Translate

Friday 20 December 2013

Solving RPM Dependencies


To list package dependencies, download, and and install them at one time see
http://www.perzl.org/aix/index.php?n=FAQs.FAQs#rpm-dependency-hell

You can also download the FTP list of dependency files.

To install Apache

1.              Find the dependencies file for page using:

or

1.              Search for your package and and download the dependency list ".deps" file.

2.              Download the package and all its dependencies:

wget     ftp://www.oss4aix.org/everything/RPMS/httpd-2.4.3-1.aix5.1.ppc.rpm
wget -B ftp://www.oss4aix.org/everything/RPMS/  -i httpd-2.4.3-1.aix5.1.ppc.deps

4.              Install the package and dependencies:

rpm -Uvh *.rpm

Wednesday 18 December 2013

Fedora 20 released

The latest version of Fedora has finally available. The biggest difference I have seen so far is that they have now included virtualisation in the kernel and so there is no longer any need to install third-party products such as VMWare.

There is also a new cut of RedHat Enterprise Linux (RHEL) currently in Beta, so expect many of the new Fedora features to be back-ported in to the main RedHat products.

I installed the latest Gnome spin, however after a few hours replaced it with Mate as I still really hate the quasi-Windows-8 look and feel, the slow reponse, and lack of simple features that are already available through Mate and Cinnamon. This is a real shame as I love the simplicity of useability of the standard RedHat and Centos desktops.

I think that IBM really needs to wake-up and embrace a lot of the latest functionality such as Yum if they are to reverse their declining market share.

Friday 13 December 2013

Excellent news for anyone struggling with RPMs

I just saw this post on Nigel's excellent AIX blog:

https://www.ibm.com/developerworks/community/blogs/aixpert/entry/open_source_bootstrap_on_aix_rpm_dependencies_from_hell_fixed?lang=en

It is a real shame that you have to find these workarounds as I would have expected IBM to embrace tools like YUM and try to widen the appeal of AIX to Linux users.

AIX meets OpenStack

IBM have been working on PowerVC, a tool that is based upon OpenStack and greatly simplifies the process of provisioning cloud-type images.

For more information see:
http://www-03.ibm.com/systems/power/software/virtualization-management/

and

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=67c72dc8-51c6-4f7b-bf0d-7735620026fe

Thursday 12 December 2013

AIX Systems Director Console

If you install or upgrade to AIX 6.1 or 7.1. the system director console service is now installed by default. This opens two web ports:

http://<hostname>:5335/ibm/console
https://<hostname>:5336/ibm.console
(Optional SSL)



and creates the "pconsole" user.

The service is started from the "/etc/inittab" as follows:

pconsole:2:once:/usr/bin/startsrc -s pconsole  > /dev/null 2>&1

You can also see it is active from the SRC:

# lssrc -s pconsole
Subsystem         Group            PID          Status
 pconsole         pconsole         7143642      active

If it has not been installed, or was previously removed, you can install the following packages from your AIX DVD or NIM Server:


lwi.runtime
sysmgt.pconsole.rte
sysmgt.pconsole.apps.pda
sysmgt.pconsole.apps.wsmit
sysmgt.pconsole.apps.wdcem
sysmgt.pconsole.apps.wrbac
sysmgt.pconsole.apps.websm

The SDMC is a very useful tool but also opens a potential backdoor as it can enable users to login directly as root, and also later enable their own users. I would recommend disabling it in the "inittab" and only starting it manually when you require it and ensure that you control the "pconsole" user password.

Wednesday 11 December 2013

IBM Closes the door

IBM has now started to restrict access to Fix-Central (downloads) and now requires a valid maintenance-contract to be linked to your IBM ID. Whilst I understand that IBM is looking to protect there IP this could not have come at a worse time. With falling AIX sales and countless customers looking to break-out of what they see as unnecessarily expense vendor lock-ins and proprietry technology I think IBM should be looking to do the following:
  1. Provide low-cost (may free) developmental AIX licences for partners and solution providers
  2. Build flexible cloud offerings where developers could have access to lab systems on a pay per use basis
  3. Simplify the leasing of new and used equipment
  4. Increase the Linux affinity of AIX to encourage more AIX/Linux hybrid systems so that customers that wish to migrate to Linux could stay on the same hardware.

