Linux DEBIAN8 Environment Installation APACHE/PHP7/MARIADB Web environment (LAMP)

Source: Internet
Author: User
Tags zend

First, LAMP (PHP7) Installation Preparation work

First in my bricklayer VPS (I am using the 512MB memory scheme), then reload the system to select DEBIAN8 64-bit system environment. The same remember port, root password, so we need to use SSH link login client.

Second, add PHP7 data source and update system

echo "Deb Http://repos.zend.com/zend-server/early-access/php7/repos ubuntu/" >>/etc/apt/sources.list

With the above command, we need to update the PHP7 source and then update the system.

sudo apt-get update && sudo apt-get upgrade

Third, install Apache and verify the success

sudo apt-get install apache2

Enter the command to install Apache2, and then ask if we continue, enter Y to continue carriage return. Detect whether the installation is successful, we can through the service apache2 statusingles Check whether we can see the active, or directly in the browser to open the IP address to see if there is the following interface.

See this interface to indicate that the APACHE2 has been successfully installed.

IV. Install MARIADB database

Generally we may be accustomed to install MySQL database, in fact mariadb is also common to us, is based on MySQL and derived from the more resources than MySQL, such as our 128MB or 256MB memory environment installed MARIADB database than the MySQL province resources.

sudo apt-get install Mariadb-server

After entering the command, enter the carriage, see if you want to continue, type Y, and then enter.

During the installation, you will see the pop-up window, let us enter the root password, to enter two times. Then the installation will continue.

Set the security options for the database

Mysql_secure_installation

This should be useful if we have MySQL installed, and after the database is installed, we need to kick out some options, mainly security settings.

This setting is much safer, and then we check the status of the database.

Service MySQL Status

Let's see if the database is running.

Vi. installation of PHP7

sudo apt-get install php7-nightly

In the installation process we enter Y can continue, the other is automatic installation can be.

Seven, set PHP7 applied to Apache

cp/usr/local/php7/libphp7.so/usr/lib/apache2/modules/
cp/usr/local/php7/php7.load/etc/apache2/mods-available/

After performing two lines of file movement, then edit the file:

/etc/apache2/apache2.conf

Add the following script.

<filesmatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

Add to the last file as above.

A2dismod mpm_event && a2enmod mpm_prefork && a2enmod PHP7

Execute the command, and then restart Apache.

Service Apache2 Restart

Eighth, check the PHP7 link is normal

Here/var/www/html/creates a PHP file in the current directory, such as creating a info.php, and then adding a script:

<?php
Phpinfo ();
?>

Then we open the IP address to see if we can see the successful PHP7 version.

Here we can see that the current has been PHP7 installed, so far the lamp environment has been installed, if we need to add a site, it will need to modify the configuration file, build the site.


Http://www.banwagong.me/44.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.