liunx 环境下安装Nginx
新服务器安装中可能遇到的问题(可跳过)
- 显示Loading mirror speeds from cached hostfile;无可用安装包
方法一: 更新 yum
yum -y update
方法二: 更新可用 yum 源,这里更新为 163源
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
- yum 安装失败;(出现repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found)
方法: 重装yyum -y install wgetum (建议提前安装 wget)
- 安装wget
yum -y install wget- 删除老仓库文件
cd /etc/yum.repos.d
rm * . *- 卸载yum 包和安装组件