1. Add PHP7 data source and update the system
<code>apt-get install <span>sudo</span></code>
<code><span>echo</span><span>"deb http://repos.zend.com/zend-server/early-access/php7/repos ubuntu/"</span> >> /etc/apt/sources.<span>list</span></code>
<code><span>sudo</span> apt-get update && <span>sudo</span> apt-get upgrade</code>
When you encounter this prompt, just press Q to exit and continue
2. Install Apache and verify whether it is successful
<code><span>sudo</span> apt-get install apache2</code>
3. Install the MariaDB database
<code>sudo apt-<span>get</span> install mariadb-<span>server</span></code>
Enter the command and press Enter. When you see if you want to continue, type Y and press Enter. During the installation process, you will see the following window. Let us enter the ROOT password. You need to enter it twice before the installation will continue.
4. Set the security options of the database
<code>mysql_secure_installation</code>
This setting is much safer, and then we check the status of the database
<code>service mysql status</code>
5. Install PHP7
<code>sudo apt<span>-get</span> install php7<span>-nightly</span></code>
6. Set PHP7 to apply to APACHE
<code><span>cp</span> /usr/local/php7/libphp7<span>.so</span> /usr/lib/apache2/modules/ <span>cp</span> /usr/local/php7/php7<span>.load</span> /etc/apache2/mods-available/</code>
After executing the two-line file move, then edit the file:
<code>/etc/apache2/apache2<span>.conf</span></code>
Add the script below.
<code>SetHandler application/x<span>-httpd</span><span>-php</span></code>
Add the same at the end of the above file.
<code>a2dismod mpm_event && a2enmod mpm_prefork && a2enmod php7</code>
Execute the command to take effect, and then restart APACHE.
<code>service apache2 restart</code>
7. Check whether the PHP7 link is normal
Create a PHP file in the current directory of /var/www/html/, for example, create an info.php, and then add the script:
Then we open it with the IP address to see if You can see the successful PHP7 version.
Refer to the original text
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });The above introduces the installation of Apache/PHP7/MariaDB website environment in Debian8 environment, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.