In this tutorial, we will learn how to install a web server under a Linux environment
In this tutorial I will present you the installation of the LAMP platform. This one means L for Linux, A for Apache, M for MySQL and P for PHP. This platform allows to get a stable web server, dynamic pages and a powerful database server.
First of all, we will install Apache, which is the web server itself.
When we speak about web server, we often think about the machine, but this term also indicates the software which allows the machine to analyze the requests of a user (in http form), and to return the file corresponding to the request (or an error if the file is not found, or the request badly formulated).
\In the context of Apache, it is therefore the software that we are talking about.
Before installing the server, we will make sure that our server is up to date. To carry out these commands, you must have administrator rights.
Once your server is up to date, we can install the Apache server.
Once the installation is finished, we will give us the access rights to the apache folder to easily administer our sites.
PHP (the language this time) is mainly used to make a site dynamic, i.e. the user sends information to the server which sends back results modified according to this information. In contrast, a static site does not adapt to the information provided by a user. It is saved as a file once and for all, and will always deliver the same content.
Now that we have implemented PHP, you will probably want to store information for use in your sites. For this, we use databases most often.
So we will set up a DBMS (Database Management System), namely MySQL.
MySQL is a free, powerful, massively used DBMS (about 56% market share of free DBMS). Once again, MySQL is a must-have for any kind of development, so you should absolutely learn and master it.
Let's check that MySQL is working properly.
We are now going to delete the root user and create a new root user, because the default one is only usable by the system administrator account, and is therefore not accessible to the server's PHP scripts.
Your web server is now ready.
PHPMyAdmin is an application developed in PHP, and which aims to provide a simplified interface for MySQL.
It allows you for example to see quickly and in a readable way the content of your database, or to manipulate it without having to make your own MySQL queries
PHPMyAdmin will ask you several questions about its settings.
As we have already configured the database, choose no to the question about using dbconfig-common. Choose to use PHPMyAdmin for an Apache server. For the root password, this is the one you used for MySQL.
You must also activate the mysqli extension.
0 commentaire