How To Install NCDU on Ubuntu 17.04

Install NCDU on Ubuntu 17

Ncdu (NCurses Disk Usage) is a command line tool to view and analyse disk space usage on linux. It can drill down into directories and report space used by individual directories. This way it is very easy to track down space consuming files/directories. This article walks you through the process of installing and using NCDU on a Linux 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 NCDU on a Ubuntu 17.04 Zesty Zapus server.

Install NCDU on Ubuntu 17.04

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 NCDU.

First, add the PPA (personal package archive) repo by executing the following command:

add-apt-repository ppa:eugenesan/ppa

Install NCDU itself with this command:

apt-get update
apt-get install ncdu

Step 3. Ncdu sample usage

To start ncdu type following command on your terminal:

ncdu

Ncdu-1
To get more information on selected directory press “i” button:
Ncdu-2
To see help window with ncdu available options press “Shift+?” key combination. You can use arrow keys to move up and down for more options.
ncdu-3
For command line options and other information, go through the man page of ncdu command.

Congratulation’s! You have successfully installed Ncdu. Thanks for using this tutorial for installing NCurses Disk Usage in Ubuntu 17.04 Zesty Zapus system. For additional help or useful information, we recommend you to check the official NCDU web site.

How To Install Caddy Web Server on Ubuntu 16.04 LTS

Install Caddy Web Server on Ubuntu 16

Caddy is a modern, general-purpose, multi-platform web server which supports Virtual hosting, HTTP/2, IPv6, Markdown, WebSockets, FastCGI, automatic HTTPS via Let’s Encrypt, templates and 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 Caddy Web Server on a Ubuntu 16.04 Xenial Xerus server.

Install Caddy Web 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 Caddy Web Server.

Install Caddy is quick and easy with run the following command:

curl https://getcaddy.com | bash

Once the installation is completed, we need to add the cap_net_bind_servicecapability to the Caddy binary:

sudo setcap cap_net_bind_service=+ep /usr/local/bin/caddy

Step 3. Setting Up Necessary Directories.

Next, create the directories where we will store the Caddy configuration file Caddyfile and SSL certificates:

sudo mkdir /etc/caddy
sudo chown -R root:www-data /etc/caddy
sudo mkdir /etc/ssl/caddy
sudo chown -R www-data:root /etc/ssl/caddy
sudo chmod 0770 /etc/ssl/caddy
sudo touch /etc/caddy/Caddyfile
sudo mkdir /var/www
sudo chown www-data: /var/www

Step 4. Installing Caddy as a System Service.

We also need to create a new SystemD configuration script:

nano /lib/systemd/system/caddy.service

Add following line:

[Unit]
Description=Caddy HTTP/2 web server
Documentation=https://caddyserver.com/docs
After=network-online.target
Wants=network-online.target

[Service]
Restart=on-failure
StartLimitInterval=86400
StartLimitBurst=5

User=www-data
Group=www-data
; Letsencrypt-issued certificates will be written to this directory.
Environment=CADDYPATH=/etc/ssl/caddy

ExecStart=/usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp
ExecReload=/bin/kill -USR1 $MAINPID

LimitNOFILE=1048576
LimitNPROC=64

PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=full
ReadWriteDirectories=/etc/ssl/caddy

; The following additional security directives only work with systemd v229 or later.
; They further retrict privileges that can be gained by caddy. Uncomment if you like.
; Note that you may have to add capabilities required by any plugins in use.
;CapabilityBoundingSet=CAP_NET_BIND_SERVICE
;AmbientCapabilities=CAP_NET_BIND_SERVICE
;NoNewPrivileges=true
[Install]
WantedBy=multi-user.target

Execute the following commands to enable Caddy to run on boot:

systemctl enable caddy.service
systemctl restart caddy.service

Step 5. Creating Test Web Page and a Caddyfile.

For testing purposes, we will create a test HTML file:

