Installing k1om RPMs with zypper using an http repo for Intel Xeon Phi coprocessor

One obvious disadvantage of the previous method is that, where there are dependencies, the user must install RPMs in the correct order. This can be solved by creating a repo on the host that zypper can access from the coprocessor. Zypper is preinstalled in the coprocessor’s default file system.

The steps in this section are for creating a repository of RPMs and using the Python SimpleHTTPServer for serving them; we assume that these tools have been previously installed on the host. Though other repository creation tools and HTTP servers are available, we only provide instructions for using createrepo and Python SimpleHTTPServer. The host firewall or iptables may need to be configured to allow zypper to access the repository on the host.

Change to the folder where the k1om RPMs were extracted:


[host]$ cd $MPSS38_K1OM

Use the createrepo tool to create a new repo:


[host]$ createrepo .

Start an http server as follows:


[host]# python -m SimpleHTTPServer ${PORT_NUMBER}

From another terminal, add the repo on a coprocessor:


[host]$ ssh root@micN -R ${SOME_PORT}:host:${PORT_NUMBER}
[micN]# zypper addrepo http://host:${PORT_NUMBER} mpss

If no port is specified, python -m SimpleHTTPServer defaults to port 8000. In that case, the following is sufficient:


[host]$ ssh root@micN
[micN]# zypper addrepo http://host:8000 mpss

Now install RPMs as needed:

[micN]# zypper install <rpm file>

For example, to install man:


[micN]# zypper install man
File 'repomd.xml' from repository 'mpss' is unsigned, continue? [yes/no] (no): yes
Building repository 'mpss' cache [done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW packages are going to be installed:
groff less libperl5 man perl
5 new packages to install.
Overall download size: 2.8 MiB. After the operation, additional 8.4 MiB will be used. 
Continue? [y/n/?] (y): y
Retrieving package libperl5-5.14.2-r7.k1om (1/5), 709.0 KiB (1.5 MiB unpacked)
Retrieving: libperl5-5.14.2-r7.k1om.rpm [done]
Retrieving package less-444-r2.k1om (2/5), 78.0 KiB (163.0 KiB unpacked)
Retrieving: less-444-r2.k1om.rpm [done]
Retrieving package perl-5.14.2-r7.k1om (3/5), 16.0 KiB (36.0 KiB unpacked)
Retrieving: perl-5.14.2-r7.k1om.rpm [done]
Retrieving package groff-1.20.1-r1.k1om (4/5), 1.9 MiB (6.4 MiB unpacked)
Retrieving: groff-1.20.1-r1.k1om.rpm [done]
Retrieving package man-1.6f-r2.k1om (5/5), 130.0 KiB (266.0 KiB unpacked)
Retrieving: man-1.6f-r2.k1om.rpm [done]
Installing: libperl5-5.14.2-r7 [done]
Installing: less-444-r2 [done]
Additional rpm output:
update-alternatives: Linking //usr/bin/less to less.less
Installing: perl-5.14.2-r7 [done]
Installing: groff-1.20.1-r1 [done]
Installing: man-1.6f-r2 [done]

We see that zypper takes care of all the dependencies if they can be satisfied by the RPM files in the repo.
The directory containing such a repository can also be NFS mounted. Zypper can then access it as in a local directory.

继续阅读Installing k1om RPMs with zypper using an http repo for Intel Xeon Phi coprocessor