When you look at the speed at which the iSeries market appears to have dried-up, I think they need to act very quickly and decisively.

Tuesday 10 December 2013

Why the PC industry is dying

This is not really an AIX tip, but it does effect all my daily work and so I thought I would still have a rant! :)

Last week the USB Ports failed on my HP laptop so I enquired about a repair. To their credit HP were very helpful and it can be done so long as I can get the machine to London. I then went to a local IT chain and asked for a second opinion just in case they could order the part and thus save me time by fitting it locally...

There response was unsuprising. "It would be cheaper to buy a new one" which got me thinking. Whilst this is true the value of the software that I have installed is greater than the cost of the new machine, and coupled with all the hassle of re-installing the apps etc, makes it a complete nightmare for me, and most likely many other people.

You are probably wondering what the point of this post is?

I think that if Microsoft, and perhaps also IBM et al, could come up with a way to effectively CLONE your configuration (licences, activations, etc) from your original machine to a new one. Once you were happy, have some way of nuking the original and perhaps recycling the parts, this could be a great way to encourage people to update and upgrade?

Thursday 5 December 2013

De-installing UUCP

It is highly unlikely that you will ever need or use UUCP and thus removing it can only help to save space and reduce your systems attack-surface.

1. Remove the LPP:

# installp -u bos.net.uucp

2. Create a list of the files belonging to the uucp users:

# find / -group uucp > /tmp/u

3. Remove the users and group:

# rmuser -p nuucp
# rmuser -p uucp
# rmuser xuucp
# rmgroup uucp


4. Assign the orphaned files to root:

cat /tmp/u | while read F
do
  chown -root.system $F
done


5. Remove the temporary file:

# rm /tmp/u

Wednesday 4 December 2013

SystemScan AIX launched.

Today marks the end of more than two years of work for us and SystemScan AIX is now available. Please see: www.systemscanaix.com for details.

SystemScan runs more than 600 tests which are then compiled into either CSV, HTML, Plaintext, or XML files. If you choose HTML option:

  • The results are compiled into a clear and concise (mini-website) report complete with a risks and issues summary. 
  • Each test comes complete with a helpfile containing an explanation of the results as well as tips and tricks.
  • No local webserver or external connection is required to create the reports, the idea being that you can transfer the reulting files to a PC or internal website where they can be viewed by auditors, managers, (external) consultants, and first-line support.
  • Viewers do not need to apply for root access to view the results no no time has to be lost making costly and time consuming access requests.
The clear-text, CSV, and XML can be exported to databases and spreadsheets in order to mine the data and produce unlimited reports.

SystemScan AIXonly uses standard AIX commands and is written using Korn/Posix shell scripts so all the tests can be viewed by auditors and security officers, and even amended or extended as required.

The idea is to eventually build an open-source type community that can make improvements and suggest new tests that can benefit others, or if preferred we can produce a tailored version/module(s) for your private use.

Tuesday 26 November 2013

Backing-up your VIOS server

The easiest way to backup your VIOS servers is to create an NFS mount-point on another machine and then mount it. e.g.

1. Create a new directory/mount-point:

# mkdir /backups
# chmod 0777 /backups

2. Create a public-share in "/etc/exports". (Note this is a quick and dirty method without security)

# cat > /etc/exports
/fixes -public,sec=sys:krb5p:krb5i:krb5:dh,rw

3. Export the filesystem

# exportfs -a
# lsnfsexp
/fixes -public,sec=sys:krb5p:krb5i:krb5:dh,rw

4. Login to your VIOS server as "padmin" and switch to root (You have to do that as “root” because “padmin” uses a restricted shell).

$ oem_setup_env
# mount server:/backups /mnt
# ^d

5. Start the backup. This example does not backup the media-library for quickness, and to save space, however there are many options available:

