If you’ve made any changes to /etc/php5/fpm/php.ini or /etc/php5/cli/php.ini, you should reapply them in /etc/php/7.0/fpm/php.ini and /etc/php/7.0/cli/php.ini, respectively.Īt this point your website should be served by PHP 7 via NGINX. With fastcgi_pass unix:/var/run/php/ Īnd then restart NGINX sudo service nginx restart Open file /etc/nginx/sites-available/default and replace fastcgi_pass unix:/var/run/php5-fpm.sock
Next, let’s update NGINX settings to use the new version of PHP.
The first part is the same as above, we’re going to add PPA and install a bunch of basic packages: sudo apt-add-repository ppa:ondrej/php -y I’m going to use DigitalOcean’s “LEMP on 14.04” image. We already have a LEMP stack (Linux, NGINX, MySQL, PHP) with PHP 5.x running on Ubuntu 14.04 and we want to update it to PHP 7. Sudo apt-get install -y php7.0-common php7.0-cli php7.0-fpm php7.0-curl php7.0-sqlite3 php7.0-json php7.0-tidy php7.0-mysqlĪnd you can confirm that we have PHP 7 running with: php -v Unfortunately PHP 7 is not available out of the box on 14.04, so we’ll have to add a PPA to be able to install it: sudo apt-add-repository ppa:ondrej/php -y
It also explains how to upgrade from PHP 5.x to PHP 7 on LEMP stack. Ubuntu 14.04 comes with nginx version 1.4, to install the latest stable version of Nginx version 1.8, run: $ sudo add-apt-repository -y ppa:nginx/stableĬreate a new Nginx server block with the following content: $ sudo nano /etc/nginx/sites-available/myMagentoSite.In this short tutorial I’m going to explain step by step how to install PHP 7 (the latest stable version) on Ubuntu 14.04 (the latest LTS, or Long Term Support version). Restart PHP-FPM: $ sudo service php5-fpm restart Install and configure Nginx Listen = /var/run/php5-fpm-your_user.sockĭo not forget to change your_user with your username. : Magento Admin URI: /admin_1pqiagĬreate a new PHP-FPM pool for your user: $ sudo nano /etc/php5/fpm/pool.d/your_nf When the installation is complete, you’ll see the message below. currency=$currency -timezone=$timezone -use-rewrites=1 admin-user=$admin_user -admin-password=$admin_password -language=$language \
admin-firstname=$admin_firstname -admin-lastname=$admin_lastname -admin-email=$admin_email \ db-host=$db_host -db-name=$db_name -db-user=$db_name -db-password=$db_password \ If you don’t have an account you can create one at: Ĭhange to the directory and install Magento: $ cd ~//public_htmlĬhange the following values as per your setup bin/magento setup:install -base-url=$base_url \ When prompted, enter your Magento support portal user name and password. Issue the Composer create-project command: composer create-project -repository-url= magento/project-community-edition public_html $ sudo mv composer.phar /usr/local/bin/composer Install Magento 2Ĭreate a root directory for your Magento using the following command: $ mkdir -p ~// Composer will pull in all the required libraries and dependencies you need for your project. $ sudo apt-get -y install php5-fpm php5-cli php5-gd php5-imagick php5-mysqlnd php5-mcrypt php-pear php5-curl php5-intl php5-gd php5-xslĬomposer is a dependency manager for PHP with which you can install packages. DigitalOcean Kubernetes: new control plane is faster and free, enable HA for 99. To install the latest stable version of PHP version 5.6 and all necessary modules, run: $ sudo add-apt-repository -y ppa:ondrej/php5-5.6 It takes minutes to install and configure, and this tutorial shows you how to set it up an BaasBox is an open-source backend for web and mobile applications. MariaDB > \q Install PHP, composer and required PHP modules MariaDB > GRANT ALL PRIVILEGES ON magento.* TO IDENTIFIED BY 'okdf9Js8fj' $ mysql -uroot -p MariaDB > CREATE DATABASE magento Next, we need to create a database for our Magento installation.
When the installation is complete, run the following command to secure your installation: $ mysql_secure_installation
$ sudo add-apt-repository 'deb trusty main' To add the MariaDB repository to your sources list and install the latest MariaDB server, run the following commands: $ sudo apt-key adv -recv-keys -keyserver hkp://:80 0xcbcb082a1bb943db $ sudo apt-get install software-properties-common curl nano Login to your VPS via SSH ssh Update the system and install necessary packages $ sudo apt-get update & sudo apt-get -y upgrade
Magento 2 is a complete overhaul of the Magento 1.x codebase and it requires PHP 5.5+, MySQL 5.6+ and Nginx 1.8+ or Apache 2.2+, This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 14.04 VPS. In this guide, we will explain how to install Magento 2 on an Ubuntu 14.04 VPS with MariaDB, PHP-FPM and Nginx.