mkdir -p /var/www/wpcademy.com
echo "Caddy" > /var/www/wpcademy.com/index.html
chown -R www-data: /var/www/my-domain.com

Next, add our domain to the Caddy configuration file:

nano /etc/caddy/Caddyfile

Add following line:

my-domain.com {
    root /var/www/wpcademy.com
}

Save the file and exit the editor. To apply the changes, restart Caddy:

systemctl restart caddy.service

Now, with a web browser, just go to https://wpcademy.com, and you will see our test page!

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

How To Install Graylog on Ubuntu 16.04 LTS

Install Graylog on Ubuntu 16

Graylog is a free and open source powerful centralized log management tool based on Elasticsearch and MongoDB. Graylog helps you to collect, index and analyze any machine logs centrally.

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 Graylog on a Ubuntu 16.04 (Xenial Xerus) server.

Install Graylog 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.

By default Java is not available in Ubuntu default repository. So first add the Oracle Java PPA to apt with the following command:

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

Now check the java version:

java -version

Step 3. Installing MongoDB.

MongoDB cannot be installed from the Ubuntu repository, so we will have to add the MongoDB repository:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" > /etc/apt/sources.list.d/mongodb-org-3.0.list

Update your apt database and install MongoDB with the following command:

apt-get update -y
apt-get install mongodb-org

Start the MongoDB service and enable it to start on boot with the following command:

systemctl start mongod
systemctl enable mongod

Step 4. Installing Elasticsearch.

Elasticsearch is one of the main component which requires Graylog to run, Let’s install the Elasticsearch. First download and install GPG signing key:

wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Now add the elasticsearch repository to sources list:

apt-get update
apt-get install elasticsearch

Start the elasticsearch service and enable it to start on boot time with the following command:

systemctl start elasticsearch
systemctl enable elasticsearch

Step 5. Installing Graylog.

First, you will need to download and install graylog repository on your system:

wget https://packages.graylog2.org/repo/packages/graylog-2.3-repository_latest.deb
dpkg -i graylog-2.3-repository_latest.deb

Update the package lists and install Graylog:

apt-get update
apt-get install graylog-server

After you have installed the Graylog Server, you have to generate secret key for Graylog using the following command:

### pwgen -N 1 -s 96 
MTtPFSMZxAvoLsUiXXauggyJ761hwkGn1ZTN2ovb8wN2tO1LzyeNbaatOrpLukp96p0MxwHQosmMGPbmw46ojnnSORVvr2

Now create a hash password for the root user that can be used to log in to the Graylog web server using the following command:

### echo -n Password | sha256sum
e7cf3ef4f17c3999a94f2c6f612e8bmwe46b1026878e4e19398b23bd38ec221a

Edit the server.conf file:

nano /etc/graylog/server/server.conf

Make changes to the file as shown below:

password_secret= MTtPFSMZxAvoLsUiXXauggyJ761hwkGn1ZTN2ovb8wN2tO1LzyeNbaatOrpLukp96p0MxwHQosmMGPborm1YRojnnSORVvr2
root_password_sha2= e7cf3ef4f17c3999a94f2c6f612e8a888e5b10268bmwe4619398b23bd38ec221a
[email protected]
root_timezone=UTC
elasticsearch_discovery_zen_ping_unicast_hosts = ipaddress:9300
elasticsearch_shards=1
script.inline: false
script.indexed: false
script.file: false

To enable the Graylog web interface, make changes to the file as shown below:

rest_listen_uri = http://your-server-ip:12900/
web_listen_uri = http://your-server-ip:9000/

After you have modified the configuration file, you can start Graylog Service using the following commands:

systemctl enable graylog-server
systemctl restart graylog-server

Step 6. Accessing Graylog.

Graylog will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:9000 or http://server-ip:9000 and complete the required the steps to finish the installation.
Installing-Graylog-LoginScreen
Congratulation’s! You have successfully installed Graylog. Thanks for using this tutorial for installing Graylog in Ubuntu 16.04 Xenial Xerus system. For additional help or useful information, we recommend you to check the official Graylog web site.

