ติดตั้ง Sun Freeware บน Solaris
เว็บไซต์
Sunfreeware.com เป็นแหล่งรวม free software ที่ถูก compile
ให้อยู่ในรูปแบบ package (.pkg) ทำให้สะดวกต่อการติดตั้งบน Solaris
ไฟล์ที่มีให้ดาวน์โหลดมีตั้งแต่ Solaris 2.5 จนถึงเวอร์ชั่นล่าสุด Solaris
10 ทั้งสำหรับรันบนเครื่อง SPARC และ Intel (x86)
การดาวน์โหลดไฟล์เพื่อนำมาติดตั้งมีขั้นตอนดังนี้
- เลือกเวอร์ชั่นของ Solaris เป็น SPARC หรือ Intel x86 (Pick Processor/OS)
- เลือก Package ที่จะติดตั้ง
- อ่านรายละเอียดของ Package นั้น เช่น ต้องติดตั้งโปรแกรมอะไรก่อน (Dependencies)
- คลิ้กดาวน์โหลดไฟล์ที่ต้องใช้
บทความนี้ขอนำเสนอตัวอย่างการติดตั้ง apache-2.2.11 โดยจะทดลองบน Solaris 10(x86)
เลือกเวอร์ชั่นของ Solaris
คลิ้กเลือก x86/Solaris 10
เลือก Package
คลิ้กเลือก apache-2.2.11
อ่านรายละเอียด Package
รายละเอียดของ apache-2.2.11-sol10-x86-local.gz มีดังนี้
apache-2.2.11-sol10-x86-local.gz Apache 2 – the popular
web server – installs in /usr/local/apache2. Dependencies: expat,
libiconv, openldap, sasl, zlib, openssl-0.9.8k, and either the
libgcc-3.4.6 or gcc-3.4.6. Documentation can be found in
/usr/local/apache2/doc/apache2. The configuration files in
/usr/local/apache2/conf must be edited to fit your site’s needs,
including ssl support.
จากรายละเอียด
- การติดตั้ง apache จะถูกติดตั้งไว้ใน /usr/local/apache2
- ต้องดาวน์โหลดไฟล์อื่นๆ ด้วย (Dependencies) ในที่นี้มี expat,
libiconv, openldap, sasl, zlib, openssl-0.9.8k
สามารถคลิ้กลิ้งค์ที่ชื่อไฟล์ได้เลย โดยแต่ละไฟล์อาจมี Dependencies
ที่ต้องลงอีก สามารถอ่านรายละเอียดของแต่ละไฟล์ เช่น libiconv ต้องใช้
db-4.2.52.NC
- สำหรับ libgcc_s.so.1 สามารถเลือกไฟล์ติดตั้ง ได้สองแบบคือ
libgcc-3.4.6 คือ gcc-3.4.6 แบบแรกไฟล์ libgcc-3.4.6
จะขนาดเล็กกว่าแต่มีเฉพาะ library ที่จำเป็นต้องใช้ ไม่มี compiler
เพื่อใช้คอมไพล์โปรแกรมเหมือน gcc-3.4.6 ได้
คลิ้กลิงค์ที่ไฟล์ต่างๆ เพื่อดาวน์โหลดไฟล์ทั้งหมดที่ต้องใช้
ติดตั้ง package
สำหรับการติดตั้ง apache-2.2.11 ถ้าคลิ้กลิ้งค์ไปเรื่อยๆ ตาม Dependencies ไฟล์ที่ต้องใช้มีดังนี้ (24 May 2009)
# ls -l
total 47568
-rw-r--r-- 1 user1 other 7873798 May 24 21:20 apache-2.2.11-sol10-x86-local.gz
-rw-r--r-- 1 user1 other 3942221 May 24 21:20 db-4.2.52.NC-sol10-intel-local.gz
-rw-r--r-- 1 user1 other 299057 May 24 21:20 expat-2.0.1-sol10-x86-local.gz
-rw-r--r-- 1 user1 other 526342 May 24 21:20 libgcc-3.4.6-sol10-x86-local.gz
-rw-r--r-- 1 user1 other 1451349 May 24 21:20 libiconv-1.11-sol10-x86-local.gz
-rw-r--r-- 1 user1 other 6436151 May 24 21:20 openldap-2.4.11-sol10-x86-local.gz
-rw-r--r-- 1 user1 other 3174076 May 24 21:20 openssl-0.9.8k-sol10-x86-local.gz
-rw-r--r-- 1 user1 other 540742 May 24 21:20 sasl-2.1.21-sol10-x86-local.gz
รัน gzip เพื่อ unzip ไฟล์
# gzip -dv *.gz
apache-2.2.11-sol10-x86-local.gz: 75.3% -- replaced with apache-2.2.11-sol10-x86-local
db-4.2.52.NC-sol10-intel-local.gz: 84.1% -- replaced with db-4.2.52.NC-sol10-intel-local
expat-2.0.1-sol10-x86-local.gz: 65.7% -- replaced with expat-2.0.1-sol10-x86-local
libgcc-3.4.6-sol10-x86-local.gz: 71.7% -- replaced with libgcc-3.4.6-sol10-x86-local
libiconv-1.11-sol10-x86-local.gz: 36.8% -- replaced with libiconv-1.11-sol10-x86-local
openldap-2.4.11-sol10-x86-local.gz: 72.1% -- replaced with openldap-2.4.11-sol10-x86-local
openssl-0.9.8k-sol10-x86-local.gz: 71.3% -- replaced with openssl-0.9.8k-sol10-x86-local
sasl-2.1.21-sol10-x86-local.gz: 71.4% -- replaced with sasl-2.1.21-sol10-x86-local
รัน pkgadd เพื่อติดตั้ง package ต่างๆ
หมายเหตุ ไม่จำเป็นต้องรัน pkgadd เพื่อติดตั้งไฟล์ตาม Dependencies
# pkgadd -d apache-2.2.11-sol10-x86-local
The following packages are available:
1 SMCap2211 apache
(x86) 2.2.11
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMCap2211> from </usr/local/src/apache-2.2.11-sol10-x86-local>
apache(x86) 2.2.11
The Apache Group
Using </usr/local> 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.
Installing apache as <SMCap2211>
## Installing part 1 of 1.
/usr/local/apache2/bin/ab
/usr/local/apache2/bin/apachectl
/usr/local/apache2/bin/apr-1-config
/usr/local/apache2/bin/apu-1-config
/usr/local/apache2/bin/apxs
/usr/local/apache2/bin/checkgid
/usr/local/apache2/bin/dbmmanage
/usr/local/apache2/bin/envvars
/usr/local/apache2/bin/envvars-std
/usr/local/apache2/bin/htcacheclean
/usr/local/apache2/bin/htdbm
/usr/local/apache2/bin/htdigest
/usr/local/apache2/bin/htpasswd
/usr/local/apache2/bin/httpd
...
...
...
/usr/local/doc/apache/docs/manual/vhosts/name-based.html.ja.utf8
/usr/local/doc/apache/docs/manual/vhosts/name-based.html.ko.euc-kr
/usr/local/doc/apache/docs/manual/vhosts/name-based.html.tr.utf8
/usr/local/doc/apache/httpd.spec
[ verifying class <none> ]
Installation of <SMCap2211> was successful.
# pkgadd -d expat-2.0.1-sol10-x86-local
The following packages are available:
1 SMCexpat expat
(x86) 2.0.1
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMCexpat> from </usr/local/src/expat-2.0.1-sol10-x86-local>
expat(x86) 2.0.1
James Clark et al
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
The following files are already installed on the system and are being
used by another package:
* /usr/local/bin <attribute change only>
* - conflict with a file which does not belong to any package.
Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.
Installing expat as <SMCexpat>
## Installing part 1 of 1.
/usr/local/bin/xmlwf
/usr/local/doc/expat/COPYING
/usr/local/doc/expat/Changes
/usr/local/doc/expat/MANIFEST
/usr/local/doc/expat/README
...
...
...
/usr/local/lib/libexpat.so.0 <symbolic link>
/usr/local/lib/libexpat.so.0.4.0
/usr/local/lib/libexpat.so.1 <symbolic link>
/usr/local/lib/libexpat.so.1.5.2
/usr/local/man/man1/xmlwf.1
[ verifying class <none> ]
Installation of <SMCexpat> was successful.
# pkgadd -d libiconv-1.11-sol10-x86-local
The following packages are available:
1 SMCliconv libiconv
(x86) 1.11
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMCliconv> from </usr/local/src/libiconv-1.11-sol10-x86-local>
libiconv(x86) 1.11
Bruno Haible
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
6 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
The following files are already installed on the system and are being
used by another package:
* /usr/local/share <attribute change only>
* /usr/local/share/doc <attribute change only>
* - conflict with a file which does not belong to any package.
Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.
Installing libiconv as <SMCliconv>
## Installing part 1 of 1.
/usr/local/bin/iconv
/usr/local/doc/libiconv/ABOUT-NLS
/usr/local/doc/libiconv/AUTHORS
/usr/local/doc/libiconv/COPYING.LIB
/usr/local/doc/libiconv/ChangeLog
...
...
/usr/local/share/doc/iconv.1.html
/usr/local/share/doc/iconv.3.html
/usr/local/share/doc/iconv_close.3.html
/usr/local/share/doc/iconv_open.3.html
/usr/local/share/doc/iconvctl.3.html
[ verifying class <none> ]
Installation of <SMCliconv> was successful.
# pkgadd -d openssl-0.9.8k-sol10-x86-local
The following packages are available:
1 SMCossl openssl
(x86) 0.9.8k
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMCossl> from </usr/local/src/openssl-0.9.8k-sol10-x86-local>
openssl(x86) 0.9.8k
The OpenSSL Group
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing openssl as <SMCossl>
## Installing part 1 of 1.
/usr/local/doc/openssl/CHANGES
/usr/local/doc/openssl/CHANGES.SSLeay
/usr/local/doc/openssl/FAQ
/usr/local/doc/openssl/INSTALL
/usr/local/doc/openssl/INSTALL.DJGPP
...
...
...
/usr/local/ssl/misc/c_hash
/usr/local/ssl/misc/c_info
/usr/local/ssl/misc/c_issuer
/usr/local/ssl/misc/c_name
/usr/local/ssl/openssl.cnf
[ verifying class <none> ]
Installation of <SMCossl> was successful.
# pkgadd -d db-4.2.52.NC-sol10-intel-local
The following packages are available:
1 SMCdb db
(intel) 4.2.52.NC
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMCdb> from </usr/local/src/db-4.2.52.NC-sol10-intel-local>
db(intel) 4.2.52.NC
Sleepycat Software
Using </usr/local> 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.
Installing db as <SMCdb>
## Installing part 1 of 1.
/usr/local/BerkeleyDB.4.2/bin/db_archive
/usr/local/BerkeleyDB.4.2/bin/db_checkpoint
/usr/local/BerkeleyDB.4.2/bin/db_deadlock
/usr/local/BerkeleyDB.4.2/bin/db_dump
/usr/local/BerkeleyDB.4.2/bin/db_load
...
...
...
/usr/local/BerkeleyDB.4.2/lib/libdb-4.2.la
/usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so
/usr/local/BerkeleyDB.4.2/lib/libdb-4.so <symbolic link>
/usr/local/BerkeleyDB.4.2/lib/libdb.a
/usr/local/BerkeleyDB.4.2/lib/libdb.so <symbolic link>
[ verifying class <none> ]
Installation of <SMCdb> was successful.
# pkgadd -d libgcc-3.4.6-sol10-x86-local
The following packages are available:
1 SMClgcc346 libgcc
(x86) 3.4.6
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMClgcc346> from </usr/local/src/libgcc-3.4.6-sol10-x86-local>
libgcc(x86) 3.4.6
FSF
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing libgcc as <SMClgcc346>
## Installing part 1 of 1.
/usr/local/lib/libg2c.so <symbolic link>
/usr/local/lib/libg2c.so.0 <symbolic link>
/usr/local/lib/libg2c.so.0.0.0
/usr/local/lib/libgcc_s.so <symbolic link>
/usr/local/lib/libgcc_s.so.1
/usr/local/lib/libstdc++.so.6 <symbolic link>
/usr/local/lib/libstdc++.so.6.0.3
[ verifying class <none> ]
Installation of <SMClgcc346> was successful.
# pkgadd -d openldap-2.4.11-sol10-x86-local
The following packages are available:
1 SMColdap openldap
(x86) 2.4.11
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMColdap> from </usr/local/src/openldap-2.4.11-sol10-x86-local>
openldap(x86) 2.4.11
The OpenLDAP Group
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
7 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing openldap as <SMColdap>
## Installing part 1 of 1.
/usr/local/bin/ldapadd <symbolic link>
/usr/local/bin/ldapcompare
/usr/local/bin/ldapdelete
/usr/local/bin/ldapexop
/usr/local/bin/ldapmodify
...
...
...
/usr/local/var/openldap-data/__db.005
/usr/local/var/openldap-data/alock
/usr/local/var/openldap-data/dn2id.bdb
/usr/local/var/openldap-data/id2entry.bdb
/usr/local/var/openldap-data/log.0000000001
[ verifying class <none> ]
Installation of <SMColdap> was successful.
# pkgadd -d sasl-2.1.21-sol10-x86-local
The following packages are available:
1 SMCsasl sasl
(x86) 2.1.21
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SMCsasl> from </usr/local/src/sasl-2.1.21-sol10-x86-local>
sasl(x86) 2.1.21
The SASL Team
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
7 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing sasl as <SMCsasl>
## Installing part 1 of 1.
/usr/local/doc/sasl2/AUTHORS
/usr/local/doc/sasl2/COPYING
/usr/local/doc/sasl2/ChangeLog
/usr/local/doc/sasl2/INSTALL
/usr/local/doc/sasl2/NEWS
...
...
...
/usr/local/man/man8/sasldblistusers2.8
/usr/local/man/man8/saslpasswd2.8
/usr/local/sbin/saslauthd
/usr/local/sbin/sasldblistusers2
/usr/local/sbin/saslpasswd2
[ verifying class <none> ]
Installation of <SMCsasl> was successful.
ตรวจสอบ package ที่ติดตั้ง
รันคำสั่ง pkginfo เพื่อตรวจสอบ package ที่ติดตั้ง ดูเฉพาะที่มีชื่อ SMC
# pkginfo | grep SMC
application SMCap2211 apache
application SMCdb db
application SMCexpat expat
application SMClgcc346 libgcc
application SMCliconv libiconv
application SMColdap openldap
application SMCossl openssl
application SMCsasl sasl
system SUNWmgts Trusted Extensions, SMC
application SUNWtsmc Trusted Extensions SMC Server
รันเว็บเซิร์ฟเวอร์ apache
ใช้คำสั่ง apachectl เพื่อรัน apache
# /usr/local/apache2/bin/apachectl start
# ps -ef | grep apache
daemon 1016 1011 0 22:13:43 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 1013 1011 0 22:13:43 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 1012 1011 0 22:13:43 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 1015 1011 0 22:13:43 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 1014 1011 0 22:13:43 ? 0:00 /usr/local/apache2/bin/httpd -k start
root 1011 1 0 22:13:42 ? 0:00 /usr/local/apache2/bin/httpd -k start