Difference between revisions of "Install PHP 7 on its dedicated server"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
<span data-link_translate_en_title="Install PHP 7 on its dedicated server"  data-link_translate_en_url="Install PHP 7 on its dedicated server"></span>[[:en:Install PHP 7 on its dedicated server]][[en:Install PHP 7 on its dedicated server]]
 +
<span data-link_translate_he_title="להתקין PHP 7 על שרת ייעודי שלה"  data-link_translate_he_url="%D7%9C%D7%94%D7%AA%D7%A7%D7%99%D7%9F+PHP+7+%D7%A2%D7%9C+%D7%A9%D7%A8%D7%AA+%D7%99%D7%99%D7%A2%D7%95%D7%93%D7%99+%D7%A9%D7%9C%D7%94"></span>[[:he:להתקין PHP 7 על שרת ייעודי שלה]][[he:להתקין PHP 7 על שרת ייעודי שלה]]
 
<span data-link_translate_ro_title="Instala PHP 7 pe un server dedicat"  data-link_translate_ro_url="Instala+PHP+7+pe+un+server+dedicat"></span>[[:ro:Instala PHP 7 pe un server dedicat]][[ro:Instala PHP 7 pe un server dedicat]]
 
<span data-link_translate_ro_title="Instala PHP 7 pe un server dedicat"  data-link_translate_ro_url="Instala+PHP+7+pe+un+server+dedicat"></span>[[:ro:Instala PHP 7 pe un server dedicat]][[ro:Instala PHP 7 pe un server dedicat]]
 
<span data-link_translate_ru_title="Установка PHP 7 на выделенный сервер"  data-link_translate_ru_url="%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0+PHP+7+%D0%BD%D0%B0+%D0%B2%D1%8B%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9+%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80"></span>[[:ru:Установка PHP 7 на выделенный сервер]][[ru:Установка PHP 7 на выделенный сервер]]
 
<span data-link_translate_ru_title="Установка PHP 7 на выделенный сервер"  data-link_translate_ru_url="%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0+PHP+7+%D0%BD%D0%B0+%D0%B2%D1%8B%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9+%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80"></span>[[:ru:Установка PHP 7 на выделенный сервер]][[ru:Установка PHP 7 на выделенный сервер]]
Line 13: Line 15:
 
<br />
 
<br />
  
This article has been created by an automatic translation software. You can view the article source [[:fr:Installer PHP 7 sur son serveur dédié|here]].<br /><span data-translate="fr"></span>
+
{{#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 | _. _. You want to take advantage of the latest major version of PHP on your | _. _. dedicated | _. _. This article will allow you to install PHP | _. _.  in a few commands and so boost your ites and CMS running PHP ==
+
== Introduction  ==
Performance up to: _! _ |  times higher under Wordpress | _. _. : _! _ |  Attention, at the moment the official Debian repositories | _. _.  lack of version | _. _.  PHP, the package will be available from Debian | _. _.  . It is still possible to benefit from PHP | _. _.  on your | _. _.  under Debian | _. _.  This article is addressed to the essentially to users with a | _. _.  dedicated without installation of Plesk. {{Template:Serveur}} Adding the Dotdeb deposits | _. _.  As stated above, PHP | _. _.  is not yet available in the official repositories of Debian, it will be necessary to configure the repositories of ? , a Debian unofficial repository containing among other things the version | _. _.  PHP. 7 Addition of the deposit | _. _.  Is to update its deposits | _. _.  Remove PHP | _. _.    ( '''Retrieve the list of older modules php | _. _.  installed | _. _.  It may be useful to keep the list of packages php | _. _.  currently installed on your | _. _.  for resettlement under PHP | _. _.  If PHP | _. _.  is already installed and you do not want to mix both versions | _. _.  choices presented in this article | _. _.  with your Apache installation | _. _.  Installation of PHP | _. _.  Installation of PHP | _. _.  : _! _ |  You will understand, if a module is required by your site or project, it will be generally named php | _. _.  PHP test | _. _.  You have the possibility to test your new version of PHP using the function phpinfo | _. _.  to display various information relating to your | _. _.  Web.  3 To do this create a new file info.php in the hierarchy of your web site with content | _. _.  Access will be made then to | _. _.  : _! _ |  Under Apache module PHP | _. _.  If active automatically, you now get a PHP installation | _. _.  functional | _. _.  Attention, if you chose to delete the old installation PHP | _. _.  you have probably noticed that PHPMyAdmin was part of packages removed during the operation. Indeed LDCS requires a working installation of PHP | _. _.  .x to be filled. If you want to keep PHPMyAdmin you will then need to co-locate the two version of PHP on your 4.3.1 !''' ).
+
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 ?==
 +
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 ==
8 7  97  {{Template:Serveur}}  8.<br />
+
Careful, currently the official Debian 8 deposits do not have the new version of PHP, the package will only be available from Debian 9.
{{Template:Serveur}}
+
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.
  
=== ===
+
==Adding the Dotdeb Deposit ==
[https://www.dotdeb.org/ Dotdeb] 7  
+
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 34: Line 48:
 
</pre>
 
</pre>
  
* :
+
* Update deposites :
  
 
<pre>
 
<pre>
Line 40: Line 54:
 
</pre>
 
</pre>
  
=== 5.x ===
+
=== Removing PHP 5.x ===
* 5  
+
*Retrieve the list of installed php 5 modules.
5 {{Template:Serveur}}  7.
+
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>
  
* ( ) 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
 
 
 
<pre>
 
<pre>
# Suppression de tous les packages PHP5 et dépendances
+
# Removing all PHP5 packages and dependencies
 
apt-get autoremove --purge php5*
 
apt-get autoremove --purge php5*
 
</pre>
 
</pre>
  
==7 ===
+
==Installing PHP 7==
 
 
*  7
 
  
 
<pre>
 
<pre>
# Installation de PHP7 ainsi que quelques dépendances et modules principaux pour Apache
+
# 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>
  
==7 ===
+
== Test PHP 7==
() {{Template:Serveur}} web.<br />
+
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 73: Line 84:
 
</pre>
 
</pre>
  
''http://ip.{{Template:Serveur}}/info.php''
+
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
5 5 {{Template:Serveur}}.
+
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
Note: 7.0-[module]

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



You are not allowed to post comments.