Monday, August 25, 2008

AIX commands quick reference

AIX systems commands

How to make user password never expire ?
Type the following:
# chuser maxage=0 dsusr – passwd never expires

How do I lpar configuration ?
Type the following:
# lparstat –i

How do I get a detailed configuration of my system?
Type the following:
# lscfg

The following options provide specific information:
-p Displays platform-specific device information. The flag is applicable to AIX 4.2.1 or later.
-v Displays the VPD (Vital Product Database) found in the customized VPD object class.
For example, to display details about the tape drive, rmt0, type:
# lscfg -vl rmt0


How many hard disks does my system have and which ones are in use?
To display the number of hard disks on your system, type:
# lspv

How do I list information about a specific physical volume?
To find details about hdisk1, for example, run the following command:
# lspv hdisk1

How would I know if my machine is CHRP-based?
# lsconf – systeminfo, same as prtconf
# prtconf
# prtconf –m
# prtconf –k
# prtconf -s
Model Architecture: chrp
If it's a CHRP machine, the string chrp (Common Hardware Reference Platform) appears on the Model Architecture line.
Also gives detailed system info.

How would I know if I am running a 32-bit kernel or 64-bit kernel?
# bootinfo –K If the OS is 32/64 bit
# bootinfo –y If the hardware is 32/64 bit
#bootinfo –r Display real memory in KB

How would I know if it is a single core or dual core?
# pmcycles –m
CPU 0 runs at 4208 MHz
CPU 1 runs at 4208 MHz
CPU 2 runs at 4208 MHz
CPU 3 runs at 4208 MHz
CPU 4 runs at 4208 MHz
CPU 5 runs at 4208 MHz
CPU 6 runs at 4208 MHz
CPU 7 runs at 4208 MHz
the Performance Monitor cycle counter and the processor real-time clock to measure the actual processor clock speed in MHz
Number Of Processors: 4
Above result is for 4 processors.


How do I know if I am running a uniprocessor kernel or a multiprocessor kernel?
/unix is a symbolic link to the booted kernel. To find out what kernel mode is running,
# ls -l /unix and see what file /unix it links to. The following are the three possible outputs from the ls -l /unix command and their corresponding kernels:
/unix -> /usr/lib/boot/unix_up # 32 bit uniprocessor kernel
/unix -> /usr/lib/boot/unix_mp # 32 bit multiprocessor kernel
/unix -> /usr/lib/boot/unix_64 # 64 bit multiprocessor kernel

In AIX 5.2, the 32-bit kernel is installed by default. In AIX 5.3, the 64-bit kernel is installed on 64-bit hardware and the 32-bit kernel is installed on 32-bit hardware by default.

What version, release, and maintenance level of AIX is running on my system?
Type one of the following:
# oslevel –r

# lslpp –h bos.rte

What SP (Service Pack) is installed on my system?
To see which SP is currently installed on the system,
Sample output for an AIX 5L Version 5.3 system, with TL4, and SP2 installed would be:
# oslevel –s
5300-04-02


How do I find out the chip type, system name, node name, model number, and so forth?
The uname command provides details about your system.
uname -p Displays the chip type of the system. For example, PowerPC.
uname -r Displays the release number of the operating system.
uname -s Displays the system name. For example, AIX.
uname -n Displays the name of the node.
uname -a Displays the system name, nodename, version, machine ID.
uname -M Displays the system model name. For example, IBM, 9114-275.
uname -v Displays the operating system version.
uname -m Displays the machine ID number of the hardware running the system.
uname -u Displays the system ID number.


AIX file systems commands
How do I create a file system?
The following command will create, within volume group testvg, a jfs file system of 10MB with mounting point /fs1:
# crfs -v jfs -g testvg -a size=10M -m /fs1


The following command will create, within volume group testvg, a jfs2 file system of 10MB with mounting point /fs2 and having read only permissions:
# crfs -v jfs2 -g testvg -a size=10M -p ro -m /fs2


How do I change the size of a file system?
To increase the /usr file system size by 1000000 512-byte blocks, type:
# chfs -a size=+1000000 /usr

Note:
In AIX 5.3, the size of a JFS2 file system can be shrunk as well.

How do I mount a CD?
Type the following:
# mount -V cdrfs -o ro /dev/cd0 /cdrom

How do I mount a file system?
The following command will mount file system /dev/fslv02 on the /test directory:
# mount /dev/fslv02 /test

How do I remove a file system?
Type the following command to remove the /test file system:
# rmfs /test

How can I defragment a file system?
The defragfs command can be used to improve or report the status of contiguous space within a file system. For example, to defragment the file system /home, use the following command:
# defragfs /home

Which fileset contains a particular binary?
To show bos.acct contains /usr/bin/vmstat, type:
lslpp -w /usr/bin/vmstat

Or to show bos.perf.tools contains /usr/bin/svmon, type:
which_fileset svmon

How do I display information about installed filesets on my system?
Type the following:
lslpp -l


How do I determine if all filesets of maintenance levels are installed on my system?
Type the following:
instfix -i | grep ML

