How To Install Ghost on Ubuntu 16.04

Install Ghost on Ubuntu 16

Ghost is a free and open source blogging platform written in JavaScript and built on Node.js, designed to simplify the process of online publishing for individual bloggers as well as online publications.

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

Install Ghost on Ubuntu 16.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. Install LEMP (Linux, Nginx, MariaDB/MySQL and 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 imagemagick php7.0-curl php7.0-gd php7.0-mbstring php7.0-mysql libapache2-mod-php7.0 php7.0-mcrypt

Step 3. Installing Node.JS and NPM.

Node.JS is the server that will be hosting the instance of our Ghost blog. Ubuntu Server’s default repository list has a stable version of Node.JS. This stable version of Node.JS will be ideal for Ghost and can be installed as follows:

apt-get install nodejs

You’ll also need to install NPM, or the Node Package Manager, which Node uses to manage packages and dependencies as follows:

apt-get install npm

After installing both Node and NPM, you can confirm the version of Node running on your server by running the following command:

nodejs -v
npm -v

Step 4. Installing Ghost.

Download and unpack Ghost with the following commands:

mkdir ~/myGhostBlog
wget https://ghost.org/zip/ghost-latest.zip
unzip -d ~/myGhostBlog ghost-latest.zip
rm -f ghost-latest.zip

Change into the ~/myGhostBlog directory and install Ghost:

cd ~/myGhostBlog
npm install --production

After the installation is completed, configure Ghost and update the URL in the config file with your domain. Copy the example config into a new file:

cp config.example.js config.js

We need to open the Ghost config file for editing using the nano text editor:

nano config.js

Find the ‘Production’ section and update the URL with your domain. After modifying it should look like this:

// ### Production
// When running Ghost in the wild, use the production environment.
// Configure your URL and mail settings here
production: {
url: 'http://your_domain.com',

Once the installation process is complete, start Ghost by running the following command:

npm start –production

You should see the following message if Ghost was installed successfully:

Ghost is running in production...
Your blog is now available on http://your_domain.com
Ctrl+C to shut down

By default, Ghost runs on default port 2368. While Ghost is running, you could visit either http://your-ip-address:2368 to view your blog or http://your-ip-address:2368/ghost to create your administrator user.

Step 5. Configure Nginx web server for Ghost.

Create a new Nginx server block with the following content:

nano /etc/nginx/conf.d/mydomain.com

Add following files:

server {
server_name mydomain.com;
listen 80;

access_log /var/log/nginx/myGhostBlog-access.log;
error_log /var/log/nginx/myGhostBlog-error.log;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}

}

Save and Restart Nginx. You should see a OK message with no errors:

systemctl nginx restart

Step 6. Accessing Ghost.

Ghost will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ghost or http://server-ip/ghost and create an admin user to log in to the Ghost. If you are using a firewall, please open port 80 to enable access to the control panel.

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

How To Install Subversion on Ubuntu 16.04

Install Subversion on Ubuntu 16

Subversion is an open source version control system. It helps you keep track of a collection of files and folders. Any time you change, add or delete a file or folder that you manage with Subversion, you commit these changes to your Subversion repository, which creates a new revision in your repository reflecting these changes. You can always go back, look at and get the contents of previous revisions. SVN supports several protocols for network access: SVN, SVN+SSH, HTTP, HTTPS. If you are behind a firewall, HTTP-based Subversion is advantageous since SVN traffic will go through the firewall without any additional firewall rule setting.

Install Subversion on Ubuntu 16.04

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

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 Apache web server.

First you need to install Apache web server to access svn server using http urls:

apt-get install apache2

Step 3. Installing Subversion.

Use following command to install subversion packages and there dependencies. Also install svn module for Apache libapache2-mod-svn packages on your system:

apt-get install subversion libapache2-mod-svn libapache2-svn libsvn-dev
a2enmod dav
a2enmod dav_svn

Step 4. Configure Apache for Subversion.

Subversion Apache module package creates an configuration file /etc/apache2/mods-enabled/dav_svn.conf. You just need to make necessary changes to it:

### nano /etc/apache2/mods-enabled/dav_svn.conf

Alias /svn /var/lib/svn

DAV svn
SVNParentPath /var/lib/svn

AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd

After making above changes, restart Apache service:

systemctl restart apache2

Step 5. Create First SVN Repository.

Create your first svn repository named firstrepo, You can use any suitable name:

mkdir -p /var/lib/svn/
svnadmin create /var/lib/svn/myrepo
chown -R www-data:www-data /var/lib/svn
chmod -R 775 /var/lib/sv

Step 6. Create account and password for SVN.

Following commands will add two users for svn. It will prompt for users password to be assigned.

htpasswd -m /etc/apache2/dav_svn.passwd wpcademy.com
htpasswd -m /etc/apache2/dav_svn.passwd chedelics

Let’s restart Apache service again:

systemctl restart apache2

Step 7. Accessing Repository in Browser.

Subversion will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/svn/myrepo/ or http://server-ip/svn/myrepo/ and will prompt for authentication. Use login credentials created in Step 6. If you are using a firewall, please open port 80 to enable access to the control panel.

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

How To Install Docker on Ubuntu 16.04 LTS

Install Docker on Ubuntu 16

Docker is an open-source project that automates the deployment of application inside the software container. The container allows the developer to package up all project resources such as libraries, dependencies, assets etc. Docker is written in Go Programming language and is developed by Dotcloud. It is basically a container engine which uses the Linux Kernel features like namespaces and control groups to create containers on top of an operating system and automates the application deployment on the container.

Install Docker on Ubuntu 16.04 LTS

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

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

Now install docker with the apt command:

apt-get install linux-image-generic-lts-trusty
apt-get install -y docker.io

Wait until the installation has been completed, start and enable Docker service:

systemctl start docker
systemctl enable docker

Verify docker version:

docker version

Step 3. Download Docker Container.

Let’s begin using Docker, Download the ubuntu Docker image:

docker pull ubuntu

docker-ubuntu
Verify downloaded Ubuntu container:

docker images

docker-ubuntu-1

To enter to that Ubuntu container give following command and you will be automatically in, -i option will make it interactive and -t will assign tty to container:

docker run -i -t ubuntu

Alternatively, you may want to launch a specific version of Ubuntu: a container can contain multiple images. This command shows the available images that you have downloaded so far:

sudo docker.io images
REPOSITORY TAG IMAGE ID
ubuntu vivid 76ca2fd90787
ubuntu 15.04 76ca2fd90787
ubuntu utopic cfaba6b5fefe
ubuntu 14.10 cfaba6b5fefe
ubuntu 14.04 5ba9dab47459
ubuntu trusty 5ba9dab47459
ubuntu 14.04.1 5ba9dab47459
ubuntu latest 5ba9dab47459
ubuntu 12.04.5 69c02692b0c1

Now if you want to launch another version, you can simply preprend the TAG of the version you want to launch to the container in this way:

sudo docker.io run -i -t ubuntu:14.10 /bin/bash

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

How To Install OwnCloud on Ubuntu 16.04 LTS

Install OwnCloud on Ubuntu 16

OwnCloud is a free and open-source software which enables you to create a private “file-hosting” cloud. OwnCloud is similar to DropBox service with the diference of being free to download and install on your private server. Owncloud made by PHP and backend database MySQL (MariaDB), SQLLite or PostgreSQL. OwnCloud also enables you to easily view and sync address book, calendar events, tasks and bookmarks. You can access it via the good looking and easy to use web interface or install OwnCloud client on your Desktop or Laptop machine (supports Linux, Windows and Mac OSX).

Install OwnCloud on Ubuntu 16.04 LTS

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

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 imagemagick php7.0-curl php7.0-gd php7.0-mbstring php7.0-mysql libapache2-mod-php7.0 php7.0-mcrypt php7.0-bz2 php7.0-zip php7.0-json

Step 3. Installing OwnCloud 9.

OwnCloud provides you the official deb packages for the installation of ownCloud. Setup ownCloud repository using the following command:

wget -nv https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key -O Release.key
sudo apt-key add - < Release.key sudo sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list"

Install ownCloud using the following command:

apt-get update
apt-get -y install owncloud

Step 4. Configuring MariaDB for OwnCloud.

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

CREATE DATABASE ownclouddb;
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost';
FLUSH PRIVILEGES;
exit

Step 5. OwnCloud Configuration.

To configure ownCloud, we will use the web interface. So, go ahead and open up a web browser and point it to http://server_ip_address/owncloud You should see a web page like this. Enter username and password for the administrator user account, click on the ‘Advanced options’ hyperlink and enter the data directory (or leave the default setting), then enter database username, database password, database name, host (localhost) and click ‘Finish setup’.
Install-OwnCloud-9-on-Ubuntu-16.04
Alternately you can also download the ownCloud clients to sync the documents across your devices.
Install-OwnCloud-9-Ubuntu-16.04
The home page will look like below; you can start uploading the contents using “+ sign” button.
OwnCloud-9-Ubuntu-16.04-Upload
Congratulation’s! You have successfully installed OwnCloud. Thanks for using this tutorial for installing OwnCloud on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official OwnCloud web site.

You Might Also Like: How To Install OwnCloud 8 on CentOS 6

How To Install Mail-in-a-Box on Ubuntu 16.04 LTS

Install Mail-in-a-Box on Ubuntu 16

Mailinabox is a free and open source software that deploys a complete full stack email solution with a well managed server control panel in few simple minutes. Deploying our own well managed email server is pretty easy with Mailinabox now. It is designed to handle SMTP, IMAP/POP, spam filtering, webmail, and since the server itself is handling our DNS, we’ll get an off-the-shelf DNS solution optimized for mail. Mailinabox has the ability to host multiple domains email and provides webmail, contacts, calendar synchronization and IMAP/SMTP server setting so that we can access our emails with mobile devices and desktop mailing clients.

Install Mail-in-a-Box on Ubuntu 16.04 LTS

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

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
sudo apt-get install git nano curl

Step 2. Setting Hostname.

First of all, we’ll need to setup a hostname for our machine running Ubuntu 16.04 LTS. Officially, hostname of our machine should be set to box.example.com so that our installation goes easy:

nano /etc/hostname

Then, we’ll need to append the file to the following line:

box.https://wpcademy.com

Step 3. Adding Hosts.

Now, we’ll edit /etc/hosts file so that we can associate our hostname with the server’s ip address where we are going to setup mailinabox. To do so, we’ll need to execute the following command:

nano /etc/hosts

Then, we’ll need to append the file with the following lines:

127.0.0.1 localhost.localdomain localhost
server_ip_address box.wpcademy.com box

Step 4. Installing Mail-in-a-Box.
Run the following command to install Mail-in-a-Box:

curl -s https://mailinabox.email/bootstrap.sh | sudo bash

The script will prompt you with the introductory message in the following image. Press the Enter button on the keyboard:

Install Mail-in-a-Box on Ubuntu 16
First question, we will be asked to enter our email address that we’ll use to login to our Mail-in-a-box control panel and use as the default email address for our server. We can add other email addresses later. Once it is done, we will continue by selecting OK in the menu.
Mail-in-a-Box-2
Next, we will be asked to enter the hostname for our mail server. As we have already set in the above step, we should be prompted with box.rosehosting.com as the default hostname. So, we will simply leave it as is and continue further.
Mail-in-a-Box-3
Once it is done, we will be asked to select our country where we live. After we have selected our country, we will need to hit enter to proceed ahead. This will prompt another box asking us to enter the city or region corresponding with our timezone. Doing this will exit the box and continue the installation process.
Mail-in-a-Box-4
At some point, you will get this prompt:

Okay. I'm about to set up [email protected] for you. This account will also have access to the box's control panel.
password:

That’s it. You are pretty much done. All that is left is to point your domains’ DNS to Mail-in-a-Box and you will have a fully functional Mail server, webmail, calendar, web server and contacts.

Step 5. Accessing Mail-in-a-Box Panel.

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

[youtube https://www.youtube.com/watch?v=9WOmkoEYMIg]

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

How To Install TeamSpeak Server on Ubuntu 16.04 LTS

Install TeamSpeak Server on Ubuntu 16

TeamSpeak is a VoIP (voice-over-Internet Protocol) solution first released in 2001 and most popular with those who play team-based online games. The software has two parts, a server and a client, both of which can be installed on Windows, Mac and Linux.

Install TeamSpeak Server on Ubuntu 16.04 LTS

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

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. Create a new user for TeamSpeak.

Now we need to create a new user on our server, this user will be used for the installation and running of TeamSpeak. This is done by executing the following command as root:

adduser --disabled-login teamspeak

Step 3. Installing TeamSpeak server.

Next, you’ll need to install TeamSpeak server, using the following command:

wget http://dl.4players.de/ts/releases/3.0.12.4/teamspeak3-server_linux_amd64-3.0.12.4.tar.bz2
tar xvf teamspeak3-server_linux_amd64-3.0.12.4.tar.bz2
cd teamspeak3-server_linux_amd64
cp * -R /home/teamspeak
cd ..
rm -rf teamspeak3-server_linux_amd64*
chown -R teamspeak:teamspeak /home/teamspeak

By default, the TeamSpeak server will not start when your system boots. You will need to create a startup script so that your system will automatically start the TeamSpeak server software on boot. This is where startup scripts can come in handy. Create the following file and open it in your text editor:

nano /lib/systemd/system/teamspeak.service

Copy the following content into the startup script file:

[Unit]
Description=Team Speak 3 Server
After=network.target

[Service]
WorkingDirectory=/home/teamspeak/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/home/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/ts3server.pid
RestartSec=15
Restart=always

[Install]
WantedBy=multi-user.target

Now we will start the TeamSpeak server and enable it to start when your system boots:

systemctl --system daemon-reload
systemctl start teamspeak.service
systemctl enable teamspeak.service

Step 4. Configure Firewall for TeamSpeak.

Now our server installation is completed we can open the ports on our firewall. This can be done by executing the following command:

iptables -A INPUT -p udp --dport 9987 -j ACCEPT
iptables -A INPUT -p udp --sport 9987 -j ACCEPT
iptables -A INPUT -p tcp --dport 30033 -j ACCEPT
iptables -A INPUT -p tcp --sport 30033 -j ACCEPT
iptables -A INPUT -p tcp --dport 10011 -j ACCEPT
iptables -A INPUT -p tcp --sport 10011 -j ACCEPT

And connect with our TeamSpeak Client. The first person to logon will be asked to provide a privilege key, enter the one retrieved during the installation.

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

How To Install HHVM on Ubuntu 16.04 LTS

Install HHVM on Ubuntu

HipHop Virtual Machine (HHVM) is a virtual machine developed and open sourced by Facebook to process and execute programs and scripts written in PHP. Facebook developed HHVM because the regular Zend+Apache combination isn’t as efficient to serve large applications built in PHP.

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 HHVM (HipHop Virtual Machine) on a Ubuntu 16.04 (Xenial Xerus) server.
Install HHVM 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 HHVM.

First we need to add the HHVM repository to your Ubuntu Server with the following command:

apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main"

Now we can install HHVM with the following command:

apt-get update
apt-get install -y hhvm

HHVM should have been successfully installed, to make sure run the following command:

$ php -v

HipHop VM 3.15.0 (rel)
Compiler: tags/HHVM-3.15.0-0-g92a682ebaa3c85b84857852d8621f528607fe27d
Repo schema: 225d4323575bbc8a498dc809a1c41354f6bca83

HHVM includes an excellent script to install FastCGI based on web server you have installed. This section will help you configure HHVM in the FastCGI mode with the Apache and Nginx servers:

With Apache

Configuring HHVM to work in the FastCGI mode with Apache is extremely simple. All you need to do is execute the following following script:

sudo /usr/share/hhvm/install_fastcgi.sh

With Nginx

If you are using Nginx with PHP-FPM, you’ll have to modify the configuration file to disable the use of PHP-FPM. This file is normally located at /etc/nginx/sites-available/default.Look for the following section and make sure it’s all commented (by adding a # at the beginning of each line):

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass unix:/var/run/php5-fpm.sock;
# fastcgi_index index.php;
# include fastcgi_params;
#}

After doing this, execute the following script:

sudo /usr/share/hhvm/install_fastcgi.sh

Finally, run the commands below to start up HHVM:

systemctl start hhvm

Step 3. Testing HHVM.

To test HHVM, create a test page in the root directory and type these lines in the file and save it:

nano /var/www/html/hhvminfo.php

Then add the following code to your new file:

<? php phpinfo(); ?>

Try to access it at http://your_server_ip/hhvminfo.php. If the PHP info page is rendered in your browser then everything looks good and you are ready to proceed further.
Install-HHVM-on-Ubuntu-16.04
Congratulation’s! You have successfully installed HHVM. Thanks for using this tutorial for installing HHVM (HipHop Virtual Machine) on your Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official HipHop Virtual Machine web site.