Chapter IV deploying yum warehouse services
1. notes
systemctl start command: reboot
systemctl enable command: boot from the start
netstat -anput | grep command: See if open
echo $:? determine whether the command is executed successfully, 0 on success, non-zero unsuccessful
yum provides package: Check the package name
2. Based on the FTP : // local CD-ROM to create the y- UM warehouse processes
-Y ftp the install yum (installed ftp package)
umount / dev / SR0 (uninstalled CD / dev / SR0 )
mkdir / var / FTP / centos7 (creates directories in / var / FTP / centos7 )
Mount / dev / sr0 / var / FTP / centos7 / (mount / dev / sr0 mount / var / FTP / centos7 )
/etc/yum.repos.d/local.repo vim (editors /etc/yum.repos.d/local.repo )
[local] (warehouse name)
= local name (warehouse name)
baseurl = ftp: //192.168.203.4 ( local address ) / centos7 (designated rpm package position)
= 0 gpgcheck (disable gpg check)
1 = Enabled (enable local yum repository)
Clean All -Y yum (buffer empty)
makecache yum (reconstruction cache)
Yum yum repository configuration 3.centos7 online sources and source EPEL
http://rpm.pbone.net/
http://rpmfind.net/
rpm-Uvhhttps://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- After completion of the mirror mount and into the /etc/yum.repos.d After you create a folder under the file backup
cd /etc/yum.r*
mkdir a/
mv C* a/
2. Download the new CentOS-Base.repo to /etc/yum.repos.d/ or after downloading files to a virtual machine /etc/yum.repos.dxia under
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3 , after running yum -y clean all clear the cache, run yum makecache generate new cache
[root@bogon yum.repos.d]# yum -y clean all
[root@bogon yum.repos.d]# yum makecache
Installation EPEL source
[root@bogon yum.repos.d]# yum list | grep epel-release
epel-release.noarch 7-9 extras
[root@bogon yum.repos.d]# yum install -y epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-9 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================
Installing:
epel-release noarch 7-9 extras 14 k
Transaction Summary
==================================================================================================================================
Install 1 Package
Total download size: 14 k
Installed size: 24 k
Downloading packages:
epel-release-7-9.noarch.rpm | 14 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-9.noarch 1/1
Verifying : epel-release-7-9.noarch 1/1
Installed:
epel-release.noarch 0:7-9
Complete!
[root@bogon yum.repos.d]# ls
#多了epel.repo和epel-testing.repo
CentOS-Base.repo epel.repo epel-testing.repo repo_bak
运行yum clean all 清除缓存,运行 yum makecache 生成新的缓存
[root@bogon yum.repos.d]# yum repolist enabled #查看启用的仓库
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.ustc.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 9,591
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,277
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 388
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 1,929
repolist: 24,185
[root@bogon yum.repos.d]# yum repolist all #查看所有的仓库
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.ustc.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com enabled: 9,591
centosplus/7/x86_64 CentOS-7 - Plus - mirrors.aliyun.com disabled
contrib/7/x86_64 CentOS-7 - Contrib - mirrors.aliyun.com disabled
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 enabled: 12,277
epel-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 - Debug disabled
epel-source/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 - Source disabled
epel-testing/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 disabled
epel-testing-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Debug disabled
epel-testing-source/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Source disabled
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com enabled: 388
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com enabled: 1,929
repolist: 24,185