Ajitabh Pandey's Soul & Syntax

Exploring systems, souls, and stories – one post at a time

Tag: Solaris

  • UW IMAP on OpenSolaris 2009.06

    It is quite surprising that the opensolaris distribution does not come with an imap server in the standard repositories. I needed one and the simplest one to use is the one from UW IMAP.

    I downloaded the source package from:

    ftp://ftp.cac.washington.edu/imap/imap.tar.gz

    The UW IMAP documentation is at http://www.washington.edu/imap/documentation/

    I have GCC installed in my opensolaris 2009.6
    (more…)

  • Changing the Hostname of a Solaris System

    On Solaris 10 the value in the /etc/nodename file is sufficient for setting the hostname of the system.
    The hostname of a solaris system needs a change in the following files. So replace the old hostname with the new one in these file. Do not try to comment out as this may lead to some boot time errors.

    • /etc/nodename
    • /etc/hosts
    • /etc/hostname.*
    • /etc/net/*/hosts
    • /etc/inet/ipnodes (Solaris 10 or later)

    In order to change the hostname and nodename for the current session run:

    uname -S new_hostname

    Next change the savecore-dir (Solaris 7 or later)

    dumpadm -s /var/crash/`uname -n`

    Finally restart the syslog service to log messages using the new hostname.

    Courtsey – http://www.princeton.edu/~unix/Solaris/troubleshoot/hostname-change.html

  • Solaris10 on VirtualBox

    I installed Solaris10 11/06 on VirtualBox 1.5.6 OSE. The first problem immediately after installation I faced was that of mouse not being captured by virtual machine. So I open a terminal window and start the vold and then ran the volcheck command.

    /etc/init.d/volmgt start
    volcheck
    

    The mouse started working after this. The reason for this I guess is because I did not had the mouse inside the virtual machine while booting. I need to confirm this.

    Moving the home directory of root from / to /root:

    Changing the home directory of root using “usermod” command does not work as the root user is logged in. So edit the /etc/passwd file and change root’s home directory to /root. Logout and login again. After that remove all the /.* files and /Desktop directory.

    vi /etc/passwd
    rm -rf /.*pwd
    rm -rf /Desktop
    

    Installing third-party tools

    Next I need to install third party tools in the virtual machine. I downloaded the “pkg-get” as:

    pkgadd -d http://www.blastwave.org/pkg_get-3.8.4-SunOS5.8-all-CSW.pkg
    

    Next I downloaded the static version of the wget utility using mozilla from http://www.blastwave.org/wget-i386.bin and renamed it as wget.
    Next I put the directory containing the wget utility and the /opt/csw/bin directory in default PATH. The first thing installed was wget itself, so that I can get rid of the static version.

    pkg-get install wget
    

    Patch check advanced is a utility which I installed next to apply patches to the operating system.

    pkg-get install pca
    

    The gnupg program was needed to verify the signatures on the catalogue files. This can be installed as:

    pkg-get install gnupg
    

    To install the gpg key of the blastwave repository use the following commands:

    wget --output-document=/tmp/gpg.key http://www.blastwave.org/mirrors.php
    gpg --import /tmp/gpg.key
    
  • Swap Space Management in Solaris

    The swap utility provides an administrative interface to the management of the system swap areas. A standard swap partition which is not under the volume manager control cannot be resized, but swap space can be added using swap files.

    Create a swapfile of 512MB in /local:

    mkfile 512M /local/swapfile01

    Add the swap to system swap space:

    swap -a /local/swapfile01
    swap -a /dev/dsk/c0t0d0s1

    Add /etc/vfstab entry to add the swap space to make sure it is recognized after reboot:

    /local/swapfile01       -       -       swap    -       no      -
    /dev/dsk/c0t0d0s1       -       -       swap    -       no      -

    Delete a swap space:

    swap -d /local/swapfile01
    swap -d /dev/dsk/c0t0d0s1

    The /etc/vfstab entry has to be removed after removing the swap space.

    List swap space:

    swap -l

    List swap space statistics:

    swap -s
  • Timezones in Solaris

    The available timezones in solaris are listed in /usr/share/lib/zoneinfo/
    To find out the current timezone on the system:

    grep '^TZ' /etc/TIMEZONE
    

    and in order to change the timezone, modify the TZ line in /etc/TIMEZONE and then reboot the system.