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.