How do I determine if a fix is installed on my system?
To determine if IY24043 is installed, type:
instfix -ik IY24043

How do I install an individual fix by APAR?
To install APAR IY73748 from /dev/cd0, for example, enter the command:
instfix -k IY73748 -d /dev/cd0


How do I verify if filesets have required prerequisites and are completely installed?
To show which filesets need to be installed or corrected, type:
lppchk –v

How do I get a dump of the header of the loader section and the symbol entries in symbolic representation?
Type the following:
dump –Htv

How do I determine the amount of paging space allocated and in use?
Type the following:
lsps –a


AIX volume groups and logical volumes commands
How do I know if my volume group is normal, big, or scalable?
Run the lsvg command on the volume group and look at the value for MAX PVs. The value is 32 for normal, 128 for big, and 1024 for scalable volume group.
How to create a volume group?
Use the following command, where s partition_size sets the number of megabytes (MB) in each physical partition where the partition_size is expressed in units of MB from 1 through 1024. (It's 1 through 131072 for AIX 5.3.) The partition_size variable must be equal to a power of 2 (for example: 1, 2, 4, 8). The default value for standard and big volume groups is the lowest value to remain within the limitation of 1016 physical partitions per physical volume. The default value for scalable volume groups is the lowest value to accommodate 2040 physical partitions per physical volume.
mkvg -y name_of_volume_group -s partition_size list_of_hard_disks


How can I change the characteristics of a volume group?
You use the following command to change the characteristics of a volume group:
chvg

How do I create a logical volume?
Type the following:
mklv -y name_of_logical_volume name_of_volume_group number_of_partition


How do I increase the size of a logical volume?
To increase the size of the logical volume represented by the lv05 directory by three logical partitions, for example, type:
extendlv lv05 3


How do I display all logical volumes that are part of a volume group (for example, rootvg)?
You can display all logical volumes that are part of rootvg by typing the following command:
lsvg -l rootvg

How do I list information about logical volumes?
Run the following command to display information about the logical volume lv1:
lslv lv1

How do I remove a logical volume?
You can remove the logical volume lv7 by running the following command:
rmlv lv7

The rmlv command removes only the logical volume, but does not remove other entities, such as file systems or paging spaces that were using the logical volume.
How do I mirror a logical volume?
1. mklvcopy LogicalVolumeName Numberofcopies
2. syncvg VolumeGroupName
How do I remove a copy of a logical volume?
You can use the rmlvcopy command to remove copies of logical partitions of a logical volume. To reduce the number of copies of each logical partition belonging to logical volume testlv, enter:
rmlvcopy testlv 2

Each logical partition in the logical volume now has at most two physical partitions.
Queries about volume groups
To show volume groups in the system, type:
lsvg

To show all the characteristics of rootvg, type:
lsvg rootvg

To show disks used by rootvg, type:
lsvg -p rootvg

How to add a disk to a volume group?
Type the following:
extendvg VolumeGroupName hdisk0 hdisk1 ... hdiskn

How do I find out what the maximum supported logical track group (LTG) size of my hard disk?
You can use the lquerypv command with the -M flag. The output gives the LTG size in KB. For instance, the LTG size for hdisk0 in the following example is 256 KB.
/usr/sbin/lquerypv -M hdisk0
256

You can also run the lspv command on the hard disk and look at the value for MAX REQUEST.
What does syncvg command do?
The syncvg command is used to synchronize stale physical partitions. It accepts names of logical volumes, physical volumes, or volume groups as parameters.
For example, to synchronize the physical partitions located on physical volumes hdisk6 and hdisk7, use:
syncvg -p hdisk4 hdisk5

How do I replace a disk?
1. extendvg VolumeGroupName hdisk_new
2. migratepv hdisk_bad hdisk_new
3. reducevg -d VolumeGroupName hdisk_bad
How can I clone (make a copy of ) the rootvg?
You can run the alt_disk_copy command to copy the current rootvg to an alternate disk. The following example shows how to clone the rootvg to hdisk1.
alt_disk_copy -d hdisk1

AIX network commands
How do I identify the network interfaces on my server?
Either of the following two commands will display the network interfaces:
# lsdev -Cc if
# ifconfig -a

How do I activate a network interface?
To activate the network interface tr0, run the command:
# ifconfig tr0 up

How do I deactivate a network interface?
For example, to deactivate the network interface tr0, run the command:
# ifconfig tr0 down



list installed subsystem
#lssrc –a | grep active
If you are updating the subsystem, you need to de-activate it first

Show licensed program installed
#lslpp –l | grep –i ssh list of installed programs
#lslpp –f F-Secure.SSH.Server list of files belong to the license program
# lslpp –l | grep vac check for xlc compiler

#stopsrc –g
#stopsrc –s


#Pwdadm –c

Verifies correctness of user definitions. Runs the following command to fix and report errors:
%usrck -y ALL
%grpck –y ALL
%Pwdck –y ALL

Initab commands
# lsitab -a
# mkitab spid52:2:once:/Quest_Software/Foglight_SPID/startup
# rmitab spid52

sudo commands
# sudo -l -u p139pkg

GPG and PGP

GPG and PGP
Installing PGP on AIX 5.3
gunzip PGPcmdln_6.5.8.AIX_FW.tar.gz
tar xvf PGPcmdln_6.5.8.AIX_FW.tar

[xxxx:/opt/PGP] # ls -l
total 14248
-rw-r--r-- 1 user ux 3637760 Apr 11 16:29 PGPcmdln_6.5.8.AIX_FW.tar
-rwxr-xr-x 1 root staff 3613307 Aug 30 2000 PGPcmdln_6.5.8_AIX_FW.tar.gz
-rwxr-xr-x 1 root staff 66 Aug 30 2000 PGPcmdln_6.5.8_AIX_FW.tar.gz.sig
-rwxr-xr-x 1 root staff 10981 Aug 30 2000 WhatsNew.htm
-rwxr-xr-x 1 root staff 8758 Aug 30 2000 WhatsNew.txt

export PGPPATH=/opt/PGP/pgp-6.5.8/data
#cd pgp-6.5.8

Installing GPG on AIX 5.3
gunzip gnupg-1.2.2.tar.gz
.configure
make
make install

you will find gppin /usr/local/bin

-------------------------------------------------
to create a new key pair
#pgp -kg

To display all of the encryption/decryption options:
#pgp -hTo display all of the key management options:
#pgp -kTo display all of the group management options:

#pgp -gListing all the keys:
gpg --list-keyspgp -kvpgp -kvcpgp -kvv

Exporting keys from the lists:
gpg --armor --output "private.pankaj.asc" --export-secret-keys "pankaj@domain.com"gpg --armor --output "public.y.domain.asc" --export "y@ydomain.com"gpg --armor --output "public.s.asc" --export "e@ydomain.com"gpg --armor --output "public.b.asc" --export "BMail"

Impoting/Adding a keys to the keyring:
pgp -ka data/public.y.domain.ascpgp -ka data/private.pankaj.asc '//.pgp/secring.skr'gpg --import public.pankaj.asc/usr/local/bin/gpg --import private.pankaj.asc

Signing the messages:pgp -es pgp -es
encrypting a file:
pgp -e test/pankaj1.txt pankaj@domain.com -u pankaj.gautam@domain.comgpg --encrypt test.txtdecrypting a filegpg -d /tmp/pankaj1.txt.pgpecho "xxxxxxxxxxxxxxx" /usr/local/bin/gpg --passphrase-fd 0 --always-trust --output test.1 --decrypt YesResponse_20080412.dat.gpg

trust the keys:
pgp -ke pankaj@domain.com

deleting keys:
pgp -kr pankaj@domain.com

Pure-ftp commands

Pure-ftp commands

cat /usr/local/etc/pure-passwd

# /usr/local/bin/pure-pw useradd ftpuser -u 500 -g 501 -d /home/ftpuser
# pure-pw mkdb

Opentext Artesia installation

Base Installation:
Make sure you read the Artesia 68 instllation guide before you proceed

upload Artesia_DAM_6.8_Sol.iso to /public
# lofiadm -a /public/artesia/Artesia_DAM_6.8_Sol.iso
/dev/lofi/1

# mkdir /mnt/cd
# mount -o ro -f hsfs /dev/lofi/1 /mnt/cd

install oracle client - select administrator option

make sure you tnsnames.ora configured which points to the right DB

Also make sure lsnrctl is running on the DB server

create artesia user and make in part of dam group
# export ORACLE_HOME=/home/oracle/product/10.2.0/Db_1

Add ORACLE_HOME, ORACLE_HOME/bin and LD_LIBRARY_PATH in artesia user account


check the connectivity with the ORACLE SID using artesia user

change permission on /opt/artesia as artesia:dam


goto
# cd /mnt/cd/disk1/instdata/vm

start installation as artesia user

artesia$ ./install.bin
or
try always doing as console install
artesia$ ./install.bin -i console -f artesia-config.txt


Resolving LLDS issues:
#1. make sure you install artesia direcly login to the server as artesia, no sudo to artesia
#2. after installation, make you source .profile again or re-login as artesia
#3. make iodbctest works with your DSN name
#4. also change /opt/artesia/Search/Spider/config/DSN.ini to point to your DSN
#5. make sure /opt/artesia/install/ant/build.cfg poitns to the correct DSN
#6. also check in .profile or .bash_profile it runs openlink.sh

Resolving classpath issue:
#1. /opt/artesia/jboss/server/teams/conf/jboss-service.xml
#2. /etc/system has these lines to set ulimit parameters
set rlim_fd_max=1024
set rlim_fd_cur=1024


Default login
tsuper:tsuper

Url
http://localhost:11090/teams
http://localhost:11090/teams/Admin.do?action=ShowLogin
LLDS url
http://localhost:11090/brs/


sqlplus artesia/artesia@xxxx
and run these scripts.


sh /home/artesia/builds/deploy.metadata.sql
(you may have set set escape \ while running @PopulateMD.sql)

sh /home/artesia/builds/deploy.transformer.sql
sh /home/artesia/builds/deploy.phase1.sql


Run llds database
sh /home/artesia/builds/deploy.llds.sh

Run ant customization and mkdir commands
sh /home/artesia/builds/deploy.Tresource.sh
sh /home/artesia/builds/deploy.mk_dir.sh

make sure the /usr/sfw/bin is in the path


start the app:
sh bin/artesia-process-manager.sh start

create this user
login-name: hotExporter
login-pass: hotExporter






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

Artesia Env Variables:
TEAMS_HOME
TEAMS_REPOSITORY
TEAMS_SERVER_DEBUG
PATH=$TEAM_HOME/bin


Artesia start and stop:
artesia-process-manager.sh start
artesia-process-manager.sh stop

LLDS start and stop
startLLDS.sh
stopLLDS.sh

Using crypt for LDAP authentication:
/home/artesia/artesia68/bin/crypt.sh e ?5s-sH_FYi
3YKQ0UBlXcf4/5o5Xq2Kcw==
-----
User ID: $svc-mdcldap
path: ou=ServiceAccounts,ou=SpecialAccounts,ou=_PankajGautam,dc=pankajgautam,dc=com
PW: ?5s-sH_FYi (Question Five Sierra Dash Sierra Hotel Underscore Foxtrot Yankee India )


Tresource syntax:
[NC]"LDAP_SERVER_URL0"="ldap://ldap.domain.com:389"
[NC]"LDAP_SEARCH_NAME"="OU=users,OU=dotcom,DC=domain,DC=com"
[NC]"LDAP_SEARCH_PRINC"="ldap@pankajgautam.com"
[NC]"LDAP_SEARCH_PASS"="XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

LDAP authentication:
- First read artesia security configuration section in Artesia Integrators guide

cd $TEAMS_HOME/install/ant
run ant enable-ldap-synchronization

Make sure you update tresource file according to your environment
==========
[SECURITY\LDAP_SYNCHRONIZATION]
"LDAP_PROVIDER_URL0"="ldap://ldap.domain.com:389"
"LDAP_SYNC_USER"="ldap@pankajgautam.com"
"LDAP_SYNC_PASS"="XXXXXXXXXXXXXXXXXXXX"
"LDAP_FIRSTNAME_ATTR"="givenName"
"LDAP_LASTNAME_ATTR"="sn"
"LDAP_LOGINNAME_ATTR"="userPrincipalName"
"LDAP_ROLE_ATTR"="extensionAttribute5"
"LDAP_GROUP_ATTR"="memberOf"
"LDAP_LAST_MODIFIED_ATTR"="whenChanged"
"CONTEXT_PROPERTIES"=
"LDAP_SEARCH_BASE"="OU=users,OU=dotcom,DC=domain,DC=com"
"LDAP_SEARCH_DISABLED_FILTER"="(&(objectClass=user)(extensionAttribute5=*)(!(userAccountControl=512)))"
"LDAP_SEARCH_ENABLED_FILTER"="(&(objectClass=user)(extensionAttribute5=*)(userAccountControl=512))"
"PROCESS_UPDATED_ONLY"="true"
"LDAP_DIRECTORY_ATTRIBUTES"="mail"
"LDAP_ARTESIA_ATTRIBUTES"="emailAddress"
"LDAP_MEMBEROF_GROUPS"=
"LDAP_ARTESIA_USER_GROUPS"=
#"LDAP_SEARCH_TIMEOUT"="5000"
"ARTESIA_USER"="ldap@pankajgautam.com"
"ARTESIA_PASS"="XXXXXXXXXXXXXXXXX"
"DEFAULT_ARTESIA_ROLE"="2"
"DEFAULT_ARTESIA_DEPARTMENT"=
"DEFAULT_ARTESIA_EMAILADDRESS"=
"DEFAULT_ARTESIA_EMAILENABLED"=
"DEFAULT_ARTESIA_PARTICIPANTROLE"=
"DEFAULT_ARTESIA_CANDIDATEUSERGROUPADMINISTRATOR"=
"DEFAULT_ARTESIA_CANDIDATESECURITYPOLICYADMINISTRATOR"=
"DEFAULT_ARTESIA_PREFERENCETEMPLATE"=
"DEAFULT_ARTESIA_PASS"=
===========

$TEAMS_HOME/bin/ldapsync.sh



Artesia repository
$TEAMS_HOME/data/repository-default but it configurable
/opt/artesia/data/repository
Artesia server configuration file
$TEAMS_HOME/data/cs/global/Tresource
$TEAMS_HOME/data/cs/global/commonProperties.xml

Log clean ups
$TEAMS_HOME/ear/artesia.ear/war/teams.war/images/previewCreator
$TEAM_HOME/archive


log file
$TEAM_HOME/logs/artesiaappserver.log

Log levels
app log level
set grep DEBUG

JBoss log level
$TEAMS_HOME/jboss/server/teams/conf/log4j.xml


JBoss high availability configuration
have we tested that
who has done this configuration

Artesia Tools and Utils
$TEAMS_HOME/RoleManager.sh
$TEAMS_HOME/Thesaurus.sh

Artesia Processes
brsnetd.exe - 1 (LLDS process)
llspider.exe - 1
perl.exe - 5
sulu.exe -2



LDAP configuration command:
ldapclient manual \
-a credentialLevel=proxy \
-a authenticationMethod=simple \
-a proxyDN=cn=ldap,cn=Users,dc=domain,dc=fds \
-a proxyPassword=xxxxx \
-a defaultSearchBase=dc=domain,dc=dom \
-a domainName=pankajgautam.com \
-a defaultServerList=ldap.domain.fds \
-a attributeMap=group:userpassword=userPassword \
-a attributeMap=group:memberuid=memberUid \
-a attributeMap=group:gidnumber=gidNumber \
-a attributeMap=passwd:gecos=cn \
-a attributeMap=passwd:gidnumber=gidNumber \
-a attributeMap=passwd:uidnumber=uidNumber \
-a attributeMap=passwd:homedirectory=unixHomeDirectory \
-a attributeMap=passwd:loginshell=loginShell \
-a attributeMap=shadow:shadowflag=shadowFlag \
-a attributeMap=shadow:userpassword=userPassword \
-a objectClassMap=group:posixGroup=group \
-a objectClassMap=passwd:posixAccount=user \
-a objectClassMap=shadow:shadowAccount=user \
-a serviceSearchDescriptor=passwd:dc=domain,dc=com?sub \
-a serviceSearchDescriptor=group:dc=domain,dc=com?sub

ldapsearch -h ldap.domain.fds -b "cn=users,dc=domain,dc=com" -o mech=gssapi -o authzid='' "cn=Pankaj Gautam"

Solaris QFS installation

QFS Installation and configuration:

#lofiadm -a /opt/sw/softrageTek.iso
loopback file interface command will load the iso image

sam: storage and archive manager

#mount -o ro -f hsfs /dev/lofi/1 /mnt/cdrom
mount the image to the cdrom

Base installation files are
SUMWqfsr
SUNWqfsu

#pkgadd -d . SUNWqfsr SUNWqfsu

Install File system manager
#fsmgr_setup

Apply patches
#patchadd 126512-04

web console:
http://X.X.X.X:6789

If you want to administrator other QFS server from the console.
For example: if you want to administor app2 from app1
#fsadm add app2
run this on app1

Setup user profiles:
export PATH=/opt/SUNWsamfs/bin
export PATH=/opt/SUNWsamfs/sbin
export MANPATH=/opt/SUNWsamfs/man

Logs configuration:
Edit syslog.conf
local7.debug /var/adm/qfslog
make sure use tab only between the above line

Restart syslogd
#pkill -HUP syslogd


Some info on mutlipath
/etc/fc
luxadm -e dump_map /dev/fc/fp0
mpathadm list lu
stms boot -e or -d
to enable or disable



Troubleshooting commands:

#samexplorer
it creates a tar.gz file to /tmp which has information about the qfs, filemgr, etc

logs file to look
# /var/adm/messages
# /var/adm/qfslog

#samcmd

#samfsconfig

#samfsinfo qfsf1

backup commands:
#qfsdump -f /tmp/dumptoday.dfs
#qfsrestore -f /tmp/dumtoday.qfs

umount
before unmouting a QFS, umount all clients and umount the master
Also unshare all nfs share

File check
#samfsck qfsf1
Always use samfsck instead of fsck on the QFS

FC Controller probing:
# cfgadm -al
to check the current controller status

# cfgadm -c configure c2
# cfgadm -c configure c3
this will update any new LUNs on the c2 and c3 controller

#devfsadm -C
creating a device path


newfs /dev/rdsk/c6t600A0B80004715FC000007B647FE3875d0s6
its a long name c3.....d0S6
edit the vsftab
/dev/dsk/c6t600A0B80004715FC000007B647FE3875d0s6 - /u01 ufs 2 yes -
mount


DAM hardware setup:

APP1 APP2 DB1 DB2


SW1 SW2

SAN
--------------------------------------------------
WWPN 2014 2024 2034 2044 2015 2025 2035 2045
--------------------------------------------------
CTRA CTRB
WWNN 2004 2005
--------------------------------------------------
disks 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

AIX xlC Compiler installation

gunzip xlcpp.9.0.0.aix.eval.tar.Z
tar xvf xlcpp.9.0.0.aix.eval.tar
cd /tmp/cc/usr/sys/inst.images
installp -aXYgd . all

check /usr/vac for all c++ files

uninstall command before installing new install
installp -ugw vac.* vacpp.* memdbg.* xlhelp.* xlmass.* xlsmp.* xlC.adt.include xlC.msg*

Teradata ODBC installation

Teradata installation:

copy the following tars on the server
tdodbc__aix_power32.12.00.00.01.tar
tdodbc__aix_power32.12.00.00.01.txt

untar them in /opt/odbc_teradata
you will see these files:

TeraGSS.12.00.00.00.tar.gz
tdicu.12.00.00.00.tar.gz
tdodbc__aix_power32.12.00.00.01.tar.gz
TeraGSS.12.00.00.00.txt
tdicu.12.00.00.00.txt
tdodbc__aix_power32.12.00.00.01.txt


# gunzip TeraGSS.12.00.00.00.tar.gz
# gunzip tdicu.12.00.00.00.tar.gz
# gunzip tdodbc__aix_power32.12.00.00.01.tar.gz


tar xvf TeraGSS.12.00.00.00.tar
tar xvf tdicu.12.00.00.00.tar
tar xvf tdodbc__aix_power32.12.00.00.01.tar


It should create these following directories

TeraGSS
tdicu
tdodbc

cd TeraGSS
installp -acXd TeraGSS_aix-power32_12.00.00.00.bff all

cd tdicu
installp -acXd tdicu.bff all

cd tdodbc
installp -acXd tdodbc.bff all


copy the following tars on the server
cliv2_AIX_POWER.12.00.00.02.tar.gz

untar them in /opt/odbc_teradata

you will the following directories:

power32
power32/TeraGSS
power32/TeraGSS/.toc, 651 bytes, 2 media blocks.
power32/TeraGSS/TeraGSS_aix-power32_12.00.00.04.bff, 122112000 bytes, 238500 media blocks.
power32/TeraGSS__aix_power32.12.00.00.04.txt, 737 bytes, 2 media blocks.

power64
power64/TeraGSS
power64/TeraGSS/.toc, 616 bytes, 2 media blocks.
power64/TeraGSS/TeraGSS_aix-power_12.00.00.04.bff, 128870400 bytes, 251700 media blocks.
power64/TeraGSS__aix_power64.12.00.00.04.txt, 737 bytes, 2 media blocks.

tdicu
tdicu/tdicu.bff, 23091200 bytes, 45100 media blocks.
tdicu/.toc, 232 bytes, 1 media blocks.
tdicu.12.00.00.00.txt, 1409 bytes, 3 media blocks.

cliv2
cliv2/cliv2.bff, 1331200 bytes, 2600 media blocks.
cliv2/.toc, 207 bytes, 1 media blocks.
cliv2__aix_power.12.00.00.02.txt, 2331 bytes, 5 media blocks.

cd cliv2
installp -acXd cliv2.bff all


==========================================

int installation
untar
goto /opt/odbc_teradata/power32/TeraGSS

installp -acXd TeraGSS_aix-power32_12.00.00.04.bff all
TeraGSS_aix-power32.TeraGSS 12.0.0.4 USR APPLY SUCCESS

goto /opt/odbc_teradata/tdicu
installp -acXd tdicu.bff all
tdicu.tdicu 12.0.0.0 USR APPLY SUCCESS
tdicu.tdicu 12.0.0.0 ROOT APPLY SUCCESS

goto /opt/odbc_teradata/cliv2
installp -acXd cliv2.bff all
cliv2.cliv2 12.0.0.0 USR APPLY SUCCESS
cliv2.cliv2 12.0.0.0 ROOT APPLY SUCCESS

untar tdodbc__aix_power32.12.00.00.01.tar
goto /opt/odbc_teradata/tdodbc
cd tdodbc
installp -acXd tdodbc.bff all

======================================



---------------------------------------------------------
On datastage
1. update $DSHOME/.odbc.ini with following DSN name

[DSN_DATA]
Driver=/usr/lpp/tdodbc/odbc/drivers/tdata.so
Description=NCR 3600 running Teradata V1R5.2
DBCName=dev.domain.com
LastUser=
Username=XXXX
Password=XXXX
Database=Dev
DefaultDatabase=
Username: xxxxxxx
password: xxxxxxx

[TDATA]
Driver=/usr/lpp/tdodbc/odbc/drivers/tdata.so
Description=NCR 3600 running Teradata V1R5.2
DBCName=prod.domain.com
LastUser=
Username=xxxx
Password=xxxx
Database=Prod
DefaultDatabase=
[dBase]
Driver=/opt/IBM/InformationServer/Server/branded_odbc/lib/VMdbf22.so
Description=DataDirect dBaseFile(*.dbf) Driver
ApplicationUsingThreads=1


2. run dsenv

Oracle Installation troubleshooting

# Oracle installation
1. Unzip the file: gunzip
2. Extract the file: cpio -idcmv <
3. Installation guides and general Oracle Database 10g documentation can be found here.
4. Review the certification matrix for this product here.


# Oracle Environment
export $ORACLE_HOME=/fs2/oracle/product/10.2.0/db_1/
export PATH=/fs2/oracle/product/10.2.0/db_1/bin
tnsping mmxtest
sqlplus tstusr/tstusr@mmxtst


#tnsnames.ora
edit $ORACLE_HOME/network/admin/tnsnames.ora
with
------------------
EPNYDEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 11.16.155.112)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = epnydev)
)
)
---------------------------


