20070120

notes: solaris' hostname, ip

Files to edit/change hostname manually
--------------------------------------
/etc/hosts
/etc/nodename
/etc/hostname.xxn (xxn = network interface, such as hme0)
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/inet/ipnodes (if file exists and if hostname entry exists)

Files to edit/change the IP manually
------------------------------------
/etc/hosts
/etc/defaultrouter
/etc/netmasks


..and a script thanks to Sandra Henry-Stocker & David Cashion

20070118

cron, at by example b4 rtfm

want to use cron? first create a script

#!/bin/sh
apt-get update


and create mycron.txt(or w'ever name u want), add:

30 23 * * * /home/bambino/script

will run script on 11.30pm everyday. finally, `crontab mycron.txt` as root

want to use at? just `at 11pm 2days`, then enter your commands.

bambino:/home/bambino# at 11pm + 2days
warning: commands will be executed using /bin/sh
at> apt-get update
at> [^D]
job 4 at 2007-01-22 16:00
bambino:/home/bambino#


will run update apt 2days later at 11pm.
to list jobs, `atq`
to show spec. job, `at -c [jobnumber]`

apache, authentication, htaccess, htpasswd

Create a file .htaccess in the web directory

#.htaccess
AuthUserFile /home/bambino/public_html/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require user bambino


To create a user, `htpasswd -c .htpasswd bambino`

20070115

navigating Solaris default man pages sucks

Solaris man pages are using more.

So to change to less, set PAGER environment variable to less:

$ export PAGER="less"

############################################

Update August 18th '07

# export PAGER="less"
PAGER=less: is not an identifier


so i use,
`PAGER="less"; export PAGER`

20070112

enable rstatd on Solaris 10

rstatd is important for stdperfmeter to work. But 5.10 disables it by default.

# svcadm enable rstat

to check, use rpcinfo -p

20070111

secure solaris, auto-boot and eeprom

Auto-boot parameter in eeprom can disable Sun's machine from entering PROM.

# eeprom "auto-boot?"=false

And there are more parameters for consideration credit to Jeff Hunter

20070108

today's note: solaris

kayword: solaris unable to boot CD DVD PROM man -k windex

Get into PROM during boot: command + A

if `man -k` returns /usr/share/man/windex: no such file or directory we have to create the windex database which is also used by whatis and apropos by `catman -w`. While in Linux, `catman` is enough.