LAMP
From FrugalWiki
Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어
Contents |
Introduction
To make short, LAMP is a webserver. The nom comes from initials : Linux, Apache, Mysql and Php. I'll explain you how to create a local webserver.
Installation of Apache
To begin, what is Apache ? Apache is a HTTP server software made by the Apache Software Foundation.
To install it :
Where it's done, we have to start the "httpd" service :
It the service correctly started, you should have this shown on your screen :
Now, to have the service started at each boot, you have to type this :
Apache will be launched automaticly at each boot of your machine.
Now, you have to edit a file, with your favorite editor. I prefer Gedit, which is easier because it provides a graphical interface.
At the line 323, add "ServerName 127.0.0.1", as we are in local.
If all is ok, go to this url with your Internet Browser : http://127.0.0.1 or http://localhost
You could see a page like this :
Installation of PHP
PHP is a programmation language for making dynamic web pages. To install php and its documentation, you have to type this :
Now, we'll verify if the installation is good. For this, we'll create a file called phpinfo.php. This file will give us informations about the version of php installed on your system.
Add in this file these lines. These lines call a php function called phpinfo.
<?php phpinfo(); ?>
You should see a page similar (but maybe with some diffences) if your installation is OK.
NB : you should have to reboot your computer or reboot X.
Installation of MySQL
MySQL is a relational database management system (RDBMS). According to the type of the application, its licence is free ou proprietary. It's one of the most database system used in the world, people (mainly web applications) as professionnals, competing Oracle or Microsoft SQL Server.
MySQL est un système de gestion de base de données (SGBD). Selon le type d’application, sa licence est libre ou propriétaire. Il fait partie des logiciels de gestion de base de données les plus utilisés au monde, autant par le grand public (applications web principalement) que par des professionnels, en concurrence avec Oracle ou Microsoft SQL Server.
To install MySQL :
Like for Apache, we'll have to start the service :
To launch the service each boot :
We'll now install phpMyAdmin. It allows to administrate your databases with your web browser. It's easy to install it :
To configure MySQL :
The first question is to choose a password for connecting to phpMyAdmin.The next questions are not necessary in your case. You can pass it by pressing Enter. But, if you want, you can configure the rest.
Now you can connect to verify if phpMyAdmin is installed. For this, go to : http://127.0.0.1/phpmyadmin/
To connect, the user is "root" and the password is the one you've configured earlier. You can imagine, but don't delete the two databases which are already present.
Now you have all the tools to work without Internet.