6 软件管理
6.2 配置epel仓库,安装nginx,不需要启动nginx服务(systemctl start nginx)
-
针对系统架构选择相应的类型:http://dl.fedoraproject.org/pub/epel/7/。我们使用的x86_64,就要进入该目录下寻找相应包,安装方法如下:
[root@localhost ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-
更新数据
[root@localhost ~]# yum clean all
-
查看仓库信息
[root@localhost ~]# yum repolist
-
安装nginx
[root@localhost ~]# yum -y install nginx
-
启动nginx服务
[root@localhost ~]# nginx
-
测试
- 还有第二种方法
配置文件
去清华镜像复制内容
https://mirrors.tuna.tsinghua.edu.cn/help/epel/
然后配置仓库文件