网站首页 博客 centos7安装php72
centos7安装php72
1.
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
2.
yum install php72w-fpm
yum install php72w-bcmath php72w-gd php72w-json php72w-mbstring php72w-mcrypt php72w-mysqlnd php72w-pdo php72w-soap php72w-xml php72w-exif php72w-curl
3.
/etc/php-fpm.conf
/etc/php.ini
4.
systemctl enable php-fpm
systemctl start php-fpm
5.apache
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/www/xuexi/web/$1
6.nginx
server {
listen 80;
server_name xuexi.iefeel.com;
access_log /var/log/nginx/xuexi_access.log;
error_log /var/log/nginx/xuexi_error.log;
location / {
root /usr/www/xuexi/web;
index index.html index.php;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
root /usr/www/xuexi/web;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param s.c.r.i.p.t_FILENAME $document_root$fastcgi_s.c.r.i.p.t_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}