Computing
Poseidon - SUN Ultra 2 - Overview
- Details
- Category: Sun Ultra 2
- Hits: 658
This is the main SUN server on the network, with Solaris 10.
Usual network services are hosted on it, like DHCP, DNS, file, email, web and database servers. It is also used for web applications developpement.
General Information
VendorSUN
SystemUltra 2
Type64bits Sparc Unix Workstation
Operating SystemSolaris 10 (SunOS 5.10 Sparc 64bits)
Hardware Configuration
Processor(s)2 x UltraSPARC II 296MHz (2MB L2 cache)
Memory512MB (4x64MB + 8x32MB 60ns ECC EDO DIMM)
Drives- 9.1GB IBM U2W-SCSI hard drive
- 18.2GB SGI U2W-SCSI hard drive
- TOSHIBA XM6201TASUN32XCD1103 32x SCSI CDROM
GraphicsSUN Elite 3D
NetworkFast (10/100 Mb/sec) Ethernet
Misc.Fast/wide SCSI
Network Configuration
HostnamePoseidon
IP Address10.0.0.130
Services
DNS ServerBIND DNS server version 9.2.4
Email ServerSendmail version 8.13.7+Sun, config V10/Sun
File ServerNFS 4 and Samba version 3
Web ServerApache version 2.2
Application ServerMacromedia ColdFusion MX 7
Database ServerMySQL version 5
memconf -v output:
memconf: V2.9 17-Nov-2008 http://www.4schmidts.com/unix.html
hostname: Poseidon
banner: Sun Ultra 2 UPA/SBus (2 X UltraSPARC-II 296MHz)
manufacturer: Sun Microsystems, Inc.
model: Ultra-2
Sun development codename: Pulsar
Sun Family Part Number: A14
Solaris 10 11/06 s10s_u3wos_10 SPARC, 64-bit kernel, SunOS 5.10
2 UltraSPARC-II 296MHz cpus, system freq: 99MHz
CPU Units:
========================= CPUs =========================
Run Ecache CPU CPU
Brd CPU Module MHz MB Impl. Mask
--- --- ------- ----- ------ ------ ----
0 0 0 296 2.0 US-II 2.0
0 1 1 296 2.0 US-II 2.0
Memory Units:
socket U0501 has a 64MB DIMM (group 0, bank 0L, byte 00-15, address 0x00000000-0x0fffffff)
socket U0401 has a 64MB DIMM (group 0, bank 0H, byte 16-31, address 0x00000000-0x0fffffff)
socket U0701 has a 64MB DIMM (group 0, bank 1L, byte 32-47, address 0x00000000-0x0fffffff)
socket U0601 has a 64MB DIMM (group 0, bank 1H, byte 48-63, address 0x00000000-0x0fffffff)
socket U0502 has a 32MB DIMM (group 1, bank 0L, byte 00-15, address 0x20000000-0x27ffffff)
socket U0402 has a 32MB DIMM (group 1, bank 0H, byte 16-31, address 0x20000000-0x27ffffff)
socket U0702 has a 32MB DIMM (group 1, bank 1L, byte 32-47, address 0x20000000-0x27ffffff)
socket U0602 has a 32MB DIMM (group 1, bank 1H, byte 48-63, address 0x20000000-0x27ffffff)
socket U0503 has a 32MB DIMM (group 2, bank 0L, byte 00-15, address 0x40000000-0x47ffffff)
socket U0403 has a 32MB DIMM (group 2, bank 0H, byte 16-31, address 0x40000000-0x47ffffff)
socket U0703 has a 32MB DIMM (group 2, bank 1L, byte 32-47, address 0x40000000-0x47ffffff)
socket U0603 has a 32MB DIMM (group 2, bank 1H, byte 48-63, address 0x40000000-0x47ffffff)
empty sockets: U0504 U0404 U0704 U0604
total memory = 512MB
Poseidon - Sun Ultra 2 - Setup
- Details
- Category: Sun Ultra 2
- Hits: 720
This server needs to host the following services: file server (NFS + Samba), web application (Apache + ColdFusion) and database server (mySQL). It is configured with 2 hard drives, on for the system, and one for web sites, databases and shared folder.
The installation procedure for Solaris 10 will not be detailled, as it is widely available on other sites, and the various steps are explained on screen.
Hardware Setup
SUN Ultra 2 during hardware setup
Each setup will be different. For this system, an 9GB drive for the system is used. Another 18GB for files and services.
- Open the box and insert te hard drives, on the side of the computer.
- Close the box, making sure not to forget the plate to close the hard drive bay.
- Plug the various cables (network and power supply).
The computer doesn't have a screen. It is in server mode. It needs to be connected to a terminal console with a serial cable. A good terminal emulator for Windows is TERA Term (http://hp.vector.co.jp/authors/VA002416/teraterm.html). For linux, you can use minicom (http://alioth.debian.org/projects/minicom/).
- Connect the computer to the terminal on port A (upper connector), and setup the terminal for 9600 bauds, 8 bits, no parity and 1 stop bit.
Solaris 10 Installation
Solaris 10 is freely available from the Sun web site.
It is installed with a set of Solaris CDs. You'll need the following CDs:
- Solaris 10 Disc 1 of 5 (Sparc)
- Solaris 10 Disc 2 of 5 (Sparc)
- Solaris 10 Disc 3 of 5 (Sparc)
- Solaris 10 Disc 4 of 5 (Sparc)
- Solaris 10 Disc 5 of 5 (Sparc)
- Solaris 10 Languages CD (Sparc) (optionel)
Before installing, make sure you have all the network parameters (IP address, network mask, gateway...)
- Switch the computer on. It presents the boot prompt because the hard drive is not inistialised for Solaris.
Insert disc 1 in the drive and type boot cdrom to start the installastion.
Welcome to minicom 1.83.0
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Mar 7 2000, 06:12:31
Press CTRL-A Z for help on special keys
.
Sun Ultra 2 UPA/SBus (2 X UltraSPARC-II 296MHz), No Keyboard
OpenBoot 3.19, 512 MB memory installed, Serial #00000000.
Ethernet address 8:0:30:xx:xx:xx, Host ID: 80xxxxxx.
Boot device: /sbus@1f, 0/SUNW,fas@e,8800000/sd@0.0:a File and args:
The file just loaded does not appear to be executable.
{0} ok boot cdrom
Boot device: /sbus/SUNW,fas@e, 8800000/sd@6,0:f File and args:
SunOS Release 5.10 Version Generic_118833-33 64-bit
Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring devices.
_
- The install program will prompt for a language on the terminal screen.
Choose a language. - Select the terminal type (VT100 in this case).
Follow the screen instructions. - Fill up the network informtation when prompted.
Confirm Information for hme0
> Confirm the following information.
Networked: Yes
Host name: Poseidon
System part of a subnet: Yes
Netmask: 255.255.255.0
Enable IPv6: No
Default Route: Specify one
Router IP Address: 10.0.0.1
- Choose the name resolution method, depending on the network. (DNS for the test network).
- Continue following the on screen instructions (timezone, localisation, date, root password...).
- Choose standard installation and continue.
- Install the full distribution.
- Choose the disk where you want to install Solaris (disk c0t0d0 for the Ultra 2)
Disk Devic Available Space
------------------------------------------------------------
[X] ** c0t0d0 8633 MB (F4 to edit)
[ ] c0t1d0 17360 MB
Total Selected: 8633 MB
Suggested Minimum: 4313 MB
- Continue and choose the startup disk.
It is possible that the installation program ask if you want to reconfigure the EEPROM. Answer yes to update it and setup the startup disk to the disk you selected. - It is possible to add and configure the second disk now, it depends of the configuration.
The information shown below is your profile for installing Solaris software.
It reflects the choices you've made on previous screens.
==================================================================
Installation Option:_Initial
| Boot Device: c0t0d0
| Client Services: None
|
| Locales: France (ISO8859-1)
| Ireland (ISO8859-1)
| System Locale: C ( C )
|
| Software: Solaris 10, Entire Distribution
|
| File System and Disk Layout: / c0t0d0s0 5258 MB
| swap c0t0d0s1 1025 MB
| /export/home c0t0d0s7 2349 MB
| /data c0t1d0s7 17360 MB
- After validation, the installation starts.
- Follow the on screen instructions until finished.
Poseidon - Sun Ultra 2 - Services
- Details
- Category: Sun Ultra 2
- Hits: 758
This server needs to provide the following network services: DNS, DHCP, Email, file server (NFS et Samba), web server (Apache 2.2 and ColdFusion MX 7) and database (MySQL4 or 5).
This is the setup of the various services.
Initial Configuration
Webmin on the SUN Ultra 2 workstation
Some utilities are used on the network to manage and administer some servers. It can make administration tasks easier.
- SSH is installed on all servers to replace telnet and ftp with similar but more secure utilities. SSH is installed by default with Solaris 10.
- Webmin is one tool that can be used to administer servers. It doesn't replace the command line on Unix or Linux servers, but it can help a lot.
Webmin is available at webmin.com, with a package ready for Solaris. Webmin needs Perl 5, also installed by default with Solaris 10. Once installed, you can access it with a web browser at http://serveurIP:10000.
# gunzip webmin-1.450.pkg.gz
# pkgadd -d webmin-1.450.pkg
Webmin helps managing DNS, NFS, Samba, Apache and mySQL amongst other services.
mv /usr/ucb/cc /usr/ucb/suncc
ln -s /usr/sfw/bin/gcc /usr/ucb/cc
DNS Installation
This server manage the DNS service in the lab network. It is the master of the lab zone.
- With Webmin, go to 'Servers' -> 'BIND DNS Server'.
- Go to 'Forwarding and Transfers' to setup the DNS server used to forward requests if the local zone can not resolve the name. It is typically your ISP's DNS.
- Create a master zone for the test network (hug-lab.local in the lab network)
- Click on the icon of the newly created zone and add you records.
- Click on 'Apply Configuration' to apply the changes.
DHCP Installation
This server also serves DHCP requests from the lab network.
Install the DHCP service
- At the console, tyoe in the following command to create the ressource table and configuration file. The DHCP service will start automatically at every boot.
# dhcpconfig -D -r SUNWbinfiles -p /var/dhcp
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - Poseidon
DHCP server started.
#
Add the networks to serve
The networks the DHCP service needs to supply IP addresses to need to be configured. There's only one on the test lab, with IP addresses 10.0.0.0 and 24bits network mask.
- Type 'pntadm -C xx.xx.xx.xx' where xx.xx.xx.xx is the network addresses (10.0.0.0). Type 'pntadm -L' to check the zone was created.
- Update the /etc/netmasks file with the network mask for the zone created.
- Enable the network interface used to supply the IP addresses in the /etc/inet/dhcpsvc.conf file by adding an INTERFACES line with the name of the network interface (hme0).
# pntadm -C 10.0.0.0
# pntadm -L
10.0.0.0
# cat /etc/netmasks
...
10.0.0.0 255.255.255.0
...
# cat /etc/inet/dhcpsvc.conf
DAEMON_ENABLE=TRUE
RESOURCE=SUNWbinfiles
RUN_MODE=server
PATH=/var/dhcp
CONVER=1
INTERFACES=hme0
#
Manage zones
To manage zones/networks, you can use the command line with dhcpconfig. The grapical interface is handier.
You need to configure a linux/unix workstation to accept connections from the Ultra 2 on the X server. I used the SGI Octane Unix workstation. Type on a command line 'xhost + IPadr', where IPadr is the IP address or the name of the client (the Ultra 2 here).
ZEUS 1% xhost + Poseidon
From the linux/unix graphic workstation, connect on the server with telnet or ssh, and add the DISPLAY variable to point on the X server.
Start the dhcpmgr programm to manage the DHCP service. It will start in graphical mode on the linux/unix workstation.
# DISPLAY=Zeus:0.0
# export DISPLAY
# /usr/sadm/admin/bin/dhcpmgr
The zone created at step 2 should be listed. Add the addresses to provide, the go to macro to add the options, such as gateway, DNS, ...
dhcpmgr with options
File Server Installation
NFS allows sharing files with linux or unix clients, Samba is used to share files with Windows clients.
The 2 services are installed by default with Solaris 10. They just need to be configured. Once again, webmin can help:
NFS
- With Webmin, go to 'Networking' -> 'NFS Shares'.
- Configure the folders you want to share. ('/data/shared' is shared on the lab network)
- Click on 'Apply Changes' to validate the changes.
Samba
- With Webmin, go to 'Servers' -> 'Samba Windows File Sharing'.
- Configure the Samba users (would match Windows users)
- Add the folders you want to share (/data/shared)
- Click on 'Restart Samba Servers' enable the changes.
The 2 services are very efficient. They allow copying or sharing files easily between different platforms. The speed is limited by the network speed (about 11MB/s in the lab network).
Web Server Installation
Apache 2.2 is used for the web service on this server.
ColdFusion 7 and PHP 5 will also be installed.
Apache 2.2
Solaris 10 installed with Apache 1.3 and 2.0, but the services will stay disabled.
The easy solution is to download a package to install Apache 2.2 for Solaris 10, on Sparc paltform. It is possible to compile Apache, but it's longuer and didn't add any benefit to the setup in the lab network.
- Go to www.sunfreeware.com and select the right Apache package for your version of Solaris and hardware paltform.
- Save apache-2.2.x---.tar.gz in a folder on the server.
- Decompress the file with 'gunzip apache-2.2.x---.local.gz'.
- Install the package with 'pkgadd -d apache-2.2.x---.local'.
Repeat steps 1 to 4 for each package.
- Once installed, configure the 'Apache Webserver' module in webmin.
Apache 2.2 is installed in /usr/local/apache2 - Edit the '/usr/local/apache2/conf/httpd.conf' file and chenage the lignes 'DocumentRoot' with the root folder of the websites ('/data/www' on the Ultra 2) and 'ServerName' with the Ultra2 name.
Coldfusion MX 7
Coldfusion is an application that allows to quickly create and deploy web applications. It is a multi-platform application written in Java, running on J2EE JRun4 server.
The CFML language is quick to learn and is 'tag' based, like HTML.
Coldfusion (initially Allaire, then Macromedia and eventually Adobe) is freely available on http://www.adobe.com/products/coldfusion/ in developer version. Version 7 was chosen for this platform.
- Download the Coldfusion file (coldfusion-702-sol.bin for this server) in a folder on the server.
- SSH or telnet the server, go to the folder where the file was saved and change its permission so it becomes executable: 'chmod 777 coldfusion-702-sol.bin'.
- Run the file ('./coldfusion-702-sol.bin') and follow the screen instructions. (Coldfusion is installed in /opt/coldfusionmx7 on the Ultra 2)
- The Apache connector included with the installation is not compatible with Apache 2.2. The integrated web server must be selected for now. The Apache connector will be configured later.
- Finish the installation.
...
You have successfully completed the first step in installing Macromedia
ColdFusion MX 7.
To continue with your installation, go to /opt/coldfusionmx7/bin and type
"./coldfusion start" to start your server.
Once the server is started log in to the Configuration Wizard at
http://[machinename]:8500/CFIDE/administrator/index.cfm
PRESS <ENTER> TO EXIT THE INSTALLER:
#
- Once finished, start Coldfusion with '/opt/coldfusionmx7/bin/coldfusion start'
- With a web browser, go to the administration page of Coldfusion and let the installation complete:
http://Poseidon.hug-lab.local:8500/CFIDE/administrator/index.cfm - Stop Coldfusion with '/opt/coldfusionmx7/bin/coldfusion stop' and Apache with '/usr/local/apache2/bin/apachectl stop'.
- Before configuring the connector between Coldfusion and Apache, a hot fix for Coldfusion 7.02 needs to be installed. It includes a connector for Apache 2.2.
It is available here. You can also get it from this site.
Extract the file wsconfig.jar from the zip file and put it in the '/opt/coldfusionmx7/runtime/lib' folder. (replace the existing one). - Change the install script for the Apache connector to configure it for this server, it is located here: '/opt/coldfusionmx7/bin/connectors/apache_connector.sh'.
(Apache is installed in /usr/local/apache2)
#!/bin/sh
#
# Configure the Apache connector.
# -dir should be the *directory* which contains httpd.conf
# -bin should be the path to the apache *executable*
# -script should be the path to the script which is used to
# start/stop apache
#
../../runtime/bin/wsconfig \
-server coldfusion \
-ws apache \
-dir /usr/local/apache2/conf \
-bin /usr/local/apache2/bin/httpd \
-script /usr/local/apache2/bin/apachectl \
-coldfusion
exit $#
...
# ./apache_connector.sh
- Copy the 'CFIDE' and 'cfdocs' folders from '/opt/coldfusionmx7/wwwroot' into the root folder of Apache 2.2 (Same folder than in step 6 of the Apache installation. '/data/www' for this server).
- Restart Coldfusion and Apache with '/opt/coldfusionmx7/bin/coldfusion start' then '/usr/local/apache2/bin/apachectl start'.
# cp -R /opt/coldfusionmx7/wwwroot/CFIDE /data/www/
# cp -R /opt/coldfusionmx7/wwwroot/cfdocs /data/www/
# /opt/coldfusionmx7/bin/coldfusion start
...
# /usr/local/apache2/bin/apachectl start
- Check that everything works properly by navigating the administration page of Coldfusion on the Apache server:
http://Poseidon.hug-lab.local/CFIDE/administrator/index.cfm
To connect Coldfusion to MySQL5, add the Java JDBC connector for MySQL:
- Download the J connector from MySQL.com in a folder on the server.
- Extract the files with 'gunzip -c mysql-connector-java-5.x.x.tar.gz | tar -xf '.
- Install the connector in Coldfusion MX 7 by copying the .jar file: 'cp ./mysql-connector-java-5.x.x/mysql-connector-java-5.x.x-bin.jar /opt/coldfusionmx7/runtime/servers/lib/'.
- Restart Coldfusion with '/opt/coldfusionmx7/bin/coldfusion restart'.
- Add a DSN in Coldfusion Administrator by choosing Other.
- Fill in the JDBC URL line: 'jdbc:mysql://[host]:[port]/[database]'.
- The Driver Class: 'com.mysql.jdbc.Driver'.
- The Driver Name: 'MySQL 5.x'.
- Add the credentials for the user to connect to the database.
- Apply by clicking on Submit.
MySQL 5 DSN Source in Coldfusion Administrator
mySQL Database server
MySQL is the most popular open source database engine: efficient, reliable and easy to implement.
mySQL 4 is installed with Solaris 10, and just needs to be configured. Here are the steps for this.
mySQL 4
- Create a mysql group with 'groupadd mysql'
- Create a mysql user, member of the mysql group with 'useradd –g mysql –d /export/home/mysql –m –c "MySQL account" mysql'
Add a password for the mysql user with 'passwd mysql'
# groupadd mysql
# useradd –g mysql –d /export/home/mysql –m –c "MySQL account" mysql
64 blocks
# passwd mysql
New Password:
Re-enter new Password:
passwd: password successfully changed for mysql
#
- Create a folder for the databases (on the second hard drive on this server) with 'mkdir /data/mysqldata'
- Go to the'/usr/sfw/bin' folder and create the default databases with the script './mysql_install_db'
- Copy the databases created in the folder where the databases will be hosted: 'cp -R /var/mysql/mysql /data/mysqldata'
- Update the rights on the mysql folders: 'chown -R mysql /data/mysqldata' and 'chgrp -R mysql /data/mysqldata'
- Update the /etc/my.cnf file by adding or changing the following lines:
[mysqld]
datadir=/data/mysqldata
socket=/tmp/mysql.sock
port=3306
user=mysql - Start mysql with '/usr/sfw/sbin/mysqld_safe --user=mysql &' change the root password with '/usr/sfw/bin/mysqladmin -u root password xxxx' and '/usr/sfw/bin/mysqladmin -u root -h hostname password xxxxx'
When the steps above are executed as root, it is possible to get an error the first time mysql starts. It is a file permission issue. Repeat setp 6 and start the service again as in step 8.
# mkdir /data/mysqldata
# /usr/sfw/bin/mysql_install_db
# cp -R /var/mysql/mysql /data/mysqldata
# chown -R mysql /data/mysqldata
# chgrp -R mysql /data/mysqldata
...
# /usr/sfw/sbin/mysqld_safe --user=mysql &
# /usr/sfw/bin/mysqladmin -u root password xxxx
# /usr/sfw/bin/mysqladmin -u root -h Poseidon password xxxxx
#
- Configure MySQL so it starts automatically at boot time.
The mysql.server script needs to be updated with the databases files location (modify the line 'datadir=/var/mysql' to 'datadir=/data/mysqldata').
# cp /etc/sfw/mysql/mysql.server /etc/init.d/mysql
# ln -s /etc/init.d/mysql /etc/rc0.d/K21mysql
# ln -s /etc/init.d/mysql /etc/rc3.d/K21mysql
#
- Webmin can manage mysql with the 'mySQL database server' module. It just needs to be configured.
mySQL 5.1
- Download the package for Solaris 10 (Sparc, 64-bit) from the MySQL website http://www.mysql.com in a folder on the server.
Create a group and user for the mySql services, as described in steps 1 and 2 for MySQL 4.
- Decompress the file with 'gunzip -c mysql-5.1.xx-solaris10-sparc-64bit.pkg.gz'.
- Install the package with 'pkgadd -d mysql-5.1.xx-solaris10-sparc-64bit.pkg'.
- Copy the configuration file with 'cp /opt/mysql/mysql/support-files/my-medium.cnf /etc/my.cnf'.
# gunzip -c mysql-5.1.31-solaris10-sparc-64bit.pkg.gz
# pkgadd -d mysql-5.1.31-solaris10-sparc-64bit.pkg
# pkgadd -d mysql-5.1.31-solaris10-sparc-64bit.pkg
The following packages are available:
1 mysql MySQL Community Server (GPL)
(sun4u) 5.1.31
Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]:
Processing package instance <mysql> from </data/shared/Downloads/mysql-5.1.31-solaris10-sparc-64bit.pkg>
MySQL Community Server (GPL)(sun4u) 5.1.31
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using </opt/mysql> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <mysql> [y,n,?] y
Installing MySQL Community Server (GPL) as <mysql>
## Installing part 1 of 1.
/opt/mysql/mysql/COPYING
...
Installation of <mysql> was successful.
# cp /opt/mysql/mysql/support-files/my-medium.cnf /etc/my.cnf
- Create a folder for the databases (on the second disk if available) with the following command: 'mkdir /data/mysqldata'.
- Apply the proper permissions on the mysql folders with: 'chown -R mysql /data/mysqldata' and 'chgrp -R mysql /data/mysqldata'
- Update the /etc/my.cnf file by adding or modifying the following lines:
[mysqld]
datadir=/data/mysqldata
socket=/tmp/mysql.sock
port=3306
user=mysql - Go to the '/opt/mysql/mysql/scripts' folder and create the default database file with the script: './mysql_install_db'.
- Start mysql with '/opt/mysql/mysqlbin/mysqld_safe --user=mysql &', change the root password with '/opt/mysql/mysql/bin/mysqladmin -u root password xxxx' and '/opt/mysql/mysql/bin/mysqladmin -u root -h hostname password xxxxx'
# mkdir /data/mysqldata
# chown -R mysql /data/mysqldata
# chgrp -R mysql /data/mysqldata
...
# /opt/mysql/mysql/scripts/mysql_install_db
...
# /opt/mysql/mysql/bin/mysqld_safe --user=mysql &
# /opt/mysql/mysql/bin/mysqladmin -u root password xxxx
# /opt/mysql/mysql/bin/mysqladmin -u root -h Poseidon password xxxxx
#
- Configure MySQL so it starts automatically at boot time.
The '/opt/mysql/mysql/support-files/mysql.server' script needs to be updated with the databases files location (modify the line 'datadir=/var/mysql' to 'datadir=/data/mysqldata').
# cp /opt/mysql/mysql/support-files/mysql.server /etc/init.d/mysql
# ln -s /etc/init.d/mysql /etc/rc0.d/K21mysql
# ln -s /etc/init.d/mysql /etc/rc3.d/K21mysql
#
- Webmin can manage mysql with the 'mySQL database server' module. It just needs to be configured.