backupios -file {Directory} [-nosvg][-nomedialib]
       backupios -file {Filename} [-mksysb][-nopak][-nosvg][-nomedialib]
       backupios -tape Device [-blocks Number] [-nopak] [-verify] [-nosvg][-nomedialib]
       backupios -cd Device {-udf | -cdformat} [-accept] [-nosvg][-nomedialib]

$ backupios -file /mnt/backupios.mksysb -mksysb -nomedialib

Creating /mnt/backupios.mksysb
Backup in progress.  This command can take a considerable amount of time
to complete, please be patient...

Creating information file (/image.data) for rootvg.

Creating list of files to back up.

Backing up 107493 files.....................

107493 of 107493 files (100%)
0512-038 savevg: Backup Completed Successfully.

6. Once the backup has completed switch back to root and un-mount "/mnt"

$ oem_setup_env
# umount /mnt

7. Login to the backup server host and check the backup file as follows:

# lsmksysb -sf ./backupios.mksysb | head
New volume on ./imx02.backupios:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Tue Nov 26 08:46:01 CET 2013
Files are backed up by name.
The user is root.
        5576 ./bosinst.data
          11 ./tmp/vgdata/rootvg/image.info
       12736 ./image.data
      316958 ./tmp/vgdata/rootvg/backup.data
           0 ./usr
           0 ./usr/X11R6
          19 ./usr/X11R6/lib
           8 ./usr/adm
           0 ./usr/aix
           0 ./usr/aix/bin





Wednesday 20 November 2013

Undeleting files

Have you ever accidentally deleted a file and wished you had a "Recycle Bin" like in Windows? Well now you can!



j2restore is an IBM DeveloperWorks project that offers a possibility to un-delete files:

or

wget https://www.ibm.com/developerworks/community/blogs/aixworld/resource/j2restorev1.51.zip --no-check-certificate

The only two small catches are that you have to register the tool and purchase a licence, and the filesystem has to be un-mounted during the recovery.

Installing:

unzip ./j2restorev1.51.zip
Archive:  ./j2restorev1.51.zip
  inflating: j2restorelist53
  inflating: j2restorelist61
  inflating: j2restoredemo53
  inflating: j2restoredemo61

chmod 0750 j*

Running the tool:
 
./j2restorelist61
j2restorelist v1.51, Author: Wu Jian Jun <wujianjun-zju@163.com>
Usage: j2restorelist [--fast | -f] [--partial | -p : no|yes|all] <file system>

To get full functional j2restore, pls send following machine ID to <wujianjun-zju@163.com>:
ODAwMDBFRUE4NjYwMDAwMTAwQzlCOEZBNEMwMDAwMDAwMDAwNGU4ZGY0ODA$ IBM,02659B......

umount /test

./j2restoredemo61 -r /test
output file: /var/j2restore/report.log
report only flag: on (just report, no restore action)
fast flag: off (block scan)
partial flag: no (only scan complete file)
Scaning directories...
100% finished
Scaning inodes...
 85.71% finished

Tuesday 19 November 2013

Releasing SAN data locks

Normally when a server opens a LUN it sets a lock-reserve, and it is released again when the servers is shutdown, or failed-over in a cluster. If your server crashes, or there is a problem with your SAN link this flag may have to be cleared manually.

Checking the status of your SAN flags:

# devrsrv -c query -l hdisk14

Device Name                     :  hdisk14
Device Open On Current Host?    :  NO
ODM Reservation Policy          :  NO RESERVE
Device Reservation State        :  NO RESERVE
Device Reservation State Information


To check all your LUNs:

# lspv | awk '{print $1}' | while read D
> do
> devrsrv -c query -l $D
> done


The above example shows a healthy LUN that is not in use. If it is active you will see:

Device Open On Current Host?    :  YES

If a host has crashed, or there is a faulty lock you may see:

Device Name                     :  hdisk10
Device Open On Current Host?    :  NO
ODM Reservation Policy          :  NO RESERVE
Device Reservation State        :  NO RESERVE
Already reserved through SINGLE PATH by other host
Device Reservation State Information

In this case you need to forceably break the lock as follows:

#  devrsrv -c release -l hdisk10
or
# devrsrv -f -l hdisk10

