[TriLUG] How to install package(PHP) wrapped in tar ball

Blackburn, Stuart Stuart.Blackburn at tekelec.com
Thu Sep 13 13:44:44 EDT 2007


I've just installed PHP from source on Solaris 9 box. Assuming that you
are using PHP for web scripts like 99% of the world, realize that you
need to configure your webserver (which should be Apache ;-) and PHP to
work together...
 
I downloaded the php*.tar.gz from http://us2.php.net/downloads.php
(Apache, if you don't have it, from http://httpd.apache.org/download.cgi
)
 
Once I untarred the package, I simply followed the instructions for Unix
(Linux) as described in the INSTALL text file in the root directory.
Cliff notes of instructions:
 
Example 2-4. Installation Instructions (Apache 2 Shared Module Version)
1.  gzip -d httpd-2_0_NN.tar.gz
2.  tar xvf httpd-2_0_NN.tar
3.  gunzip php-NN.tar.gz
4.  tar -xvf php-NN.tar
5.  cd httpd-2_0_NN
6.  ./configure --enable-so
7.  make
8.  make install
9.  cd ../php-NN
10. Now, configure your PHP. 
      ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
11. make
12. make install
13. Setup your php.ini
    cp php.ini-dist /usr/local/lib/php.ini
14. Edit your httpd.conf to load the PHP module.  
    For PHP 4:
      LoadModule php4_module modules/libphp4.so
    For PHP 5:
      LoadModule php5_module modules/libphp5.so
15. Tell Apache to parse certain extensions as PHP.  
      AddType application/x-httpd-php .php .phtml
16. Use your normal procedure for starting the Apache server, e.g.:
      /usr/local/apache2/bin/apachectl start



More information about the TriLUG mailing list