|
||||||||
|
||||||||
|
|
Công Cụ | Xếp Bài |
02-06-2009, 11:01 PM | #1 |
Guest
Trả Lời: n/a
|
Install & Configure LAMP (Apache/MySQL/PHP) in openSUSE 11.0
One of the many popular combinations in Linux is the LAMP setup. LAMP to expand is Linux Apache MySQL PHP. Most of the websites running on the internet these days or LAMP servers where
Linux is your flavor opensource operating system (openSUSE for us :-)) 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. Computers - YaST - Install Software - Set filter to “Patterns” then select and accept “Web and LAMP” under Server functions. But, this installs things we don’t need from LAMP perpesctive like DNS, Perl modules etc. 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. Install & Configure Apache2 Webserver Install Apache webserver opensuse11:~ # yast2 –install apache2This should install apache webserver. To check try the following command: opensuse11:~ # rcapache2 statusThat 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:~ # cd /srv/www/htdocsand 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:~ # rcapache2 startNow, 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″) Let’s proceed to install PHP5 Install PHP5 opensuse11:~ # yast2 –install php5 php5-mysql apache2-mod_php5This 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:~ # rcapache2 restartInstall & configure MySQL opensuse11:~ # yast2 –install mysql mysql-toolsThis should install MySQL Database Server and options mysql-tools (for administration) on your openSUSE. To check the installation, run the following command: opensuse11:~ # rcmysql statusThe above indicates that the MySQL Server is installed but not started yet. Start MySQL Server opensuse11:~ # rcmysql startBy 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:~ # mysqladmin -u root -p rootpasswordThis 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:~ # mysql -u root -pIn 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 Install phpMyAdmin opensuse11:~ # yast2 –install phpMyAdminThis 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:~ # cd /srv/www/htdocs/phpMyAdminEdit the file and look for 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. For advanced documentation, click here |
|
|