Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Apache, MySQL

Apache MySQL PHP Solaris 8 Installation

Submitted by on November 21, 2005 – 11:03 amOne Comment

FROM: http://ampubsvc.com/~meljr/a2m4p5s8.html
BY: Mel Lester Jr.

This page briefly documents the installation of Apache 2.0.xx, MySQL 4.0.xx and PHP 5.0.x on Sparc Solaris 8.
Disclaimer
Rapid revision is the nature of Open Source products and the versions I refer to in this document are probably already outdated. Therefore, I am not sharing this information with the promise that I will keep it current or am in any way obligated for any problems you may encounter. Because there was not much in the way of Solaris specific integration information available, I have decided to share what has worked for me in this instance. You are welcome to make use of this information at your own risk. Please exercise caution — especially if you are unsure of the consequences of issuing certain commands with Systems Administrator priviledges. Most of the command examples can be cut and pasted, but you should Read The Fine Manual pages if you are not familiar with the possible consequences.
Assumptions:

* Specific version numbers will probably have changed.
* Installations are done using ksh as superuser (root).
* lines starting with #: are literal examples of root commands.
* Variable parameters that may be specific to your installation are shown in itallics.
* Sparc Solaris 8 installed with most recent recommended patches:
#: uname -a
SunOS hostname 5.8 Generic_117000-03 sun4u sparc SUNW,UltraAX-i2
* A source or build directory exists on a filesystem with plenty of free space:
#: mkdir /build
#: cd /build

Steps:

1. Verify all of the following SUNW* developer packages have been installed:
SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWsprot
SUNWtoo

Sample command line to determine if package SUNWarc is installed:
#: pkginfo | grep SUNWarc
system SUNWarc Archive Libraries
system SUNWarcx Archive Libraries (64-bit)

Missing packagages may be found on the Solaris 8 installation CDs
2. The $PATH environmental variable for root should begin with the following:
/usr/local/bin
/usr/local/sbin
/usr/ccs/bin

#: echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/sbin:/usr/bin
3. The following baseline tools are needed for this installation and are available as easily installed packages from sunfreeware.com:
* perl (a suitable version is usually already installed)
#: perl -v
This is perl, version 5.005_03 built for sun4-solaris
* gunzip or gzip (a suitable version is usually already installed)
#: gunzip -V
gunzip 1.2.4 (18 Aug 93)
* libiconv (downloaded current version of package from sunfreeware.com)
#: gunzip libiconv-1.8-sol8-sparc-local.gz
#: pkgadd -d libiconv-1.8-sol8-sparc-local
* gcc (downloaded current version of package from sunfreeware.com)
#: gunzip gcc-3.4.1-sol8-sparc-local.gz
#: pkgadd -d gcc-3.4.1-sol8-sparc-local
#: gcc –version
gcc (GCC) 3.4.1
* libgcc (should be installed as part of the gcc package – located in /usr/local/lib)
o Now, set these Environmental Variables:
#: CXX=`which gcc`; export CXX
#: CXXFLAGS=”-O3 -felide-constructors -fno-exceptions -fno-rtti”
#: export CXXFLAGS
#: CC=`which gcc`; export CC
#: CFLAGS=”-O3″; export CFLAGS
#: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/ssl/lib
#: export LD_LIBRARY_PATH
* gmake (downloaded current version of package from sunfreeware.com)
#: gunzip make-3.80-sol8-sparc-local.gz
#: pkgadd -d make-3.80-sol8-sparc-local

After you install the GNU counterpart of a Solaris program (e.g. tar and make), be sure that your $PATH environmental variable selects the GNU version first.
#: make –version
GNU Make 3.80
* gnu tar (make sure /usr/local/bin is found early in root’s $PATH)
#: gunzip tar-1.14-sol8-sparc-local.gz
#: pkgadd -d tar-1.14-sol8-sparc-local
#: tar –version
tar (GNU tar) 1.14
* flex (downloaded current version of package from sunfreeware.com)
#: gunzip flex-2.5.31-sol8-sparc-local.gz
#: pkgadd -d flex-2.5.31-sol8-sparc-local
#: flex –version
flex 2.5.31
* bison (downloaded current version of package from sunfreeware.com)
#: gunzip bison-1.875d-sol8-sparc-local.gz
#: pkgadd -d bison-1.875d-sol8-sparc-local
#: bison –version
bison (GNU Bison) 1.875d
* m4 (downloaded current version of package from sunfreeware.com)
#: gunzip m4-1.4.1-sol8-sparc-local.gz
#: pkgadd -d m4-1.4.1-sol8-sparc-local
#: m4 –version
GNU m4 1.4.1
* autoconf (downloaded current version of package from sunfreeware.com)
#: gunzip autoconf-2.59-sol8-sparc-local.gz
#: pkgadd -d autoconf-2.59-sol8-sparc-local
#: autoconf –version
autoconf (GNU Autoconf) 2.59
* automake (downloaded current version of package from sunfreeware.com)
#: gunzip automake-1.8b-sol8-sparc-local.gz
#: pkgadd -d automake-1.8b-sol8-sparc-local
#: pkginfo | grep -i automake
application SMCautom automake
* GNU sed (downloaded current version of package from sunfreeware.com)
#: gunzip sed-4.0-sol8-sparc-local.gz
#: pkgadd -d sed-4.0-sol8-sparc-local
#: sed –version
GNU sed version 4.0
* upgrade zlib to version 1.1.4 or greater. (downloaded current version of package from sunfreeware.com)
#: gunzip zlib-1.2.1-sol8-sparc-local.gz
#: pkgadd -d zlib-1.2.1-sol8-sparc-local