# Create a database thru a wizard
$ORACLE_HOME/bin/dbca


# Which instance are you connecting
env | grep SID

# Oracle process to determine if Oracle DB is started
ps -def | grep smon_

# Oracle env file
. oraenv

# Connecting to Oracle DB
sqlplus
sys as sydba
SQL> / as sysdba
SQL> show users;
SQL> connect sys as sysdba;
SQL> select name from v$database;
SQL> select username, password from dba_users order by 1;
SQL> select * from dba_data_files;


#ORACLESID already exits during installation
comment the sid in this file /var/opt/oracle/oratab

# Oracle Shutdown
shutdown or shutdown normal
shutdown immediate
shutdown abort
shutdown transactional

# Oracle Start
startup
startup restrict

# Run a script
SQL> @script_name

NFS Installation

The NFS server service is dependent on a slew of other services.
Manually enabling all of these services would be tedious.
The svcadm command makes this simple with one command:

svcadm -v enable -r network/nfs/server


The first step is to edit the /etc/dfs/dfstab file. We just added this entry:

share -F nfs -o rw=srv-1 -d "share" /share

# Edit the /etc/dfs/dfstab file on the server.
share [-F nfs] [-o specific-options] [-d description] pathname

share -F nfs -o ro,rw=homedog:chester /usr/src
read-only access is assigned to any client except homedog and chester, who have read/write access

