Вы находитесь на странице: 1из 11

Lenovo

MISC tasks for IBM AIX


Sohaib Ikram

MISC tasks for IBM AIX

MISC tasks for IBM AIX

1.

Procedure to install bash shell on AIX.

Login to server with root.


BASH patch has been copied to /tmp of all servers.
BASH file is rpm package and its complete name is bash-3.2-1.aix5.2.ppc.rpm.
Go to /tmp directory and run following command
#rpm --install bash-3.2-1.aix5.2.ppc.rpm

(Note double dash -- in above command.)

It will take just few seconds to install.


Once command is completed you can switch to bash with bash command. Now required bash options and particularly
command history will be available by upper arrow.

2.

INSTALLATION OF NEW SERVICE PACK OR PACKAGE

Copy new SP to any directory. Itll be in bff format.

Now we need to generate a .toc file for the package. It will be done through following command:
1.

3.

Inutoc <package directory>


e.g. #inutoc /software/SP2/

Now package is ready for installation. Well use SMITTY for installation. Go to smitty install. Select Install and Update
Software Update Installed Software to Latest Level (Update All). Here give the path of package directory
(/software/SP2/) and Enter.
Now a questionnaire will appear. Here you MUST select yes for ACCEPT NEW LICNESE AGREEMENT. Else default
values are ok. Now enter and press enter again for confirmation of warning messages. Installation progress will start
appearing until it is finished. Logs can be found in /smit.log

ALL LOG FILES


bash-3.2# find / -name '*.log'
/etc/tunables/lastboot.log
/fsout.log
/opt/freeware/cimom/pegasus/logs/PegasusError.log
/opt/freeware/cimom/pegasus/logs/PegasusStandard.log
find: 0652-023 Cannot open file /proc/36882.
/smit.log
/tmp/.ctinst.log
/tmp/acu_si.log
/tmp/lvmt.log
/tmp/root/SIInstall.log
/usr/ibm/common/acsi/logs/root/si_cbe.log
/usr/ibm/common/acsi/logs/root/si_msg.log
/usr/ibm/common/acsi/logs/root/si_trace.log
/usr/ibm/common/acsi/repos/derby.log
/usr/ibm/tivoli/common/CIT/1/logs/cce.log
/usr/ibm/tivoli/common/CIT/1/logs/cce_providers.log
/usr/lpp/DirectorPlatformAgent/dirinst.log

MISC tasks for IBM AIX


/var/adm/esa/config.log
/var/adm/ml/rc.ml.log
/var/adm/ras/alt_disk_inst.log
/var/adm/ras/altinst_rootvg.log
/var/adm/ras/artex/artex.log
/var/adm/ras/devinst.log
/var/adm/ras/install_updates.log
/var/adm/ras/lvmcfg.log
/var/adm/ras/rmsock.log
/var/ct/RMstart.log
/var/ct/RMstop.log
/var/ct/first.log
/var/ecc/data/log/eccAudit0.0.log
/var/ecc/data/log/eccFlight0.0.log
/var/ecc/data/log/eccTrace0.0.log
/var/ecc/dial/pppdial_trace.log
/var/ecc/dial/trace.log
/var/log/dirinst.log
/var/opt/tivoli/ep/conf/org.eclipse.update/error_recovery.log
/var/opt/tivoli/ep/conf/org.eclipse.update/install.log
/var/opt/tivoli/ep/log/installFeatures_2010.01.12_03.27.log
/var/opt/tivoli/ep/logs/nonstop.log
/var/opt/tivoli/ep/logs/nonstopbundle.log
/var/opt/tivoli/ep/runtime/core/logs/cceAgentTrace.log
/var/opt/tivoli/ep/runtime/nonstop/nonstopoutput.log
/var/perf/pm/daily/pmcfg.log
/var/tmp/aixmibd.log
/var/tmp/hostmibd.log
/var/tmp/snmpdv3.log
/var/tmp/snmpmibd.log

