| to see this document in french |
Installation of Apache, PHP/Oracle
Necessary software:
Apache2 (httpd-2.0.54.tar.gz)
PHP4 (php-4.3.11.tar.gz)
Oracle
First of all, you must know that it is necessary for you to be an administrator, i.e.
root . You have to download the sources of Apache2,PHP and Oracle Client, available on this site or on the official site, and to put its in a directory. Then extract files.
tar xvfz httpd-2.0.54.tar.gz tar xvfz php-4.3.11.tar.gz then enter in the Apache directory:
Cd httpd-2.0.54/
/configure -- enable-so -- prefix=/usr/local/apache2
make
make installNow you must to install Oracle, note bene: it is not possible to launch the install if your linux does not have an X environment (
Gnome, KDE ).
You must launch the installation while being connected under the Oracle
account , to create an account under linux you have to type the following command line under
Terminal :
adduser oracle - G dBa then loggin:
su - oracle then enter in the Oracle directory and start the installation:
Cd../Disk1/
/runInstallerDuring the installation, choose the
Custom option, and to check that
Oracle Call Interface, OCI are well selected. These files are essential to configure PHP correctly.
By default, Oracle is installed in the following directory
home/oracle/OraHome1 loggin as
root and enter in the PHP directory:
su - root
Cd../php-4.3.11/
/configure -- with-oracle=home/oracle/OraHome1 -- with-oci8=home/oracle/OraHome1 -- with-apxs2=/usr/local/apache2/bin/apxsars
make
make install
cp php.ini-dist/usr/local/lib/php.ini // then copy the config file of PHP Configuration
You have to change the file
/usr/local/apache2/conf/httpd.conf and to add the following lines into (if its don't already exist):
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php phpchange ServerName and give the name of your server:
ServerName Server_name change the Apache user to allow the Web server to attack an Oracle dataBase
User oracle
Group dBaThen it is necessary to modify the file
/usr/local/lib/php.ini , check that
"session.save_handler = files" give the path of the session directory:
"session.save_path =/usr/local/apache2/session" remove the
; in front of
include_path = ":/php/includes "check that
doc_root =/usr/local/apache2/htdocs Now, you must create the directory where all the sessions var will be stored:
mkdir/usr/local/apache2/session
chmod 775 /usr/local/apache2/sessionTo make it possible the Web server (
apache ) to use
Oracle , you must to create the following environment var for the user
oracle :
ORACLE_HOME=/home/oracle/OraHome1 export
PATH=$ORACLE_HOME/bin:/home/oracle/outil:$PATH exportadd its in the file
bash_profile Type:
vi bash_profile Finally
Now the web service is ready to work, start it!!!!
/usr/local/apache2/bin/apachectl start
Now you can attack an Oracle database. If you want to attack a distant database look at the documentation
distant database.