share -F nfs -o rw=engineering,ro=homedog /usr/src
read/write is assigned to any client in the engineering netgroup. The client homedog has read-only access

#shareall

the share command writes information about all shared file resources to the /etc/dfs/sharetab file
#cat /etc/dfs/sharetab



#dfshares

Run the server script /etc/init.d/nfs.server stop.

Run the server script /etc/init.d/nfs.server start

server:/disk - /mount_point nfs - yes rw,soft



Start the server:

# /etc/init.d/nfs.server start


On the client side:
#dfsshares nfsserver

root@srv-1 u-1 # mount -t nfs srv-50:/share /share2


fstab on the client:

srv-50:/share /share2 nfs defaults 0 0


http://docs.sun.com/app/docs/doc/801-6634/6i10efskb?a=view

Solaris disk mirroring

Setting up solaris disk mirroring:

#1. copy vtoc (partition table ) from the first disk to another disk
prtvtoc /dev/rdsk/c1t0d0s2 fmthard -s - /dev/rdsk/c1t1d0s2fmthard:
New volume table of contents now in place

#2. this will create 2 replicas on each disk
# metadb -a -f -c2 /dev/dsk/c1t0d0s4
# metadb -a -f -c2 /dev/dsk/c1t1d0s4

#metadb -i ( check metadb state database replica status)
AVAILABLE DISK SELECTIONS:
0. c1t0d0 /pci@0/pci@0/pci@2/scsi@0/sd@0,0
1. c1t1d0 /pci@0/pci@0/pci@2/scsi@0/sd@1,0
Specify disk (enter its number):