Test the installation of baseline tools by builing libxml2 from source:
Download the latest version from: ftp://xmlsoft.org/
#: gunzip -dc libxml2-2.6.11.tar.gz | tar xvpf -
#: cd libxml2-2.6.11
#: ./configure
#: make
#: make install
4. Add /dev/random functionality to Solaris 8 if it doesn’t already exist.
A /kernel/drv/random patch is available from SunSolve Patch Access. An earlier versions of this patch created /dev/random. To find the SPARC/Solaris 8 patch, type 112438-03 into the SunSolve Patch Access “Enter a PatchID” search window and click the Find Patch button. This will take you to the page where the patch is described and where the patch download links are. Download the patch and install it as indicated in the instructions.
#: cd /build
#: unzip 112438-03.zip
#: patchadd ./112438-03
You will probably need to reboot your system.
#: reboot — -r

#: cd /build

If this doesn’t work (/kernel/drv/random isn’t created or patch doesn’t install for some reason), here is an alternative:
download ANDIrand-0.7-5.8-sparc-1 from: http://www.cosy.sbg.ac.at/~andi/SUNrand/
#: pkgadd -d ANDIrand-0.7-5.8-sparc-1

If /dev/random still doesn’t exist, but /kernel/drv/random does:
#: ln -s /kernel/drv/random /dev/random
5. OpenSSL Installation
Download the latest OPENSSL source: http://www.openssl.org/
#: gunzip -c openssl-0.9.7d.tar.gz | tar xvpf -
#: cd openssl-0.9.7d
#: cp Makefile Makefile.orig

#: vi Makefile
replace “RANLIB=/usr/bin/ranlib” with “RANLIB=/usr/ccs/bin/ranlib”
* If you successfully implemented /dev/random, add the line:
“DEVRANDOM= /dev/random”
* OR
“DEVRANDOM= /kernel/drv/random”

Make sure “PERL=” is set to the fully qualified path of perl program.
Save changes and exit vi

#: ./config –prefix=/usr/local/ssl -fPIC
#: make
#: make test
#: make install
#: cd ..

6. MySQL installation
* Create a pseudo user to run mysql:
#: cd /build
#: groupadd mysql
#: useradd -g mysql mysql
* Download the latest MySQL binary for Solaris 8 from: http://www.mysql.com/
#: gunzip mysql-standard-4.0.20-sun-solaris2.8-sparc.tar.gz
#: cd /usr/local
#: tar xvpf /build/mysql-standard-4.0.20-sun-solaris2.8-sparc.tar
* To complete the installation of binary MySQL:
#: ln -s mysql-standard-4.0.20-sun-solaris2.8-sparc mysql
#: cd mysql
#: scripts/mysql_install_db –user=mysql
#: chown -R root /usr/local/mysql
#: chown -R mysql /usr/local/mysql/data
#: chgrp -R mysql /usr/local/mysql
#: cp support-files/my-medium.cnf /etc/my.cnf
* Try to start the MySQL server:
#: cd /usr/local/mysql/bin
#: ./mysqld_safe –user=mysql&
* Set the root MySQL user password and run a few quick tests:
#: ./mysqladmin -u root password ‘new-password’
#: ./mysqladmin -u root -h hostname password ‘new-password’
* Test the server:
#: ./mysqlshow -p
Enter password: new-password

+———–+
| Databases |
+———–+
| mysql |
| test |
+———–+

#: ./mysql -u root -p
Enter password: new-password

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.20-standard
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> show databases;
+———–+
| Databases |
+———–+
| mysql |
| test |
+———–+
2 rows in set (0.00 sec)

mysql> quit;
Bye

