Job One: RPM command
Mount the disc file to the/media directory
mount -t auto /dev/cdrom /media
Go in the Packages directory under the/media directory
cd /media/Packages
View all RPM packages that the system has installed
rpm -qa
To see if the system installs DHCP packages
rpm -qa | grep dhcp
Installing DHCP Packages
rpm -ivh dhclient-4.2.5-47.el7.centos.x86_64.rpm
Viewing information for DHCP packages
rpm -qip dhclient-4.2.5-47.el7.centos.x86_64.rpm
Look at all the files contained in the DHCP software package
rpm -qlp dhclient-4.2.5-47.el7.centos.x86_64.rpm
See which package/bin/ls files are generated by
rpm -qf /bin/ls
Uninstalling a DHCP package
rpm -e dhclient-4.2.5-47.el7.centos.x86_64 --nodeps
Job Two: Yum command
0. Using the local iOS image RPM package to make a Yum source
mkdir /etc/backup mv /etc/yum.repos.d/* /etc/backup/ //备份yum配置cat /etc/yum.repos.d/myyum.repo //创建自己的配置文件[cx2c]name=myyumsourcebaseurl=file:///cx2cgpgcheck=0cp /media/Packages/* /cx2c/ //copy IOS镜像里的rpm包mkdir /cx2c/repoodata && cp -R /media/repodata/* /cx2c/repodata/yum clean all //清除yum缓存yum repolist
Yum List view Add source succeeded
Customizing the Yum repository: Createrepo
Install the Createrepo command
yum install createrepo
Create a storage path for the source
mkdir /yum/centos/7/x86_64
Download RPM package from Sohu Image station
wget -r -c -nH http://mirrors.sohu.com/centos/7/os/x86_64/
Initializing Repodata Information
createrepo -p -d -o /yum/centos/7/x86_64/centos/7/os/x86_64 /yum/centos/7/x86_64/centos/7/os/x86_64
Add Local.repo Source Configuration file
cd /etc/yum.repos.d/cat Local.repo[cx2c]name=cx2cbaseurl=file:///yum/centos/7/x86_64/centos/$releasever/os/$basearch/enable=0gpgcheck=0gpgkey=
See if the local Yum source added success:: Success!
yum repolist
Customizing the Repo file
See above
HTTPD package for loading and unloading:
yum install https yum –y remove httpd
Installing components ' KDE Desktop ' using Yum
yum groupinstall ‘KDE Plasma Workspace‘ //本机最小化安装所以先略过这步
Mastering the use of Yum to remove components ' KDE desktop '
yum –y groupremov ‘KDE Plasma Workspace‘
Mastering the Purge Yum cache
yum clean all
Find Packages using Yum
yum search zlib-*
Job Three: Source installation python
// readline-devel python shell里 方向键可用// 机器默认是2.7,安装完之后需要把python命令链接到3.6 yum -y install zlib zlib-devel gcc readline-develwget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz xz -d Python-3.6.1.tar.xztar -xvf Python-3.6.1.tarcd Python-3.6.1/./configuremake allmake installrm /bin/pythonln -s /usr/local/bin/python3.6 /bin/python
Job Four: Samba services
略
7-rpm-yum-pythonbain Compiling and installing