Basic Commands in AIX auditing
http://www.blogger.com/profile/05365174810038891856
|
|
comments (0)
|
addboard -d N SB11
addboard -d N IO11
addboard -d A -c assign SB2 SB4 SB7(any)
deleteboard -c unassign SB2(to delete a board)
deleteboard -c unassign IO3
addtag -d A domainA
deletetag -d domain_id
showkeyswitch -d A
setkeyswitch -d domain_id position (on)
/export/install/SOL_10_0509_SPARC/Solaris_10/Tools
./add_install_client vnl-25k2-b sun4u
boot net - install
|
|
comments (0)
|
|
|
comments (0)
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
comments (0)
|
check the LUN
# /opt/NTAP/SANToolkit/bin/sanlun lun show all|grep Callhistory-Lungrow
Go to format..
Then
# vxdctl enable
# vxdisk scandisks
it will be online status with the number Disk_179
# vxdisksetup -i -f Disk_179 [ -f option for if it assigned previously in any disk group ]
#vxdg init EMC_ESCDG ESCDG01=emcpower1s2
#vxdg -g EMC_ESCDG adddisk ESCDG02=emcpower2s2
# vxdg -g tdwdg adddisk Disk_179=Disk_179
check the mount point primary node
# fsclustadm -v showprimary /ccbs/oradata/u01 2
tabsdb01
check the master node
# vxdctl -c mode
mode: enabled: cluster active - MASTER
master: tabsdb01
vxassist -g EMC_ESCDG make workvol 15g [ alloc="emcpower1s2 emcpower3s2" ]
mkfs -F vxfs /dev/vx/rdsk/EMC_ESCDG/workvol
mount -F vxfs /dev/vx/dsk/EMC_ESCDG/workvol /emc/med/work
Increase the ORAvol01 100g [prev size was 400g, new size will be 500g]
# vxresize -F vxfs -g EMC_ESCDG workvol +100g
check the DG total space
# vxassist -g ORAdg maxsize
Maximum volume size: 209448960 (102270Mb)
#########################################################3
check the LUN
# /opt/NTAP/SANToolkit/bin/sanlun lun show all|grep Callhistory-Lungrow
Go to format..
Then
# vxdctl enable
# vxdisk scandisks
it will be online status with the number Disk_179
# vxdisksetup -i Disk_179 [ -f for force ]
vxdg -g EMC_ESCDG adddisk ESCDG02=emcpower2s2
fsclustadm -v showprimary /ccbs/oradata/u01
vxdctl -c mode [ check the master node ]
vxresize -F vxfs -g EMC_ESCDG workvol +100g
|
|
comments (0)
|
The first thing to do when configuring a quota is to creat a partition
Then make a file system
You can make it parmanet by adding an entry in the fstab
Now create a use for the quota
To verify
|
|
comments (0)
|
You can use the GUI.
/usr/sadm/admin/bin/printmgr &
Please note the gui gives you more simpler way of configuring print in linux, it is explaninatory
Basic commands
#lp -d lloyd >> lloyd is the printer name
#lpadmin -x lloyd >> to remove a printer
#reject printer(printer name)
#enable/disable printer
#lpmove printer1 printer2
#lpadmin -p printer -c >>>> (class)
#lpstat -p printername
#cancel printer
As a system admin you can deny or allow a printer
vi /etc/lp/printer/printername/users-all/deny
lpadmin -p printer -u deny:users
To start and stop a print service
#svcadm enable -t print >>>solaris
#service print start
|
|
comments (0)
|
Zone IntroductionZones are containers to segregate services so that they do notinterfere with each other. One zone, the global zone, isthe locus for system-wide administrative functions. Non-globalzones are not able to interact with each other except throughnetwork interfaces. When using management commands that reference PIDs, only processes in the same zone will be visible from any non-global zone.
Zones requiring network connectivity have at least onededicated IP address. Non-global zones cannot observeeach other's network traffic. Users in the global zone, however,are able to observe the functioning of processes in non-globalzones. It is usually good practice to limit user access tothe global zone to system administrators. Other processes and users should be assigned to a non-global zone.
Each zone is assigned a zone name and a unique numeric zone ID.The global zone always has the name "global" and ID "0."A node name is also assigned to each zone, including global.The node names are independent of the zone names.
Each zone has a path to its root directory relative to theglobal zone's root directory.
A non-global zone's scheduling class is set to be the same as the system's scheduling class. Ifa zone is assigned to a resource pool, its scheduling class can be controlled by controlling the pool's scheduling class.
Non-global zones can have their own zone administrators. Their authority is limited to their home zone.
The separation of the environments allows for bettersecurity, since the security for each zone is independent.Separation also allows for the installation ofenvironments with distinct profiles on the samehardware.
The virtualization of the environment makes it easierto duplicate an environment on different physicalservers.
ZFS is supported in Solaris10 zones from the 6/2006 release and after.
Zone InstallationThe system administrator configures new non-global zonesvia the zonecfg command, administers themviazoneadm and logs into them viazlogin.
Zone StatesZone state information can be viewed withzoneadm list -iv from the global zone.Non-global zones have one of the following states:
configured: Configuration complete and in stable storage.incomplete: Installation or uninstallationunderwayinstalled: Configuration instantiatedon system. Zone has no associated virtual platform.ready: Virtual platform established,zsched started,IPs plumbed, filesystems mounted, zone ID assigned.No zone processes started yet.running:
This state entered when zoneinit process starts.shutting down: Zone being halted.down: Transitional state during zoneshutdown.Zone Control CommandsThe following control commands can be used to manage and monitor transitions between states:
zlogin options
zone-namezoneadm -z zone-name bootzoneadm -z zone-name haltzoneadm -z zone-name installzoneadm -z zone-name readyzoneadm -z zone-name rebootzoneadm -z zone-name uninstallzoneadm -z zone-name verifyzonecfg -z zone-name: Interactive mode;can be used to remove properties of the following types: fs, device, rctl, net, attrzonecfg -z zone-name commitzonecfg -z zone-name createzonecfg -z zone-name deletezonecfg -z zone-name verifyResource ManagementZones can be used to dynamically control resource allocations on a zone basis. This means that an applicationon a zone can be isolated and prevented from throttling other processesin other zones on the same server.
Zone ComponentsThe following components may be included in a zone:
Zone namezonepath: Path to the zone root in the globalzone's file space.autoboot: Whether to start the zone automatically.(Note that the svc:/system/zones:default service needsto be running in SMF for this to work.)pool: Associate the zone with a resource pool; multiple zones may share a pool.net: Zone network interfacefs: File systems from the zone's /etc/vfstab, automounted file systems configured within the zone, manually mounted file systems or ZFS mounts from within the zone.dataset: This allows a non-global zone to manage a ZFS file system.inherit-pkg-dir: In a sparse root zone, representsdirectories containing packaged software that a non-global zoneshares with the global zone. (Should not be used in a whole rootzone.)device: Devices that should be configuredin a non-global zone.rctl: Zone-wide resource controls such as zone.cpu-shares andzone.max-lwpsattr: Zone commentsThe components can be set using the zonecfg command.zonecfg Interactive ModeIn interactive mode, zonecfg can refer to eithera global scope or a specific resource. If no zone is specified inthe original zonecfg command, the scope is globalby default.
If a select or add subcommand isused to specify a resource, the scope limited to that resourceuntil an end or cancel command isissued.
The following subcommands are supported:
(See Resource Management forinformation about what sorts of values to use.)
Zone ModelsThere are two different zone models, sparse and whole root.
Sparse zones only contain a subset of the packages installed intothe root zone. Additional packages can be brought in usingthe inherit-pkg-dirresources. Each sparse zone requires about 100MB of free spacein the global file system. 40MB of free RAM are also recommended.
Whole root zones contain all required packages and also anyoptional Solaris packages that have been selected. The diskspace required for whole root zones is as much as is requiredfor a full installation. Whole root zones allow maximum configurationwithin the zone context.
mkdir zonename
chmod 777 zonename
|
|
comments (0)
|
There are verious method but this is the simplest way in configuring samba.
Please note you install samba first
#mkdir /data
#vi /etc/samba/smb.conf
edit this file and add the below entry but it will be bas e on your requirement
workgroup=CORP
hostallow=your IP
[data]
path=/data
browseable=yes
readabl=yes
Please note this are just veriables which can be add, this means that your file /data should be browseable and readable and the path means the full path to the file which you want to share.
#chkconfig smb on
#service smb start
#smbclient -L //your IP
Please note you should have a user that will access the file /data
useradd lloyd
#smbclient //Your IP/data -U lloyd
#lloyd user password
Now you can start transfering files via samba
Johnson Lloyd.
|
|
comments (0)
|
Table 3-7. Access mode codes
CodeMeaning0 or -The access right that is supposed to be on this place is not granted.4 or rread access is granted to the user category defined in this place2 or wwrite permission is granted to the user category defined in this place1 or xexecute permission is granted to the user category defined in this placeTable 3-8. User group codes
CodeMeaninguuser permissionsggroup permissionsopermissions for othersThisstraight forward scheme is applied very strictly, which allows a highlevel of security even without network security. Among other functions,the security scheme takes care of user access to programs, it can servefiles on a need-to-know basis and protect sensitive data such as homedirectories and system configuration files.
You should know what your user name is. If you don't, it can be displayed using the id command, which also displays the default group you belong to and eventually other groups of which you are a member:
tilly:~> id
uid=504(tilly) gid=504(tilly) groups=504(tilly),100(users),2051(org)
Your user name is also stored in the environment variable USER:
tilly:~> echo $USER
tilly
3.4.2. The tools3.4.2.1. The chmod commandAnormal consequence of applying strict file permissions, and sometimes anuisance, is that access rights will need to be changed for all kindsof reasons. We use the chmod command to do this, and eventually to chmod has become an almost acceptable English verb, meaning the changing of the access mode of a file. The chmod command can be used with alphanumeric or numeric options, whatever you like best.
The example below uses alphanumeric options in order to solve a problem that commonly occurs with new users:
asim:~> ./hello
bash: ./hello: bad interpreter: Permission denied
asim:~> cat hello
#!/bin/bash
echo "Hello, World"
asim:~> ls -l hello
-rw-rw-r-- 1 asim asim 32 Jan 15 16:29 hello
asim:~> chmod u+x hello
asim:~> ./hello
Hello, World
asim:~> ls -l hello
-rwxrw-r-- 1 asim asim 32 Jan 15 16:29 hello*
The + and -operators are used to grant or deny a given right to a given group.Combinations separated by commas are allowed. The Info and man pagescontain useful examples. Here's another one, which makes the file fromthe previous example a private file to user asim:
asim:~> chmod u+rwx,go-rwx hello
asim:~> ls -l hello
-rwx------ 1 asim asim 32 Jan 15 16:29 hello*
The kind of problem resultingin an error message saying that permission is denied somewhere isusually a problem with access rights in most cases. Also, commentslike, "It worked yesterday," and "When I run this as root it works," are most likely caused by the wrong file permissions.
When using chmodwith numeric arguments, the values for each granted access right haveto be counted together per group. Thus we get a 3-digit number, whichis the symbolic value for the settings chmod has to make. The following table lists the most common combinations:
Table 3-9. File protection with chmod
CommandMeaningchmod 400 fileTo protect a file against accidental overwriting.chmod 500 directoryTo protect yourself from accidentally removing, renaming or moving files from this directory.chmod 600 fileA private file only changeable by the user who entered this command.chmod 644 fileA publicly readable file that can only be changed by the issuing user.chmod 660 fileUsers belonging to your group can change this file, others don't have any access to it at all.chmod 700 fileProtects a file against any access from other users, while the issuing user still has full access.chmod 755 directoryFor files that should be readable and executable by others, but only changeable by the issuing user.chmod 775 fileStandard file sharing mode for a group.chmod 777 fileEverybody can do everything to this file.If you enter a number with less than three digits as an argument to chmod,omitted characters are replaced with zeros starting from the left.There is actually a fourth digit on Linux systems, that precedes thefirst three and sets special access modes. Everything about these andmany more are located in the Info pages.
|
|
comments (0)
|
Upgrading to SF Oracle RAC 5.0 MP3 & RP3
Preparingto upgrade SF Oracle RAC to 5.0 MP3
Beforeyou install SF Oracle RAC Maintenance Pack 3, you must stop Oracle RAC
andthe cluster resources.
Tostop Oracle RAC and the cluster resources
1 Log in as superuser to one of the nodes,TABSDB01, in the cluster.
2 Create a backup of the existing clusterconfiguration. Back up the main.cf,
types.cf,and OracleTypes.cf on all cluster nodes:
#cp/etc/VRTSvcs/conf/config/main.cf /etc/VRTSvcs/conf/config/main.cf.save
#cp/etc/VRTSvcs/conf/config/types.cf /etc/VRTSvcs/conf/config/types.cf.save
#cp/etc/VRTSvcs/conf/config/OracleTypes.cf /etc/VRTSvcs/conf/config/OracleTypes.cf.save
3 Make a backup of vcsmm.conf.
#cp /kernel/drv/vcsmm.conf /kernel/drv/vcsmm.conf.save
4 For Oracle RAC 10g, stop all resources.
■ If the database instances are under VCScontrol, take the corresponding
VCSservice groups offline. As superuser, enter:
#hagrp -offline group_name -any
■ If the database instances are under CRScontrol, then run the following
onone node:
$srvctl stop database -d database_name
■ If the resources are under CRS control,stop all resources configured under
CRScontrol. As Oracle user, enter:
$srvctl stop nodeapps -n sys
Repeatthe above command for each node in the cluster. Note that if the
Oraclelistener or database instances are managed by CRS, they are taken
offlineby the “srvctl” command shown above.
5 For Oracle RAC 10g or Oracle RAC 11g, stopCRS on each node in the cluster.
Symantechighly recommends putting CRS under VCS control.
■ If CRS is controlled by VCS, log in assuperuser on any system in the cluster
andenter:
#hares -offline cssd-resource -sys galaxy
#hares -offline cssd-resource -sys nebula
■ If CRS is not controlled by VCS, log in assuperuser on each system in the
clusterand enter:
#/etc/init.d/init.crs stop
6 Take offline all other VCS groups thatdepend on VxFS file systems or VxVM
diskgroups, whether local or CFS.
7 Stop all applications that use VxFS or VxVMbut that are not under VCS
control.
8 Make sure that no processes are runningwhich make use of mounted shared
filesystem or shared volumes.
9 Take offline all VCS groups that containCFSMount and CVMVolDg.
#hagrp -offline group -sysgalaxy
#hagrp -offline group -sysnebula
10 Unmount all the VxFS file system which isnot under VCS control.
#mount -v |grep vxfs
#fuser -c /mount_point
#umount /mount_point
11 Deport any CVM disk groups that are notunder VCS control.
12 Set the VCS resource attribute, AutoStart,to 0 for all VCS resources that
managethe Oracle RAC 10g or Oracle RAC 11g CRS or Oracle RAC database
instances.From any system in the cluster, enter:
#haconf -makerw
#hagrp -modify oracle_group AutoStart 0
#hagrp -modify cvm_group AutoStart0
#haconf -dump -makero
13 If you are upgrading from SF Oracle RAC5.0x, run the following command
onall nodes in the SF Oracle RAC cluster:
#hastop -all
14 For Oracle RAC 10g or Oracle RAC 11g,comment out the CRS-specific lines
inthe /etc/inittab file to prevent the system from starting the CRS daemons
duringsystem startup. On each system, prefix the CRS lines with a colon (”:”)
tocomment them out.
Forexample:
:h1:2:respawn:/etc/init.evmdrun >/dev/null 2>&1 /null
:h2:2:respawn:/etc/init.cssdfatal >/dev/null 2>&1 /null
:h3:2:respawn:/etc/init.crsdrun >/dev/null 2>&1 /null
15 Stop Cluster File System on all nodes usingthe following command:
#/opt/VRTSvxfs/sbin/fsclustadmcfsdeinit
16 For an optional port verification step,make sure only ports a, b, d, and o are
open:
#gabconfig -a
GABPort Memberships
=======================================================
Porta gen 6b5901 membership 01
Portb gen 6b5904 membership 01
Portd gen 6b5907 membership 01
Porto gen 6b5905 membership 01
23For an optional disk group verificationstep, make sure no disk groups are
imported:
#vxdg list
NAMESTATE ID
#
^^^NOTE: no diskgroups imported
17 Start VCS:
#hastart
18 Start VCS on other nodes:
#hastart
To make sure the file system is clean
1 Verify the VCS service groups with CVMVolDgand CFSMount are offline.
#hagrp -state group
2 Check and repair each file system:
#fsck -F vxfs /dev/vx/dsk/diskgroup/volume
Upgrading to SF Oracle RAC 5.0 MP3
Upgradingfrom SF Oracle RAC 5.0x using the installmp installer
Ifyou have a working SF Oracle RAC 5.0 or 5.0MP1cluster you can add the patches
usingthe installmp installer.
Toupgrade to SF Oracle RAC 5.0 MP3 using the installmp installer
1 Insert the disc containing the Veritas SFOracle RAC 5.0 MP3 software in a
discdrive connected to one of the nodes for installation.
2 Log in as superuser on one of the systemsfor installation.
3 Mount the software (5.0 MP3) disc.
#mkdir /cdrom
#mount -F hsfs -o ro /dev/dsk/c0t6d0s2/cdrom
4 Browse to the directory containinginstaller program.
#cd /cdrom
Where/cdrom is the software disc mount point.
5 Start the SF Oracle RAC installer utility.
Invokeinstallmp fromone of your cluster nodes using the option that
correspondsto your configuration:
■ To install using SSH (default):
#./installmp galaxy nebula
■ To install using RSH:
#./installmp -rsh galaxy nebula
6 Review the output as the installer checksthat the systems are ready for
installation.At the conclusion of these initial checks, and before installing
anysoftware, the installer does the following:
■ Creates a log file (installmp-xxxxxx) oneach system in the directory
/var/tmp.
■ Specifies the utilities it uses tocommunicate with the remote systems;
typicallythis is ssh -x and scp
■ Lists the packages that it will install oneach system
StorageFoundation Cluster File System and Veritas Enterprise Administrator
processesmust be stopped before adding patches. When you are prompted:
installmpis now ready to install MP3.
Required5.0 processes that are currently running will be
stopped.
Areyou sure you want to install MP3? [y,n,q] (y)
PressEnter to continue.
7 Note the location of the summary and logfiles for future reference.
8 On all nodes, restore the configurationfiles from the backups created in an
earlierprocedure.
■ Restore the original main.cf file:
#cp /etc/VRTSvcs/conf/config/main.cf.save /etc/VRTSvcs/conf/config/main.cf
■ Merge any changes you made to the originaltypes.cf file and backed up
ina previous procedure at:
/etc/VRTSvcs/conf/config/types.cf.save
withthe new types.cf file at:
/etc/VRTSvcs/conf/types.cf
■ Merge any changes you made to the originalOracleTypes.cf file and backed
upin a previous procedure at:
/etc/VRTSvcs/conf/config/OracleTypse.cf.save
withthe new types.cf file at:
/etc/VRTSvcs/conf/config/OracleTypes.cf
■ Restore the original vcsmm.conf file:
#cp /kernel/drv/vcsmm.conf.save/kernel/drv/vcsmm.conf
9 Restart each system in the cluster.
#/usr/sbin/shutdown -g0 -y -i6
10 Make sure that all eight GAB ports are upafter the restart.
#gabconfig -a
11 Make sure that all the resources configuredunder VCS except the CSSD and
Oracleresource come online.
Performing post-upgrade tasks for SFOracle RAC 5.0 MP3
Youmust relink Oracle RAC to the Veritas libraries after upgrading to SF Oracle
RAC5.0 MP3.
Torelink Oracle RAC 10g or Oracle RAC 11g using the installer
1 Make sure CRS is offline before relinking.
2 Invoke the installsfracinstaller:
#cd /opt/VRTS/install
#./installsfrac -configure
3 Enter the system names when prompted:
Enterthe system names separated by spaces on which to configure
SFRAC:galaxy nebula
4 Navigate to the “Install or Relink Oracle”menu.
■ Select the appropriate Oracle version:
1)Oracle 9iR2
2)Oracle 10gR1
3)Oracle 10gR2
4)Oracle 11g
■ Select “Relink Oracle” from the menu:
1)Install Oracle Clusterware (CRS)
2)Install Oracle RDBMS server
3)Relink Oracle
b)[Go to previous menu]
5 In the “Install or Relink Oracle” menu,enter the required information. For
example,if you are using Oracle RAC 10g R2:
EnterOracle UNIX user name: [b] (oracle) oracle
EnterOracle UNIX group name: [b] (oinstall) oinstall
EnterOracle base directory: [b] /app/oracle
Enterabsolute path of CRS home directory: [b] /app/crshome
Enterabsolute path of Database Home directory: [b] /app/oracle/
orahome
EnterOracle Bits (64/32) [b] (64) 64
6 Confirm your responses in the verificationscreen. The installer copies the
SFOracle RAC libraries to $ORACLE_HOME/lib.
Oracleenvironment information verification
OracleUnix User: oracle
OracleUnix Group: oinstall
OracleClusterware (CRS) Home: /app/crshome
OracleRelease: 10.2
OracleBits: 64
OracleBase: /app/oracle
OracleHome: /app/oracle/orahome
Isthis information correct? [y,n,q](y)
7 If any VCS service groups were frozenduring the upgrade, unfreeze them.
Asroot user, enter:
#haconf -makerw
#hagrp -unfreeze group_name -persistent
#haconf -dump -makero
8 As root user, remove the prefix “:” touncomment the CRS-specific lines in
the/etc/inittab file.
9 Start CRS on each node in the cluster.
■ If CRS is not controlled by VCS, log in assuperuser on each system in the
clusterand enter:
#/etc/init.d/init.crs start
■ If CRS is controlled by VCS, log in assuperuser on any system in the cluster
andenter:
#hares -online cssd-resource -sys galaxy
#hares -online cssd-resource -sys nebula
10 Start all resources.
■ If the Oracle RAC database instances areunder VCS control, bring the
correspondingVCS service groups online. As superuser, enter:
#hagrp -online oracle_group -sys galaxy
#hagrp -online oracle_group -sys nebula
■ If the database instances are under CRScontrol, then run the following
onone node:
$srvctl start database -ddatabase_name
■ If the resources are under CRS control,start all resources configured
underCRS control. As Oracle user, enter:
$srvctl start nodeapps -n sys
Repeatthe above command for each node in the cluster. Note that if the
Oraclelistener or database instances are managed by CRS, they are taken
offlineby the srvctl commandshown above.
11 Verify that the Oracle RAC instances are upand running.
12 Reset the VCS resource attribute AutoStartto 1 for all resources that manage
OracleRAC CRS and database instances. As root user on any system in the
cluster,enter:
#haconf -makerw
#hagrp -modify oracle_group AutoStart 1
#hagrp -modify cvm_group AutoStart1
#haconf -dump -makero
Upgrading CVM disk group version
Totake advantage of the new features in this release, you must upgrade theVeritas
ClusterVolume Manager (CVM) disk group version to 140. The default protocol
versionis 80 and does not need to be upgraded.
Toupgrade the disk group version
1 Upgrade the disk group version to 140.Enter the following command on the
masternode:
#vxdg -T 140 upgrade <disk_group_name>
2 After upgrading CVM in a VCS environment,you should run the command:
#vxcvmconfig upgrade
Ifthis command is not run, you will see a warning in the engine log file,
/opt/VRTSvcs/log/engine_A.log.
Toverify the cluster protocol version
◆ Enterthe following command to verify the cluster protocol version:
#/opt/VRTS/bin/vxdctl protocolversion
Upgrading to SF Oracle RAC 5.0 RP3 (ROLLING PATCH)
Upgrading using the installrp script:
This section describes how to upgrade to 5.0 MP3 RP3 using the installrp
script.
To upgrade the Veritas software using the installrp script
1 Load and mount the 5.0 MP3 RP3 software disc.
2 Move to the top-level directory on thedisc.
3 Run the installrpscript to upgrade to 5.0 MP3 RP3:
# installrp node1node2 ...
Theinstallrp scriptstops all the processes and upgrades to 5.0 MP3 RP3.
4 Once the installrpscript completes, reboot the node(s).