First, the deployment of private repo source
1, download the official repository needs:
rsync -avrt --delete rsync://mirrors.ustc.edu.cn/centos/7/cloud/x86_64/openstack-pike /export/download/cloud/
2. Install the package:
yum install yum-utils createrepo nginx -y
3. Create yum source repository:
cd /export/download/ && createrepo cloud
4, create and edit the nginx configuration file:
/etc/nginx/conf.d/ Vim repo.conf #repo the conf Server { the listen 8080 ; ######## from a domain ####### server_name open.yunwei.edu; access_log / var / log / Nginx / repo.log; the error_log / var / log / Nginx / repoerr.log; LOCATION / { the root / Export / downloads / Cloud; autoindex ON; } }
5, open the browser, to verify:
http://ip:8080
Second, ISO image build private source repository yum
In general there is no optical drive on the server, we need to produce their own local ISO image a warehouse source:
By local ISO image, Copy to a Linux system directory, the pseudo file system is mounted, the following command:
Mount: Mount -o -t iso9660 CentOS- Loop 7.3 -x86_64-DVD- 1611 .iso directory names such as: Mount -o -t iso9660 CentOS- Loop 7.3 -x86_64-DVD- 1611 .iso / mnt unload mount: for example, : umount / mnt
1, in /etc/yum.repos.d/ catalog, establish repo source file
vim .repo name [name] name = Comment baseurl = file: // path mount Enabled. 1 = gpgcheck = 0
Note: gpg keys detection support; 0 is no and 1 is allowed;
Gpg keys to specify the path and name: gpgcheck = file: /// etc / pki / rpm-gpg / RPM-GPG-Test
2, clear the cache
yum clean all
3, establish metadata cache
yum makecache
4, installation of software testing
yum install tree -y
Third, the network source cache settings
[ren11 the root @ ~] # Vim / etc / yum .conf [main] cacheDir = / var / Cache / yum / basearch $ / $ the releasever keepcache = 0 # 1 is turned on to buffer
Four, yum commonly used commands
yum repolist All software lists all the local pool information yum Groups List View package group (group list) yum install PACKAGE1 install the specified installation package yum Groups install "GROUPS1" to install the specified program group yum Update Update All yum Update PACKAGE1 update the specified packages yum the Remove PACKAGE1 delete the specified package yum groups the Remove "gROUP1" Remove programs group group1 yum -y install yum -utils * install yum plugin yumdownloader download only the package name is not installed
yum history History feature rollback, the most important thing is to rely on the joint be deleted
yum history View History yum history list Name / ID search in the history of a package yum history undo ID rollback
Five, Linux character and graphical interface to mount the switch of the two interfaces
1, see the yum software charter
yum groups list
2, select the server installed with the GUI
yum groups install "Server with a GUI"
3, is switched to the character interface graphical interface
Meet switch to a graphical character: startx Crt inside exit graphic: Ctrl + C
4, the current configuration of the interface get started
systemctl get-default
5, reboot into the next set of interface: Character / Graphics
[root @ ren11 ~] # systemctl set-default multi-user.target next boot is set to launch the character of [root @ ren11 ~] # systemctl set-default graphical.target set to start next boot into a graphical [root @ ren11 ~] # reboot reboot