Once the lock has been released you should be able to access the LUN.

If this is a VIOS server ensure that the attribute is permanently set as follows:

$ chdev -dev hdisk11 -attr reserve_policy=no_reserve -perm

The shutdown and power-off your clients, and then do the same with the VIOS, and restart the clients. Powering-off ensures your partition profiles are correct, and also forces a log-out/in of the SAN/Switch.


Wednesday 13 November 2013

Tuesday 12 November 2013

Install Graphviz on AIX 6.1

The Graphviz utility enables you to convert tabular data into pictures. Don't worry if you IBM system does not have a graphics card because you can generate the files and view them on your PC.

wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-2.26.3-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-doc-2.26.3-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-gd-2.26.3-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-graphs-2.26.3-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-lua-2.26.3-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-perl-2.26.3-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/graphviz/graphviz-python-2.26.3-2.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/python/python-2.7.5-1.aix6.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/python/python-libs-2.7.5-1.aix6.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/python/tkinter-2.7.5-1.aix6.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/swig/swig-1.3.40-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/db4/db4-4.7.25-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/tk/tk-8.5.14-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/tcl/tcl-8.5.14-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/libXft/libXft-2.3.1-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/expat/expat-2.1.0-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/expat/expat-devel-2.1.0-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/gdbm/gdbm-1.10-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/openssl/openssl-1.0.1e-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/openssl/openssl-devel-1.0.1e-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/openssl/openssl-doc-1.0.1e-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/gts/gts-0.7.6-1.aix5.1.ppc.rpm

rpm -Uvh ./swig-1.3.40-1.aix5.1.ppc.rpm
rpm -Uvh ./db4-4.7.25-2.aix5.1.ppc.rpm
rpm -Uvh ./tcl-8.5.14-1.aix5.1.ppc.rpm
rpm -Uvh ./libXft-2.3.1-1.aix5.1.ppc.rpm
rpm -Uvh ./tk-8.5.14-1.aix5.1.ppc.rpm
rpm -Uvh ./expat-2.1.0-1.aix5.1.ppc.rpm ./expat-devel-2.1.0-1.aix5.1.ppc.rpm
rpm -Uvh ./gdbm-1.10-1.aix5.1.ppc.rpm
rpm -Uvh ./openssl*rpm
rpm -Uvh ./tkinter-2.7.5-1.aix6.1.ppc.rpm ./pyth*
rpm -Uvh ./gts-0.7.6-1.aix5.1.ppc.rpm
rpm -Uvh ./graphviz*rpm --nodeps

Monday 11 November 2013

AIX editions

If you are running AIX 6.1 or above you should have set the "edition" type when you installed it. The default seems to be "Express" which restricts the size of memory and number of procs in a partition.

There are three editions for AIX 6.1 and 7.1:

Express which is the basic/entry level and was designed to make available a low-cost version of the OS, and is generally constrained to a maximum of 4 cores and 8 GB of memory per core in a single partition, and there are also limits on cluster-aware-AIX in AIX 7.1.

Standard edition is the one IBM expects most people to use, and basically is only limited by the hardware IBM offers you.

Enterprise which includes many extra tools for clustering and monitoring.

To check which version you are running:


# chedition -l
standard

To switch editions:

chedition: Change to express edition
      chedition -x [-d Device [-p]]

chedition: Change to standard edition
      chedition -s [-d Device [-p]]

chedition: Change to enterprise edition
      chedition -e [-d Device [-p]]

The command can be run with a reboot, however it is unclear as to how this affects AIX's actual usage of the system's resources. IBM has also recently announced that a lot of the restriction imposed by the Express edition will now only apply to compute-nodes in their Pure systems.








Friday 8 November 2013

Installing gnuplot on AIX 6.1

Installing RPMs on AIX is generally a nightmare due to the sheer number of dependencies and the lack of a tool such as YUM, however here is how I did it. My test system is directly connected to the Internet and so I downloaded the packages using WGET. If your system is not connected you will need to use a laptop (or similar) to download the software and then transfer it to the AIX system.

It is important to remember that RPM versions are changing all the time so the links may need to be modified/updated.

