安装PHP7

来源:互联网 发布:js 代码高亮插件 编辑:程序博客网 时间:2024/03/29 08:49

安装PHP7

下载PHP7

[root@shuai-01 src]# wget http://cn2.php.net/distributions/php-7.1.6.tar.bz2

解压缩:

进入PHP7源码包下,编译安装

 ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc  --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif[root@shuai-01 php-7.1.6]# echo $?0

接着make

[root@shuai-01 php-7.1.6]# echo $?0

make install

把PHP7配置文件拷贝到指定路径下

查看Apache加载的PHP模块:

[root@shuai-01 php-7.1.6]# /usr/local/apache2.4/bin/apachectl -MAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::4f59:7251:18f1:8716. Set the 'ServerName' directive globally to suppress this messageLoaded Modules: core_module (static) so_module (static) http_module (static) mpm_event_module (static) authn_file_module (shared) authn_core_module (shared) authz_host_module (shared) authz_groupfile_module (shared) authz_user_module (shared) authz_core_module (shared) access_compat_module (shared) auth_basic_module (shared) reqtimeout_module (shared) filter_module (shared) mime_module (shared) log_config_module (shared) env_module (shared) headers_module (shared) setenvif_module (shared) version_module (shared) unixd_module (shared) status_module (shared) autoindex_module (shared) dir_module (shared) alias_module (shared) php5_module (shared) php7_module (shared)

查看Apache的配置文件(/usr/local/apache2.4/conf/httpd.conf)

[root@shuai-01 php-7.1.6]# vim /usr/local/apache2.4/conf/httpd.confLoadModule dir_module modules/mod_dir.so#LoadModule actions_module modules/mod_actions.so#LoadModule speling_module modules/mod_speling.so#LoadModule userdir_module modules/mod_userdir.soLoadModule alias_module modules/mod_alias.so#LoadModule rewrite_module modules/mod_rewrite.soLoadModule php5_module        modules/libphp5.soLoadModule php7_module        modules/libphp7.so

Apache中两PHP模块,只能使用一个,另一个要注释掉

php中mysql,mysqli,mysqlnd,pdo到底是什么 http://blog.csdn.net/u013785951/article/details/60876816
查看编译参数 http://ask.apelearn.com/question/1295

原创粉丝点击