Build a LAMP platform in Linux and a lamp in linux
Knowledge Background (from: Baidu encyclopedia ):
LAMP refers to the first letter of the Linux (operating system), Apache HTTP Server, MySQL (sometimes MariaDB, database software), and PHP (sometimes Perl or Python, it is generally used to create a web server.
Linux is a free open-source software, which means that the source code is available in the operating system.
Apache is the most popular open source WEB server software.
MySQL is a multi-threaded, multi-user SQL database management system.
PHP, Perl, or Python: PHP is a programming language originally designed to produce dynamic websites. PHP is mainly used for server applications. Perl is similar to Python.
The operating environment is used here:
Ubuntu 14.04 LTS Server amd64
VMware WorkStation Virtual Machine
Install the software in Linux using apt-get.
1. install Linux:
Ubuntu 14.04 LTS Server amd64 installation process:
Installation completed:
2. install Apache:
Run sudo apt-get install apache2.
3. Install MySQL:
Run sudo apt-get install mysql-server.
During installation, you must set the password of the root account. This parameter is set :********
4. install PHP:
Run sudo apt-get install php5.
5. test:
To be intuitive, install a desktop environment. To save resources (hardware is burning on virtual machines), I chose Xfce.
Go to the Xfce desktop environment and open localhost 127.0.0.1:
Test 2: Use PHP to connect to the MySQL database.
Create the following PHP file under/var/www/html:
<? Php $ link = mysql_connect ('127. 0.0.1 ', 'root',' *** This Is My password'); if (! $ Link) {echo "failed";} else {echo "success";} mysql_close ();?> Access localhost/test. php In the browser:
It can be seen that the LAMP environment has been basically set up successfully.
Which linux system is better to build LAMP in vps? Start with linode vps
There are also many tutorials .. Very suitable for beginners !!! However, if the server traffic is high .. I suggest you use Freebsd ..... He has a royal family .... Many servers are built on it !!! And its ports are very convenient... And high security performance .... This is better than linux! Q: If you are not familiar with system deployment, FreeBSD is not recommended for use. It is more difficult to use than Linux, and the port system management software package is used. Compiling the software is also vigorous, the advantage is that the compilation feature of server software can be well controlled. We recommend that you use Ubuntu, not because it has a special advantage over other systems, mainly because there are a lot of users now and people can easily find answers to problems. if resources are insufficient, Debian is recommended, it is basically the same as Ubuntu, because there are fewer components by default, so the whole system is smaller than Ubuntu. Q: If another 20 days have expired, I have to switch to vps. It is estimated that I have no time to learn ==# answer: Yes, ubuntu is based on debian.
What are the installation, configuration, and test results of the LAMP development platform in Linux?
Result?