Two use yum

pingrpm management packages:
rpm command manager: for dependencies, rpm command selections to ignore (not installed);
Use steps:
1. Connect the optical disc, the optical disk mounted in the system;
Mount / dev / CDROM / mnt
2. Use rpm command to install or uninstall;
installation: rpm -ivh /mnt/Packages/*.rpm --nodeps
uninstall: RPM -e * - nodeps
yum command management: for the dependencies, yum command to take the package and you have installed installed installed together;
use steps:
1. connect the optical disc, the optical disk mounted in the system;
Mount / dev / CDROM / mnt
2. deletes the existing system configuration files yum (yum source system comes with connection required);
RM -rf /etc/yum.repos.d/*
3. yum manually write the source profile (source profile to the image file);
VI /etc/yum.repos.d/centos.repo
[local]
name = local
BaseURL = file : /// mnt
enable = 1
gpgcheck = 0
: WQ
4. use the command yum package management;
installation: -y install package names (complete this prompt indicates completion!) yum
uninstall: yum -y erase the package name

 

1. Configure local yum source;
2. Add the virtual machine bridge mode the card;
3.IP View A virtual machine;
4. Preparation of eth1 card profile;
VI / etc / sysconfig / Network-scripts / the ifcfg-eth1
the DEVICE = eth1
the TYPE = Ethernet
the ONBOOT = Yes
NM_CONTROLLED = NO
BOOTPROTO DHCP =
5. the network service restart:
/etc/init.d/network the restart
6. the verify whether it can access;
of ping www.baidu.com
7. the configuration Ali yum source;
[LWH the root @ ~] # wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
8. the configuration of yum epel source:
yum Release the install-EPEL -Y
9. the yum verify whether the cell configuration;
LS /etc/yum.repos.d/
10. the opening yum cache;
11. ntop installation package; Clean All yum
yum the install ntop -Y

 

 


Use find / var / cache / yum -name after Cache "* .rpm" command to see the software packages in the cache
if no cache, using ftp upload and download ntop package to the next / ntop directory virtual machine;
mount the CD, write yum configuration profile, installation package creeterepo;
Mount / dev / CDROM / mnt
RM -rf /etc/yum.repos.d/*
VI /etc/yum.repos.d/centos.repo
[local]
name = local
BaseURL file =: /// mnt
enable. 1 =
gpgcheck = 0
yum the install the createrepo -Y
generated package data files: createrepo -g /mnt/repodata/repomd.xml / ntop
generate verification data file: ls / ntop
remove all yum source file: -rf /etc/yum.repos.d/* rm
prepared yum configuration, the source location to the package ntop;
VI /etc/yum.repos.d/centos.repo
[local]
name = local
BaseURL File =: /// ntop
enable. 1 =
gpgcheck = 0
installation ntop test: -Y yum the install ntop
aready installed
Setting up a local yum repository complete source

Guess you like

Origin www.cnblogs.com/vilenx/p/12532684.html