How To Install Matomo 3.9.1 on Ubuntu 18.04 LTS

Install Matomo on Ubuntu 18

Matomo or formerly known as Piwik, is an open source web analytics application. It rivals Google Analytics and includes even more features and allows you to brand your brand and send out custom daily, weekly, and monthly reports to your clients.

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 Matomo open source web analytics on an Ubuntu 18.04 Bionic Beaver server.

Install Matomo on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Install LAMP (Linux, Apache, MariaDB and PHP) server.

A Ubuntu 18.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also install all required PHP modules:

apt-get install php7.1-cli php7.1-mbstring php7.1-gd php7.1-opcache php7.1-mysql php7.1-json php7.1-mcrypt php7.1-xml php7.1-curl

Step 3. Download the latest version

First thing to do is to go to Matomo’s download page and download the latest stable version of Matomo:

cd /var/www/html/
wget https://builds.matomo.org/piwik.zip

Unzip the Matomo archive to the document root directory on your server:

unzip piwik.zip

We will need to change some folders permissions:

chown -R www-data:www-data /var/www/html/piwik
chmod -R 0755 /var/www/html/piwik/tmp

Step 4. Configuring MariaDB for Matomo.

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

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the Matomo. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Matomo installation:

CREATE DATABASE db_name;
GRANT ALL ON db_name.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit

Step 5. Accessing Matomo web analytics application.

Matomo will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/piwik or http://server-ip/piwik and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

install-matomo

Congratulation’s! You have successfully installed Matomo. Thanks for using this tutorial for installing Matomo open source web analytics on your Ubuntu 18.04 LTS Bionic Beaver. For additional help or useful information, we recommend you to check the official Matomo web site.

How To Install WordPress 5.1.1 on Ubuntu 18.04 LTS

Install WordPress on Ubuntu 18

WordPress is an online, open source website creation tool written in PHP. But in non-geek speak, it’s probably the easiest and most powerful blogging and website content management system (or CMS) in existence today.

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 WordPress content management systems on an Ubuntu 18.04 Bionic Beaver server.

Install WordPress on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Install LAMP (Linux, Apache, MariaDB, PHP) server.

A Ubuntu 18.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also install all required PHP modules:

apt-get install php7.1-cli php7.1-gd php7.1-opcache php7.1-mysql php7.1-json php7.1-mcrypt php7.1-xml php7.1-curl php7.1-mysql php7.1-xml php7.1-xmlrpc

Step 3. Installing WordPress on Ubuntu 18.04 LTS.

First thing to do is to go to WordPress’s download page and download the latest stable version of WordPress, At the moment of writing this article it is version 4.9.7:

wget http://wordpress.org/latest.zip

Unpack the WordPress archive to the document root directory on your server:

unzip -q latest.zip -d /var/www/html/
cd wordpress
cp -a * ..

We will need to change some folders permissions:

chown www-data:www-data -R /var/www/html/

We need to create the upload directory manually:

mkdir -p /var/www/html/wp-content/uploads

Allow the Apache web server to write to the uploads directory. Do this by assigning group ownership of this directory to your web server which will allow Apache to create files and directories. Issue the following command:

chown www-data:www-data -R /var/www/html/wp-content/uploads

Step 4. Configuring MariaDB for WordPress.

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

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the WordPress. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for WordPress installation:

create database wordpress;
grant all privileges on wordpress.* to wpuser@localhost identified by 'your-password';
flush privileges;
exit;

Step 5. Configuring WordPress

In this step we will configure the main configuration file of WordPress, where we need to configure it’s basic parameters so that it can be connected with the database and user:

mv wp-config-sample.php wp-config.php

Now open it using any of your favourite editor, to make any changes in the WordPress configuration file:

nano wp-config.php

Here are the values that we need to update according to our previous database and user’s setup:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wpuser');

