php7的编译安装高性能的php喜欢的朋友们可以看下哦

linux中安装php7

# 安装mcrypt

yum install -y php-mcrypt libmcrypt libmcrypt-devel

编译PHP7

# 下载源代码

wget  https://downloads.php.net/~ab/php-7.0.0RC5.tar.gz
tar zxvf php-7.0.0RC5.tar.gz

cd php-7.0.0RC5

# 配置参数

 

编译
make

make install

配置php
cp php.ini-production /usr/local/php7/etc/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm
chmod +x /etc/init.d/php7-fpm
cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf

 

vim /usr/local/php7/etc/php.ini
# 加入
zend_extension=/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/opcache.so
# 启动
/etc/init.d/php7-fpm start
# 查看PHP版本
/usr/local/php7/bin/php -v
为了安全最好是去掉头信息  X-Powered-By: PHP/7.*.*
则修改 php.ini 文件 设置 expose_php = Off

vim /usr/local/php7/etc/php.ini

找到 expose_php = On
改为 expose_php = Off

php7的编译安装高性能的php喜欢的朋友们可以看下哦》有1个想法

  1. Hello, i read your blog from time to time and i own a similar one and i was
    just wondering if you get a lot of spam feedback?
    If so how do you prevent it, any plugin or anything you can recommend?
    I get so much lately it’s driving me crazy so
    any assistance is very much appreciated.

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*