How To Install Lighttpd With PHP And MariaDB on Ubuntu 16.04 LTS

Install Lighttpd With PHP And MariaDB on Ubuntu 16

Lighttpd is a fast and secure web-server which has been optimized for high-performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Lighttpd With PHP FPM And MariaDB on Ubuntu 16.04 Xenial Xerus server.

Install Lighttpd With PHP and MariaDB on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

apt-get update
apt-get upgrade

Step 2. Installing Lighttpd on Ubuntu 16.04.

Lighttpd is available to install from the official Ubuntu repositories, So if you want to install Lighttpd, you only have to run this command:

apt-get install lighttpd

To start up Lighttpd webserver, run the commands below and You can test the status of the server by accessing the IP address of your VPS in a web browser. Upon success, you will see the Lighttp welcome page:

systemctl start lighttpd.service

Step 3. Installing MariaDB.

To install MariaDB in Ubuntu run the following command:

apt-get install mariadb-server

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

To log into MariaDB, use the following command (note that it’s the same command you would use to log into a MySQL database):

mysql -u root -p

To start the database, run the commands below:

systemctl start mariadb.service

Step 4. Installing PHP and other PHP7 modules.

Next, run the commands below to install PHP5 and other PHP modules:

apt-get -y install php-fpm php-mysql

Enable PHP CGI modules in Lighttpd with the following commands:

sudo lighty-enable-mod fastcgi 
sudo lighty-enable-mod fastcgi-php

After enabling the modules, you need to restart the Lighttpd service by running the following command:

systemctl restart lighttpd

Testing if PHP is working:

nano /srv/www/htdocs/info.php

Then, we’ll simply add the following line into the file:

<?php phpinfo(); ?>

Step 5. Configure firewall for LLMP.

Run following commands to allow HTTP (80) and HTPPS (443) request through the firewall.

ufw allow 80/tcp
ufw allow 443/tcp
ufw reload

Congratulations! You have successfully installed LLMP. Thanks for using this tutorial for installing Lighttpd With PHP FPM and MariaDB in Ubuntu 16.04 Xenial Xerus systems. For additional help or useful information, we recommend you to check the official Lighttpd web site.

How To Install Vesta Control Panel on Ubuntu 16.04 LTS

Install Vesta Control Panel on Ubuntu 16

KDE is a well-known desktop environment for the Unix-Like systems designed for users who wants to have a nice desktop environment for their machines, It is one of the most used desktop interfaces out there.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Vesta Control Panel on a Ubuntu 16.04 (Xenial Xerus) server.
Install Vesta Control Panel on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Vesta Control Panel.

Download the Vesta Control panel install script with the following command:

curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh

In additon, you can customize the installation using the advanced install settings at https://vestacp.com/install/ and generate install command to install nginx, php-fpm, proftpd, exim, dovecot, spamassassin, named, iptables, MySQL and use file system quota:

bash vst-install.sh --nginx yes --phpfpm yes --apache no --named yes --remi no --vsftpd no --proftpd yes --iptables yes --fail2ban no --quota yes --exim yes --dovecot yes --spamassassin yes --clamav no --mysql yes --postgresql no --hostname your-domain.com --email [email protected] --password Y0ur_PaSSwD

If everything is OK, you should receive an output like this:

Vesta Control Panel

Following software will be installed on your system:
   - Nginx Web Server
   - PHP-FPM Application Server
   - Bind DNS Server
   - Exim mail server + Antispam
   - Dovecot POP3/IMAP Server
   - MySQL Database Server
   - ProFTPD FTP Server
   - Iptables Firewall

Would you like to continue [y/n]:

Once the installation is complete, you will get a screen that has the control panel login:

Congratulations, you have just successfully installed Vesta Control Panel

    https://your_server_IP:8083
    username: admin
    password: Y0ur_PaSSwD

Step 4. Access Vesta Control Panel.

Once the installer finishes installing, it will show you the url, Username and Password. Just open that url in web browser and login using the username and password.

https://ip.add.re.ss:8083/

Congratulation’s! You have successfully installed Vesta CP. Thanks for using this tutorial for installing Vesta Control Panel on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Vesta Control Panel web site.

