<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # Swoft環境要求 現在我們來介紹如何安裝Swoft需要的環境。 ### 環境要求 * PHP > 7.1 * Swoole > 4.3.0 * PHP包管理器Composer * 連接迭代器依賴 pcre 庫 * OpenSSL PHP 擴展 * JSON PHP 擴展 * PDO PHP 擴展 (如需要使用到 MySQL 客戶端) * Redis PHP 擴展 (如需要使用到 Redis 客戶端) ### 課程實驗環境 * Linux(本文使用Centos6.8 64位) * 安裝git * PHP7.3.8 * Swoole4.4 ### 1、安裝依賴 這個根據用戶自己的需求安裝相關依賴,依賴的安裝可以根據php編譯的時候帶上的參數決定。 ```shell yum -y install \ gcc gcc-c++ wget vim make cmake automake autoconf kernel-devel ncurses-devel \ libxml2-devel pcre-devel openssl openssl-devel curl-devel libjpeg-devel \ libpng-devel pcre-devel libtool-libs freetype-devel gd zlib-devel file \ bison bison-devel patch mlocate flex diffutils readline-devel glibc-devel \ glib2-devel bzip2-devel gettext-devel libcap-devel libmcrypt-devel gmp-devel \ libxslt-devel git libevent libevent-devel perl-ExtUtils-MakeMaker package xz ``` ### 2、安裝Git ```shell yum -y remove git wget https://www.kernel.org/pub/software/scm/git/git-2.6.0.tar.gz --no-check-certificate tar zxvf git-2.6.0.tar.gz cd git-2.6.0 ./configure --prefix=/usr/local/git make make install echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile source /etc/profile ``` 給當前登陸的linux用戶設置環境變量,當你使用的賬號是非root賬號設置環境變量使用git ```shell echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bashrc source ~/.bashrc ``` 如果使用git clone出現 Peer certificate cannot be authenticated with known CA certificates 則可以關閉證書驗證解決 ```shell git config --global http.sslVerify false ``` ### 3、安裝php 我編譯的參數大家可以進行參考不一定需要跟我的一摸一樣。 ```shell wget https://www.php.net/distributions/php-7.3.8.tar.gz --no-check-certificate tar zxvf php-7.3.8.tar.gz cd php-7.3.8 ./configure --prefix=/usr/local/php \ --enable-fpm \ --with-config-file-path=/etc \ --with-libxml-dir --with-openssl \ --with-mysqli \ --enable-bcmath \ --with-bz2 \ --enable-calendar \ --with-curl \ --enable-exif \ --with-pcre-dir \ --enable-ftp \ --with-openssl-dir \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --enable-gd-jis-conv \ --with-gettext \ --with-gmp \ --with-mhash \ --enable-mbstring \ --with-onig \ --with-pdo-mysql \ --with-readline \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --with-xmlrpc \ --with-xsl \ --with-pear \ --enable-shared \ --enable-inline-optimization \ --disable-debug \ --enable-xml \ --with-sqlite3 \ --with-iconv \ --with-cdb \ --enable-dom \ --enable-fileinfo \ --enable-filter \ --enable-json \ --enable-mbregex \ --enable-mbregex-backtrack \ --enable-pdo \ --with-pdo-sqlite \ --enable-session \ --enable-simplexml \ --enable-opcache \ --enable-mysqlnd \ --with-pdo-mysql=mysqlnd \ --enable-maintainer-zts make make install ``` 建立php相關命令的軟連接 ```shell ln -s /usr/local/php/bin/php /usr/bin/php ln -s /usr/local/php/bin/phpize /usr/bin/phpize ln -s /usr/local/php/bin/php-config /usr/bin/php-config ``` ### 4、安裝Swoole擴展 我這里使用的Swoole擴展是目前最新的,編譯最新Swoole需要gcc4.8以上,如果你的gcc低于這個版本則需要升級。 ```shell gcc --version #查看版本 ``` 升級gcc的教程 升級gcc ```shell git clone https://gitee.com/swoole/swoole.git cd swoole phpize ./configure \ --with-php-config=/usr/local/php/bin/php-config \ --enable-openssl \ --enable-sockets \ --enable-mysqlnd make clean make make install ``` 關于參數問題可以參考 編譯參數 ### 5、讓php支持swoole ```shell echo "extension=swoole.so" >> /etc/php.ini ``` ### 6、安裝Redis的php擴展 Redis擴展的源碼地址:http://pecl.php.net/package/redis ```shell wget http://pecl.php.net/get/redis-5.0.2.tgz tar -zxvf redis-5.0.2.tgz cd redis-5.0.2 phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install ``` ### 錯誤解決 ```shell configure: error: Please reinstall the libzip distribution ``` 需要重新安裝 `libzip` ```shell wget https://libzip.org/download/libzip-1.5.1.tar.gz --no-check-certificate tar -zxvf libzip-1.5.1.tar.gz cd libzip-1.5.1 mkdir build cd build cmake .. make && make install ``` 注意:如果提示cmake版本過低,需新版本,則需要重新安裝cmake。 ```shell yum remove cmake wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz --no-check-certificate tar -zxvf cmake-3.10.2-Linux-x86_64.tar.gz mv cmake-3.10.2-Linux-x86_64 /usr/local/cmake echo "export CMAKE_HOME=/usr/local/cmake" >> /etc/profile echo "export PATH=$PATH:$CMAKE_HOME/bin" >> /etc/profile source /etc/profile ``` ```shell configure: error: off_t undefined; check your library configuration ``` 安裝swoole錯誤 ```shell configure.ac:3: error: Autoconf version 2.68 or higher is required ``` 需要重新安裝更高版本的 `autoconf` ```shell yum remove autoconf -y wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz tar -zxvf autoconf-2.69.tar.gz cd autoconf-2.69 ./configure make make install ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看