因为不少新手问我怎么作编译安装,因此就蛮整理一下。学会编译安装,不管是开发或者运维,都是皆要掌握的硬性要求
。php
yum install libxml2-devel bzip2-devel libcurl-devel libpng-devel libXpm-devel libjpeg-turbo-devel gmp-devel freetype-devel libvpx-devel krb5-devel zlib-devel pcre-devel pam-devel openssl openssl-devel libmcrypt libmcrypt-devel
libmcrypt libmcrypt-devel 可能不存在
须要添加repo
yum install epel-release
yum install libmcrypt libmcrypt-develmysql
PHP7.2 enable-gd-native-ttf with-mcrypt 已经不支持
cp php-fpm.conf.default php-fpm.conf
cp www.conf.default www.conf
cp php.ini-production /opt/php7/etc/php.ini 从源码包复制php.ini配置nginx
yum install gcc #编译须要
yum install -y pcre-devel #rewrite
yum install -y zlib-devel #HTTP gzip
yum install openssl* #支持ssl
wget http://nginx.org/download/ngi...
tar xvzf nginx-1.11.5.tar.gz
./configure --prefix=/opt/nginx --user=www --group=www --with-http_ssl_module --with-pcre
make && make installsql
./configure --help
./configure
--prefix=/opt/nginx
--user=apache
--group=apache
--with-http_stub_status_module:支持nginx状态查询
--with-http_ssl_module:支持https
--with-http_spdy_module:支持google的spdy,想了解请百度spdy,这个必须有ssl的支持
--with-pcre:为了支持rewrite重写功能,必须制定pcreapache