RPM安装nginx
精简 rpm安装Nginx
·
在阿里云镜像网站下载epel源
阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区https://developer.aliyun.com/mirror/在centos yum源里没有提供rpm包,epel源里提供了nginx rpm包。
找到对应版本的epel源配置
安装wget工具
yum -y install wget wget是liunx的命令下载工具
下载阿里提供的epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
安装nginx
yum -y install nginx
启动nginx
systemctl start nginx
关闭翻火墙
systemctl stop firewalld
访问nginx默认网页
nginx rpm安装配置文件路径默认在
/etc/nginx/nginx.conf
默认网页文件在:
/usr/share/nginx/html/
日志文件在:
/var/log/nginx/
更多推荐
已为社区贡献5条内容
所有评论(0)