4.

NTP Configuration on AIX

Check if ntp service is already running:


root@omnibus1:/etc# lssrc -s xntpd
Subsystem
Group
PID
xntpd
tcpip
205184

Status
active

Above output shows that xntpd daemon is running and it must be stopped before changing ntp configuration.
root@omnibus1:/etc# stopsrc -s xntpd

Modify /etc/ntp.conf file and add following lines.


root@omnibus1:/etc# vi ntp.conf
server 10.231.60.1 prefer
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

Start xntpd daemon


root@omnibus1:/etc# startsrc -s xntpd
0513-059 The xntpd Subsystem has been started. Subsystem PID is 205184.
Check if ntp configurations have taken place:

MISC tasks for IBM AIX


root@omnibus1:/etc# ntpq -i
ntpq> peer
remote
refid
st t when poll reach
delay
offset
disp
==============================================================================
10.231.60.1
.LCL.
1 u
12
64
1
1.53 -242112 15875.0
ntpq> peer
remote
refid
st t when poll reach
delay
offset
disp
==============================================================================
*10.231.60.1
.LCL.
1 u
23
64
3
0.50
-0.288
0.21
ntpq>

5.

How to Remotely Turn On (and off) OS X Screen Sharing

This procedure keeps security in mind. The idea is to turn on screen sharing while you need it, and then turn it off when youre done. Also,
the write-ups of Tim Boland and Chris Brewer were very helpful in figuring this out.
a) SSH into your remote OS X machine with an administrators log in and password.
b)) Enable Remote Desktop (a.k.a. Screen Sharing, a.k.a. VNC) with this command:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd restart -agent -privs all
c)) Login using a VNC client. As I mentioned, TightVNC worked for me; for some reason, RealVNC and UltraVNC didnt. Your password is
mypasswd (see the -vncpw flag in the above command; you can and should change this).
d) When you are done, turn of screen sharing using your SSH session:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate configure -access -off

6.

Installing OpenSSH on AIX 6.1

1) Obtain the files. Its downloadable here: http://sourceforge.net/projects/openssh-aix/. Or you can find it on the expansion CD. Or the
Linux toolkit for AIX CD.
2) Install. If youre using a CD, follow my directions for installing lsof from here (of course, replace openssh with lsof). Otherwise, I have
some installp examples here.
3) Start your SSH.
AIX61# startsrc -g ssh
4) Edit your /etc/hosts.allow file. Otherwise youll see an error that says this:
ssh_exchange_identification: Connection closed by remote host
5) Test it out.
Linux# ssh AIX61

7.

How to Disable Telnet on AIX 6.1

1) Comment out telnet from /etc/inetd.conf.


2) Reload the configuration file
AIX61# refresh -s inetd
3) Test. You should get a nice error message like this:
Linux# telnet AIX6.1
Trying 10.1.1.10
telnet: connect to address 10.1.1.10: Connection refused
telnet: Unable to connect to remote host: Connection refused

8.

HOWTO: CDE and X-Windows Connectivity with AIX

With some regularity I see questions about how to connect graphic applications to PC's running windows and/or Linux. Read more for
some answers!
The oldest approach is to have an X-server package running. There are various commercial, shareware, and freeware packages
available. I am not going to discuss the packages, only the basic steps needed to get AIX to connect to your X-server package.
Basically, for a single application, the easiest step to take is to export your display. For example, my PC has the address
192.168.129.27 and I am running a X-server package. On AIX I would enter:
$ export DISPLAY=192.168.129.27:0.0
$ aixterm &

MISC tasks for IBM AIX


