February 3, 2010
Operating System |
Platform |
Application(s) |
Other |
|
|
|
N / A |
This document describes the process of configuring a Sun Solaris 10 (SPARC) JumpStart server. I will also provide an example JumpStart profile that will install a stripped down GNU GCC development / server environment. Once the client is ready, we will install the GCC for Sun Systems compilers from Sun (err, Oracle) and remove the old version of GCC included in the base installation.
I always include a development foundation when installing Solaris because Sun's package and patching systems are disgusting. Therefore, most of my work is done using source code for application installation. I also use Martin Paul's excellent patching software, PCA, for all updating needs.
Test Platform:
- Sun Fire V240
- 2x 1Ghz UltraSPARC-IIIi / 8GB RAM
- Solaris 10 OE 10/09
Keep in mind that this document does not cover hardening the system. That process is outlined in other documents from myself or others, and is very specific to the intended purpose of the machine.
This guide assumes you already have Solaris 10 installed on what will now be your JumpStart server.
First, download the Sun Solaris 10 (SPARC) installation DVD bits from sun.com. Then, copy it to your soon-to-be JumpStart server.
You will need to have root access to perform the following functions. On my system, I created a disk partition named /jumpstart. Most people stick it in /export. Here, we'll do it my way (assume a separate /jumpstart slice). Also, my OS ISO file was saved to my user directory, /export/home/randy.
# cd /jumpstart
# mkdir /mnt/temp
# lofiadm -a /export/home/randy/sol-10-u8-ga-sparc-dvd.iso
# mount -F hsfs /dev/lofi/1 /mnt/temp |
Now that we have that out of the way, it is time to create our source directory and run the installation script:
# mkdir /jumpstart/solaris_10_js
# /mnt/temp/Solaris_10/Tools/setup_install_server /jumpstart/solaris_10_js |
This will copy all necessary installation files to the server. Once finished this part, you can unmount and delete the ISO file. Once finished, we can create the configuration files for our automated installations:
# mkdir /jumpstart/solaris_10_js/config
# cd /jumpstart/solaris_10_js/config
# vi
sysidcfg |
The sysidcfg file contains information for setting system locales, timezone, IP information, and much more. Here is the one I use - it is simple so I can use the same one for many installations:
system_locale=en_US.UTF-8
timezone=US/Eastern
timeserver=time.nist.gov
terminal=vt100
name_service=DNS {domain_name=procyonlabs.com
name_server=192.168.1.1}
security_policy=NONE
root_password=<encrypted_pw_for_root_on_new_installations>
|
Next, we need to create a rules file:
This file contains a "rule" for each client or group of clients. Again, I keep it simple (one line for each system you plan on installing):
hostname uranus - profile -
hostname atlas - profile -
hostname ganymede - profile -
hostname jupiter - profile -
|
Now for the fun part:
The profile file contains all the details for clusters, packages, drive partitioning, etc for your target systems. Because for every system I install, I require a minimal package set without X, and a GNU development environment, this is what I have in my file:
# Solaris 10 SPARC CORE Installation w/ Development Libraries
#
# Customized for the Web Server with Apache 2, PHP 5, OpenSSL
# and Database Support guide:
#
# http://www.procyonlabs.com/guides/solaris/saps_db
#
# Edit to best fit your needs! The following file has cluster descriptions
# and is located on the Solaris 10 media directory:
#
# Solaris_10/Product/.clustertoc
#
# Solaris 10 10/09 Package List:
#
# http://docs.sun.com/app/docs/doc/821-0435/eezdz?l=en&a=view
#
# base config ##
install_type initial_install
system_type standalone
## filesystem ##
# c1t0d0 for t1125 / v120 / v210
# c0t0d0 for X1 / 420R (c0t1d0s0 for second HD)
partitioning explicit
filesys c0t0d0s0 free /
filesys c0t0d0s1 2048 swap
filesys c0t0d0s7 2048 /export/home
filesys c0t1d0s0 free /var
## primary cluster (core) ##
cluster SUNWCreq
## clusters to add ##
cluster SUNWCfwutil add # Freeware Other Utilities
cluster SUNWCfwshl add # Freeware Shells
cluster SUNWCwget add # GNU wget
cluster SUNWCntp add # Network Time Protocol
cluster SUNWCptoo add # Programming tools and libraries
cluster SUNWCssh add # Secure Shell
cluster SUNWCfwcmp add # Freeware Compression Utilities
cluster SUNWCgcc add # GNU binutils, C compiler, m4 and make
cluster SUNWCopenssl add # OpenSSL
## packages to add ##
package SUNWarc add # Lint Libraries (usr)
package SUNWarcr add # Lint Libraries (root)
package SUNWman add # On-Line Manual Pages
package SUNWdoc add # Documentation Tools
package SUNWsfwhea add # Open Source header files
package SUNWtoo add # Programming Tools
package SUNWhea add # SunOS Header Files
package SUNWxcu4 add # XCU4 Utilities
package SUNWxcu4t add # XCU4 make and sccs utilities
package SUNWxcu6 add # XCU6 Utilities
package SUNWgcmn add # gcmn - Common GNU package
package SUNWggrp add # ggrep - GNU grep utilities
package SUNWgtar add # gtar - GNU tar
package SUNWuiu8 add # Iconv modules for UTF-8 Locale
package SUNWuium add # ICONV Manual pages for UTF-8 Locale
package SUNWulcf add # UTF-8 Locale Environment Common Files
package SUNWGlib add # GLIB - Library of useful routines for C programming
package SUNWlibgcrypt-devel add # Libgcrypt Cryptographic Library - developer files
package SUNWlibgcrypt add # Libgcrypt Cryptographic Library
package SUNWflexlex add # The Flex Lexer - A lex replacement/substitute (2.5.4)
package SUNWbison add # GNU bison - A YACC Replacement 3.80
## extra stuff needed for PHP/GD ##
package SUNWpng add # PNG - Portable Network Graphics Library
package SUNWpng-devel add # Portable Network Graphics library - developer files
package SUNWjpg add # jpeg - The Independent JPEG Groups JPEG software
package SUNWjpg-devel add # jpeg - The Ind. JPEG Groups JPEG software - dev. files
package SUNWfreetype2 add # FreeType2 Font library
package SUNWxwplt add # X Window System platform software (for libXpm)
package SUNWxwinc add # X Window System include files (for xpm.h)
|
Before we can do anything, we need to validate the rules file:
# cp /jumpstart/solaris_10_js/Solaris_10/Misc/jumpstart_sample/check .
# ./check -r rules -p /jumpstart/solaris_10_js
Validating rules...
Validating profile profile...
The custom JumpStart configuration is ok. |
This creates the rules.ok file. Now, you're OK.
For each system you wish to JumpStart, you need to enter a bunch of information using the add_install_client script (located in /jumpstart/solaris_10_js/Solaris_10/Tools). The first time you do this, it will configure your NFS and TFTP servers. Everytime thereafter, it just sets up the client to be jumpstarted.
# echo "CLIENT_IP CLIENT_HOSTNAME" >> /etc/hosts
# /jumpstart/solaris_10_js/Solaris_10/Tools/add_install_client \
-e CLIENT_MAC \
-s JS_HOSTNAME:/jumpstart/solaris_10_js \
-c JS_HOSTNAME:/jumpstart/solaris_10_js/config \
-p JS_HOSTNAME:/jumpstart/solaris_10_js/config \
CLIENT_HOSTNAME sun4u
|
Power on the Sun machine and enter the OpenBoot PROM terminal (stop-a on console, break on other terminals). Enter the following:
More than likely you will see the Timeout waiting for ARP/RARP packet message appear a few times. Eventually it will 'click' and begin the OS installation process.
After the system reboots, you'll probably want to access it via SSH instead of the clunky terminal interface. So, login, create a user account like so:
# useradd -m -d /export/home/randy -s /bin/bash randy
# passwd randy
<change the password> |
Now you can login to the machine remotely using the new account. Just su - to get root access and continue.
To simplify things, you should add some directories to your system's PATH by adding the following line just above export LOGNAME PATH in /etc/profile:
PATH=/opt/gcc/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:$PATH
To use this new path now, enter source /etc/profile.
If you haven't done so already, from another machine (or this one if you want to fight through using Lynx), go to the Cool Tools - GCC for Sun Systems 4.3.3 Install page (latest as of this guide) and scroll down to the buried link ">> Get the download here. <<" and click it! Select the Solaris SPARC platform and login (or create an account, it's quite simple). Download both the SUNWgccfss433.tar.bz2 and SUNW0scgfss433.tar.bz2 and move them via your favorite method to the system you are using this guide for. Place them in the /opt directory and then do the following:
# bunzip2 *.bz2
# tar xvf SUNWgccfss433.tar
# rm SUNWgccfss433.tar
# tar xvf SUNW0scgfss433.tar
# rm SUNW0scgfss433.tar
# pkgrm SUNWgcc |
Use PCA. It rocks:
# cd /tmp
# wget
http://www.par.univie.ac.at/solaris/pca/stable/pca
# sh pca -i -a
|
The flag -i tells it to install the patches. The flag -a tells it to ask you for your Sun account (free accounts just give you security patches, paid accounts give you everything new).
Reboot and use as intended.
|