Update VestaCP to PHP 7 on CentOS 7

First let’s make sure your server is up to date.

sudo yum update

Now we make sure that yum-utils is installed

sudo yum install yum-utils

If it’s already installed, great move on to the next step, if not then allow it to install.
Now we can enable remi-php70
sudo yum-config-manager –enable remi-php70

Now we can tell yum to update, this will upgrade our old version of PHP to 7
sudo yum update

sudo service php-fpm restart

php -v

How To Install and Configure Redis on Ubuntu 16.04

I’ll show you, how to install and configure Redis on Ubuntu 16.04. Redis is an in-memory data structure store primarily used as a database and cache. Installing Redis on Ubuntu 16.04 is an easy task, just follow the steps bellow and you should install, configure and use Redis on Ubuntu 16.04.

1. Connect via SSH
Connect to your Linux server via SSH, resynchronize the package index files from their sources and install the newest versions of all packages that are currently installed on your server by using the following commands:

sudo apt-get update
sudo apt-get upgrade
Once the upgrade is completed you can move on to the next step.

2. Install Redis on Ubuntu 16.04
Installing Redis on an Ubuntu VPS is simple. Run the command below to install Redis on your machine:

sudo apt-get install redis-server
If you are planning on using Redis as an object cache for WordPress or any other PHP-based application, you need to install the following package too:

sudo apt-get install php-redis
3. Configure Redis as a cache on Ubuntu 16.04
To configure Redis as a cache you need to edit the /etc/redis/redis.conf file. We will use nano as a text editor for this purpose, but you can use any text editor of your choice.

sudo nano /etc/redis/redis.conf
To configure the max memory for Redis as well as how Redis will select what to remove when the max memory is reached, add the following lines at the end of the file:

maxmemory 128mb
maxmemory-policy allkeys-lru
In this example, Redis will remove any key according to the LRU algorithm when the max memory of 128mb is reached. Save and close the file, then restart the Redis service:

sudo systemctl restart redis-server.service
Next, enable Redis on system boot:

sudo systemctl enable redis-server.service

install laravel on ubuntu 16 nginx php7 server

apt update && apt upgrade
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer

Following are required extension for php 7 laravel app installation
sudo apt-get install php7.0-gd
sudo apt-get install php7.0-intl
sudo apt-get install php7.0-xsl
sudo apt-get install php7.0-bcmath
sudo apt-get install php7.0-mbstring php7.0-xml composer unzip

enabled gd extension by the following command
sudo phpenmod gd

# cd /var/www/html/your_website
# git clone https://github.com/laravel/laravel.git
# mv laravel/* .
# mv laravel/.* .
#rmdir laravel/
composer install

php artisan key:generate

The API based drivers such as Mailgun and SparkPost are often simpler and faster than SMTP servers. If possible, you should use one of these drivers. All of the API drivers require the Guzzle HTTP library, which may be installed via the Composer package manager:
composer require guzzlehttp/guzzle

clear cache on laravel by using the following command
php artisan cache:clear

python 2.6 to 2.7.14 on centos7

# Start by making sure your system is up-to-date:
yum update
# Compilers and related tools:
yum groupinstall -y “development tools”
# Libraries needed during compilation to enable all features of Python:
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel
# If you are on a clean “minimal” install of CentOS you also need the wget tool:
yum install -y wget

# Python 2.7.14:
wget http://python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz
tar xf Python-2.7.14.tar.xz
cd Python-2.7.14
./configure –prefix=/usr/local –enable-unicode=ucs4 –enable-shared LDFLAGS=”-Wl,-rpath /usr/local/lib”
make && make altinstall

After running the commands above your newly installed Python interpreter will be available as /usr/local/bin/python2.7. The system version of Python 2.6.6 will continue to be available as /usr/bin/python, /usr/bin/python
You might also want to strip symbols from the shared library to reduce the memory footprint.

# Strip the Python 2.7 binary:
strip /usr/local/lib/libpython2.7.a

But you don’t need to change your default Python to get the system to run 2.7 when you type python.
First, you can set up a shell alias:
alias python=/usr/local/bin/python2.7

# Check the system Python interpreter version:
python –V

Install/upgrade pip, setuptools and wheel
# First get the script:
wget https://bootstrap.pypa.io/get-pip.py

# Then execute it using Python 2.7 and/or Python 3.6:
python2.7 get-pip.py

install nvm & set up bitcore over centos 7

1.curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash

After running the above command, you may receive output similar to the following:
Close and reopen your terminal to start using nvm

We can quickly verify that NVM is now installed and working properly with the following command:
nvm –version

2. nvm install v4
Now using node v4.8.6 (npm v2.15.11)
node -v & npm -v check same version number.

or
here is a quick and easy way how to install the current Node.js 4.x LTS
# Install the repository
rpm -Uvh https://rpm.nodesource.com/pub_4.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm

# Install Node.js
yum install nodejs
3. npm install -g bitcore