I can actually start any graphical application, for example firefox, but aixterm, xterm, and dtterm all load quickly and I have a
verification that it is working.
To get the CDE desktop to start is a bit more complicated on the PC side. I have to configure the application to do a broadcast looking
for X window clients. The actual steps will vary per product, but the setting name you want to look for is named (or should be in the
help somewhere) is XDMCP query mode. There are three different ways to configure it. The most direct is to give the IP address, or
resolveable hostname of the AIX system you want to connect to. The other modes are broadcast andindirect broadcast. The
difference is which system does an XDMCP broadcast and the choices you get. Broadcast means your PC system does the broadcast
and it connects to the first system that replies. Indirect Broadcast is actually a request to another to do a broadcast for your system
and wait for that system to return a list of the systems that returns to it's broadcast. Then you choose one of these systems, and you
see X window management system login screen (e.g., xdm, or CDE).
On Linux systems you will probably need to authorize the AIX system to connect. The basic command for doing this is xhost. If xhost
does not exist, as some distributions do not install it by default, you will need to search for a X HOWTO for your distribution of Linux.
Once you have that resolved, you can use the same export DISPLAY statement on AIX to get AIX to connect to your X server running
on your Linux desktop.
The other basic setup requires installing some extra software on AIX and (generally) on your desktop. The software is vnc_server. This
software is available from the IBM AIX Toolbox (check vgBookmarks for a link) as a RPM install. Or you can get an installp package
from the Bull software repository. The Bull software requires a second package from their site as well (zlib) as a prequisite to install
the vnc server.
I have only tried the RPM package once, on AIX 5.3 system, and it did not work immediately. I uninstalled that, and installed the two
Bull filesets, and ran vncserver command (set the PATH to include /usr/local/bin/) and make sure your hostname is of the "short"
variety (felt03, not felt03.rootvg.net).
On your desktop you will need a vnc_client installed. There are many of these, and have, as a drawback, that many virus scanners
consider them a virus. Why goes beyond this article, but vnc had a period in which the clients were more than they appeared to be :).
Once you start the client, most ask for a hostname to connect to. You need to provide a hostname, and a "port". For my systems,
192.168.129.2:1 works fine (IP address 192.168.129.2, port 1). Actually, the port number is much higher, but vnc has a default base
number, and I am connecting to that number plus 1.
To support unique sessions, start vncserver several times, and increase the port number. To password protect the sessions, use the
command vncpasswd on AIX.
Hope this helps. If there are any questions, please post on the forums, and I'll answer there, and update here!
9.

HOWTO: Use SUMA and NIM to manage Software updates

This HOWTO describes how to combine two standard AIX technologies that can be used to simplify centralized collection and
distribution of software updates for AIX.
Rather than use SUMA on every system I setup SUMA on separate systems based on their level of AIX - AIX 5.3 and AIX 6.1. As no new
TL or SP are planned for AIX 5.2 and I am phasing AIX 5.2 out I am not using this process for updating the one or two AIX 5.2 systems.
For all others I now use SUMA to collect updates and distribute them to other systems via a software server. And since I like pushing
resources, I have integrated SUMA into my NIM resources. I'll discuss the how and why below.
Step 1: Collecting updates using SUMA
For years I have just downloaded filesets and/or compressed tar files of AIX updates. For a few years there has been an alturnate
solution - SUMA, or Service UpdateManagement Assistant. I liked the fileset approach because I had done it that way since I got
started and try not to change just for the sake of change. SUMA (I kept telling myself) is just another interface.
And then IBM changed the way FixCentral works - and now it was hard to do things the way I was accustommed to. And so SUMA
became more than just another way! SUMA became the way - well, after I finally bit the bullet and took a serious look at SUMA.
Preparation
SUMA is setup using smit. Although you can set it up to be fully automated via cron I continue using it via smit. Automated updates
could be handy for critical fixes but for my goal of centralized update management the focus is on TL (technology level) and and SP

MISC tasks for IBM AIX


(service pack) collections.
The first step is configure SUMA. I try to avoid the defaults - you never know when defaults change and I rarely find them fit my
situation.
# smit suma
brings us to the openingscreen.

