在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在安装php前先安装 nginx 1.创建php用户和用户组,并在github下载php7源码 # groupadd -r www && useradd -r -g www -s /bin/false -d /usr/local/php7 -M php 2.安装编译php7时需要的依赖包# yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel 3.PHP7编译参数的配置# cd /usr/local/src # wget http://cn2.php.net/distributions/php-7.1.5.tar.gz # tar zxvf php-7.1.5.tar.gz # cd php-7.1.5 # ./configure \ --prefix=/usr/local/php7 \ --exec-prefix=/usr/local/php7 \ --bindir=/usr/local/php7/bin \ --sbindir=/usr/local/php7/sbin \ --includedir=/usr/local/php7/include \ --libdir=/usr/local/php7/lib/php \ --mandir=/usr/local/php7/php/man \ --with-config-file-path=/usr/local/php7/etc \ --with-mysql-sock=/var/lib/mysql/mysql.sock \ --with-mcrypt=/usr/include \ --with-mhash \ --with-openssl \ --with-mysql=shared,mysqlnd \ --with-mysqli=shared,mysqlnd \ --with-pdo-mysql=shared,mysqlnd \ --with-gd \ --with-iconv \ --with-zlib \ --enable-zip \ --enable-inline-optimization \ --disable-debug \ --disable-rpath \ --enable-shared \ --enable-xml \ --enable-bcmath \ --enable-shmop \ --enable-sysvsem \ --enable-mbregex \ --enable-mbstring \ --enable-ftp \ --enable-gd-native-ttf \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-soap \ --without-pear \ --with-gettext \ --enable-session \ --with-curl \ --with-jpeg-dir \ --with-freetype-dir \ --enable-opcache \ --enable-redis \ --enable-fpm \ --enable-fastcgi \ --with-fpm-user=www \ --with-fpm-group=www \ --without-gdbm \ --disable-fileinfo # make clean && make && make install
部分编译出错的环境请使用 #make ZEND_EXTRA_LIBS='-liconv'; 编译安装完成PHP7!
安装PHP7 还可参考地址 https://www.cnblogs.com/milton/p/6223813.html https://blog.csdn.net/qq_29287973/article/details/78125125 |
2022-08-17
2022-11-06
2022-08-18
2022-08-15
2022-08-16
请发表评论