您好,登錄后才能下訂單哦!
安裝之前:
centos下: yum -y install gcc pcre-devel curl-devel libxml2-devel libpng-devel libmcrypt-devel libjpeg-devel openssl-devel libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 ubuntu下: apt-get -y install libxml2-dev libxml2 libpng-dev zlib1g-dev openssl libssl-dev libcurl4-gnutls-dev libjpeg-dev libpng-dev libfreetype6-dev --force-yes wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz tar -zxvf libmcrypt-2.5.7.tar.gz cd libmcrypt-2.5.7 ./configure --prefix=/usr/local/libmcrypt make && make install
下載安裝php5.6:
wget -c http://au1.php.net/get/php-5.6.8.tar.gz/from/this/mirror tar -zxvf mirror cd php-5.6.8/ ./configure --enable-fpm --enable-soap --enable-sockets --enable-zip --with-curl --with-mysql=/usr/local/mysql-5.5.41-linux2.6-x86_64 --with-mysqli=/usr/local/mysql-5.5.41-linux2.6-x86_64/bin/mysql_config --with-gd --with-openssl --with-pdo-mysql=/usr/local/mysql-5.5.41-linux2.6-x86_64 --prefix=/usr/local/php --with-iconv --with-mcrypt=/usr/local/libmcrypt --with-freetype-dir==/usr/lib64/ --with-jpeg-dir=/usr/lib64/ --with-gd make && make install
下載安裝php7.0.2
wget -c http://cn2.php.net/distributions/php-7.0.2.tar.gz tar -xzxvf php-7.0.2.tar.gz cd php-7.0.2 ./configure --enable-fpm --enable-soap --enable-sockets --enable-zip --with-curl --with-mysqli=/usr/local/mysql-5.5.41-linux2.6-x86_64/bin/mysql_config --with-gd --with-openssl --with-pdo-mysql=/usr/local/mysql-5.5.41-linux2.6-x86_64 --prefix=/usr/local/php --with-iconv --with-mcrypt=/usr/local/libmcrypt --with-freetype-dir==/usr/lib64/ --with-jpeg-dir=/usr/lib64/ --with-gd make && make install cp php.ini-development /usr/local/php/lib/php.ini vi /etc/profile 在最低部添加 PATH=$PATH:/usr/local/php/bin export PATH source /etc/profile cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod +x /etc/init.d/php-fpm vi /usr/local/php/etc/php-fpm.d/www.conf 修改 user = www group = www groupadd www useradd -g www www /etc/init.d/php-fpm restart
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。