English Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch Estonian Filipino Finnish French Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh
Digg: TheServerAdmin Facebook: pages/The-Server-Admin/178309771625?v=wall&ref=search Twitter: TheServerAdmi YouTube: TheServerAdmin External Link: www.the-server-admin.blogspot.com/
None

You are not logged in.

You are not logged in.


Installing a Linux LAMP Server on openSUSE PDF Print E-mail
Operating System - Linux
Written by Marcus Lee Beach   
Monday, 17 August 2009 19:00

Installing a Linux, Apache, MySQL and PHP Server (LAMP) on openSUSE 11.1

Linux servers have many configurations and many roles. One of the most well known configurations is the LAMP server or Linux, Apache, MySQL and PHP Server config. The “P” in LAMP server means more than just PHP. The “P” can stand for any scripting language such as Perl, Python, PHP, and others. The Lamp server configuration is the fastest way to get a Web server up and running. Apache 2 is the leading Web server in the computer market. This install guide will show you how to install a LAMP server on OpenSuSe 11.1.


Installing a Linux, Apache, MySQL and PHP Server (LAMP) on openSUSE 11.1

Getting the OpenSuSe 11.1 CD

You can get openSUSE at http://software.opensuse.org/

After installing, do not forget to add your Software Repositories in Yast2.

I would add the following repositories to openSUSE:

  1. Main Repository (OSS)

  2. Main Repository (Non-OSS)

  3. Packman Repository

  4. Main Update Repository

You can find them here http://en.opensuse.org/Package_Repositories

Installing the LAMP or Linux, Apache, MySQL and PHP Server

Two options exist:

Option 1

Open Yast2 (From any command line, you can just type Yast2)




After opening Yast, you will need to open the Software Management tool.


Here you will need to filter by Patterns. In this list, you can select the LAMP server pattern.

Scroll down until you see the LAMP server pattern.


If you just click the LAMP server option, then Yast2 will install the defaults. You can pick other options after selecting the LAMP pattern.
Make sure that you pick the yast2-http-server. This is the GUI forYast2.



Select accept and install.



Option 2


Now, here is the way I prefer:

Open a console as the root user and type:

yast2 –install apache2; yast2 –install php5 php5-mysql apache2-mod_php5; yast2 –install mysql mysql-tools

Some people like to use zypper instead of Yast2. Only do this if you do not want to use the "Yast2 --install" command.


zypper install apache2; zypper install php5 php5-mysql qpqche2-mod_php5; zypper install mysql mysql-tools





Configuring the LAMP Server on openSUSE 11.1



Configuring MYSQL

The command below will check to see if the MySQL server is installed and running.



service mysql status

Next command will start MySQL.Type the following in a console:


service mysql start

The following command will set the root password. When you see rootpassword, replace it with the password you want. In a console type:


mysqladmin -u root -p rootpassword

In order to start MySQL at boot, use the following command:


/etc/init.d/mysqld start

In order to connect to MySQL on the command line, type the command below:


mysql -u -p

The -u stands for username and the -p stands for password. I would not type my password after the -p. Hit enter and wait until you are promoted to type the password.

To show all your databases, you need to type the commend below in MySQL:


show databases;

To create a database you need to type the following:


create database;

Configuration for Apache 2

Start the server by typing the following command:


service apache2 start

In order to starting Apache2 at boot.

  • run yast "type yast2" on the command line
  • click system
  • click runlevel editor
  • click find apache2 in the list
  • click enable

Configuration file for your default site should go into /srv/www/htdocs.



You should now be able to go to http://localhost and see your site.


For any questions about openSUSE 11.1 LAMP server, LAMP servers or Web servers, see our Server Admin Forum at http://www.the-server-admin.com/server-admin-forum


Last Updated on Monday, 02 August 2010 16:43