RedHat脚本改用CentOS源更新安装Nginx、PHP 5.3、Varnish
RedHat改用CentOS的yum组件,步骤有点麻烦,为了方便大家,写了个脚本的自动配置。。。。
yum源用的是epel和科技大学的。
- #/bin/bash
- #by rfyiamcool
- #echo "nameserver 8.8.8.8" >>/etc/resolv.conf
- mkdir /root/yum
- cd /root/yum
- rpm -qa|grep yum|xargs rpm -e --nodeps
- if ! rpm -qa|grep yum ;then
- echo uninstall yum ok
- else
- rpm -qa |grep yum
- exit
- fi
- wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
- wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
- wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
- echo dowoload cetnos-yum ok
- rpm -ivh yum-*.rpm
- echo install cetnos-yum ok
- cd /etc/yum.repos.d
- wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
- rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
- cat >> epel.repo <<EOF
- [epel]
- name=Extra Packages for Enterprise Linux 5 - \$basearch
- #baseurl=http://download.Fedoraproject.org/pub/epel/5/\$basearch
- mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=\$basearch
- failovermethod=priority
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
- [epel-debuginfo]
- name=Extra Packages for Enterprise Linux 5 - \$basearch - Debug
- baseurl=http://download.fedoraproject.org/pub/epel/5/\$basearch/debug
- #mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=\$basearch
- failovermethod=priority
- enabled=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
- gpgcheck=1
- [epel-source]
- name=Extra Packages for Enterprise Linux 5 - \$basearch - Source
- #baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
- mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=\$basearch
- failovermethod=priority
- enabled=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
- gpgcheck=1
- EOF
- yum makecache
- yum list httpd*
相关推荐
IT之家 2020-03-11
graseed 2020-10-28
zbkyumlei 2020-10-12
SXIAOYI 2020-09-16
jinhao 2020-09-07
impress 2020-08-26
liuqipao 2020-07-07
淡风wisdon大大 2020-06-06
yoohsummer 2020-06-01
chenjia00 2020-05-29
baike 2020-05-19
扭来不叫牛奶 2020-05-08
hxmilyy 2020-05-11
黎豆子 2020-05-07
xiongweiwei00 2020-04-29
Cypress 2020-04-25
冰蝶 2020-04-20