Install/Configure Apache, PHP, CakePHP and MySQL on SUSE Linux Enterprise Server 11

Although Apache and PHP packages are already available in SLES-11 DVD but here i want to use XAMPP Software for Apache, PHP, MySQL and Perl Installation/Configuration on SUSE Linux Enterprise Server 11. Many people know from their own experience that it's not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.

The distribution for Linux systems contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.

Step 1: Download XAMPP

Download the XAMPP software from their webstie freely.

Step2: Installation on SLES-11

After downloading simply type in the following commands:

  1. Go to a Command prompt and login as the system administrator root:
    # su - root

  2. Extract the downloaded archive file to /opt:
    # tar xvfz xampp-linux-1.7.2.tar.gz -C /opt

That's all. XAMPP is now installed below the /opt/lampp directory.

Step 3: Start

To start XAMPP simply call this command:

# /opt/lampp/lampp start

Ready. Apache, PHP and MySQL are running.

Step 4: Test

Type in the following URL at your web browser:


Now you should see the start page of XAMPP containing some links to check the status of the installed software and some small programming examples.

Here is the Directory Structure of LAMPP

Here is a list of missing security in XAMPP:

  1. The MySQL administrator (root) has no password.
  2. The MySQL daemon is accessible via network.
  3. ProFTPD uses the password "lampp" for user "nobody".
  4. PhpMyAdmin is accessible via network.
  5. Examples are accessible via network.
  6. MySQL and Apache running under the same user (nobody).

To fix most of the security weaknesses simply call the following command on the command prompt:
# /opt/lampp/lampp security
Important Files and Directories

The XAMPP commands home. /opt/lampp/bin/mysql calls for example the MySQL monitor.
The Apache DocumentRoot directory.
The Apache configuration file.
The MySQL configuration file.
The PHP configuration file.
The ProFTPD configuration file. (since 0.9.5)
The phpMyAdmin configuration file.
Stopping XAMPP
To stop XAMPP simply call this command:

/opt/lampp/lampp stop


CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns likeMVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.

Step1: Download

Download  CakePHP from their website.

Step2: Unzip

Extract the download archive into /opt/lampp/htdocs directory using following command.

# unzip

Step3: Rename CakePHP Directory

Rename the newly extracted directory of Cake_1.2.5 to mycakephp or any other suitable name.

# mv cake_1.2.5 mycakephp

Step 4: Test

Type in the following URL at your web browser:

Now you should see the start page of CakePHP containing some error. Now step by step we solve these errors.

Step5: Set Writable Permission to tmp Directory

Change the mod of tmp directory that is placed in /opt/lampp/htdocs/mycakephp/app.
# chmod 777 -R tmp/

Now refresh your browser. you should see that now tmp directory is writable.

Step6: Configure MySQL

Now move to /opt/lampp/htdocs/mycakephp/app/config directory. In this directory rename the file named database.php.default to database.php. Use given below command to rename.
# mv database.php.default database.php

Now open database.php file and go to the end of file.
Change the login user, password and define database name in the database parameter. In my case Login user is 'Root', Password is 'blank', and Database name is 'caketodoo'. Change in both Default and Test variables.

Now refresh your browser. you should see that the database is configured and Cake is able to connect to the database.

The Directory Structure of CakePHP is:-

Installation and Configuration DONE


Popular posts from this blog

How to create Oracle stored Procedures using TOAD for Oracle

How to Create Packages in Oracle Database using TOAD for Oracle

Create Tables in Oracle Database using TOAD