1th Chapter yum1.1 Command description
Yum is a RPM-based package Manager that enables system managers to interact and automate finer and more granular management of RPM packages, and he can automatically download RPM packages from the server and install them, and he can automatically handle dependencies and automatically install all required packages
1.2 Command format
Yum [Options] Parameters
1.3 Command Options
1.3.1-y prompts "yes" for all interactions
1.3.2-q Quiet mode, does not output the installation process
1.3.3 Install the specified package
1.3.4 Remove Uninstalls the specified installation package
1.3.5 Update updates the specified RPM package
1.3.5.1 Makecache Generate local cache
1.3.6 clean all clears stale cache for all Yum
1.3.7 Localinstall Install the local RPM package (automatically resolves if there is a dependency)
1.3.8 List Display lists
1.3.9 grouplist display of available package groups
1.3.10 Groupinstall Installing package groups
1.3.11 groupupdate Update Package Group
1.3.12 Groupremove Deleting a package group
1.4 Local Yum Source, and the network of Yum source 1.4.1 local Yum source
When we build the local Yum source, we need to use the image file, an image file of 3.7 g containing all the RPM package
The first step in building a local Yum source is to mount the disc
Mount/dev/cdrom/mnt Temporary Mount
echo "Mount/dev/cdrom/mnt" >>/etc/rc.local written to the boot from the file, to achieve the effect of permanent mount, convenient for us to use later
Then go to the/ect/yum.repos.d/directory, delete the other files under this directory (not recommended), or cut away.
Then start writing a Xxxx.repo file that must end in. Repo
[[email protected]_50 yum.repos.d]# cat >>Centos.repo<<EOF> [Centos_local_yum]> name=Centos_local_install> baseurl=file:///mnt> enabled=1> gpgcheck=0> EOF第一行:本地仓库的说明信息第二行:本地仓库的名称第三行:通过哪种方式来确定yum源的地址 file:// 本地文件 http:// 通过http协议访问 ftp:// 通过ftp访问,集群定制软件仓库最常用的方法第四行:是否启动这个源,0表示不启用,1表示启用第五行:是否检测,我们基本上都选择0,不检测然后便可以使用了
1.4.2 Build Network Yum Source
Prerequisites: The server must be able to access the Internet through the domain name, the environment ready to start operation
Find a domestic Yum source-Ali's Yum Source: Https://opsx.alibaba.com/mirror
Find the right Yum source
Then copy the above command down to the server to download it.
Wget-o/etc/yum.repos.d/centos-base.repo Http://mirrors.aliyun.com/repo/Centos-6.repo
Sed-i ' s# $releasever #6.9#gp ' Centos-base.repo Replace the version of the model with your current system version
Yum Clean all first empties the previous local cache
Yum Makecache generate local cache
can be used normally
1.4.3 development of local Yum warehouses
Work scenario: In the actual work environment, our cluster server has a lot of is not directly access to the external network, we install software when it is not possible to mount a CD on each server (time-consuming and laborious), this time we need to find a service to act as a local Yum source server. To customize our own need for a software repository. What needs to install the software, we directly put on this server, because in the intranet, so the network transmission speed, the realization of high-speed, high-efficiency installation.
We are using FTP to build the local Yum repository today.
1) Install VSFTP service,
yum -y install vsftpd
2) Install the necessary packages for the specified Yum warehouse Createrepo.noarch
yum -y install createrepo.noarch 生成yum索引的时候需要
3) Create the packet directory under the/VAT/FTP directory
mdkir -p /var/ftp/Packet然后把我们定制需要的rpm包上传至这个里面。
4) then execute the command to generate the Yum index list
cd /var/ftp/ ; createrepo ./
5) Turn off the firewall or release the FTP port
关闭的命令 /etc/init.d/iptables stop 最好执行两次以上放行端口的命令 iptables -I INPUT -p tcp --dprot 21 -j ACCEPT iptables -I INPUT -p tcp --dprot 20 -j ACCEPT
6) then configure it to the client, just change the baseurl.
[[email protected]_50 yum.repos.d]# cat >>Centos.repo<<EOF> [Centos_local_yum]> name=Centos_local_install> baseurl=ftp://yum_server_IP/Packet> enabled=1> gpgcheck=0> EOF
2nd RPM Package Management Tool 2.1 command description
RPM原本是Red Hat Linux 发行版专门用来管理LInux各项套件的程序,由于他遵循GPL规则且功能强大方便,因此广受欢迎。yum相当于他的升级版本,它不能自动解决依赖关系,需要自己手动的解决依赖关系,比较麻烦。
2.2 Command format
RPM [options] Parameters
2.3 command Options
2.3.1-i (install) install package
2.3.2-v Show installation process
2.3.3-h Use # to represent progress
Install Rsync Package
Rpm-ivh rsync-3.0.6-12.el6.x86_64.rpm
2.3.4-q Inquiry mode, the rpm command asks the user
2.3.5-l list all file locations generated by the package installation
[[email protected]_50 packages]# RPM-QL openssh-5.3p1-122.el6.x86_64/etc/ssh/etc/ssh/moduli/usr/ bin/ssh-keygen/usr/libexec/openssh/usr/libexec/openssh/ssh-keysign/usr/share/doc/openssh-5.3p1/usr/share/doc/ openssh-5.3p1/credits/usr/share/doc/openssh-5.3p1/changelog/usr/share/doc/openssh-5.3p1/install/usr/share/doc/ openssh-5.3p1/licence/usr/share/doc/openssh-5.3p1/overview/usr/share/doc/openssh-5.3p1/protocol/usr/share/doc/ openssh-5.3p1/protocol.agent/usr/share/doc/openssh-5.3p1/protocol.certkeys/usr/share/doc/openssh-5.3p1/readme/ usr/share/doc/openssh-5.3p1/readme.dns/usr/share/doc/openssh-5.3p1/readme.nss/usr/share/doc/openssh-5.3p1/ readme.platform/usr/share/doc/openssh-5.3p1/readme.privsep/usr/share/doc/openssh-5.3p1/readme.smartcard/usr/ Share/doc/openssh-5.3p1/readme.tun/usr/share/doc/openssh-5.3p1/todo/usr/share/doc/openssh-5.3p1/warning. rng/usr/share/man/man1/ssh-keygen.1.gz/usr/share/man/man8/ssh-keysign.8.gz
2.3.6-A query all installed packages, with grep, and query packages for installation
[[email protected]_50 Packages]# rpm -qa | grep sshopenssh-clients-5.3p1-122.el6.x86_64openssh-5.3p1-122.el6.x86_64openssh-server-5.3p1-122.el6.x86_64libssh2-1.4.2-2.el6_7.1.x86_64
2.3.7-c Query the configuration associated with the specified package, the file of the service process
[[email protected]_50 Packages]# rpm -qc openssh-server-5.3p1-122.el6.x86_64/etc/pam.d/ssh-keycat/etc/pam.d/sshd/etc/ssh/sshd_config/etc/sysconfig/sshd
2.3.8-f through files, query which RPM package belongs to
[[email protected]_50 Packages]# rpm -qf `which ssh-keygen` openssh-5.3p1-122.el6.x86_64
2.3.9-i Query The version information of the package, description information
[[email protected]_50 packages]# Rpm-qi Openssh-5.3p1-122.el6.x86_64name:openssh Relocations: (not relocatable) Version:5.3p1 vendor:centosrelease:122.el6 Build date:wed 04:33:21 am edtinstall date:tue Jul 2018 11:13:19 am EDT build Ho St:c1bm.rdu2.centos.orggroup:applications/internet Source rpm:openssh-5.3p1-122.el6.src.rpmsize: 787618 license:bsdsignature:rsa/sha1, Thu 10:58:59 AM EDT, Key ID 0946fca2c105 B9depackager:centos Buildsystem
2.3.10-E uninstalling the specified package
[Email protected]_50 packages]# rpm-e openssh-5.3p1-122.el6.x86_64
3rd. Compiling and installing3.1 Compiled and installed trilogy:./configure----->make----------->make Install
Linux Package Installation--Three devil