cancel
Showing results for 
Search instead for 
Did you mean: 

EPAS 10 - Using RPMs on Disconnected Networks

EDB Team Member

###Download tarballs of RPMs

 

#On machine that is connected to the internet and has createrepo installed:
##This method does not require to install the software on the connected machine but you sitll have to download it here

# 1. Setup environment

 

##set up the envrionment with the correct yum credentials

export YUM_USER=
export YUM_PASSWORD=

export REPO_PATH=/usr/edb/repos
yum -y install createrepo
mkdir -p $REPO_PATH
mkdir -p $REPO_PATH/edb-repos
mkdir -p $REPO_PATH/edbas10
mkdir -p $REPO_PATH/enterprisedb-dependencies
mkdir -p $REPO_PATH/enterprisedb-tools
mkdir -p $REPO_PATH/enterprisedb-xdb60
mkdir -p /tmp/temp_download
cd /tmp/temp_download

# 2. Download repository RPM for all EDB RPMs
curl -O http://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
# 3. Download tarballs of EDB repositories
# EPAS 10 repos
curl -u $YUM_USER:$YUM_PASSWORD -O http://yum.enterprisedb.com/10/redhat/edb_10_redhat_rhel-7-x86_64.tar.gz

# EDB Dependencies repos
curl -u $YUM_USER:$YUM_PASSWORD -O http://yum.enterprisedb.com/dependencies/redhat/edb_dependencies_redhat_rhel-7-x86_64.tar.gz

# EDB Tools repos
curl -u $YUM_USER:$YUM_PASSWORD -O http://yum.enterprisedb.com/tools/redhat/edb_tools_redhat_rhel-7-x86_64.tar.gz

# EDB Replication Server (aka, xDB) repos
curl -u $YUM_USER:$YUM_PASSWORD -O http://yum.enterprisedb.com/xdb60/redhat/edb_xdb60_redhat_rhel-7-x86_64.tar.gz

# 4. Copy RPMs to local repo folders
cp edb-repo-latest.noarch.rpm $REPO_PATH/edb-repos/
tar xvzf edb_10_redhat_rhel-7-x86_64.tar.gz -C $REPO_PATH/edbas10/
tar xvzf edb_dependencies_redhat_rhel-7-x86_64.tar.gz -C $REPO_PATH/enterprisedb-dependencies/
tar xvzf edb_tools_redhat_rhel-7-x86_64.tar.gz -C $REPO_PATH/enterprisedb-tools/
tar xvzf edb_xdb60_redhat_rhel-7-x86_64.tar.gz -C $REPO_PATH/enterprisedb-xdb60/

# if desired, verify local repo folders can copied/extracted RPMs

ls -R $REPO_PATH/
# 5. Createrepo for all the repos
createrepo -p $REPO_PATH/edb-repos
createrepo -p $REPO_PATH/edbas10
createrepo -p $REPO_PATH/enterprisedb-dependencies
createrepo -p $REPO_PATH/enterprisedb-tools
createrepo -p $REPO_PATH/enterprisedb-xdb60
# 6 Tar up all the repos
tar -czvf /tmp/edb-repos.tar.gz $REPO_PATH


###Congratulations you have full tar file in your /tmp directory that you can ftp to a different location

##########################################################

 

###STEP 2 on the Disconnected Server

# Extract the repo into / which will put it in /usr/edb/repo.
# You don't have to put it here, but for consistency sake it is a good location.
# Keep in mind that this is not the "install" folder, this is just the directory that will hold the RPM repos.
# It is you local equivalent to or copy of http://yum.enterprisedb.com which you can't access,
# so you are creating a directory based clone of that web repository.
tar -C / -xvf /tmp/edb-repos.tar.gz

# Install the RPM that installs EDB's GPG key and creates the edb.repo file
yum install -y /usr/edb/repos/edb-repos/edb-repo-latest.noarch.rpm

# Update the edb.repo file to enable the repos we want and set the baseurl to our new directories of RPMs we created.
# You can do this manually by editing /etc/yum.repos.d to set enabled=1 and correct baseurl or you can
# use these five sets of sed commands to do it automatically
sed -i "\/edb-repos/,/gpgcheck/ s,enabled=.*$,enabled=1," /etc/yum.repos.d/edb.repo
sed -i "\/edb-repos/,/gpgcheck/ s,baseurl=.*$,baseurl=file:///usr/edb/repos/edb-repos," /etc/yum.repos.d/edb.repo

sed -i "\/edbas10/,/gpgcheck/ s,enabled=.*$,enabled=1," /etc/yum.repos.d/edb.repo
sed -i "\/edbas10/,/gpgcheck/ s,baseurl=.*$,baseurl=file:///usr/edb/repos/edbas10," /etc/yum.repos.d/edb.repo

sed -i "\/enterprisedb-dependencies/,/gpgcheck/ s,enabled=.*$,enabled=1," /etc/yum.repos.d/edb.repo
sed -i "\/enterprisedb-dependencies/,/gpgcheck/ s,baseurl=.*$,baseurl=file:///usr/edb/repos/enterprisedb-dependencies," /etc/yum.repos.d/edb.repo

sed -i "\/enterprisedb-tools/,/gpgcheck/ s,enabled=.*$,enabled=1," /etc/yum.repos.d/edb.repo
sed -i "\/enterprisedb-tools/,/gpgcheck/ s,baseurl=.*$,baseurl=file:///usr/edb/repos/enterprisedb-tools," /etc/yum.repos.d/edb.repo

sed -i "\/enterprisedb-xdb60/,/gpgcheck/ s,enabled=.*$,enabled=1," /etc/yum.repos.d/edb.repo
sed -i "\/enterprisedb-xdb60/,/gpgcheck/ s,baseurl=.*$,baseurl=file:///usr/edb/repos/enterprisedb-xdb60," /etc/yum.repos.d/edb.repo

# Run this command, just to look at the edb.repo file to see what was enabled and see the baseurls set to the RPM directories that we took out of the tar.gz file
# Note that this file will also include lines corresponding to other (older) versions of Advanced Server that we did not include in our offline repo
# These should not be enabled and can be igonored
cat /etc/yum.repos.d/edb.repo

# Now, install components
# First, install epas 10
yum install -y edb-as10-server-core

# Run this command to see where epas 9.6 was installed
ls /usr/edb/as10

# At this point you have installed the binaries for the database binaries
# Now, install some components that may be needed/desired
yum install -y edb-migrationtoolkit # an EDB tool for migrating Oracle (and other) databases to Postgres

 

 

For some Advanced Server components that include or support pgAgent or PostGIS, you may be required to install the EPEL (Extra Packages for Enterprise Linux ) repository. If your platform has yum access to the EPEL repository, you can assume superuser. If your platform has yum access to the EPEL repository, you can assume superuser privileges and enter:

 

     yum install epel-release

If yum cannot access the EPEL repository, you will get an error message: No package epel available.

     Error: Nothing to do

If you receive this error, you can download the EPEL rpm package, and install it manually. To manually install EPEL, download the rpm package, assume superuser privileges, navigate into the directory that contains the package, and install EPEL with the command:

yum install epel-release-latest-7.noarch.rpm For more information about installing EPEL, visit:

https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F