metadb -a -c n -l nnnn -f ctds-of-slice
-a specifies to add a state database replica.
-f specifies to force the operation, even if no replicas exist.
-c n specifies the number of replicas to add to the specified slice.
-l nnnn specifies the size of the new replicas, in blocks.

ctds-of-slice specifies the name of the component that will hold the replica.


#3. setting up sub-mirrors
The -f option forces the creation of the submirror even though the specified slice is a mounted filesystem. The second two options 1 1 specify the number of stripes on the metadevice and the number of slices that make up the stripe. In a mirroring situation, this should always be 1 1

# metainit -f d10 1 1
c1t0d0s0d10: Concat/Stripe is setup
# metainit -f d11 1 1
c1t1d0s0d11: Concat/Stripe is setup

#4. Setting up logical mirror device

# metainit d1 -m d10
d1: Mirror is setup

#5.After mirroring the root partition, we need to run the metaroot command. This command will update the root entry in /etc/vfstab with the new metadevice as well as add the appropriate configuration information into /etc/system. Ommitting this step is one of the most common mistakes made by those unfamiliar with DiskSuite. If you do not run the metaroot command before you reboot, you will not be able to boot the system!

/etc/vfstab changes
from/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no
to
/dev/md/dsk/d1 /dev/md/rdsk/d1 / ufs 1 no -

