Install and configure LAMP on suse

This entry was posted in Linux and tagged on June 17, 2012, by

LAMP stands for LINUX, APACHE, MYSQL and PHP

Install and Configuration of LAMP is as shown below

* Install and configure apache2

1. Install the package using yast

# yast2 –install apache2

This will install apache webserver

2. Check the status of apache webserver

# rcapache2 status

It will show you unused. It will show you its installed but not running

3. Create a sample page so we can check apache is working

# cd /srv/www/htdocs

# vi index.html

welcome to suse

Save and quit

4 . Start the apache server

# rcapache2 start

5 . Go on to the browser and type http://localhost , you will see the text you entered

* Install PHP5

1 . Run the following command

# yast2 –install php5 php5-mysql apache2-mod_php5

This will install PHP5 , PHP-Mysql module and Apache2 PHP5 module

We need to restart the apache server for changes to take effect

# rcapache2 restart

* Install and configure MySQL

1 . Install mysql packages using yast

# yast2 – install mysql

2. Check the status of mysql

# rcmysql status

It will show you the status is unused

3 . Start the mysql server

# rcmysql start

4. By default there is no root password set for mysql . We need to set it

# mysqladmin -u root -p password rootpassword

This will set password as rootpassword

5 . Now try to login into the mysql server

# mysql -u root -p

Enter password: “Type the password we just created”

mysql >

6 . To administer mysql database we have one popular tool named as phpmyadmin . Install it

# yast2 –install phpMyAdmin

This will install it and setup website at /srv/www/htdocs/phpMyadmin directory. Now setup phpmyadmin

# cd /srv/www/htdocs/phpmyAdmin

# cp config.sample.inc.php config.inc.php

Now login to phpmyadmin from http://localhost/phpmyadmin with sql root user and password

Now you can administor Mysql database from phmyadmin tool.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.