Linux beginners
Just getting started with RPM
Package dependency is a headache. Learned to use
Yum
It is a good thing to solve the dependency, but when we
Linux
What if the system is not connected to the Internet? Can it be automatically installed?
?
Of course there is a solution.
I. First, set the RPM of the CD
All packages are copied to the hard disk,
Xxx
Directory.
/Var/FTP/RPM
In this way, it makes it easier for others to connect;
2. Install createrepo
And
Yum
These two tools
# Rpm-IVH createrepo-0.4.11-3.el5.noarch.rpm
# Rpm-IVH yum-3.2.19-18.el5.noarch.rpm
# Createrepo/var/FTP/RPM
III,
Edit configuration file
# Cd/etc/yum. Repos. d/
# Cp rhel-debuginfo.repo local. Repo // The name can not start with the suffix must be
Repo
# Vi local. Repo
[Yum] # Name
Rhel-debuginfo.repo
Repeat it.
Name = Yum install # The name is also self-explanatory
Baseurl = file: // var/FTP/RPM # Here is the storage path of our installation package.
"///"
Enabled = 1 #1 is enabled
0
Yes
Gpgcheck = 0 # Here is the red hat check package consistency Option
Gpgkey = file: // etc/pki/rpm-GPG-key-RedHat-release # Check the above through this file
IV,
Finally, execute the following command:
# Yum clean all
# Yum list
Output result:
Yum list
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Yum | 951 B 00: 00
Primary.xml.gz | 812 KB
The yum 2361/2361
Server
Created successfully!
Start FTP
Service!
5. Set the client in the LAN
1. Install
Yum
Package
2./etc/yum. repo/create a file suffix
Repo
File
The content is basically the same as that of the server. You can modify the content as needed.
[Yum]
Name = Yum install
Baseurl = ftp: // 172.16.0.9/RPM # This is the only change you need.
FTP
Okay.
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-GPG-key-RedHat-release
3.
Run
Yum clean all and
Yum list
All set!