# centos6_64位操作系统
安装epel源(速度快,首选):
rpm -ivh http://mirrors.zju.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
各种网络yum仓库:
网易centos6源(速度快,首选):
wget -O /etc/yum.repos.d/6CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
sed -ri 's/\$releasever/6/g' /etc/yum.repos.d/6CentOS-Base.repo 修改yum源文件(必做)
说明:由于官网的yum仓库目录版本中没有6server目录,而直接是用的版本号6,所以必须sed替换才能正常使用。
centos6安装epel源(已测OK,但有点慢):
首选:rpm -Uvhhttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
备用:rpm -Uvhhttp://mirrors.ustc.edu.cn/epel/epel-release-latest-6.noarch.rpm
centos6的zabbix源(官网首选):
6zabbix-2.4:rpm -ivhhttp://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
6zabbix-3.2(兼容性不好,可能无法安装): http://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/
网易centos7源(速度快,首选):
wget -O /etc/yum.repos.d/7CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
sed -ri 's/\$releasever/7/g' /etc/yum.repos.d/7CentOS-Base.repo 修改yum源文件(必做)
centos7安装epel源(已测OK):
rpm -Uvhhttp://mirrors.ustc.edu.cn/epel/epel-release-latest-7.noarch.rpm
centos7的zabbix源(官网首选):
7zabbix-2.4: rpm -ivhhttp://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
7zabbix-3.2: rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
centos6的网络yum源(阿里云,速度慢):
centos6源: wget -O /etc/yum.repos.d/6CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
sed -ri 's/\$releasever/6/g' /etc/yum.repos.d/6CentOS-Base.repo 修改yum源文件(必做)
6epel源:wget -O /etc/yum.repos.d/6epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
centos7的网络yum源(阿里云,速度慢):
centos7源: wget -O /etc/yum.repos.d/7CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
7epel源:wget -O /etc/yum.repos.d/7epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
####技巧:下载网络yum源中的rpm软件包到本地。#######
1、安装插件。
yum install -y yum-plugin-downloadonly
2、用yum下载要安装的软件及其依赖包。
下载Nginx软件:
yum install -y --downloadonly --downloaddir=/soft/Nginx/ Nginx
下载ansible软件:
yum install -y --downloadonly --downloaddir=/soft/ansible/ ansible
下载saltstack-master和saltstack-agent软件:
yum install -y --downloadonly --downloaddir=/soft/saltstack/ salt-master salt-minion
下载tomcat6软件:
yum install -y --downloadonly --downloaddir=/soft/tomcat6*/ tomcat6*
下载zabbix2.4软件包:
yum install -y --downloadonly --downloaddir=/soft/zabbix/ zabbix-server zabbix-agent zabbix-server-MysqL zabbix-web-MysqL
createrepo /soft/
原文链接:https://www.f2er.com/centos/376161.html