# metaroot d1
at this point we should reboot to see if the server comes up fine with d1

#lockfs -fa
#init 6lock -f

Flushes all transactions out of the log and write the transactions to the master file system. This option is valid only if logging has been enabled on the file systemlocak -a Apply command to all mounted, UFS type file systems

6. attach the second half of the mirrors.
# metattach d1 d11
d1: submirror d11 is attached

metastatus before attaching the second mirror
#metastat -p more
d4 -m d40 1
d40 1 1 c1t0d0s5
d3 -m d30 1
d30 1 1 c1t0d0s4
d2 -m d20 1
d20 1 1 c1t0d0s1
d1 -m d10 1
d10 1 1 c1t0d0s0
d5 -m d50 1
d50 1 1 c1t0d0s7
d51 1 1 c1t1d0s7
d41 1 1 c1t1d0s5
d31 1 1 c1t1d0s4
d21 1 1 c1t1d0s1
d11 1 1 c1t1d0s0

metastatus after attaching the second mirror
metastat -p more
d4 -m d40 d41 1
d40 1 1 c1t0d0s5
d41 1 1 c1t1d0s5
d3 -m d30 d31 1
d30 1 1 c1t0d0s4
d31 1 1 c1t1d0s4
d2 -m d20 d21 1
d20 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
d1 -m d10 d11 1
d10 1 1 c1t0d0s0
d11 1 1 c1t1d0s0
d5 -m d50 d51 1
d50 1 1 c1t0d0s7
d51 1 1 c1t1d0s7

