Oracle Solaris 11 configuration and administration notas

por | 6 abril, 2016
Make some first indexing,
updatedb
note. you’ll have to use ‘slocate’, not ‘locate’

 

Oracle Solaris 11 configuration and administration
Introduction
See http://pbraun.nethence.com/doc/sysutils_solaris/network.html for network configuration.
Vmware tools on solaris
System configuration
Disable graphical login,
svcadm disable gdm
Mount an NFS share,
cd /etc/
vi vfstab
nfssrv:/path/to/share  – /mnt/mountpoint nfs – no ro,soft
If you get this error when using pkg,
https protocol error: code: 401 reason: Unauthorized
enable pkg tools,
pkg publisher
Access http://pkg-register.oracle.com/
Fetch the PEMs from https://pkg-register.oracle.com/register/certificate/,
~/pkg.oracle.com.certificate.pem
~/pkg.oracle.com.key.pem
enable the publisher,
pkg set-publisher \
   -k ~/pkg.oracle.com.key.pem \
   -c ~/pkg.oracle.com.certificate.pem \
   -G «*» -g https://pkg.oracle.com/solaris/support/ solaris
#should return nothing,
pkg publisher solaris | grep Mirror
pkg list -a ‘pkg://solaris/*’
pkg install gcc-3
Refs.
Tune your environment a little bit,
cd ~/
cat >> .bashrc <<EOF9
case «$-» in *i*)
alias ll=’ls -alkF’
alias rm=’rm -i’
alias cp=’cp -i’
alias mv=’mv -i’
;;
esac
EOF9
source .bashrc
Also this might help,
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/sfw/bin:/opt/csw/bin:/usr/local/bin:/usr/local/sbin:$HOME/bin
Bring the wheel group back to life (missing the BSD times?),
cd /etc/
grep 100 group
cat >> group <<EOF9
wheel::100:root,admuser
EOF9
note. change ‘admuser’ accordingly
Restrict the SSH service to the wheeled users and enable root login (for test servers only),
cd /etc/ssh/
mv sshd_config sshd_config.dist
sed ‘/^$/d;/^#/d;/^PermitRootLogin/d;/^ListenAddress/d’ sshd_config.dist > sshd_config
cat >> sshd_config <<EOF9
AllowGroups wheel
PermitRootLogin yes
ListenAddress 0.0.0.0
EOF9
note. eventually change the Port too
note. to enable remote root logins you’ll also have to,
vi /etc/default/login
#CONSOLE =/dev/login
rolemod -K type=normal root
apply,
svcadm restart ssh
Configure syslog,
cd /etc/
mv syslog.conf syslog.conf.dist
cat > syslog.conf <<EOF9
*.notice /var/adm/messages
EOF9
note. ‘*.*’ doesn’t work on solaris. You have to define your syslog level manually (here from ‘notice’ up to ‘emerg’)
ref http://www.cuddletech.com/blog/pivot/entry.php?id=642
fix the perms (wheel group has been added),
chown root:wheel messages
chmod 640 messages
apply,
svcadm restart system-log
Configure screen,
cd /etc/
ls -l screenrc*
mv -i screenrc screenrc.dist
wget pbraun.nethence.com/configs/misc/screenrc
cd ~/
ls -l .screenrc*
mv -i .screenrc .screenrc.dist
wget pbraun.nethence.com/configs/misc/.screenrc
vi .screenrc
==> /var/log/syslog
Disable the auto-mount daemon,
svcs | grep auto
svcadm disable autofs
Make some first indexing,
updatedb
note. you’ll have to use ‘slocate’, not ‘locate’
System administration
To shutdown/reboot,
init 0 (shutdown and halt)
poweroff (shutdown and poweroff), or init 5
init 6 (reboot)
note. here’s the equivalent with the shutdown command,
shutdown -y -i0 -g0
shutdown -y -i5 -g0
shutdown -y -i6 -g0
To mount a cdrom manually (automountd disabled),
iostat -En
#pkill vold
mkdir -p /mnt/cdrom/
mount -F hsfs -o ro /dev/dsk/c1t0d0s2 /mnt/cdrom