RHEL6 to obtain the installation package (RPM) without Installation
Sometimes we can only get the RPM installation package online on a machine. to install the RPM package on an intranet machine that cannot access the Internet, we need to download the installation package to the local machine without installation, then copy the packages to the Intranet machine for installation. Another method is to create an image server without testing! The following example illustrates how to install saltstack (salt-master and salt-minion.
1) First, set the yum source on the machine that can connect to the Internet. I have set several yum sources for RHEL6.4, as shown below:
Rhel6_4-default
Name = "Red Hat Enterprise Linux Server release 6.4 (Santiago )"
Baseurl = ftp: // 192.168.122.100/pub/rhel64
Enabled = 1
Gpgcheck = 1
Gpgkey = ftp: // 192.168.122.100/pub/rhel64/RPM-GPG-KEY-RedHat-release
Cloudera-cdh5
# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 6 x86_64
Name = Cloudera's Distribution for Hadoop, Version 5
Enabled = 1
Gpgcheck = 1
Baseurl = ftp: // 192.168.122.100/pub/cloudera/cdh/5/
Gpgkey = ftp: // 192.168.122.100/pub/cloudera/cdh/RPM-GPG-KEY-cloudera
Cloudera-gplextras5
# Packages for Cloudera's GPLExtras, Version 5, on RedHat or CentOS 6 x86_64
Name = Cloudera's GPLExtras, Version 5
Enabled = 1
Gpgcheck = 1
Baseurl = ftp: // 192.168.122.100/pub/cloudera/gplextras/5/
Gpgkey = ftp: // 192.168.122.100/pub/cloudera/gplextras/RPM-GPG-KEY-cloudera
Epel-6
Name = Extra Packages for Enterprise Linux 6
# Http://ftp.linux.ncsu.edu/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#
Base url = http://ftp.linux.ncsu.edu/pub/epel/6/x86_64
Failovermethod = priority
Enabled = 1
Gpgcheck = 1
Gpgkey = http://ftp.linux.ncsu.edu/pub/epel/RPM-GPG-KEY-EPEL-6
To obtain the saltstack installation package, add the following yum Source:
* *** Install rpmforge
* *** This step is important because there is no python-jinja2 on the epel source of redhat 6 and centos 6.
# Wget -- no-check-certificate http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
# Rpm-Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
All right, the source is ready. Start installing plug-in yum-plugin-downloadonly.noarch. 1.30-14. el6:
# Yum install yum-downloadonly
After the installation is complete, this machine can download but do not install the RPM package of saltstack.
# Mkdir/root/Downloads/salt-minion
# Mkdir/root/Downloads/salt-master
# Mkdir/root/Downloads/salt-ssh
# Mkdir/root/Downloads/salt-api
# Yum install-y -- downloadonly -- downloaddir =/root/Downloads/salt-minion
# Yum install-y -- downloadonly -- downloaddir =/root/Downloads/salt-master
# Yum install-y -- downloadonly -- downloaddir =/root/Downloads/salt-ssh #### no need to install any salt on minion, directly on the master through ssh.
# Yum install-y -- downloadonly -- downloaddir =/root/Downloads/salt-api #### rest api of salt
2) copy the rpm under/root/Downloads/salt-minion to another machine, and then install:
# Scp-r/root/Downloads/salt-minion root @ anotherIP :~ /
# Ssh root @ anotherIP
# Cd ~ /Salt-minion
# Rpm-ivh *. rpm
######################################## ###
#### Service salt-minion start
#### Service salt-master start
#### Service salt-api start
You can also install salt-master.
Getting started with creating an RPM package
In Linux, how does one create an RPM package?
Create your own rpm package
Directory structure and configuration after rpm installation in Linux
Brief Introduction and demo of rpm and yum
Redhat Linux --- rpm command details
Use FPM to easily create an RPM package
This article permanently updates the link address: