My Php and MySQL hard install

My PHP and MySQL rough install

Recently i had dealed with a rough install (that means every single package, installed separatedly) of PHP and MySQL in my Linux distribution (It was a Fedora core 6).

During my install experience, i visited a lot of forums regarding particular issues about my installation. Many of the websites were useless but some of them gave me a sign of light to solve my installation problems.

There are some good aplications that do a all-included and clean install without any trouble like Xampp so you might consider using this software also and free your mind of a lot of trouble. But If you are planning to do a rough install anyway (and become a Linux Master - like me - LOL), I review here some key points to successfully install Php and Mysql in a Linux enviroment.

I installed Fedora core 6 with default services running and no web server package selected during first install, but the httpd service (apache) was installed by default, so start this service to start using your Linux as a web server.

Install php and mysql packages with all the dependency packages necessary. I used the packages and .rpm's from the fedora installation DVD but you might get updated versions of PHP and MySQL installers.

After install all the packages, check out your http://localhost site and prepare a test.php file to see if everything is working fine. During my testing, my PHP installation didnt work with php files, so check the following:
  • Permissions and security of your files and folders from the html folder (or your web directory) in Apache server. For testing give "Full access" (Read and write) to everyone.

  • I dont know why but i had to set up an IP and DNS configuration in Linux instead of accesing localhost. I had to access apache by an IP address (http://10.x.x.x) in the browser.

  • Check if your Linux has Firewall or security software like SELinux and disable them for a moment, then I suggest to reconfigure this permissions if you need them.
During my installation, I didnt have to edit the httpd.conf file (in your etc/httpd folder), but you might look for this lines in the file (if you dont find them, then put them in the proper section of the file):

LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php

(Notice that I used a PHP version 5 installation. You might use another version number, so check and replace the number version.)

For proper use of PHP with MySQL, I had to install a php-mysql module (another RPM) and then uncomment the extension=msql.so line from the php.ini file (etc/ folder in Linux).

Now, I have PHP and MySQL ready to install and use any CMS software like Drupal or Wordpress.

No comments

Home