DEBIAN8 Environment Installation APACHE/PHP7/MARIADB website environment

Source: Internet
Author: User
I. Adding PHP7 data sources and updating systems

    • After installing Debian, you cannot use sudo and you need to install the sudo command after logging in with the root user.
sudo
    • Adding PHP7 data sources and updating systems
echo"deb http://repos.zend.com/zend-server/early-access/php7/repos ubuntu/" >> /etc/apt/sources.list
    • Update PHP7 Source and system
sudosudo apt-get upgrade


When you encounter this prompt, press Q to exit.

II. Installing Apache and verifying success

sudo apt-get install apache2

Third, install the MARIADB database

sudo apt-get install mariadb-server

After you enter the command and then enter, you see whether to continue, type Y, and then enter. The installation process will see the following window, let us enter the root password, to enter two times, will continue to install.

Iv. setting security options for a database

mysql_secure_installation


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

service mysql status

V. Installation of PHP7

sudo apt-get install php7-nightly

Vi. setting PHP7 application in Apache

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

After you have executed two lines of file movement, then edit the file:

/etc/apache2/apache2.conf

Add the following script.

SetHandler application/x-httpd-php

Add to the last file as above.

a2dismod mpm_event && a2enmod mpm_prefork && a2enmod php7

Execute the command to take effect, and then restart Apache.

service apache2 restart

Seven, check whether 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:

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

Reference text

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the DEBIAN8 environment installation APACHE/PHP7/MARIADB site environment, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.