1. Installing the RPMs


wget http://www.oss4aix.org/download/RPMS/gnuplot/gnuplot-4.6.4-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/glib2/glib2-2.34.3-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/libffi/libffi-3.0.13-1.aix5.1.ppc.rpm
rpm -Uvh ./glib2-2.34.3-1.aix5.1.ppc.rpm ./libffi-3.0.13-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/pango/pango-1.24.5-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/libthai/libthai-0.1.18-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/libdatrie/libdatrie-0.2.4-1.aix5.1.ppc.rpm
rpm -Uvh ./libthai-0.1.18-1.aix5.1.ppc.rpm ./libdatrie-0.2.4-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/libXrender/libXrender-0.9.8-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/renderproto/renderproto-0.11.1-1.aix5.1.ppc.rpm
rpm -Uvh ./libXrender-0.9.8-1.aix5.1.ppc.rpm --force --nodeps (Had to do this as my AIX-rpm was too new)
rpm -Uvh ./pango-1.24.5-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/lzo/lzo-2.06-1.aix5.1.ppc.rpm
rpm -Uvh ./lzo-2.06-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/libXpm/libXpm-3.5.10-2.aix6.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/xorg-compat-aix/xorg-compat-aix-1.2-1.aix5.1.ppc.rpm
rpm -Uvh ./xorg-compat-aix-1.2-1.aix5.1.ppc.rpm ././libXpm-3.5.10-2.aix6.1.ppc.rpm --force

http://www.oss4aix.org/download/RPMS/lua/lua-5.2.2-1.aix5.1.ppc.rpm
rpm -Uvh ./lua-5.2.2-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/pixman/pixman-0.28.2-1.aix5.1.ppc.rpm
rpm -Uvh ./pixman-0.28.2-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/libxcb/libxcb-1.7-1.aix5.1.ppc.rpm
rpm -Uvh ./libxcb-1.7-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/librsvg2/librsvg2-2.34.2-1.aix5.1.ppc.rpm
rpm -Uvh ./librsvg2-2.34.2-1.aix5.1.ppc.rpm

http://www.oss4aix.org/download/RPMS/gtk2/gtk2-2.20.1-2.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/jasper/jasper-1.900.1-2.aix5.1.ppc.rpm
rpm -Uvh ./jasper-1.900.1-2.aix5.1.ppc.rpm

http://www.oss4aix.org/download/RPMS/libpng/libpng-1.6.6-1.aix5.1.ppc.rpm
rpm -Uvh ./libpng-1.6.6-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/atk/atk-1.32.0-1.aix5.1.ppc.rpm
rpm -Uvh ./atk-1.32.0-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/libtiff/libtiff-4.0.3-1.aix5.1.ppc.rpm
rpm -Uvh ./libtiff-4.0.3-1.aix5.1.ppc.rpm --nodeps

wget http://www.oss4aix.org/download/RPMS/librsvg2/librsvg2-2.34.2-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/libart_lgpl/libart_lgpl-2.3.21-1.aix5.1.ppc.rpm
rpm -Uvh ./libart_lgpl-2.3.21-1.aix5.1.ppc.rpm

wget http://www.oss4aix.org/download/RPMS/libcroco/libcroco-0.6.5-1.aix5.1.ppc.rpm
rpm -Uvh ./libcroco-0.6.5-1.aix5.1.ppc.rpm

rpm -Uvh ./gnuplot-4.6.4-1.aix5.1.ppc.rpm ./cairo-1.12.14-1.aix5.1.ppc.rpm ./librsvg2-2.34.2-1.aix5.1.ppc.rpm ./gtk2-2.20.1-2.aix5.1.ppc.rpm


2. Download the demo packages



wget http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.4/gnuplot-4.6.4.tar.gz

gzip -dc ./gnuplot-4.6.4.tar.gz | tar xvf -
cd gnuplot-4.6.4

3.   A quick test:

set your $DISPLAY variable and run: gnuplot
Enter the command "test" and this should open a new X-Window

4. Useful links


http://cairographics.org/

http://www.gnuplot.info/