04-配置阿里云yum源并启动nginx服务


1.查看yum源仓库
ls /etc/yum.repos.d/

2.查看CentOs-Base.repo文件

3.配置yum源
https://opsx.alibaba.com/mirror  找到这个网站,然后找到centos7
执行下载阿里云yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all 清空yum软件源
yum makecache 生成缓存

4.查看yum源仓库

5.安装epel源,用于下载第三方额外的软件(nginx,redis等等)
yum install -y epel-release 
 
 
查看yum源仓库
ls /etc/yum.repos.d/

6.安装nginx软件测试
yum install nginx -y
 

7.系统服务管理命令
启动nginx服务
systemctl start nginx


systemctl stop nginx
systemctl restart nginx


8.此时浏览器访问 10.0.0.10
  若无法访问,则可能是防火墙没关闭。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM