Skip to content


Install and Configure LAMP (Linux/Apache/MySQL/PHP) in openSUSE 11.0

SUSE Linux is your opensource operating system :)

Apache2 is the master webserver on the planet

MySQL is your favorite opensource database

PHP is the popular web programming language

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?)

3.Let’s proceed to install PHP5 :

Install PHP5

opensuse11@ p-root # yast2 –install php5 php5-mysql apache2-mod_php5

This should install PHP5, PHP5-MySQL module and the Apache2 PHP5 module.

For Apache2 to enable the PHP5 module, restart for changes to take effect.

opensuse11@ p-root# rcapache2 restart

Syntax OK

Shutting down httpd2 (waiting for all children to terminate)          done

Starting httpd2 (prefork)                                                          done

4.Install & configure MySQL :

opensuse11@ p-root # yast2 –install mysql mysql-tools

This should install MySQL Database Server and options mysql-tools (for administration) on your openSUSE. To check the installation, run the following command:

opensuse11@ p-root # rcmysql status

Checking for service MySQL:                                           unused

The above indicates that the MySQL Server is installed but not started yet.

Start MySQL Server

opensuse11@ p-root# rcmysql start

Starting service MySQL                                                done

By default there is no root password set for MySQL and it is important to set the password for the ROOT account.

Set Root Password

opensuse11@ p-root # mysqladmin -u root -p rootpassword

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)

mysql>

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

opensuse11@ p-root # cp config.sample.inc.php config.inc.php

Edit the file and look for

$cfg['blowfish_secret'] = ‘mysqladmin’;

Enter a value for blowfish secret (I’ve set it to mysqladmin here)

Thats done and has the default configs on it. Logon to phpMyAdmin from http://localhost/phpMyAdmin with the MySQL root username and password.

p-root :)

Enjoy Linux :)

Posted in lamp server.

Tagged with .


27 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Piyush says

    Hi………

    Nice and Great Tutorials !!!

    Thanks.

  2. Manoj says

    hi
    i have seen your http://www.unixsurgeon.com its good
    its out of my limit it seems to be very technical and helping site for unix sevvy personals complete details u have given about every every platform
    feel nice to see it
    ok take care………..
    Regards
    Manoj Jangid

  3. xanax says

    Your are Great. And so is your site! Awesome content. Good job guys!!!

  4. zyprexa says

    zyprexa
    Great site. Good info

  5. propecia says

    I bookmarked this site, Thank you for good job!

  6. JaneRadriges says

    Hi, interest post. I’ll write you later about few questions!

  7. KonstantinMiller says

    Hello, can you please post some more information on this topic? I would like to read more.

  8. Zashkaser says

    I wanted to ask, is there any chance for a modified version of the directory listing script, with an iphone-stylish like design?

  9. Sdanektir says

    Hi, interest post. I’ll write you later about few questions!

  10. admin says

    Any time if you have any query.

  11. admin says

    No…not at this time..

  12. admin says

    Hi,,,Thanks for your comment,i will try to provide you more information regarding this topic…

  13. xanaxrrts says

    Very informative post. Thanks for taking the time to share your view with us.

  14. tramadolatytf says

    Very Interesting Post! Thank You For Thi Blog!

  15. tramadoljiihv says

    I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.

  16. tramadolaoupj says

    You certainly have some agreeable opinions and views. Your blog provides a fresh look at the subject.

  17. lovecalculatorbz says

    I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.

  18. graphite golf clubs says

    I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.

  19. same day payday loans no faxing says

    Very nice post :) Thank you for sharing Install & Configure LAMP (Apache/MySQL/PHP) in openSUSE 11.0

  20. love calculator says

    Very Interesting Blog! Thank You For Thi Information!

  21. vemma says

    I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.

  22. lcd reviews says

    You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material

  23. seized cars says

    You certainly have some agreeable opinions and views. Your blog provides a fresh look at the subject.

  24. cash same day says

    Amazing blog post, this is very similar to a site that I have.
    Please check it out sometime and feel free to leave me a comenet on it and tell me what you think. Im always looking for feedback.

  25. admin says

    Hi,

    Can you please update me with that website name,so that i can check and update you regarding the same.

  26. scuba diving says

    I find myself coming to your blog more and more often to the point where my visits are almost daily now!

  27. Lucio Teder says

    I am continually looking online for articles that can help me. Thank you!



Some HTML is OK

or, reply to this post via trackback.