PHP7.0安装步骤
[root@ser3 Desktop]# wget http://cn2.php.net/distributions/php-7.0.4.tar.gz
[root@ser3 Desktop]# rpm -qa libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 curl-devel libxslt-devel openssl-devel
[root@ser3 Desktop]# yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxslt-devel openssl-devel
[root@ser3 Desktop]# tar xf php-7.0.4.tar.gz
[root@ser3 Desktop]# cd php-7.0.4
[root@ser3 php-7.0.4]# ./configure --prefix=/usr/local/php7 --exec-prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --with-zlib-dir --with-mhash --with-mcrypt --with-openssl-dir --with-jpeg-dir --enable-gd-jis-conv --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip
[root@ser3 php-7.0.4]# make
[root@ser3 php-7.0.4]# make test
[root@ser3 php-7.0.4]# make install
[root@ser3 php-7.0.4]# cp php.ini-production /usr/local/php7/etc/php.ini
[root@ser3 php-7.0.4]# cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
[root@ser3 php-7.0.4]# cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf
[root@ser3 php-7.0.4]# cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@ser3 php-7.0.4]# chmod +x /etc/init.d/php-fpm
[root@ser3 php-7.0.4]# chkconfig --add php-fpm
[root@ser3 php-7.0.4]# /etc/init.d/php-fpm start
[root@ser3 php-7.0.4]# ps -ef | grep php-fpm
错误1:configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
[root@wtj-web-01 php-7.0.4]# yum -y install curl-devel
执行成功如下
错误2:configure: error: mcrypt.h not found. Please reinstall libmcrypt.
[root@wtj-web-01 php-7.0.4]# wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
[root@wtj-web-01 php-7.0.4]# tar -zxvf libmcrypt-2.5.7.tar.gz
[root@wtj-web-01 php-7.0.4]# cd libmcrypt-2.5.7
[root@wtj-web-01 php-7.0.4]# ./configure --prefix=/usr/local/libmcrypt
[root@wtj-web-01 php-7.0.4]#make && make install
今天的文章linux安装php7.3_php的安装和配置教程分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/82523.html