/** MySQL database password */
define('DB_PASSWORD', 'your_password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Step 6. Configuring Apache web server for WordPress.

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘wordpress.conf’ on your virtual server:

touch /etc/apache2/sites-available/wordpress.conf
ln -s /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf
nano /etc/apache2/sites-available/wordpress.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Next step we will need to adjust the some some values in the PHP configuration files as follow:

nano /etc/php/7.1/apache2/php.ini

Add/modify the following settings:

max_execution_time = 300
max_input_time = 600
memory_limit = 256M
post_max_size = 64M
upload_max_filesize = 64M

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

sudo a2ensite wordpress.conf
sudo a2enmod rewrite 
sudo systemctl restart apache2.service

Step 7. Accessing WordPress.

WordPress will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com or http://server-ip/ and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed WordPress. Thanks for using this tutorial for installing WordPress CMS (Content Management Systems) on your Ubuntu 18.04 Bionic Beaver. For additional help or useful information, we recommend you to check the official WordPress installation guideline .

How To Install Epub Reader on Ubuntu 16.04 LTS

Install Epub Reader on Ubuntu 16

Epub (Electronic Publications) is an open book standard for reading documents on computers and mobile devices. Epub book’s format is a popular format as it adjusts its font size to the device display. In other words, Epub format is responsive. Since the default Document Viewer is unable to read ePub, we need to use another application specifically for this purpose. If you ask any experienced Linux user about eBook readers, his/her answer will be Calibre.

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 Epub Reader on a Ubuntu 16.04 (Xenial Xerus) server.
Install Epub Reader 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 Calibre on Linux Ubuntu.

Install Calibre on Ubuntu 16.04, run the following command:

sudo apt-get install calibre

Once installed, Calibre can be started from Unity Dash . For the first time users, it will ask you to configure Calibre. Simply select the default options are you are ready to use the software.

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

How To Install Oracle Java on Ubuntu 17.04

Install Oracle Java on Ubuntu 17

Java is a programming language and computing platform. It was first released by Sun Microsystems in 1995. Many programs and scripts that require Java to run it, but usually Java are not installed by default on a VPS or Dedicated Server.

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 JRE (Java Runtime Environment) and JDK (Java Development Kit) on Ubuntu 17.04 Zesty.

Install Oracle Java on Ubuntu 17.04 Zesty

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 Oracle Java.

Installing Java in Ubuntu 17.04 is almost similar to the installing Java in the previous version of Ubuntu such as Ubuntu 16.04:

apt-get install default-jre
apt-get install default-jdk

Another alternative Java install is with Oracle JRE and JDK. However, we would need to install additional repositories for a proper installation:

add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install java-common oracle-java8-installer

Verify Installed Java version.

java -version

Result:

java version "1.8.1_74"
Java(TM) SE Runtime Environment (build 1.8.1_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

Step 3. Setup JAVA_HOME on Ubuntu 17.04.

Since many programs now days need a JAVA_HOME environment variable to work properly. We will need to find the appropriate path to make these changes. With the following command, you can view your installs and their path:

sudo update-alternatives --config java
sudo nano /etc/profile

Now that you are in the user profile file, add the following code, along with the Path of your installation from the previous step, to the bottom. ( Example: JAVA_HOME=”YOUR_PATH”):

export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.1.51-1.b16.el7_1.x86_64"

Reload the file so all your changes could take effect with the following command:

source /etc/profile

Verify that your implementations are correct with the following command:

echo $JAVA_HOME

Congratulation’s! You have successfully installed Java. Thanks for using this tutorial for installing Oracle Java (JRE or JDK) on Ubuntu 17.04 Zesty system. For additional help or useful information, we recommend you to check the official Java web site.

How To Install Subsonic Media Server on Ubuntu 16.04 LTS

Install Subsonic Media Server on Ubuntu 16

Subsonic is a free, web-based media streamer written in Java, available for Linux, MacOS and Windows. With Subsonic, you can stream your music from home computer or any public-facing computer and listen to your music from anywhere with a web browser.

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 Subsonic Media Server on a Ubuntu 16.04 (Xenial Xerus) server.
Install Subsonic Media Server 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.

First we need to install Java by running the following three commands in sequence:

add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer

Step 2. Installing Subsonic Media Server.

Run the following commands to install Subsonic Media Server on Ubuntu systems:

wget https://s3-eu-west-1.amazonaws.com/subsonic-public/download/subsonic-6.0.deb

Next, install the downloaded Subsonic package by running the following command:

sudo dpkg -i subsonic-6.0.deb

Once it’s installed, the Subsonic daemon will automatically start:

systemctl start subsonic
systemctl enable subsonic

Step 3. Accessing Subsonic Media Server.

Subsonic Media Server will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com:4040 or http://server-ip:4040 and complete the required the steps to finish the installation. If you are using a firewall, please open port 4040 to enable access to the control panel.

Congratulation’s! You have successfully installed Subsonic. Thanks for using this tutorial for installing Subsonic Media Server on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Subsonic Media Server 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 Transmission on Ubuntu 14.04

Install Transmission on Ubuntu

Transmission BitTorrent Client features a simple interface on top of a cross-platform back-end. Transmission is licensed as a free software under the terms of the GNU General Public License (GPL), with parts under the MIT License. Transmission, like any other BitTorrent client allows users to download files from the Internet and upload their own files or torrents. By grabbing items and adding them to the interface, users can create queues of files to be downloaded and uploaded.

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. I will show you through the step by step installation Transmission on Ubuntu 14.04.

In this tutorial we will show you how to will help you with your install and configuration of Transmission on your Ubuntu 14.04 server.

Install Transmission on Ubuntu 14.04

Step 1. First, add transmission into the repository.

 sudo add-apt-repository ppa:transmissionbt/ppa

Step 2. Install Transmission.

sudo apt-get update
sudo apt-get install transmission-cli transmission-common transmission-daemon

Step 3. Configure users and permissions for Transmission.

After the installation, create the directory where you want to put all your downloaded files.

cd /var/www/html/
mkdir transmission
cd transmission
mkdir completed incomplete torrents

Add the current user to debian-transmission group.

 sudo usermod -a -G debian-transmission wpcademy

Now, when Transmission downloads torrents, it automatically sets the rights of the files that it downloads to the Transmission user group. We need to make sure that our username is a part of that group, and we need to set the correct permissions on the downloads folders. Issue the following commands:

sudo chgrp -R debian-transmission /var/www/html/transmission
sudo chmod -R 775 /var/www/html/transmission

Configure Transmission

Step 4. Configure Transmission.

The configuration file is easy to understand. Here is my sample configuration:

#sudo nano /etc/transmission-daemon/settings.json

"download-dir": "/var/www/html/trasmission/completed",
...
"incomplete-dir": "/var/www/html/trasmission/incomplete",
"incomplete-dir-enabled": true,
...
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "password",
"rpc-port": 9091,
"rpc-username": "username",
"rpc-whitelist": "127.0.0.1,*.*.*.*",
"rpc-whitelist-enabled": true,
...
"umask": 2,
...
"watch-dir": "/media/datadrive/downloads",
"watch-dir-enabled": true

Step 5. Start Transmission daemon.

 sudo service transmission-daemon start

Once it has reloaded and if it starts back up, go ahead and go to your browser and navigate to: 0.0.0.0:9091 (where 0.0.0.0 is the IP address of your Ubuntu server). You should be greeted with the Transmission WebUI. After logging in, you will notice that the value for the rpc-password inside the settings.json file will be hashed.

Congratulation’s! You have successfully installed transmission. Thanks for using this tutorial for installing Transmission BitTorrent Client in Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official transmission web site

You Might Also Like: How To Install Transmission on CentOS 6