Selasa, 18 Mei 2004

Installing Open Source Software on AIX

Last year I wrote about installing open source software on two commercial UNIXes, Solaris and HP-UX. Today I want to document how to install a few software packages on another commercial UNIX -- AIX.

First, I needed to get the ever popular wget onto the AIX 5.1 box to make retrieval of other software easier. I retrieved a wget package from UCLA's Public Domain Software Library for AIX using ftp. I then followed their instructions to extract and install the binary package:



# zcat wget.1.9.1.tar.Z | (cd /; tar xvpf -)

x ./usr/local/bin/wget, 619059 bytes, 1210 media blocks.

x ./usr/local/info/wget.info, 2576 bytes, 6 media blocks.

x ./usr/local/info/wget.info-1, 45301 bytes, 89 media blocks.

x ./usr/local/info/wget.info-2, 50448 bytes, 99 media blocks.

x ./usr/local/info/wget.info-3, 44699 bytes, 88 media blocks.

x ./usr/local/info/wget.info-4, 30878 bytes, 61 media blocks.

x ./usr/local/man/man1/wget.1, 58351 bytes, 114 media blocks.


That's it. Now I have /usr/local/bin/wget at my disposal.

Now I needed OpenSSH. I used the packages at Darren Tucker's OpenSSH Page. Unfortunately, as I was downloading the package I needed, I ran out of disk space. This was a result of doing a default install of AIX 5.1 and not understanding how their filesystems work. After deleting the interrupted package, my df output looked like this:


# df -k

Filesystem 1024-blocks Free %Used Iused %Iused Mounted on

/dev/hd4 16384 9744 41% 1092 14% /

/dev/hd2 524288 4816 100% 19067 15% /usr

/dev/hd9var 16384 11676 29% 300 8% /var

/dev/hd3 32768 31648 4% 30 1% /tmp

/dev/hd1 16384 15820 4% 21 1% /home

/proc - - - - - /proc

/dev/hd10opt 32768 26372 20% 290 4% /opt


I learned enough about the AIX filesystem via this thread to run 'smit chfs' and make the changes I needed to extend the /usr filesystem. Within smit I selected "Change / Show Characteristics of a Journaled File System" and then selected /usr. Smit reported /usr looked like this:


SIZE of file system (in 512-byte blocks) 1048576


I changed that value to be ten times bigger and commited the change. When done, df showed this output:


# df -k

Filesystem 1024-blocks Free %Used Iused %Iused Mounted on

/dev/hd4 16384 9744 41% 1092 14% /

/dev/hd2 5242880 4575296 13% 19067 2% /usr

/dev/hd9var 16384 11676 29% 300 8% /var

/dev/hd3 32768 31648 4% 30 1% /tmp

/dev/hd1 16384 15820 4% 21 1% /home

/proc - - - - - /proc

/dev/hd10opt 32768 26372 20% 290 4% /opt


That was better. After downloading the OpenSSH package, I unzipped and untarred it:


gunzip -d openssh-3.8p1-bff.tar.gz

tar -xvf openssh-3.8p1-bff.tar


Thanks to the AIX documentation and a helpful doc for VNC, I knew I needed to use 'installp' to install the package:


installp -a -X -d openssh-3.8p1.bff all





+-----------------------------------------------------------------------------+

Pre-installation Verification...

+-----------------------------------------------------------------------------+

Verifying selections...done

Verifying requisites...done

Results...



SUCCESSES

---------

Filesets listed in this section passed pre-installation verification

and will be installed.



Selected Filesets

-----------------

openssh 3.8.0.1 # OpenSSH 3.8p1 Portable for AIX



<< End of Success Section >>

FILESET STATISTICS

------------------

1 Selected to be installed, of which:

1 Passed pre-installation verification

----

1 Total to be installed



+-----------------------------------------------------------------------------+

Installing Software...

+-----------------------------------------------------------------------------+



installp: APPLYING software for:

openssh 3.8.0.1





. . . . . << Copyright notice for openssh >> . . . . . . .

This software is distributed under a BSD-style license.

For the full text of the license, see /usr/lpp/openssh/LICENCE

. . . . . << End of copyright notice for openssh >>. . . .



Creating configs from defaults if necessary.

Creating ssh_config from default

Creating sshd_config from default

Creating ssh_prng_cmds from default

Creating PrivSep prereqs if required.

UsePrivilegeSeparation enabled in config (or defaulting to on).

Creating PrivSep group sshd.

Creating PrivSep user sshd.

PrivSep chroot directory /var/empty already exists.



Creating host keys if required.

Generating public/private rsa1 key pair.

Your identification has been saved in /usr/local/etc/ssh_host_key.

Your public key has been saved in /usr/local/etc/ssh_host_key.pub.

The key fingerprint is:

d5:bd:25:53:da:48:6a:b9:5a:83:b1:92:b4:9b:b0:cd root@murray

Generating public/private dsa key pair.

Your identification has been saved in /usr/local/etc/ssh_host_dsa_key.

Your public key has been saved in /usr/local/etc/ssh_host_dsa_key.pub.

The key fingerprint is:

e3:98:e7:ae:ba:53:82:b9:eb:76:51:e3:f2:d9:69:5a root@murray

Generating public/private rsa key pair.

Your identification has been saved in /usr/local/etc/ssh_host_rsa_key.

Your public key has been saved in /usr/local/etc/ssh_host_rsa_key.pub.

The key fingerprint is:

48:11:50:a7:55:70:7d:84:3c:c6:db:9b:c2:95:b1:bc root@murray



Creating SRC sshd subsystem.

0513-071 The sshd Subsystem has been added.

Adding sshd to rc.tcpip

Finished processing all filesets. (Total time: 15 secs).



+-----------------------------------------------------------------------------+

Summaries:

+-----------------------------------------------------------------------------+



Installation Summary

--------------------

Name Level Part Event Result

-------------------------------------------------------------------------------

openssh 3.8.0.1 USR APPLY SUCCESS


When done, I had /usr/local/bin/ssh and /usr/local/sbin/sshd at my disposal. Once I started sshd, other systems were able to connect to the box.

0 komentar:

Posting Komentar