Installing PHP, MySQL, PHPMyAdmin for Apache Web Server This document can be used to install Apache web server and provide support for PHP, MySQL and a PHP admin tool called PHPmyAdmin. You will find the following websites useful for this procedure: http://www.apache.org http://www.mysql.com http://www.php.net http://www.phpmyadmin.net/ http://www.bullfreeware.com First of all create a filesystem, about 320Mb initially should suffice, and mount the filesystem as /www. You will also need the install the IBM C compiler. Install MySQL This is a very simple install. You can download a pre-compiled version of MySQL for AIX from Bull’s AIX Freeware site http://www.bullfreeware.com The following install package was used for the purpose of this document: mysql-standard-4.0.16-ibm-aix220.127.116.11-powerpc.tar.gz On your server create both a user and a group called mysql, and the run the following command. # cd /usr/local # gzip –d /path/to/mysql-VERSION-OS.tar.gz | tar xvf – # ln -s full-path-to-mysql-VERSION-OS mysql # cd mysql # scripts/mysql_install_db # chown –R root . # chown –R mysql data # chgrp –R mysql . # bin/mysqld_safe –user=mysql & Further documentation is available at: http://www.mysql.com/documentation/mysql/bychapter/index.html You may wish to check the documentation at this link and check the postinstallations checks. PHP and Apache Installations You will need to install some utilities first as they are needed by PHP. These are: freeware.bison.rte freeware.gnu.flex.rte These can be obtained from the Bull Freeware site, and they are SMIT installable. Once these have been installed you will also need to update your PATH variable: export PATH=$PATH:/usr/local/bin:/usr/mysql/bin You should also add this to your profile. The apache and PHP install are done together. This document shows how to install Apache 1.3.26 and PHP 4.3.3, so you will need: apache_1.3.26-000964804C00-ibm-aix4.3.tar.gz php-4.3.3.tar.gz Copy the above zipped tar files to /www, and follow these steps. # cd /www # gzip –d apache_1.3.26-000964804C00-ibm-aix4.3.tar.gz | tar xf – # cd apache_1.3.26 # ./configure # cd .. # gzip –d php-4.3.3.tar.gz | tra xf – # cd php-4.3.3 # ./configure –with-mysql –with-apache=../apache_1.3.26 –enable-track-vars # make # make install # cd ../apache_1.3.26 # ./configure –prefix=/www –activate-module=src/modules/php4/libphp4.a # make # make install # cd ../php-4.3.3 # cp php.ini-dist /usr/local/lib/php.ini Finally edit your httpd.conf file and add the following line: AddType application/x-httpd-php .php Also edit the httpd.conf and put in the correct port if you will not be using the default port 80. Then you can fire up apache and initially test whether the HTTP Server works by pointing your browser as follows: http:/servername:port To ensure that Apache can serve php pages, save the following text as test.php and place the file in /www/htdocs folder <?php echo "Hello World"; ?> Now see if you call the file from your browser: http:/servername:port/test.php Installing PHPMyAdmin The version of PHPMyAdmin installed for this document was 4.3.3. Simply unzip and then untar the contents of the gzip file into your documents root, by default that will be /www/htdocs. It is basically ready to run, but we should harden and secure the http server somewhat first, Edit the httpd.conf file and add this line to the /www/htdocs stanza Options –Indexes and also change the line that says AllowOverride None to AllowOverride Yes You may now test that you have access to PHPMyAdmin by simply pointing your browser to http://servername:port/index.php The final steps you should do are to secure PHPMyAdmin by setting a password for the roor user.
Pages to are hidden for
"Installing PHP_ MySQL_ PHPMyAdmin for Apache Web Server"Please download to view full document