Lamp is the abbreviation for Linux, Apache, MySQL, and PHP. This document describes the process of installing Apache2, MySQL5, PHP5 in Ubuntu 14.04 LTS Server 64-bit systems.
First way: Tasksel one-click Installation
Tasksel is a suite of installation tasks under Debian/ubuntu that can install multiple packages at once. Installing the lamp kit with Tasksel is a simple and convenient method. The command is as follows:
sudo tasksel install Lamp-server
Second method: Apt installs one by one
Installation using apt means that these packages need to be installed separately. Before installing, update the APT software source information (Apt source file path is/etc/apt/sources.list), run the following command:
sudo apt-get update
The installation process consists of 6 main steps,
1. Install the MYSQL5 service and client , and follow the prompts to enter the root user's password
sudo apt-get install mysql-server mysql-client
2. Installing the APACHE2 server
sudo apt-get install apache2
The default directory for the server is/var/www/html, and the configuration file path is/etc/apache2/apache2.conf
Enter an IP address (such as http://127.0.0.1) in the browser address bar to see the default home page after installation.
3. Installing PHP5
sudo apt-get install php5 libapache2-mod-php5
Restart Apache
Service Apache2 Restart
Create a probe file to test PHP:
vi/var/www/html/info.php
The contents of the file are as follows:
<?php phpinfo ();? >
Access this page (such as http://127.0.0.1/info.php) in the browser's address bar to view PHP information.
4. Installing the relevant modules
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php 5-ming php5-ps Php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
5. Install XCache optimized cache
Apt-get Install Php5-xcache
Restart Apache
Service Apache2 Restart
6. Install the phpMyAdmin Management database, install the Web server selected as Apache2, and then set phpMyAdmin need to enter the MySQL database root user password
sudo apt-get install phpMyAdmin
After the installation is complete, there is no phpMyAdmin folder under the server directory, because it is installed by default under/usr/share/, so a soft connection must be established so that a document under phpMyAdmin and/var/www/html is linked and switched to/ var/www/html directory, enter the following command
sudo ln-s/usr/share/phpmyadmin phpmyadmin
Then access the phpMyAdmin (such as Http://127.0.0.1/phpmyadmin) in the browser's address bar to log in to the management database.
Resources:
[1] http://muzi.info/2014/391/ubuntu%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85lamp-%E5%8F%8A%E4%B8%80%E9%94%AE%E5%8D% B8%e8%bd%bd.html
[2] Http://www.linuxeden.com/html/softuse/20140610/152522.html
[3] Http://jingyan.baidu.com/article/ceb9fb10d572d88cad2ba093.html
[4] Http://jingyan.baidu.com/article/9113f81b24aa9a2b3214c721.html
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Build lamp Environment under Ubuntu14.04