How To Install KernelCare on Your Linux Server

Install KernelCare on Your Linux Server

KernelCare is fabulous kernel update tool by CloudLinux. We started testing this kernel patch in a few servers and the result has been truly amazing, allowing us to avoid server downtime after kernel updates because of each server reboot we had to apply after the kernel was updated.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation KernelCare on your Linux server.
Install KernelCare on Your Linux Server

Step 1. Installing Kernelcare.

In order to install KernelCare on a RPM system like CentOS or RHEL, use the following commands:

rpm -i https://downloads.kernelcare.com/kernelcare-latest.x86_64.rpm

To install KernelCare on Debian based system like Debian or Ubuntu run:

wget https://downloads.kernelcare.com/kernelcare-latest.deb
dpkg -i kernelcare-latest.deb

Check the status of the live patching by running:

/usr/bin/kcarectl --info

The software will automatically check for new patches every 24 hours. To update manually, run:

/usr/bin/kcarectl --update

Note: If you haven’t previously licensed KernelCare, this will install a 30 day trial key for you.

Congratulation’s! You have successfully installed KernelCare. Thanks for using this tutorial for installing KernelCare on Linux system. For additional help or useful information, we recommend you to check the official KernelCarel web site.

How To Check Ubuntu Version

How To Check Ubuntu Version

In this tutorial we will show you how to check the Ubuntu version from the command line. As a system administrator, the first question you should ask yourself after getting a new Ubuntu server to manage is what version of Ubuntu am I running? The version of the operating system in use on our server is important as it is critical that we have all the latest updates to ensure that the server is secure. There are a few ways to check your VPS hosting is using what version of Ubuntu. With commands below you can choose one of them to find out which Ubuntu version is running on your system.
Check Ubuntu Version

There are several ways on how to check what version of Ubuntu is running on your system. Below you can find multiple examples on how to determine Ubuntu version.

The first place to look for Ubuntu version is to look inside /etc/issue file. From terminal run command:

### cat /etc/issue
Ubuntu Xenial Xerus \n \l

To obtain a Ubuntu release number check content of /etc/lsb-release file:

### cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus

Additional information regarding Ubuntu version can be found within /etc/os-release:

### cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04 (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

Furthermore, the following command will provide you with a neat output of your current Ubuntu version:

### lsb_release -da
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu Xenial Xerus (development branch)
Release:    16.04
Codename:   xenial

How To Install IonCube Loader on Ubuntu 16.04 LTS

Install IonCube Loader on Ubuntu 16

IonCube Loaders is basically an encryption/decryption utility for PHP applications which also assists in speeding up the pages that are served. It is often required for a lot of PHP-based applications.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Vesta Control Panel on a Ubuntu 16.04 (Xenial Xerus) server.

Install IonCube Loader on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Install LAMP server.

A Ubuntu 16.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Installing IonCube Loaders.

Download and extract the latest stable version ioncube, We will use the wget command to get the ionCube file from their website with the following command:

### 64-Bit version ###
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfz ioncube_loaders_lin_x86-64.tar.gz

### 32-Bit version ###
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xfz ioncube_loaders_lin_x86.tar.gz

Next we need to locate where PHP is loading extensions, this can be done by running the below command and looking:

php -i | grep php.ini

You will see an output that looks something like the following:

extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012

Open the extracted ioncube folder and copy the ioncube loader file match to your php version:

cd ioncube
cp ioncube_loader_lin_7.0.so /usr/lib/php/20151012

Once the file has been copied to the extensions directory, we need to make sure that the PHP configuration file is updated to use the correct extension:

nano /etc/php.ini

At the very top of the file let’s add the following line:

zend_extension = "/usr/lib/php/20151012/ioncube_loader_lin_7.0.so"

Now, we can restart Apache web server and PHP so that the changes take place:

systemctl restart apache2.service
systemctl restart php7.0-fpm.service

Step 4. Testing ionCube on Ubuntu 16.04.

If you can see the version of PHP with ionCube loader version, meaning you have successfully installed and configured ioncube PHP loader in your Ubuntu 16.04 system.

php -v

Results:

