De gacq wiki
Saltar a: navegación, buscar


Package Management

List patches applied
patchadd -p
To apply a patch
Untar the patch tar.Z
patchadd <dir>
To add a package
pkgadd -d <package file>
To add a package in tar format
tar xvfz package.tar.Z
pkgadd -d .
This will ask you which packages in the current directory you wish to install.
To remove a package
pkgrm <package>
To get info on a package
pkginfo -x <package>
pkginfo -l <package>
To list all installed packages
To find out which package a file is in
grep <file> /var/sadm/install/contents
To find out what files are in a package
grep <package> /var/sadm/install/contents

Patch Management

The most common commands

install_cluster - install cluster patches by using the command. This is command used for installing Recommended Cluster, the most common patching method in Solaris. You can also manage patches through the Solaris™ Management Console, but command line is simpler.

showrev -p  -- List patches
patchadd – Installs uncompressed patches
patchrm – Removes patches installed

Each patch is also identified with a revision number separated by a dash from the patch number. It is only necessary to install the most current revision. 116268-05 would indicate a patch revision of 05, and all patches with the revision lower than 05 would be considered obsolete. The patch number typically does not change, however the revision number changes with every new release. This makes it easy to identify new releases.

Important directories

/var/sadm/pkg directory is used to save the base packages

/var/sadm/patch contains the list of installed patched. The date of the creation of a directory for a particular patch is actually the date of patch installation.


Discover new devices

Para no hacer un boot -R


Hostname change (Solaris 2.6)

 /etc/hostname.le0 (puede ser  hostname.hme0)
 /etc/nodename    (puede ser  modificado con vi o uname)

Activar o Desactivar IP forwarding

ndd -set /dev/ip ip_forwarding (1 o 0)

Ver que kernel esta instalado

isainfo -kv


To find out what runlevel you're in
who -r




  • sysdef - output system definition
  • ipcs - to see your shared memory and semaphore use


  • SHMMAX - kernel parameter controlling maximum size of one shared memory segment
  • SHMMHI - kernel parameter controlling maximum number of shared memory segments in the system
  • SHMSEG - kernel parameter controlling maximum number of shared memory segments a process can attach
  • SEMMNS - kernel parameter controlling maximum number of semaphores in the system
  • SEMMNI - kernel parameter controlling maximum number of semaphore sets. Semphores in Unix are allocated in sets of 1 to SEMMSL. *SEMMSL - kernel parameter controlling maximum number of semaphores in a semphore set.
  • SHMLBA - kernel parameter controlling alignment of shared memory
*set semsys:seminfo_semmsl=260 
*set semsys:seminfo_semmns=1024 
*set semsys:seminfo_semmni=100 
set shmsys:shminfo_shmmax=2147483648 
set shmsys:shminfo_shmmin=1 
set shmsys:shminfo_shmmni=200 
set shmsys:shminfo_shmseg=15 
set semsys:seminfo_semmsl=1000 
set semsys:seminfo_semmni=500 
set semsys:seminfo_semmns=2000 
set semsys:seminfo_semmap=100 
set semsys:seminfo_semmnu=3000 
set semsys:seminfo_semume=20 
set msgsys:msginfo_msgmni=500 
set msgsys:msginfo_msgmap=1000 
set msgsys:msginfo_msgmax=32768 
set msgsys:msginfo_msgmnb=2097152 
set msgsys:msginfo_msgssz=64 
set msgsys:msginfo_msgtql=400 
set msgsys:msginfo_msgseg=1024 
set pt_cnt=100


Configuring the Solaris-supplied version of Sendmail In this example, I will configure the version of Sendmail (8.11.7) that was installed by default on a Solaris 8 system. Sendmail will be configured to use header sender and envelope sender address masquerading and a "smart host."

On Solaris 9, substitute for in the instructions.

1. Change to the directory containing the Sendmail configuration files.

cd /usr/lib/mail/cf

2. Make a copy of as, and make modifications to


3. Configure In this example, we want to use the "smart host" and masquerade both the header sender and envelope sender addresses as


Insert the following entries before the MAILER lines:

define(`SMART_HOST', `')

4. Build the file from the file.

/usr/ccs/bin/m4 ../m4/cf.m4 >

5. Test the file.

/usr/lib/sendmail -bt -C./

Make sure that root is an "exposed user." An exposed user is a user that will not be masqueraded. This is used when accounts, such as root, are not unique across systems.

> $=E

Test header sender and envelope sender masquerading:

> /tryflags HS
> /try esmtp
Rcode = 0, addr =

> /tryflags ES
> /try esmtp
Rcode = 0, addr =

6. Backup the existing file.

cp /etc/mail/ /etc/mail/

7. Install the new file.

cp /etc/mail/

8. Sendmail the Sendmail process a SIGHUP to begin using the new configuration file.

kill -HUP `head -1 /var/run/`