Install & Configure Apache2 Webserver
Install Apache webserverThis should install apache webserver. To check try the following command:opensuse11:~ # yast2 – -install apache2
That tells you, the Apache webserver is installed but just not started yet.opensuse11:~ # rcapache2 status
Checking for httpd2: unused
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.
Add some text to the html file to say “Hello World!”
Start Apache2 Webserver
Now start the Apache 2 webserver so we can check if it works OK.
Now, open a web browser like Firefox and go to http://localhost and you should see the ext you entered (here “Hello World!″)opensuse11:~ # rcapache2 start
Starting httpd2 (prefork) done
Let’s proceed to install PHP5
Install PHP5
This should install PHP5, PHP5-MySQL module and the Apache2 PHP5 module.opensuse11:~ # yast2 – -install php5 php5-mysql apache2-mod_php5
For Apache2 to enable the PHP5 module, restart for changes to take effect.
opensuse11:~ # rcapache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done
Install & configure MySQL
This should install MySQL Database Server and options mysql-tools (for administration) on your openSUSE. To check the installation, run the following command:opensuse11:~ # yast2 – -install mysql mysql-tools
The above indicates that the MySQL Server is installed but not started yet.opensuse11:~ # rcmysql status
Checking for service MySQL: unused
Start MySQL Server
By default there is no root password set for MySQL and it is important to set the password for the ROOT account.opensuse11:~ # rcmysql start
Starting service MySQL done
Set Root Password
This should set the root password as “rootpassword”. Set the password to something more appropriate.opensuse11:~ # mysqladmin -h localhost -u root password rootpassword
To check if Root password is set and the MySQL Client can logon to the MySQL Server try the following:
opensuse11:~ # 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
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.0Type ‘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>
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
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:~ # yast2 – -install phpMyAdmin
Edit the file and look foropensuse11:~ # cd /srv/www/htdocs/phpMyAdmin
opensuse11:~ # cp config.sample.inc.php config.inc.php
Enter a value for blowfish secret (I’ve set it to mysqladmin here)$cfg['blowfish_secret'] = ‘mysqladmin’;
Thats done and has the default configs on it. Logon to phpMyAdmin from http://localhost/phpMyAdmin with the MySQL root username and password.
This is a nice tutorial. Thank you. whoever am wondering how i can install apache2,php,mysql,phpmyadmin fron downloaded files. kindly gives me a tutorial on this.
ReplyDelete