Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
As detailed in section RPM Installation, RPMs can be installed using the rpm-install.sh command. Alternatively the user can set up a yum server, load the RPMs onto that server, and then use the yum command to manage packages. This section describes how to setup such a server and load the RPMs into the yum repo.
First you need to setup a yum server on an external machine. This requires a HTTP deamon to be running on the server, e.g. httpd, and the tools for managing yum repos. It is recommended that you use a RedHat or CentOS based server since the RPM tools will be readily availble. For a RedHat/CentOS based server you can issue a command like the following to ensure that all the required packages are installed for httpd and createrepo.
# sudo yum install createrepo httpd
Once installed, add the following just before "<Directory "/var/www/html">" in /etc/httpd/conf/httpd.conf.
<Directory /var/www/html/repo> Options +Indexes </Directory>
Next follow the instructions at http://www.server-world.info/en/note?os=CentOS_6&p=httpd to setup httpd, summarized below:
# sudo /etc/rc.d/init.d/httpd start # sudo chkconfig httpd on
Check the httpd server is installed and configured correctly by pointing a browser to the server's IP address. You should get the Apache 2 test page.
To determine where the yum repo should be created, looking at the first line in the /etc/yum.repos.d/brl.repo file on the switch. It will contain a line that looks like the following:
baseurl=http://10.14.232.78/repo/brl/3.2
The text after "http://10.14.232.78" is the path to the repo. For the purposes of the text below, lets call this <repo-path>.
Next we need to find the RPM architecture. You can do this by querying one of the RPM packages as shown below. This is typically done on the repo server where the RPM files are available. The RPM files are obtained from the RPM tar ball that is called rpms.<toolchain>.<cpu>-<version>.tar.bz2, e.g. rpms.brl_3.8.e500_v32-1.1.1.10.tar.bz2.
# rpm -qpm output/RPMS/dos2unix-3.1-37.1.el6.brl_3.8.e500_v2.rpm \-\-qf "%{arch}\n" ppc #
In the example above, the RPM architecture is "ppc". For the purposes of the text below we will call this <rpm-arch>.
Create the repo and copy the RPM files into it using the commands below.
# sudo mkdir -p /var/www/html/repo/<repo-path>/<rpm-arch> # cd /var/www/html/repo/<repo-path> # sudo cp -rf rpms.<toolchain>.<cpu>-<version>/output/RPMS/* <rpm-arch> # sudo ln -sf <rpm-arch> noarch # # sudo createrepo --database /var/www/html/repo/<repo-path> ... Generating sqlite DBs Sqlite DBs complete #
Verify that /etc/yum.repos.d/brl.repo has the correct server IP.
Now you can use yum to install your packages. You can verify that things are working correctly by listing all packages that are available, and test installing a simple package such as dos2unix:
# yum list ... zlib-static.mips64 1.2.3-27.2.el6 brlrepo # yum install dos2unix ... Complete! #