The easiest way to get the LAMP server installed would be to install LAMP from the YaST GUI as follows:
1.LAMP Installation from YaST :
I prefer the manual option to setup a LAMP Server.
So without wasting much of time, lets proceed to get LAMP up and running on your openSUSE in no time. I’m using openSUSE 11.0 but the procedure should equally work on earlier 10.3 and other 10.2 versions.
2.Install & Configure Apache2 Webserver :
Install Apache webserver
opensuse11:~ # yast2 –install apache2
This should install apache webserver. To check try the following command:
opensuse11:~ # rcapache2 status
Checking for httpd2: unused
That tells you, the Apache webserver is installed but just not started yet.
To test if the webserver serves pages, add a file index.html into /srv/www/htdocs/ directory. This is the default web root directory for apache on your system.
opensuse11@ p-root # cd /srv/www/htdocs
opensuse11@ p-root # vi index.html
and enter some text say “Welcome to openSUSE 11.0”
Start Apache2 Webserver
Now start the Apache 2 webserver so we can check if it works OK.
opensuse11@ p-root # rcapache2 start
Starting httpd2 (prefork) done
Now, open a web browser like Firefox and go to http://localhost and you should see the ext you entered (here “Welcome to openSUSE 11.0?)
This should set the root password as “rootpassword”. Set the password to something more appropriate.
To check if Root password is set and the MySQL Client can logon to the MySQL Server try the following:
opensuse11@ p-root # mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.51a SUSE MySQL RPM
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.
mysql> show databases;
| Database |
| information_schema |
| mysql |
| test |
3 rows in set (0.04 sec)
In the above, I used mysql client to logon as root, entered the password and list the databases. That completes the installation of LAMP on openSUSE 11.0
To administer MySQL database, the easiest and the popular tool is phpMyAdmin, given that we have discussed PHP5, apache2 setup here which are required for phpMyAdmin, it makes sense to look at quickly setting up and configure phpMyAdmin
5.Install phpMyAdmin :
opensuse11@ p-root # yast2 –install phpMyAdmin
This installs phpMyAdmin and setup a website at /srv/www/htdocs/phpMyAdmin directory. Change directory and use the sample config file to quickly setup phpMyAdmin.
opensuse11@ p-root # cd /srv/www/htdocs/phpMyAdmin