php70w opcache,安装php

本文档详细介绍了如何在系统中安装EPEL和Webtatic仓库,然后卸载旧版PHP并安装PHP7.0及其相关扩展,包括fpm、mysql、xml等。接着配置Nginx服务器,设置多个location代理不同端口的服务,并展示了重要的PHP命令和参数。
摘要由CSDN通过智能技术生成

sudo yum -y install epel-release

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

sudo yum -y remove php* php-common​

sudo yum install php70w-fpm php70w-opcache

sudo yum -y install php70w-mysql php70w-xml php70w-soap php70w-xmlrpc php70w-mbstring php70w-json php70w-gd php70w-mcrypt

server {

listen 80;

server_name 106.14.112.22;

# note that these lines are originally from the "location /" block

root /usr/share/nginx/html;

index index.php index.html index.htm;

location / {

try_files $uri $uri/ =404;

}

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root /usr/share/nginx/html;

}

location ~ \.php$ {

try_files $uri =404;

fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

} }

server {

server_name example.com;

location /mail/ {

proxy_pass http://example.com:protmail/;

}

location /com/ {

proxy_pass http://example.com:portcom/main/;

}

location / {

proxy_pass http://example.com:portdefault;

}

}

有用的php参数

php --ini

php -v

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值