PHP 7.0.15-0ubuntu0.16.04.6 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
<strong>with the ionCube PHP Loader (enabled)</strong> + Intrusion Protection from ioncube24.com (unconfigured) v6.0.8, Copyright (c) 2002-2015, by ionCube Ltd.

Congratulation’s! You have successfully installed IonCube Loader. Thanks for using this tutorial for installing IonCube Loader in Ubuntu 16.04 Xenial Xerus system. For additional help or useful information, we recommend you to check the official IonCube web site.

How To Install Eclipse IDE on Ubuntu 16.04 LTS

Install Eclipse IDE on Ubuntu 16

Eclipse is an open source and free multi-language and multi-platform (Windows , Linux and Mac) software development program that used to build JAVA based web applications. It is written in Java program and can be used to develop Java based applications and other various plugins, including languages like C, C++, PHP, Perl, Python, Ruby and Rails framework and much more.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Eclipse IDE on a Ubuntu 16.04 (Xenial Xerus) server.

Install Eclipse IDE on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Java.

We need to install Java 8 and above. Run the following commands to complete this task:

apt-get install openjdk-8-jdk

Verify the Java version on your machine:

java -version

Step 3. Installing Eclipse IDE.

Download latest eclipse package. This guide uses Eclipse IDE for Java Developers version. Another popular versions are Eclipse IDE for Java EE Developers and Eclipse for PHP Developers. Select also 32-bit or 64-bit version depending on your system:

### 32 Bit ###
curl -O http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-java-oxygen-R-linux-gtk.tar.gz

### 64 Bit ###
curl -O http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-java-oxygen-R-linux-gtk-x86_64.tar.gz

Extract Eclipse package to your desired directory:

tar -zxvf eclipse-java-oxygen-R-linux-gtk*.tar.gz -C /usr/

Making a Symlink:

ln -s /usr/eclipse/eclipse /usr/bin/eclipse

Step 4. Create desktop launcher.

Create a new file eclipse.desktop in /usr/share/applications/ and add the below code:

nano /usr/share/applications/eclipse.desktop

Add the following content in the above file:

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.7
Comment=Eclipse Oxygen
Exec=/usr/bin/eclipse
Icon=/usr/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

Now install that desktop file using the below command:

sudo desktop-file-install /usr/share/applications/eclipse.desktop

For Eclipse icon to be displayed in dash, run following command:

sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm

Congratulation’s! You have successfully installed Eclipse. Thanks for using this tutorial for installing Eclipse IDE in Ubuntu 16.04 Xenial Xerus system. For additional help or useful information, we recommend you to check the official Eclipse web site.

How To Install PgAdmin on Ubuntu 16.04 LTS

Install PgAdmin on Ubuntu 16

PgAdmin is the leading graphical Open Source management, development and administration tool for PostgreSQL.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation PgAdmin on a Ubuntu 16.04 (Xenial Xerus) server.

Install PgAdmin on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Install Dependencies Packages.

First need to install the basic packages:

apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev

Step 3. Create the virtual environment.

Create the virtual enviroment:

virtualenv .pgadmin4

Next, Activate the virtual enviroment:

cd .pgadmin4
source bin/activate

Step 4. installing PGAdmin 4.

Use the following command to download PgAdmin Python wheel:

wget wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.6/pip/pgadmin4-1.6-py2.py3-none-any.whl

Install PgAdmin 4 using the following command:

pip install pgadmin4-1.6-py2.py3-none-any.whl

Step 5. Configure PGAdmin 4.

Write the SERVER_MODE = False in lib/python2.7/site-packages/pgadmin4/config_local.py to configure to run in single-user mode:

echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py

Once you finished the configuration, use the following command to run PgAdmin 4:

python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py

Step 6. Access PgAdmin.

Once the installer finishes installing, it will show you the url, Username and Password. Just open that url in web browser and login using the username and password.

http://ip.add.re.ss:5050

pgAdmin-4-login
Congratulation’s! You have successfully installed PgAdmin. Thanks for using this tutorial for installing PgAdmin in Ubuntu 16.04 Xenial Xerus system. For additional help or useful information, we recommend you to check the official PgAdmin web site.