Difference between revisions of "Solaris tricks"
(Added Static IP config info for solaris) |
|||
Line 17: | Line 17: | ||
* Edit /etc/hosts and /etc/inet/ipnodes and put in the IP address and the hostname | * Edit /etc/hosts and /etc/inet/ipnodes and put in the IP address and the hostname | ||
* Edit /etc/defaultdomain and add your FQDN | * Edit /etc/defaultdomain and add your FQDN | ||
− | * If you're not using a normal subnet, edit /etc/inet/netmasks and add your own custom one | + | * If you're not using a normal subnet, edit /etc/inet/netmasks and add your own custom one |
* Reboot (I have no idea how to restart the appropriate services) | * Reboot (I have no idea how to restart the appropriate services) | ||
* Fume at the ridiculousness of solaris | * Fume at the ridiculousness of solaris |
Revision as of 16:39, 28 April 2008
Page containing various magical things that I've learned about opensolaris in my quest to get it working as I want it.
Writing a Sun disk label to a hard drive
The solaris installer will crash and burn if the disks you're installing to don't have a valid sun disk label. To ensure you have one, get to a command prompt from the solaris installer (right click the desktop in the graphical installer and select program->terminal).
# format -e
Pick the disk you want to label, it will ask you if you want to label it. Say 'y'. This should fix things. Select any additional disks with the 'disk' command, then 'quit'.
Setting a Static IP
This is way more cumbersome than you'd expect:
- Edit /etc/nodename and /etc/hostname.<mymaininterfacename> (probably hme0) and put the hostname in the file
- Delete /etc/dhcp.<mymaininterfacename> if it exists
- Edit /etc/hosts and /etc/inet/ipnodes and put in the IP address and the hostname
- Edit /etc/defaultdomain and add your FQDN
- If you're not using a normal subnet, edit /etc/inet/netmasks and add your own custom one
- Reboot (I have no idea how to restart the appropriate services)
- Fume at the ridiculousness of solaris
I use x2x to send keyboard input to my opensolaris box. It's an Ultra 80 with a Sun Type 4 keyboard. However, the machine I x2x from is a PC with an IBM Type-M keyboard. By default, any shortcuts using the alt key don't work. However, if on the PC you run the following command:
xmodmap -e "keysym Alt_L = Meta_L Alt_L"
It should fix the issues with shortcuts using alt. This works better than using xmodmap on the sun machine. I'm not sure why but I'm not gonna argue.
Using the xterm-color terminfo file
The xterm that comes with solaris, like so many of the bundled applications, sucks. I've installed a better version from pkgsrc. To get solaris to find the terminfo file for xterm-color I've added the following to my ~/.zshrclocal (a file I use for per-machine shell configuration/overrides):
export TERMINFO=/usr/pkg/share/lib/terminfo
if [ $TERM = xterm ]; then export TERM=xterm-color fi
Making man(1) not suck so much
Install misc/less from pkgsrc
alias more=less export PAGER=less export MANPATH=/usr/man:/usr/pkg/man
Getting a locate command on the system
Install sysutils/findutils. Edit root's crontab (sudo crontab -e root or whatever)
1 3 * * * /usr/pkg/bin/gupdatedb
Then:
alias locate=glocate
Either wait for 3am to roll around or run that gupdatedb command as root. It runs as the daemon user by default for security purposes (it won't index your 0600 chmodded pr0n).