Required softwares:
apache2
php 5
mysql 5
oci 8
compile with gd library
Steps:
1. install apache
verify ldd /www/apache/bin/httpd (ref: http://us2.php.net/oci8 )
libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000)
libm.so.6 => /lib/libm.so.6 (0x4002f000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000)
libdl.so.2 => /lib/libdl.so.2 (0x4007a000)
libc.so.6 => /lib/libc.so.6 (0x4007e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
2. install mysql
3. ensure path of mysql i.e. /usr/local/mysql or find / -name mysql.h will return path
4. install oci8 instant oracle client (Ref: www.oracle.com/technology/tech/php/htdocs/inst_php_apache_linux.html)
oracle client located at : 192.168.15.92 root password copy oracle client command:
scp ./ root@192.168.15.92:/tmp/oraclient/* <-|
rpm -Uvh oracle-instantclient-basic-10.1.0.3-1.i386.rpm
rpm -Uvh oracle-instantclient-devel-10.1.0.3-1.i386.rpm
rpm -Uvh oracle-instantclient-sqlplus-10.1.0.3-1.i386.rpm
5. verify path for both oracle clients . i.e. /usr/lib/oracle/10.2.0.3/client/ , Copy tnsnames.ora file here
6. compile php with (Change the mysql parameter)
./configure --with-mysql=/home/dir/software/5.0.34-enterprise-gpl /
--with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-jpeg-dir=/usr/lib / -with-png-dir=/usr/lib --enable-gd-native-ttf /
--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib --enable-sigchild
7. make;make install;
8. make dir structure
tmp
cache
www
conf
configuration file
php.ini
httpd.conf
htdocs
element5
swreg
php-includes
element5
swreg
logs
error_log
httpd.pid
swreg_startup
9. copy the php.ini in conf folder from php installation dir
10 modify the httpd.conf file with pid parameter
mention the virtual host here as follows
Listen 8080
DocumentRoot /www
ScriptAlias /report/ "/www/"
PassEnv LD_LIBRARY_PATH
PassEnv SQLPATH
PassEnv TNS_ADMIN
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
11. add AddType application/x-httpd-php .php .phtml .html .htm in httpd.conf file ,Add "AddModule mod_php5.c" ,
verify LoadModule php5_module libexec/libphp5.so
12. modify the php.ini file magic_quotes=Off ,change the php.ini files include_path
13. modify server setup file i.e. sg_apache
PHPRC=/www/dir/conf
export PHPRC
$APACHE_PATH/bin/httpd -D$DEPLOY_ENV -f /www/.../conf/httpd.conf -k $cmd
No comments:
Post a Comment