Building a Solaris 10 SPAM Box, part 1.

29 March, 2008 (10:01) | Solaris, UNIX

Not the SPAM you’re deleting from your Inbox every day, the SPAM that is comprised of Solaris, PHP, Apache and MySQL. These articles are for my own usage more than anything, but perhaps someone else will find it useful so I though I’d blog it.

While Sun Solaris is a kickarse OS for hosting and the like, I feel there are quite a few things missing from a minimal install that I and many users who come from a GNU/Linux and even a BSD environment have come to expect in a base install. This guide is intended to make it a touch easier on someone who’s new to Solaris from a GNU/Linux or BSD environment, and setting up their first Solaris box.

1) Download Sun Solaris 10 from http://www.sun.com/solaris, and following the guides there assemble the chunks into a DVD ISO. Your choice to burn that to DVD, or keep it as an ISO if you’re using VMWare.
2) Start the Installation. Setup the system as you’d like. Soon you’ll reach a point where you’re asked to choose the type of installation;
3) Choose ‘Custom Install’
Type of Install

At this point you’ll be asked a bunch of standard questions, locales etc. You’ll work those out, pretty easily :)

Now you need to choose the right installation software group, otherwise you’ll end up with a pile of bloat on your nice new Solaris box.

4) Choose ‘Core Group’, and specifically the ‘Custom Packages’ option, then click next.
Software Group

5) At this point, you’ll be presented with a list of packages to install, we’ll just install wget and vold (for mounting/unmounting disks) to make life a little easier.
Solaris’ package installer GUI in the installer is quite braindead and stupid, it knows the dependancies of each package, yet it still expects you to manually select these.. Why, I dont know. Packages in the list are ordered alphabetically, A-Z then a-z.

6) ‘vold’ is installed when you select ‘Volume Management’, be wary of that capital ‘V’ as it’s about 2/3rds down the list, rather than right at the bottom. Check the box for ‘Volume Management’, there should be no dependencies.
7) ‘wget’ is installed when you install the ‘GNU wget’ package, but this has a dependency and will give you a warning. Select ‘As Created’.
Dependancy Warning
8) Now the installer will tell you the dependancy of ‘gcmn - Common GNU Package’. Select ‘Retain Customization’.
Wget Dependancy

9) Look for ‘gcmn’ in the package list and check it, hint: it’s down the list in the lowercase letters :)

Finish the install, and you’re ready to go. Once you’re rebooted, its time to install Bash.

Once the system comes up, login as root using the details specified when you installed the OS. You’re running /bin/sh by default, so expect some pain if you’re used to the Bash Shell.

First, make sure vold is running:
Vold Running

If you get back a Process ID, then its running and if your Solaris DVD is still in the drive it should be mounted, as seen in the above screenshot.

Change directory to the DVD drive and then into the Product directory (Your path may be slightly different):
# cd /cdrom/sol_10_807_x86/Solaris_10/Product

Once you’re here, verify you have a bash package:
# ls -la | grep bash

You should get something like:
Bash Package

Installing it is easy:

# pkgadd -d `pwd` SUNWbash

You’ll be asked a few questions, select ‘y’ to install the package.
Now, to make sure you’re using the ‘bash’ shell when you login, you need to change your user account to specify this, the path to Bash is ‘/usr/bin/bash’, so you just edit the /etc/passwd file, and change the shell for root from /bin/sh to /usr/bin/bash.

Bash Shell
Done!

In Part 2 I will go through installing PHP, Apache and MySQL with Sun’s CoolTools to complete the SPAM box, and in Part 3 setting up Patch Check Advanced to keep your system up to date.

Write a comment