Troubleshooting commands:
metaclear d11
metastat -p (check mirror status)
metadb -i ( check metadb state database replica status)

The Solaris Volume Manager state database contains configuration and status information for all volumes, hot spares, and disk sets

metainit d1 -m d10 + d11 / c1t0d0s0
metainit d2 -m d20 + d21 /usr c1t0d0s1
metainit d3 -m d30 + d31 /opt c1t0d0s4
metainit d4 -m d40 + d41 /home c1t0d0s5
metainit d5 -m d50 + d51 /data c1t0d0s7

http://spiralbound.net/2004/06/11/solaris-disk-partition-layout-mirroring-scriptshttp://slacksite.com/solaris/disksuite/disksuite.php

my volume manager scripts
#!/bin/sh
#Mirroring 1 of 2 .sh
prtvtoc /dev/rdsk/c1t0d0s2 fmthard -s - /dev/rdsk/c1t1d0s2
metadb -a -f -c2 /dev/dsk/c1t0d0s6# /dev/dsk/c1t1d0s3
metadb -a -f -c2 /dev/dsk/c1t1d0s6# /dev/dsk/c1t1d0s4
metainit -f d10 1 1 c1t0d0s0metainit -f d11 1 1 c1t1d0s0
metainit d1 -m d10metaroot d1
metainit -f d20 1 1 c1t0d0s1metainit -f d21 1 1 c1t1d0s1
metainit d2 -m d20
metainit -f d30 1 1 c1t0d0s4metainit -f d31 1 1 c1t1d0s4
metainit d3 -m d30
metainit -f d40 1 1 c1t0d0s5metainit -f d41 1 1 c1t1d0s5
metainit d4 -m d40
metainit -f d50 1 1 c1t0d0s7metainit -f d51 1 1 c1t1d0s7
metainit d5 -m d50
lockfs -fa
init 6