* If you would like MySQL to start and stop automatically:
#: cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
#: ln /etc/init.d/mysql /etc/rc3.d/S99mysql
#: ln /etc/init.d/mysql /etc/rc3.d/K01mysql
7. Apache 2 installation
#: cd /build
* Download the latest source from: http://httpd.apache.org
#: gzip -d httpd-2.0.50.tar.gz
#: tar xvpf httpd-2.0.50.tar
#: cd httpd-2.0.50
#: ./configure –enable-so –with-layout=Apache –enable-ssl
#: make
#: make install
* Edit the Apache configuration file
#: cd /usr/local/apache2
#: vi conf/httpd.conf
o Change the following line:
Group #-1
o to:
Group nobody
* Test start the Apache Server
#: /usr/local/apache2/bin/apachectl start
* Create the SSL Key and Certificate
#: cd /usr/local/ssl/bin
#: ./openssl genrsa -des3 1024 > /usr/local/apache2/conf/localhost.key
Generating RSA private key, 1024 bit long modulus
…….++++++
…………………..++++++
e is 65537 (0×10001)
Enter pass phrase: somephrase
Verifying – Enter pass phrase: somephrase
#: ./openssl req -new -key /usr/local/apache2/conf/localhost.key > \
/usr/local/apache2/conf/localhost.csr
#: ./openssl req -x509 -days 3650 -key \
/usr/local/apache2/conf/localhost.key \
-in /usr/local/apache2/conf/localhost.csr > \
/usr/local/apache2/conf/localhost.crt
* Modify the ssl.conf file to use your certificate.
#: cd /usr/local/apache2/conf
#: vi ssl.conf
o Find the following lines in the ssl.conf file:
DocumentRoot “/usr/local/apache2/htdocs”
ServerName new.host.name:443
SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
o Change the respective lines so that they are as follows:
DocumentRoot “/usr/local/apache2/htdocs-secure”
ServerName localhost:443
SSLCertificateFile /usr/local/apache2/conf/localhost.crt
SSLCertificateKeyFile /usr/local/apache2/conf/localhost.key

#: mkdir /usr/local/apache2/htdocs-secure
* Create a simple home page (e.g. Home, Secure Home)
#: vi /usr/local/apache2/htdocs-secure/index.html
Save index.html and exit vi
#: chmod a+rx /usr/local/apache2/htdocs-secure/
#: chmod a+r /usr/local/apache2/htdocs-secure/index.html
* Remove the encryption from the RSA private key
#: cd /usr/local/apache2/conf
#: cp localhost.key server.key.org
#: /usr/local/ssl/bin/openssl rsa -in server.key.org -out localhost.key
#: chmod 400 localhost.key
* Test the Apache https server.
#: /usr/local/apache2/bin/apachectl stop
#: /usr/local/apache2/bin/apachectl startssl
* Note: when the machine is rebooted, Apache will not be restarted automatically. You can manually restart Apache using:
#: /usr/local/apache2/bin/apachectl startssl
or, alternatively, this process can be made automatic by writing a script in the /etc/init.d directory and linking it to the appropriate places in /etc/rc2.d and /etc/rc3.d. See the MySQL installation notes for an example.
8. PHP 5 installation
#: cd /build
* Download the latest production version of PHP from http://www.php.net
#: gzip -d php-5.0.0.tar.gz
#: tar xvpf php-5.0.0.tar
#: cd php-5.0.0
./configure –with-apxs2=/usr/local/apache2/bin/apxs \
–with-mysql=/usr/local/mysql/ \
–enable-dbase –with-libxml-dir=/usr/local/include/libxml2
#: make
#: make install
#: cp php.ini-dist /usr/local/lib/php.ini
* Edit the Apache configuration file to deploy PHP
#: vi /usr/local/apache2/conf/httpd.conf
o Add the following line to the AddType section:
AddType application/x-httpd-php .php
o check for the following line and add it if necessary:
LoadModule php5_module modules/libphp5.so
o Save and exit vi
* Restart Apache to load PHP
#: /usr/local/apache2/bin/apachectl restart

If you made it this far, mission accomplished!
Copyright © 2004 Mel Lester Jr. All rights reserved.

Popularity: 5% [?]

Related posts:

  1. Using GNUPlot to chart MySQL data
  2. Resetting Root Password under Solaris
  3. Create and mount ISO image under Solaris

One Comment »

  • foam roofing says:

    hey, thanks for this post here, I found it very helpful. i’ve been setting up the netbeans open solaris environment to develop php and mysql on my local machine. i’ve been having serious trouble with the pre-built NBWebstack environment (Netbeans Web Stack). All the reviews I read said how great netbeans 7.0 beta was, so I’ve been fighting with it to get it installed on my machine. this is really my first exposure to solaris and i’m finding it very different from linux. hopefully this blog stays here a long time because i’ll probably be referring back to it later on…

    [Reply]

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.