yum 升级curl_centos7 yum升级curl支持http2测试

***** 亿般-push 配置参考******

rpm -ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm

vi /etc/yum.repos.d/city-fan.org.repo

enabled的值0改成1,如下

[cityfan]

name=cityfan

baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/

# Centos7系统用 baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/

enabled=1

gpgcheck=0

yum upgrade libcurl

***注意:如果升级时提示Requires: libnghttp2.so.14()(64bit)错误时,可以使用安装epel源来解决,安装方法如下:

yum install epel-release -y

然后继续执行上面命令

测试:

curl --http2 -I https://nghttp2.org/

others

=================================

参考

yum升级curl支持http2测试

https://www.cnblogs.com/lazyfang/p/8040493.html

Centos7 yum安装LNMP

https://www.cnblogs.com/ivy-zheng/p/10987431.html

centos7下使用yum方式安装PHP7

https://www.cnblogs.com/pandawan/p/11100311.html

[关闭防火墙]

# 临时

systemctl stop firewalld

# 永久

systemctl disable firewalld

[nginx]

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx

service nginx start

测试:

curl http://localhost

nginx位置:/etc/nginx/

www默认位置:/usr/share/nginx/html

如果有php,要先启动php-fpm:(见下节)

systemctl start php-fpm

重启: service nginx restart

[php]

使用以下命令将yum仓库包升级更换成PHP7的rpm包

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

先使用yum命令安装基本PHP组件,以后要用到啥再安装啥

yum -y install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64

再安装PHP-fpm(进程管理器,提供PHP进程管理方式,可以有效控制内存和进程、平滑重载PHP配置)

yum -y install php70w-fpm php70w-opcache

安装完之后启动php-fpm

systemctl start php-fpm

查看版本以检测是否安装成功

php -v

检测PHP是否能与Nginx互通

1.在Nginx的默认HTML文件夹里(/usr/local/webserver/nginx/html/)新建一个index.php,内容如下:

phpinfo();

?>

2.修改Nginx的配置文件(可使用find /|grep nginx.conf搜索配置文件位置)Nginx.conf,修改新增如下:

复制代码

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

# proxy_pass http://127.0.0.1;

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php$ {

root /usr/share/nginx/html;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值