CentOSVPS tutorial (3) YUM source configuration

Source: Internet
Author: User
Tags centos vps vps
CentOSVPS tutorial (3) YUM source configuration on the server, you may need to install a lot of software. To build a blog, you usually need a web server that supports PHP, such as Apache and Nginx, and a relational database such as MySQL. To install software for these classes, you may need to install many software in CentOS VPS tutorial (3) configure the YUM source on the server. To build a blog, you usually need a web server that supports PHP, such as Apache and Nginx, and a relational database such as MySQL. Installing software for these classes may take a long time, including many configuration, initialization, and dependency problems. you may also need to compile some software by yourself. We can use the YUM package management software that comes with CentOS to manage the installed software, making it much easier to install, update, and delete the software. (Each Linux release usually has its own package management software, such as apt of Ubuntu) YUM's software management relies on the YUM source set in the configuration file, these YUM sources are usually managed by some companies and organizations. We can use these sources to find the software we need to install. To add a YUM source, CentOS VPS usually comes with some default YUM sources. you can view/etc/yum. repos. d/directory, 1 $ ls/etc/yum. repos. d/to view the default sources. Each *. repo file indicates a YUM source, which describes the source name, address, whether to start, check, and other information. You can add a source file *. repo under this directory. Here is my source: centOS-Base.repo 01 # CentOS-Base.repo02 #03 # The mirror system uses the connecting IP address of the client and the04 # update status of each mirror to pick mirrors that are updated to and05 # geographically close to the client. you shoshould use this for CentOS updates06 # unless you are manually picking other mirrors.07 #08 # If the specified list = does not work for you, as a fall back you can try the09 # remarked out baseurl = line instead.10 #11 #12 13 [base] 14 name = CentOS-$ releasever-base151_list = http://mirrorlist.centos.org/?release= $ Releasever & arch = $ basearch & repo = os16 # baseurl = http://mirror.centos.org/centos/ $ Releasever/OS/$ basearch/17 gpgcheck = 118 enabled = 119 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-520 21 # released updates22 [updates] 23 name = CentOS-$ releasever-Updates24mirrorlist = http://mirrorlist.centos.org/?release= $ Releasever & arch = $ basearch & repo = updates25 # baseurl = http://mirror.centos.org/centos/ $ Releasever/updates/$ basearch/26 gpgcheck = 127 enabled = 128 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-529 30 # additional packages that may be useful31 [extras] 32 name = CentOS-$ releasever-Extras33mirrorlist = http://mirrorlist.centos.org/?release= $ Releasever & arch = $ basearch & repo = extras34 # baseurl = http://mirror.centos.org/centos/ $ Releasever/extras/$ basearch/35 gpgcheck = 136 enabled = 137 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-538 39 # additional packages that extend functionality of existing packages40 [centosplus] 41 name = CentOS-$ releasever-Plus42mirrorlist = http://mirrorlist.centos.org/?release= $ Releasever & arch = $ basearch & repo = centosplus43 # baseurl = http://mirror.centos.org/centos/ $ Releasever/centosplus/$ basearch/44 gpgcheck = 145 enabled = 046 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-547 48 # contrib-packages by Centos Users49 [contrib] 50 name = CentOS-$ releasever-contrib511_list = http://mirrorlist.centos.org/?release= $ Releasever & arch = $ basearch & repo = contrib52 # baseurl = http://mirror.centos.org/centos/ $ Releasever/contrib/$ basearch/53 gpgcheck = 154 enabled = 0 if you are in the education network IPv6 Environment (IPv4 can also be used), you can add the source of the Tsinghua open source image site, fast tsinghua. repo 01 [base] 02 name = CentOS-6-Base03repo = os04baseurl = http://mirrors.tuna.tsinghua.edu.cn/centos/6.4/os/ $ Basearch/05 gpgcheck = 106 gpgkey = http://mirrors.tuna.tsinghua.edu.cn/centos/RPM-GPG-KEY-CentOS-6 07 08 [update] 09 name = CentOS-6-Updates10baseurl = http://mirrors.tuna.tsinghua.edu.cn/centos/6.4/updates/ $ Basearch/11 gpgcheck = 112 gpgkey = http://mirrors.tuna.tsinghua.edu.cn/centos/RPM-GPG-KEY-CentOS-6 13 14 [extras] 15 name = CentOS-6-Extras16baseurl = http://mirrors.tuna.tsinghua.edu.cn/centos/6.4/extras/ $ Basearch/17 gpgcheck= 118 gpgkey = http://mirrors.tuna.tsinghua.edu.cn/centos/RPM-GPG-KEY-CentOS-6 19 20 [centosplus] 21 name = CentOS-6-Plus22baseurl = http://mirrors.tuna.tsinghua.edu.cn/centos/6.4/centosplus/ $ Basearch/23 gpgcheck = 124 enabled = 025 gpgkey = http://mirrors.tuna.tsinghua.edu.cn/centos/RPM-GPG-KEY-CentOS-6 26 27 [contrib] 28 name = CentOS-6-Contrib29baseurl = http://mirrors.tuna.tsinghua.edu.cn/centos/6.4/contrib/ $ Basearch/30 gpgcheck= 131 enabled = 032 gpgkey = http://mirrors.tuna.tsinghua.edu.cn/centos/RPM-GPG-KEY-CentOS-6 After adding YUM, update yum, 1 # yum check-update to complete the addition of YUM source. To install a software package, for example, install git, run the following command: 1 # yum install git update software package check for updates first, and update the software package according to the returned requirements. 1 # if yum check-update returns the following update information, 1java-1.7.0-openjdk.i386. 7.0.25-2.3.10.4.el5 _ 9 updates indicates that openjdk1.7 has an update, run the following command to update, 1 # yum update java-1.7.0-openjdk.i386 to delete a software package such as, delete git, run, 1 # yum delete git
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.