Solaris

De gacq wiki
Revisión del 17:23 15 ene 2007 de Gacq (discusión | contribuciones) (Ver que kernel esta instalado)
Saltar a: navegación, buscar

Software

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
pkginfo
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

Utiles

Para descubrir los nuevos dispositivos

Para no hacer un boot -R

/usr/sbin/drvconfig
/usr/sbin/devlinks
/usr/sbin/disks
/usr/ucb/ucblinks

Cambio hostname Solaris 2.6

 /etc/hosts
 /etc/hostname.le0 (puede ser  hostname.hme0)
 /etc/nodename    (puede ser  modificado con vi o uname)
 /etc/net/ticlts/hosts
 /etc/net/ticots/hosts
 /etc/net/ticotsord/hosts

Activar o Desactivar IP forwarding

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

Ver que kernel esta instalado

isainfo -kv

Misc

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

Sendmail

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 main.mc for main-v7sun.mc in the instructions.

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

cd /usr/lib/mail/cf

2. Make a copy of main-v7sun.mc as sendmail.mc, and make modifications to sendmail.mc.

cp main-v7sun.mc sendmail.mc

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

vi sendmail.mc

Insert the following entries before the MAILER lines:

define(`SMART_HOST', `smart_host.example.com')
MASQUERADE_AS(`example.com')
FEATURE(`masquerade_envelope')

4. Build the sendmail.cf file from the sendmail.mc file.

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

5. Test the sendmail.cf file.

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

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
root

Test header sender and envelope sender masquerading:

> /tryflags HS
> /try esmtp user@host.example.com
Rcode = 0, addr = user@example.com

> /tryflags ES
> /try esmtp user@host.example.com
Rcode = 0, addr = user@example.com

6. Backup the existing sendmail.cf file.

cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.date

7. Install the new sendmail.cf file.

cp sendmail.cf /etc/mail/sendmail.cf

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

kill -HUP `head -1 /var/run/sendmail.pid`