The RedHat script uses the CentOS source to update and install Nginx, PHP5.3, and Varnish.

Source: Internet
Author: User
Tags varnish
Using the CentOS yum component for RedHat is a little troublesome. For your convenience, I wrote a script for automatic configuration .... Yum uses epel and the University of Science and Technology. #/Bin/bash # byrfyiamcool # echo "nameserver8.8.8" & gt;/etc/resolv. confm

Using the CentOS yum component for RedHat is a little troublesome. For your convenience, I wrote a script for automatic configuration ....

Yum uses epel and the University of Science and Technology.

  1. #/Bin/bash
  2. # By rfyiamcool
  3. # Echo "nameserver 8.8.8.8">>/Etc/resolv. conf
  4. Mkdir/root/yum
  5. Cd/root/yum
  6. Rpm-qa | grep yum | xargs rpm-e -- nodeps
  7. If! Rpm-qa | grep yum; then
  8. Echo uninstall yum OK
  9. Else
  10. Rpm-qa | grep yum
  11. Exit
  12. Fi
  13. Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
  14. Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
  15. Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
  16. Echo dowoload cetnos-yum OK
  17. Rpm-ivh yum-*. rpm
  18. Echo install cetnos-yum OK
  19. Cd/etc/yum. repos. d
  20. Wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
  21. Rpm -- import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
  22. Cat>>Epel. repo<<EOF 
  23. [Epel]
  24. Name=ExtraPackages for Enterprise Linux 5-\ $ basearch
  25. #Baseurl=Http: // Download.fedoraproject.org/pub/epel/5/?#basearch
  26. Shortlist=Http: // Mirrors.fedoraproject.org/sharelist?Repo=Epel-5 &Arch=\$ Basearch
  27. Failovermethod=Priority 
  28. Enabled=1 
  29. Gpgcheck=1 
  30. Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
  31.  
  32. [Epel-debuginfo]
  33. Name=ExtraPackages for Enterprise Linux 5-\ $ basearch-Debug
  34. Baseurl=Http: // Download.fedoraproject.org/pub/epel/5/?#basearch/debug
  35. #Shortlist=Http: // Mirrors.fedoraproject.org/sharelist?Repo=Epel-Debug-5 &Arch=\$ Basearch
  36. Failovermethod=Priority 
  37. Enabled=1 
  38. Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
  39. Gpgcheck=1 
  40.  
  41. [Epel-source]
  42. Name=ExtraPackages for Enterprise Linux 5-\ $ basearch-Source
  43. #Baseurl=Http: // Download.fedoraproject.org/pub/epel/5/SRPMS
  44. Shortlist=Http: // Mirrors.fedoraproject.org/sharelist?Repo=Epel-Source-5 &Arch=\$ Basearch
  45. Failovermethod=Priority 
  46. Enabled=1 
  47. Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
  48. Gpgcheck=1 
  49. EOF
  50. Yum makecache
  51. Yum list httpd *
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.