# after reboot run mirroring 2of2.sh
#!/bin/sh
#Mirroring 2 of 2 .sh
metattach d1 d11
metattach d2 d21
metattach d3 d31
metattach d4 d41
metattach d5 d51

Openlink ODBC driver Installation

start a openlink drivers:

move odbc.openlink.tar to /data/postgres
untar install.zip
it will create /data/postgres/source
move source directory to /opt/odbc_postgres'

run sh ./install.sh
----------------------------------------------------------------------------------
Started installation on : hostname
Extracting (odbc_admin.taz) ...Extracting (pgr7_lt.taz) ...Creating link for Generic ODBC driver manager ...
Welcome to the HTTP-based OpenLink ODBC Administrator Setup.
This program will install the HTTP-based OpenLink ODBC Administrator, therebyenabling remote configuration for all OpenLink Drivers from any WebBrowser.
TCP/IP Port to use? [ENTER=8000] :
Log File? [ENTER=www_sv.log] :
Log all requests (y/n)? [ENTER=n] :
Administrator account? [ENTER=admin] :
Administrator's password? [ENTER=admin] :
The HTTP-based OpenLink ODBC Administrator is now ready for use.Please (re)start the HTTP-based OpenLink ODBC Administrator(using the command 'iodbc-admin-httpd.sh start')and then point your Web Browser to the URL below:
http://hostname:8000
Creating scripts
...
End of installation'
----------------------------------------------------------------------------------
run /opt/odbc_postgres/openlink.sh
. ./openlink.sh

copy the appropiate the license file to /opt/odbc_postgres/bin
cd /opt/odbc_postgres/bin
run ./iodbc-admin-httpd.sh start
run ./oplmgr +start
you should see these two openlink daemons running:
openlink daemons:
root 1531924 1 0 16:31:42 pts/5 0:00 ./www_sv
root 1462376 1 0 19:06:30 - 0:00 /home/p139pkg/odbc/source/32bit/bin/oplmgr +start

edit the odbc.ini /opt/odbc_postgres/bin/odbc.ini to connect to postgres database
for example: PG3
if you are getting error message, like connection refused.make sure you have permission to connect to PG3 from your serverthats the file to edit/data/pg_hba.conf
----------------------------------------------------------------

On datastage
1. update the $DSHOME/.odbc.ini with the driver and server info as follows
[ODBC_DSN]
Driver=/opt/odbc_postgres/lib/pgr7_mt_lt.so
PGHOST=X.X.X.X
Host=X.X.X.X:5432
PGPORT=5432
Options= -H x.x.x.x
ServerType=PostgreSQL
Database=mdc_oz
CURSOR_SENSITIVITY=LOW ; Set to HIGH after loading oplrvc.sql
NO_QUOTED_IDENTIFIERS=NHS
ODBC_FIX=N ; Set to Y when using HSODBC
Trace=1
TraceFile=/tmp/trace_pgodbc.log

2. run dsenv