How To Install OpenShot Video Editor on Ubuntu 16.04 LTS

Install OpenShot Video Editor on Ubuntu 16

OpenShot is a free, open-source video editor that allows you to take videos, photos, and music files and create a movie you have always dreamed of. You can easily add sub-titles, transitions, and effects, and then export your film to DVD, YouTube, Vimeo, Xbox 360, and many other formats.

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 OpenShot video editor on Ubuntu 16.04 Xenial Xerus server.

Features OpenShot Video Editor

Transform Tool – A new transform tool, which allows real-time transformations in the video preview window.
Zooming Improvements – Zooming in and out of the timeline, in order to increase precision of your edits, has been greatly improved. When zooming the timeline, it now centers on your mouse position, similar to image editing applications.
Razor Tool – Click on the Razor toolbar button to switch to razor mode. Now click on any clip or transition to quickly cut them (holding CTRL and SHIFT modify the razor to only keep the left or right side). Alternatively, you can cut a clip at the Playhead position by right clicking and choosing “Slice”, by using CTRL+K, or by grabbing the edge of the clip and dragging.
Improved Title Editors – Both editors now display a grid of thumbnails, to make finding the right title easier. Save dialogs are no longer used, and instead title files are saved directly into your project folder. New “Edit Title” and “Duplicate Title” menus have been added, to assist in quickly making changes to titles.
New Preview Window – Previewing files now have its own dedicated video player, which allows for multiple video preview windows at the same time. Also, audio files render a waveform by default. The speed of previewing files is also improved.

Install OpenShot Video Editor 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 OpenShot Video Editor.

First, you’ll need to add OpenShot’s PPA (personal package archive) to your system:

sudo add-apt-repository ppa:openshot.developers/ppa
sudo apt-get update

Next install the OpenShot package by executing the following command:

sudo apt-get install openshot-qt

Once installed, next you can start OpenShot by searching for it Unity Dash. If the app icon doesn’t show up, try logging out and logging back in.

Congratulations! You have successfully installed OpenShot. Thanks for using this tutorial for installing OpenShot video editor in Ubuntu 16.04 Xenial Xerus systems. For additional help or useful information, we recommend you to check the official OpenShot web site.

How To Install phpBB on Ubuntu 16.04 LTS

Install phpBB on Ubuntu 16

phpBB is an open source bulletin board forum software that provides a virtual space for discussion among the members of your website. It has a huge variety of features like flat topic structure, sub-forums, forum-specific styles, user groups, group-based permissions, database query and template caching, support for PHP 7, multiple database engines 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 phpBB open source bulletin board forum on an Ubuntu 16.04 Xenial Xerus server.

Install phpBB 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 (Linux, Apache, MariaDB, PHP) server.

A Ubuntu 16.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.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc php7.0-gd

Step 3. Installing phpBB.

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

wget https://www.phpbb.com/files/release/phpBB-3.2.1.zip

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

unzip -q phpBB-3.2.1.zip -d /var/www/html/
cd phpBB3
cp -a * ..

We will need to change some folders permissions:

cd /var/www/html/
chown www-data:www-data -R /var/www/html/
chmod 660 images/avatars/upload/ config.php
chmod 770 store/ cache/ files/

Step 4. Configuring MariaDB for phpBB.

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 phpBB. 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 phpBB installation:

create database phpBB;
create user 'phpBB_dbuser'@'localhost' identified by 'randomgeneratedpassword';
grant all privileges on phpBB.* to 'phpBB_dbuser'@'localhost';
flush privileges;
exit

Step 5. Configuring Apache web server for phpBB.

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

sudo a2enmod rewrite
touch /etc/apache2/sites-available/phpbb.conf
ln -s /etc/apache2/sites-available/phpbb.conf /etc/apache2/sites-enabled/phpbb.conf
nano /etc/apache2/sites-available/phpbb.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>

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

