Posts tagged ·

wget

·...

Using wget to download AIX patches

Comments Off

First, you will need to install wget on your AIX server.

 

  1. Browse to http://www.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html
  2. Search for wget
  3. Click the RPM link
  4. And it downloads the file:  wget-1.9.1-1.aix5.1.ppc.rpm
  5. Move this to your repository or home AIX machine on which you can as root install this package. Or you can directly download it using ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/wget/wget-1.9.1-1.aix5.1.ppc.rpm
  6. Run: rpm -Uvh wget-1.9.1-1.aix5.1.ppc.rpm

 

Now you can use wget to download AIX patches.

 

Assume your patches are located at ftp://www7b.boulder.ibm.com/aix/fixes/pkgs/kmjuv/

On the AIX server, go into the repository where you want to hold the patches and run wget at background.

# cd /export/nim/patches/IV22602
# wget -b -o /tmp/IV22602_download.log -nd -r --retr-symlinks ftp://www7b.boulder.ibm.com/aix/fixes/pkgs/kmjuv/

-b, --background go to background after startup.
-o, --output-file=FILE log messages to FILE.
-nd, --no-directories don't create directories.
-r, --recursive recursive download.

Check the log file later to make sure the download is completed successfuly.

Comments Off

Use wget to download AIX fixes

Comments Off

1.Browse IBM fix central, http://www-933.ibm.com/support/fixcentral/

select the fixes that you need to download, and selet bulk ftp download. You will be getting the ftp information similar to something below:

 

Download files using FTP command
The fix package has been successfully copied to a temporary location for you to get using the ftp command.
Order number: Total size:
22608558 406.62 MB


Fix package location
The following location information can be used to download the fix files.
FTP server:
 
User ID:
 
Password:
 
Directory:
delivery04-mul.dhe.ibm.com
anonymous
Send any password
/ecc/hsb/H39100475


2. On AIX that has wget installed,

mkdir /export/nim/fixes/610TL05SP5
cd /export/nim/fixes/610TL05SP5
wget -rm --retr-symlinks ftp://delivery04-mul.dhe.ibm.com/ecc/hsb/H39100475
Comments Off

An awesome tool for UNIX system administrators who manage multiple servers.

Comments Off

Clusterit is a collection of clustering tools loosely based on IBM’s PSSP clustering tools. Unlike PSSP or GLUnix, Clusterit allows fast parallel execution of remote commands as it is written in architecture-independent C. Administrators can choose from a variety of authentication methods, including SSH and Kerberos.

With Clusterit, administrators can run parallelized and load balanced software builds (using jsd/jsh) or manage a heterogeneous cluster of machines (using dsh/dvt/rvt).

You may install it right from command line, providing your servers have internet access and have wget utility installed.

# wget http://prdownloads.sourceforge.net/clusterit/clusterit-2.5.tar.gz
# tar xfvz clusterit*.gz
# cd clusterit* && ./configure –prefix=/usr/local/clusterit && make && make install

Once the software is installed, you should have a set of binaries and manual pages in /usr/local/clusterit. To use the various tools in the clusterit/bin directory, you will first need to create one or more cluster files. Each cluster file contains a list of hosts you want to manage as a group, and each host is separated by a newline. Here is an example:
# cat servers
server1
server2
server3
server4
server5
The cluster file listed above contains 5 servers named server1 – server5. To tell clusterit you want to use this list of hosts, you will need to export the file via the #CLUSTER environment variable:

# export CLUSTER=/home/matty/clusters/servers

Once you specify the list of hosts you want to use in the #CLUSTER variable, you can start using the various tools. One of the handiest tools is dsh, which allows you to run commands across the hosts in parallel:

# dsh uptime
server1  :   2:17pm  up 8 day(s), 23:37,  1 user,  load average: 0.06, 0.06, 0.06
server2  :   2:17pm  up 8 day(s), 23:56,  0 users,  load average: 0.03, 0.03, 0.02
server3  :   2:17pm  up 7 day(s), 23:32,  1 user,  load average: 0.27, 2.04, 3.21
server4  :   2:17pm  up 7 day(s), 23:33,  1 user,  load average: 3.98, 2.07, 0.96
server5  :   2:17pm  up  5:06,  0 users,  load average: 0.08, 0.09, 0.09

In the example above I ran the uptime command across all the servers listed in file that is referenced by the CLUSTER variable! You can also do more complex activities through dsh:

# dsh ‘if uname -a | grep SunOS >/dev/null; then echo Solaris; fi’
server1 : Solaris
server2 : Solaris
server3 : Solaris
server4 : Solaris
server5 : Solaris

This example uses dsh to run uname across a batch of servers, and prints the string Solaris if the keyword “SunOS” is found in the uname output. Clusterit also comes with a distributed scp command called pcp, which you can use to copy a file to a number of hosts in parallel:

# pcp /etc/services /tmp
services                   100%  616KB 616.2KB/s   00:00
services                   100%  616KB 616.2KB/s   00:00
services                   100%  616KB 616.2KB/s   00:00
services                   100%  616KB 616.2KB/s   00:00
services                   100%  616KB 616.2KB/s   00:00
 

# openssl md5 /etc/services
MD5(/etc/services)= 14801984e8caa4ea3efb44358de3bb91
# dsh openssl md5 /tmp/services
server1 : MD5(/tmp/services)= 14801984e8caa4ea3efb44358de3bb91
server2 : MD5(/tmp/services)= 14801984e8caa4ea3efb44358de3bb91
server3 : MD5(/tmp/services)= 14801984e8caa4ea3efb44358de3bb91
server4 : MD5(/tmp/services)= 14801984e8caa4ea3efb44358de3bb91
server5 : MD5(/tmp/services)= 14801984e8caa4ea3efb44358de3bb91

In this example I am using pcp to copy the file /etc/services to each host, and then using dsh to create a checksum of the file that was copied. Clusterit also comes with a distributed top (dtop), distributed df (pdf) as well as a number of job control tools! If you are currently performing management operations using the old for stanza:

# cat hosts | while read host
do
    ssh $host 'run_some_commands'
done
Comments Off