There are steps that involve 'wget' command. For the host
server to speak to a target mirror (target server), one needs to verify the
proxy settings of the host server.
Check if you are able to do a wget. If wget is not working:
- Download the files required to the local computer prior to start of this installation
- FTP the downloaded files to the required path (location)
- Proceed with other installation steps
Apache Download and Installation:
- Change Directory (cd command) to the desired path (location). Here location is /scratch/installation
- wget https://archive.apache.org/dist/httpd/httpd-2.4.39.tar.gz
- tar -xzvf httpd-2.4.39.tar.gz
- cd httpd-2.4.39/srclib/ (Observe the path before the next wget)
- wget http://mirrors.estointernet.in/apache/apr/apr-1.7.0.tar.gz
- tar -xzvf apr-1.7.0.tar.gz
- wget http://mirrors.estointernet.in/apache/apr/apr-util-1.6.1.tar.gz
- tar -xzvf apr-util-1.6.1.tar.gz
- cd apr-1.7.0
- ./configure && make && make install
- cd ../apr-util-1.6.1/
- ./configure --with-apr=/scratch/installation/httpd-2.4.39/srclib/apr-1.7.0 && make && make install
- cd ../../
- ./configure --prefix=/scratch/installation/apache2 --enable-module=so --enable-ssl
- make
- make install
Start the server:
/scratch/installation/apache2/bin/apachectl -k start
Stop Server:
/scratch/installation/apache2/bin/apachectl -k stop
Restart the Apache
/scratch/installation/apache2/bin/apachectl -k restart
~~~~~END OF STARTING APACHE SERVER~~~~~
PHP Setup:
- cd /scratch/installation/
- wget https://www.php.net/distributions/php-8.0.7.tar.gz
- tar -xzvf php-8.0.7.tar.gz
- cd /scratch/installation/php-8.0.7
- yum install sqlite-devel
- yum install oniguruma-devel
- export ORACLE_HOME=/scratch/orcleapp/opt/oracle_db/product/19c_client {path the Oracle client}
- ./configure --prefix=/scratch/installation/php --with-oci8=/scratch/orcleapp/opt/oracle_db/product/19c_client --with-apxs2=/scratch/installation/apache2/bin/apxs --with-config-file-path=/scratch/installation/apache2/conf --enable-sigchild --with-curl --with-ldap --with-gd --enable-ftp --enable-sysvsem --enable-sysvshm --enable-bcmath --enable-calendar --enable-wddx --with-openssl --with-gettext --enable-sockets --enable-mbstring --enable-soap --enable-pcntl --with-mysqli=mysqlnd --with-iconv --with-pdo-mysql=mysqlnd --enable-fileinfo --enable-phar --enable-intl --with-pdo-oci
- make
- make install
- libtool --finish /scratch/installation/php-8.0.7/libs
- Add the below line in bash profile
- vi ~/.bash_profile
- Add below line before “export PATH”
- PATH=$PATH:/scratch/installation/php/bin
- Add below line after “export PATH”
- export ORACLE_HOME=/scratch/orcleapp/opt/oracle_db/product/19c_client
- Save the file
- source ~/.bash_profile
- cd /scratch/installation/php-8.0.7
- cp php.ini-development /scratch/installation/apache2/conf/php.ini
- Add the below code in apache configuration files
- vi /scratch/installation/apache2/conf/httpd.conf
#
# This next section will call PHP for .php, .phtml, and .phps files#
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
#
# This is the directory containing php.ini
#
PHPIniDir "/scratch/installation/apache2/conf"
- Save the file using ESC, :wq and Enter keys
- Disable Directory listing
- Open the httpd.conf file and modify the line
- vi /scratch/installation/apache2/conf/httpd.conf
From
Options Indexes FollowSymLinks
To
Options FollowSymLinks
~~~~~END~~~~~
Restart the Apache
/scratch/installation/apache2/bin/apachectl -k restart
Testing
- Create a test script file: vi /scratch/installation/apache2/htdocs/phpinfo.php
add the below content
<?php
phpinfo();
?>
- Save and close the file when you are finished.
- Test by opening the url in browser
http://<domain>/phpinfo.php