systemctl restart apache2.service

Step 6. Accessing phpBB.

phpBB will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/install or http://server-ip/install 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 phpBB. Thanks for using this tutorial for installing phpBB on your Ubuntu 16.04. For additional help or useful information, we recommend you to check the official phpBB web site.

How To Install Quod Libet on Ubuntu 16.04 LTS

Install Quod Libet on Ubuntu 16

Quod Libet is a free and open source GTK+ music player for Ubuntu. Quod Libet code is written in python and provides a simple user interface and uses the Mutagen tagging Library, its library organizer is able to handle big libraries of more 10,000 songs. It also supports most of the features you’d expect from a modern media player: Unicode support, advanced tag editing, Replay Gain, podcasts & Internet radio, album art support and all major audio formats.

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 OpenShot video editor on Ubuntu 16.04 Xenial Xerus server.

Install Quod Libet 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 Quod Libet.

First, you’ll need to add Quod Libet’s PPA (personal package archive) to your system:

add-apt-repository ppa:lazka/ppa
apt-get update

Next install the Quod Libet package by executing the following command:

apt-get install quodlibet

Once installed, next you can start Quod Libet by searching for it Unity Dash. If the app icon doesn’t show up, try logging out and logging back in.

Congratulations! You have successfully installed Quod Libet. Thanks for using this tutorial for installing Quod Libet music player in Ubuntu 16.04 Xenial Xerus systems. For additional help or useful information, we recommend you to check the official Quod Libet web site.

How To Install Monica on Ubuntu 16.04 LTS

Install Monica on Ubuntu

Monica is a Personal Relationship Management (PRM) system Composed in Laravel framework. It’s designed and built to Assist You have more Meaningful relationships with your family and friends, and keep tabs on All important details about your friends and family.

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 Monica on an Ubuntu 16.04 Xenial Xerus server.

Install Monica 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 (Linux, Apache, MariaDB, PHP) server.

A Ubuntu 16.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.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc php7.0-gd

Step 3. Configuring MariaDB for Monica.

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 Monica. 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 Monica installation:

CREATE DATABASE monica;
GRANT ALL PRIVILEGES ON monica.* TO 'monicauser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
FLUSH PRIVILEGES;
\q

Step 4. Installing Monica.

First, Clone the Monica git repository:

mkdir /var/www/html/monica
git clone https://github.com/monicahq/monica.git /var/www/html/monica/

We will need to change some folders permissions:

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

Installing nodejs:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt-get install -y nodejs

Installing composer:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Once all dependencies installed, run composer in the directory the repository has been cloned, to install Monica’s:

cd /var/www/html/monica
composer install

Create .env file using the example provided and update it with your information:

cp .env.example .env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=monica
DB_USERNAME=monicauser
DB_PASSWORD=YOURPASSWORD
DB_TEST_DATABASE=monica_test
DB_TEST_USERNAME=monicauser
DB_TEST_PASSWORD=YOURPASSWORD

Run the following command to generate an application key:

php artisan key:generate
Application key [base64:j8RgNwHGsqir1ovhDWXYlEa6BMWe46wRGMaQTm4ZBTs=] set successfully.

Run all migrations executing the following command:

php artisan migrate

Enable avatar uploads for the contacts created in Monica:

php artisan storage:link
The [public/storage] directory has been linked.

Populate the activity types and countries table:

php artisan db:seed --class ActivityTypesTableSeeder
php artisan db:seed --class CountriesSeederTable

Final step, we have to set a cronjob that runs every minute with the following command:

php artisan schedule:run

Step 5. Accessing Monica Personal Relationship Management.

Monica will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/monica or http://server-ip/monica 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 Monica. Thanks for using this tutorial for installing Monica Personal Relationship Management on your Ubuntu 16.04. For additional help or useful information, we recommend you to check the official Monica web site.