The main screen I am interested in is the Task Defaults - because here I change /usr/sys/inst.images to my preferred location. One of
my "defaults" is to avoid putting anything in /usr whenever possible.

MISC tasks for IBM AIX


So I have changed it to a seperate volume group - and have the files placed in /data/suma. (By the way, you probably need to be root
to go further - almost forgot to mention that!)

So, with the small change to /data/suma I am ready to go.

Back at the main screen, choose the Download Updates Now (Easy).

MISC tasks for IBM AIX


I use separate systems - i.e. not the NIM server - so it is easier to manage multiple TL and CSP levels. On this system I am running AIX
5.3 TL07. To check on the latest releases I went to the ROOTVg bookmark section "Service Bulletins" and choose the link for AIX 5.3
TL07 notices .This opens a subscription service page on IBM Systems Support. I chose the latest service pack entry and get an APAR
number from the text
In the APAR screen I enter the APAR Number I copied: IZ15487 and press enter. SUMA keeps track of what I have already downloaded
so I only download what I do not already have at this APAR level. So, along with all the downloads, there are lines like these:

This pretty much takes care of getting the updates. What about applying them?
Step 2: Integrating SUMA downloads into NIM resources
On my NIM server I create a lpp_source that points at /data/suma on the system doing the downloads.
Note - the machine serving the resource is not the master nim server, but a client machine (here x054).
root@nim:[/]lsnim -l lpp_5307_suma
lpp_5307_suma:
class = resources
type = lpp_source
comments = SUMA maintained updates for AIX 5307
arch = power
Rstate = ready for use
prev_state = unavailable for use
location = /data/suma
alloc_count = 0
server = x054
So, on the nim server I can use the update option to push updates to nim clients as well as update the nim master. However, when I
do an update I get a message about Superseded Filesets.
Superseded Fileset Updates
-------------------------Fileset updates listed in this section will not be installed.
Newer updates which supersede (replace) these were selected instead (either by
you or automatically by theinstallation program). Make sure that the
superseding updates listed passed pre-installation verification.
This is a common occurance when you just keep downloading updates. Fortunately, IBM developed a program for AIX to assist NIM
with managing lpp_sources. This program is called lppmgr. You can use this command from the command line, but it is very easy to
use via smit as well.
The fast path is: smit nim_lppmgr
So we choose the lpp_source of interest....

MISC tasks for IBM AIX

And we get this dialog: Note: by default, it is a preview operation. When you switch that to "Preview-> no" the default action is to
delete the filesets. You can save these in a an alturnate location. In terms of lppmgr command syntax this is a move operation. For
your first time - I suggest performing the preview.

You will probably get something similar to this:

MISC tasks for IBM AIX


I hopes this helps you with managing your AIX software updates. If you have any questions - or suggestions for improvements - please
post on the forums!
10. HOW TO use VNC on AIX
1. Download zlib-1.1.4.0.bff and vnc-3.3.3.2.bff
2. Copy zlib-1.1.4.0.bff and vnc-3.3.3.2.bff to AIX server
3. Execute smitty install to install zlib-1.1.4.0.bff and vnc-3.3.3.2.bff
Default: vnc will be installed to /usr/local/bin
4.
cd /
chmod 700 /etc/profile
vi /etc/profile, add export PATH=$PATH:/usr/local/bin to the end of /etc/profile
vi /.dtprofile, uncomment #DTSOURCEPROFILE=true
5. Execute su root
6. Execute vncserver twice.
Now, you can login AIX server via vnc.
11. HOW TO create mirror copies of a File system
You can create a mirror copy of a single file system like this.
#mklvcopy lvname copies hdiskX
e.g.
#mklvcopy fslv00 2 hdisk1
and
#mklvcopy fslv01 2 hdisk1

//will create 2nd copy for /oracle on hdisk1


//for /oraclesw

and then run this command to sync mirror copies.


#syncvg -v rootvg

Вам также может понравиться