how to install php in solaris 111 min read
How to install php in solaris 11.
Hi All, Today we will show you how to install php in solaris 11.
PHP: Hypertext Preprocessor is a server-side scripting language designed for Web development, but also used as a general-purpose programming language
Solaris is a Unix operating system originally developed by Sun Microsystems. It superseded their earlier SunOS in 1993. In 2010, after the Sun acquisition by Oracle, it was renamed Oracle Solaris
- Installed apache in solaris, if not go through this link.
- Download latest php version from the following link.
- Root access to server
1: Locate the file php 5.x.x.tar.gz which you just download earlier
unzip the downloaded tar.gz file
tar -zxvf php-5.x.x.tar.gz
2: change directory to the newly unzip file
./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-gd –with-zlib –disable-ipv6 –with-jpeg-dir=/usr –with-png-dir=/usr –with-freetype-dir=/usr –with-pear –with-openssl
3: Enabling PHP on Apache
locate LoadModule php5-module modules/libphp5.so and Add the following below
AddHandler php5-script php
AddType application/x-httpd-php .php
4: locate DirectoryIndex and Add index.php
DirectoryIndex index.html index.php
5: save all changes by pressing “esc : wq!” without “”
Once you completed all the previous steps test the php is working or not
echo “<?php phpinfo (); ?>” > /usr/local/apache2/htdocs/test.php
2. open internet browser and goto http://localhost/test.php
You should be able to see PHP status result
3. stop apache