Happy Sysadmin day!

July 25th, 2008

Today July 25th, is the 9th annual System Administrator Appreciation Day.

Solaris 10 post-installation tasks

May 30th, 2008

This post outlines some of the post-installation tasks I usually perform after a fresh Solaris 10 installation. Note that this is my own approach and that it is based on x86 archictecture.

The first general tasks involve linuxifying the new environment and setting some environment variables:

a) Changing root account settings:

vi /etc/passwd
root:x:0:0:Super-User:/root:/usr/bin/bash

b) Creating a directory for the root account:

mkdir /root
mv /.bash* /root
mv /.sunw /root

c) Modifying /etc/profile or /root/.bash_profile according to my preferences:

PS1=’[33[01;31m]SERVER-NAME [33[00m]u@h:[33[01;34m]w[33[00m]$ ‘

alias la=”ls -alh”
alias cp=”cp -i”
alias mv=”mv -i”
alias rm=”rm -i”

PATH=/opt/csw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:$PATH
export PATH

export TERM=xterm

d) Network stuff:

vi /etc/resolv.conf

search mydomain.com
nameserver 192.168.1.2

vi /etc/defaultrouter

192.168.1.1

cd /etc
cp nsswitch.dns nsswitch.conf

e) Once finished this basic configuration, I usually install and configure PKG-GET for the package management:

mkdir /tmp/karkoma

cd /tmp/karkoma

/usr/sfw/bin/wget http://www.blastwave.org/pkg_get.pkg
pkgadd -d pkg_get.pkg all

/usr/sfw/bin/wget http://www.blastwave.org/wget-i386.bin
chmod 755 wget-i386.bin

PATH=/tmp/karkoma:/opt/csw/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin
export PATH

vi /opt/csw/etc/pkg-get.conf

Change this file according to your needs, remember to pick a mirror nearest to you. Then continue with the following:

pkg-get -i wget

PATH=/opt/csw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin
export PATH

pkg-get -i gnupg

Note that by adding the PATH to /etc/profile it will be available system wide.

f) Add users to your new environment:

mkdir -p /export/home
useradd -d /export/home/username -m -s /bin/bash -c “Franz Kafka” username
passwd username

g) Finally disable un-needed services

svcadm disable sendmail
svcadm disable ftp
svcadm disable telnet
svcadm disable finger

That’s all. Now, what kind of tasks do you perform in a fresh installation?

References:

Another alternative to Bind: Unbound DNS server

May 21st, 2008

DJBDNS, MaraDNS… and now another player in the DNS servers ground: Unbound.

Unbound is a validating, recursive, and caching DNS resolver.

The C implementation of Unbound is developed and maintained by NLnet Labs. It is based on ideas and algorithms taken from a java prototype developed by Verisign labs, Nominet, Kirei and ep.net.

Unbound is designed as a set of modular components, so that also DNSSEC (secure DNS) validation and stub-resolvers (that do not run as a server, but are linked into an application) are easily possible.

The source code is under a BSD License.

Unbound 1.0.0 was released in May 20.

Nine Inch Nails’ new album under Creative Commons

May 5th, 2008

You know that this kind of post is not usual in this site but I think it worth it. According to their web site:

as a thank you to our fans for your continued support, we are giving away the new nine inch nails album one hundred percent free, exclusively via nin.com.

the music is available in a variety of formats including high-quality MP3, FLAC or M4A lossless at CD quality and even higher-than-CD quality 24/96 WAVE. your link will include all options – all free. all downloads include a PDF with artwork and credits.

the slip is licensed under a creative commons attribution non-commercial share alike license.

This people is really a pioneer in the music world. Congratullations to their fans.

Is Linux less costly for web infrastructure than Solaris a myth?

April 30th, 2008

This is an interesting point of view of Robin Goldfarb, a blogger from Sun’s blog hub. He points out why he and others from Sun consider Solaris to be less costly than Linux. Check it out!

New Solaris 10 release

April 13th, 2008

According to Sun, the new Solaris 10 5/08 release will be available on April 14, 2008. This new release includes a lot of improvements and new features. Take a look into what’s new.

System stats with saidar

April 6th, 2008

saidar is a top like tool. It provides a curses based interface for viewing system statistics such as network I/O, disk I/O, CPU, memory and more. The core of the functionality is provided by the libstatgrab library:

libstatgrab is a library that provides cross platform access to statistics about the system on which it's run. It's written in C and presents a selection of useful interfaces which can be used to access key system statistics. The current list of statistics includes CPU usage, memory utilisation, disk usage, process counts, network traffic, disk I/O, and more.

On a Debian system install the package as usual:

apt-get install saidar

and then run:

saidar

Saidar in action

Debian: record boot messages

April 6th, 2008

Debian allows you to record boot messages by means of the bootlogd daemon. According to man pages:

Bootlogd runs in the background and copies all strings sent to the /dev/console device to a logfile. If the logfile is not accessible, the messages will be kept in memory until it is.

This feature is not enabled by default. Edit /etc/default/bootlogd and modify it to enable recording of boot messages:

# Run bootlogd at startup ?
BOOTLOGD_ENABLE=Yes

Now bootlogd will start sending boot messages to /var/log/boot.

Determine Solaris OS release

March 30th, 2008

Solaris OS provides the /etc/release file to easily determine the base OS level or the OS release.

cat /etc/release

Solaris 10 8/07 s10x_u4wos_12b X86
Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 August 2007

Remote login to a Solaris 10 box

March 12th, 2008

Xnest is a nested X server that I use in some cases to remotely access my Solaris 10 boxes. From Xnest man pages:

Xnest is a client and a server. Xnest is a client of the real server which manages windows and graphics requests on its behalf. Xnest is a server to its own clients. Xnest manages windows and graphics requests on their behalf. To these clients Xnest appears to be a conventional server.

I’ve installed X11 on my MacBook and now I can log into my server:

Xnest -query solaris_host01 :2 &

If you get an error like this:

Not on system console, root login rejected

Edit /etc/default/login and comment out the following line.

# CONSOLE=/dev/console

Be very carefull with this for the security implications. That’s all.