Monday, 5 December 2011

Mounting ISO images in AIX 6 and 7

In AIX version 6 it was bought in a rather useful command, god knows where I've been to miss this one -

# loopmount -i <cdrom.iso> -o "-V cdrfs -o ro" -m /<mount-point>

So, got a ISO of a DVD that's got that one base filesystem package you can get anywhere else?  Then this might just be the perfect command for you.


Thursday, 1 December 2011

RHEL 6.1 yum repository

So you have Redhat 6.1 Enterprise installed, but now you need to setup some local repositories from the DVD which the system was created.  So here is a quick guide on how to do it -

First install the createrepo command, else we can create our yum repository.
# rpm -ivh --aid /mnt/Packages/deltarpm-3.5-0.5.20090913git.el6.ppc64.rpm
# rpm -ivh --aid /mnt/Packages/python-deltarpm-3.5-0.5.20090913git.el6.ppc64.rpm
# rpm -ivh --aid /mnt/Packages/createrepo-0.9.8-4.el6.noarch.rpm


Mount the installation DVD.
# mount /dev/dvd /mnt

Copy over the packages to a folder.
# mkdir /etc/yum.repos.d/rhel6.1
# cp /mnt/Packages/* /etc/yum.repos.d/rhel6.1

When you copy over the files you will also find a *.xml library file, either in the same dir as the source or in a sub that needs to be copied over for the next command.
Create the repo with the createrepo command.
# createrepo -g repomd.xml /etc/yum.repos.d/rhel6.1

Create the repo file.
vi /etc/yum.repos.d/rhel61.repo
[RHEL-Repository]
name=RHEL 6.1
baseurl=file:///etc/yum.repos.d/rhel6.1
enabled=1
gpgcheck=0

Update yum's repo list.
# yum clean all
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
RHEL-Repository                                              | 1.3 kB     00:00 ...
RHEL-Repository/primary                                      | 1.5 MB     00:00 ...
RHEL-Repository                                                           3210/3210
repo id                                repo name                             status
RHEL-Repository                        RHEL 6.1                              3,210
repolist: 3,210

Then test.
# yum search httpd
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
======================== N/S Matched: httpd =======================================
httpd.ppc64 : Apache HTTP Server
httpd-devel.ppc : Development interfaces for the Apache HTTP server
httpd-devel.ppc64 : Development interfaces for the Apache HTTP server
httpd-manual.noarch : Documentation for the Apache HTTP server
httpd-tools.ppc64 : Tools for use with the Apache HTTP Server
mod_dav_svn.ppc64 : Apache httpd module for Subversion server
mod_dnssd.ppc64 : An Apache HTTPD module which adds Zeroconf support

  Name and summary matches only, use "search all" for everything.

SLES 11 on POWER no SSH

So you have installed SLES 11 on you POWER system, but for some odd reason you can't get ssh to the server to work.  You can ssh out and the deamon is up and running as you would expect and the IP tables is all empty, so what can the issue be.
In this case its the firewall -


# chkconfig --list SuSEfirewall2_setup
SuSEfirewall2_setup       0:off  1:off  2:off  3:on   4:on   5:on   6:off
# chkconfig --list SuSEfirewall2_init
SuSEfirewall2_init        0:off  1:off  2:off  3:on   4:on   5:on   6:off

So you can stop it as follows -

# chkconfig SuSEfirewall2_setup off
# chkconfig SuSEfirewall2_init off

Just make sure you perform the action in the order above else the command will fail as the two services are tided into each other.