Difference between revisions of "Install PHP 7 on its dedicated server"
() |
|||
(20 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
<br /> | <br /> | ||
+ | {{#seo: | ||
+ | |title=Install PHP 7 on its dedicated server | ||
+ | |title_mode=append | ||
+ | |keywords=these,are,your,keywords | ||
+ | |description=Discover in this article how to install PHP 7 on its dedicated server. This is the latest major version of PHP. | ||
+ | |image=Uploaded_file.png | ||
+ | |image_alt=Wiki Logo | ||
+ | }} | ||
== Introduction == | == Introduction == | ||
− | Want to get the latest major version of PHP on your [https://www.ikoula.com/en/dedicated-server dedicated server] ? This article will help you to install '''PHP | + | Want to get the latest major version of '''''PHP''''' on your [https://www.ikoula.com/en/dedicated-server dedicated server] ? This article will help you to install the new '''''PHP''''' in a few commands and thus boost your sites and CMS running PHP ('''Performance up to 3 times higher under Wordpress 4.3.1!'''). |
==What is PHP ?== | ==What is PHP ?== | ||
− | PHP is a computer programming language that permit to make a dynamic website, PHP is one of the most used languages to develop a website. PHP 7 is the final version of the older version of PHP. | + | PHP is a computer programming language that permit to make a dynamic website, PHP is one of the most used languages to develop a website. ''PHP 7'' is the final version of the older version of PHP. |
== Installation == | == Installation == | ||
− | Careful, currently the official Debian 8 deposits do not have version | + | Careful, currently the official Debian 8 deposits do not have the new version of PHP, the package will only be available from Debian 9. |
− | However, it is still possible to benefit from PHP | + | However, it is still possible to benefit from PHP on your [https://www.ikoula.com/en/dedicated-server server] under Debian 8. |
This article is aimed primarily at users with a [https://www.ikoula.com/en/dedicated-server dedicated] server without Plesk installation. | This article is aimed primarily at users with a [https://www.ikoula.com/en/dedicated-server dedicated] server without Plesk installation. | ||
− | == | + | ==Adding the Dotdeb Deposit == |
As previously stated, the new version of PHP is not yet available in official Debian repositories, so we will need to set up [https://www.dotdeb.org/ Dotdeb] deposits, an unofficial repository for Debian containing, among other things, version 7 of PHP | As previously stated, the new version of PHP is not yet available in official Debian repositories, so we will need to set up [https://www.dotdeb.org/ Dotdeb] deposits, an unofficial repository for Debian containing, among other things, version 7 of PHP | ||
− | * : | + | *Adding Deposit : |
<pre> | <pre> | ||
Line 40: | Line 48: | ||
</pre> | </pre> | ||
− | * : | + | * Update deposites : |
<pre> | <pre> | ||
Line 46: | Line 54: | ||
</pre> | </pre> | ||
− | === | + | === Removing PHP 5.x === |
− | * | + | *Retrieve the list of installed php 5 modules. |
− | + | It may be useful to keep the list of php 5 packages currently installed on your [https://www.ikoula.com/fr/serveur-dedie server] for reinstallation in '''PHP 7'''. | |
<pre> | <pre> | ||
dpkg --list | grep php | awk '/^ii/{ print $2}' | dpkg --list | grep php | awk '/^ii/{ print $2}' | ||
</pre> | </pre> | ||
− | * | + | * If PHP5 is already installed and you do not want to make both versions (choice presented in this article) cohabit with your Apache2 installation |
− | |||
<pre> | <pre> | ||
− | # | + | # Removing all PHP5 packages and dependencies |
apt-get autoremove --purge php5* | apt-get autoremove --purge php5* | ||
</pre> | </pre> | ||
− | == | + | ==Installing PHP 7== |
− | |||
− | |||
<pre> | <pre> | ||
− | # Installation | + | # Installation of PHP 7 as well as some dependencies and main modules for Apache |
apt-get install php7.0 libapache2-mod-php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-json php7.0-gd php7.0-intl php7.0-mbstring php7.0-xml php7.0-zip | apt-get install php7.0 libapache2-mod-php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-json php7.0-gd php7.0-intl php7.0-mbstring php7.0-xml php7.0-zip | ||
</pre> | </pre> | ||
<div style="background-color: #FFCC99;"> '''Note''': 7.0-[module]</div> | <div style="background-color: #FFCC99;"> '''Note''': 7.0-[module]</div> | ||
− | == | + | == Test PHP 7== |
− | () | + | TYou have the possibility to test your new version of PHP using the function phpinfo() to display various information about your web [https://www.ikoula.com/fr/serveur-dedie server]. |
− | : | + | To do this, create a new file info.php in the tree view of your website and having for content : |
<pre> | <pre> | ||
<?php | <?php | ||
Line 79: | Line 84: | ||
</pre> | </pre> | ||
− | + | Access will be conducted at [https://www.ikoula.com/en/dedicated-server serveur ]/info.php'' | |
== Conclusion == | == Conclusion == | ||
− | 7 | + | Under Apache the PHP 7 module is activated automatically, you now benefit from a functional installation ! Attention, if you chose to delete the old installation |
− | + | PHP 5 you probably noticed that PHPMyAdmin was part of the packages deleted during the operation. Indeed PMA requires a functional installation of PHP 5.x in order to be executed | |
− | + | If you want to keep PHPMyAdmin, you will need to have both versions of PHP on your [https://www.ikoula.com/en/dedicated-server server] | |
[[Category:PHP]] | [[Category:PHP]] |
Latest revision as of 16:16, 16 December 2020
en:Install PHP 7 on its dedicated server
he:להתקין PHP 7 על שרת ייעודי שלה
ro:Instala PHP 7 pe un server dedicat
ru:Установка PHP 7 на выделенный сервер
pl:Zainstalować PHP 7 na jego serwer dedykowany
ja:専用のサーバーで PHP 7 をインストールします。
ar:تثبيت 7 بي إتش بي على خادم مخصص لها
zh:在其专用的服务器上安装 PHP 7
de:PHP-7 auf einem dedizierten Server installieren
nl:Installeren PHP 7 op zijn dedicated server
it:Installare PHP 7 sul proprio server dedicato
pt:Instalar o 7 PHP em seu servidor dedicado
es:Instalar 7 PHP en su servidor dedicado
fr:Installer PHP 7 sur son serveur dédié
Introduction
Want to get the latest major version of PHP on your dedicated server ? This article will help you to install the new PHP in a few commands and thus boost your sites and CMS running PHP (Performance up to 3 times higher under Wordpress 4.3.1!).
What is PHP ?
PHP is a computer programming language that permit to make a dynamic website, PHP is one of the most used languages to develop a website. PHP 7 is the final version of the older version of PHP.
Installation
Careful, currently the official Debian 8 deposits do not have the new version of PHP, the package will only be available from Debian 9. However, it is still possible to benefit from PHP on your server under Debian 8. This article is aimed primarily at users with a dedicated server without Plesk installation.
Adding the Dotdeb Deposit
As previously stated, the new version of PHP is not yet available in official Debian repositories, so we will need to set up Dotdeb deposits, an unofficial repository for Debian containing, among other things, version 7 of PHP
- Adding Deposit :
# On ajoute le nouveau dépôts à notre liste echo "deb http://packages.dotdeb.org jessie all" > /etc/apt/sources.list.d/dotdeb.list # On ajoute la clé GPG d'identification du dépôts wget -O- https://www.dotdeb.org/dotdeb.gpg | apt-key add -
- Update deposites :
apt-get update
Removing PHP 5.x
- Retrieve the list of installed php 5 modules.
It may be useful to keep the list of php 5 packages currently installed on your server for reinstallation in PHP 7.
dpkg --list | grep php | awk '/^ii/{ print $2}'
- If PHP5 is already installed and you do not want to make both versions (choice presented in this article) cohabit with your Apache2 installation
# Removing all PHP5 packages and dependencies apt-get autoremove --purge php5*
Installing PHP 7
# Installation of PHP 7 as well as some dependencies and main modules for Apache apt-get install php7.0 libapache2-mod-php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-json php7.0-gd php7.0-intl php7.0-mbstring php7.0-xml php7.0-zip
Test PHP 7
TYou have the possibility to test your new version of PHP using the function phpinfo() to display various information about your web server. To do this, create a new file info.php in the tree view of your website and having for content :
<?php phpinfo(); ?>
Access will be conducted at serveur /info.php
Conclusion
Under Apache the PHP 7 module is activated automatically, you now benefit from a functional installation ! Attention, if you chose to delete the old installation PHP 5 you probably noticed that PHPMyAdmin was part of the packages deleted during the operation. Indeed PMA requires a functional installation of PHP 5.x in order to be executed If you want to keep PHPMyAdmin, you will need to have both versions of PHP on your server
Enable comment auto-refresher