LAMP repositories

From openSUSE

(Redirected from 10.1 Setup LAMP)
This article is being considered for deletion! Reason: This guide is outdated and a more up to date and detailed version is available at Linux_Apache_MySQL_PHP_Server_(lamp).
Please do not blank, merge, or move this article, or remove this notice. Refer to this article's discussion page and the openSUSE:Deletion Policy for more information.


LAMP stands for Linux, Apache, MySQL and PHP. This article tells you how to install the "LAMP stack" on your openSUSE system. In case you are wondering why there are so many links: The distribution already ships all you need for developing or hosting PHP pages. However, the packages shipped with the distribution usually stay at the same version during the whole life cycle of the distro and the maintainers only backport security fixes to that version. For those who want the newest features, there are Build Service projects with latest Apache, MySQL and PHP for release distributions. Add to this that PHP's mod_php binary packages require a specific version of the apache2 runtime, as do the php-mysql packages require a specific version of the mysql client library and the result is a matrix of different builds, depending on what version of Apache, MySQL and PHP you want. Luckily, the One Click Install feature of 10.3 and newer makes the installation less error-prone.

Picture of a bulb (lamp)

Contents

Installing LAMP via One-Click-Install (10.3 and newer)

LAMP packages as shipped by the distribution: LAMP-stock.ymp. You already have these packages if you selected the "LAMP server" pattern during installation.

Latest PHP, stock Apache and MySQL: LAMP-newest-php.ymp

Latest MySQL and PHP, stock Apache: LAMP-newest-mysql-php.ymp

Latest Apache and PHP, stock MySQL: LAMP-newest-apache-php.ymp

Latest Apache, MySQL and PHP: LAMP-all-newest.ymp

Installing manually (10.2 and older)

Apache repository

If you want updated Apache packages from the Build Service, add the Apache repository for your distribution, otherwise skip this step:

Image:susemini.png
Version:
10.2
zypper sa http://download.opensuse.org/repositories/Apache/openSUSE_10.2/ Apache
Image:susemini.png
Version:
SLE 10
zypper sa http://download.opensuse.org/repositories/Apache/SLE_10/ Apache

MySQL repository

If you want updated MySQL packages from the Build Service, add the server:database repository for your distribution, otherwise skip this step:

Image:susemini.png
Version:
10.2
zypper sa http://download.opensuse.org/repositories/server:/database/openSUSE_10.2/ server:database
Image:susemini.png
Version:
SLE 10
zypper sa http://download.opensuse.org/repositories/server:/database/SLE_10/ server:database

PHP repository

If you want updated PHP packages from the Build Service OR if you added the Apache or server:database repository, add the right server:php repository, otherwise skip this step. The server:php repositories are named as follows: Repositories using the stock versions of Apache and MySQL have only the distro version in their name:

Image:susemini.png
Version:
10.2
zypper sa http://download.opensuse.org/repositories/server:/php/openSUSE_10.2/ server:php
Image:susemini.png
Version:
SLE 10
zypper sa http://download.opensuse.org/repositories/server:/php/SLE_10/ server:php

Repositories using Apache from the Build Service are named server_apache_$distro:

Image:susemini.png
Version:
10.2
zypper sa http://download.opensuse.org/repositories/server:/php/server_apache_openSUSE_10.2/ server:php
Image:susemini.png
Version:
SLE 10
zypper sa http://download.opensuse.org/repositories/server:/php/server_apache_SLE_10/ server:php

Similarly, repositories using MySQL from the Build Service are named server_database_$distro and finally repositories using both Apache and MySQL from the Build Service are named server_database_apache_$distro.

Install the packages

You will need these packages and their dependencies: apache2, apache2-mod_php5, php5, php5-mysql and mysql, either from Build Service repositories or from the distribution media.

zypper in apache2 apache2-mod_php5 php5 php5-mysql mysql

Configuration

The Apache Quickstart HOWTO explains how to configure Apache and how to enable the php5 module.

Misc

Script to generate above YMP files. If you want to change one of the YMP files, send me a patch against this script instead.