1、安装对应版本的包,我这里是centos7,所以是下面的:
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2、yum安装:
yum install nginx
3、启动nginx,并将其加入开机默认启动
systemctl start nginx.servicesystemctl enable nginx.service
本文共 287 字,大约阅读时间需要 1 分钟。
1、安装对应版本的包,我这里是centos7,所以是下面的:
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2、yum安装:
yum install nginx
3、启动nginx,并将其加入开机默认启动
systemctl start nginx.servicesystemctl enable nginx.service
转载于:https://my.oschina.net/u/873934/blog/593889