How To Install MediaWiki on Ubuntu 16.04

Install MediaWiki on Ubuntu 16

MediaWiki is a free and open source wiki software, used to power wiki websites such as Wikipedia, Wiktionary and Commons, developed by the Wikimedia Foundation and others. It is written in the PHP programming language and uses a backend database.

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

Install MediaWiki 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 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-intl php7.0-curl php7.0-gd php7.0-mbstring php7.0-mysql

Step 3. Installing MediaWiki.

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

wget https://releases.wikimedia.org/mediawiki/1.27/mediawiki-1.27.1.tar.gz

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

tar -xvzf mediawiki-1.27.1.tar.gz
mv /opt/mediawiki-1.27.1/ /var/www/html/mediawiki

We will need to change some folders permissions:

chown -R www-data.www-data /var/www/html/mediawiki

Step 4. Configuring MariaDB for MediaWiki.

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

MariaDB [(none)]> CREATE DATABASE wikidb;
MariaDB [(none)]> CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'y0uR-passW0rd';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 5. Configuring Apache web server for MediaWiki.

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

sudo a2enmod rewrite
rm /etc/apache2/sites-enabled/000-default.conf
touch /etc/apache2/sites-available/mediawiki.conf
ln -s /etc/apache2/sites-available/mediawiki.conf /etc/apache2/sites-enabled/mediawiki.conf
nano /etc/apache2/sites-available/mediawiki.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot /var/www/html/mediawiki/
ServerName your-domain.com
ServerAlias www.your-domain.com

Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

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

systemctl restart apache2.service

Step 6. Accessing MediaWiki.

MediaWiki 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.
mediawiki-dashboard
At the end of the installation, you will need to upload the file to /var/www/html. You can do that via FTP, but to speed up the process, just open the downloaded file with a text editor, copy all the content from it and paste it to a new LocalSettings.php file

that you can create using the following command:

nano /var/www/html/LocalSettings.php

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

How To Install Laravel on Ubuntu 16.04

Install Laravel on Ubuntu 16

Laravel is a free, open-source PHP web application framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern. It is a pretty new framework, but with a big potential to become one of the most popular PHP frameworks.

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

Install Laravel 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 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-intl php7.0-curl php7.0-gd php7.0-mbstring php7.0-mysql php7.0-mcrypt

Step 3. Install Composer.

Install Composer which is the tool for dependency management in PHP:

curl -sS https://getcomposer.org/installer | sudo php

In this tutorial we will put the composer in our /usr/local/bin/ directory. We will also rename the composer name from composer.phar to composer. To do that type the following command:

mv composer.phar /usr/local/bin/composer

Give execute permission to the composer:

chmod +x /usr/local/bin/composer

Step 4. Installing Laravel.

Download latest version of Laravel, Use below command to clone master repo of laravel from github, At the moment of writing this article it is version 5:

cd /var/www
git clone https://github.com/laravel/laravel.git

After than move to the laravel code directory and use composer to install all dependencies required for Laravel framework:

cd /var/www/laravel
composer install

This will take a while according to the network speed. After than set proper permissions on files:

chown -R www-data.www-data /var/www/laravel
chmod -R 755 /var/www/laravel
chmod -R 777 /var/www/laravel/app/storage

Now set the 32 bit long random number encrypption key, which used by the Illuminate encrypter service:

### php artisan key:generate

Application key [Lf54qKbi3mwe463qR4NtYywgf9JdRGDTN0oV9qI] set successfully

Now edit config/app.php configuration file and update above generated application key as followings. Also make sure cipher is set properly:

y' => env('APP_KEY', 'Lf54qKbi3mwe463qR4NtYywgf9JdRGDTN0oV9qI'),

'cipher' => 'AES-256-CBC',

Step 5. Configuring Apache web server for Laravel.

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

sudo a2enmod rewrite
sudo a2ensite laravel.conf
touch /etc/apache2/sites-available/laravel.conf
ln -s /etc/apache2/sites-available/laravel.conf /etc/apache2/sites-enabled/laravel.conf
nano /etc/apache2/sites-available/laravel.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot /var/www/laravel/public
ServerName your-domain.com
ServerAlias www.your-domain.com

Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

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

systemctl restart apache2.service

Step 6. Accessing Laravel.

Laravel 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 Laravel. Thanks for using this tutorial for installing Laravel in Ubuntu 16.04 LTS (Xenial Xerus) systems. For additional help or useful information, we recommend you to check the official Laravel web site.

How To Install Monitorix on Ubuntu 16.04

Install Monitorix on Ubuntu 16

Monitorix is a free, open source, lightweight system monitoring tool designed to monitor server, service and devices. Monitorix allows to monitor overall system performance and also help in detecting bottlenecks, failures, unwanted long response times and other abnormal activities.

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 Monitorix Network Monitoring Tool on a Ubuntu 16.04 (Xenial Xerus) server.
Monitorix features

Global kernel usage
Unlimited number of network ports supported.
Unlimited number of Apache servers supported.
Ability to define the number of graphs per row.
Ability to enable traffic monthly reports.
Ability to zoom in any graph.
Ability to show network metrics in MBytes/sec or Mbits/sec.
Monitors Disk drive temperatures and health.
Filesystem usage and I/O activity of filesystems.
Network traffic usage up to 10 network devices.
Netstat statistics.
System services demand (SSH, ProFTPD, Samba, CUPS, Fail2ban, IMAP, POP3, SMTP, etc…)
Squid Proxy Web Cache statistics.
Built-in HTTP server.
MTA Mail statistics including input and output connections
Network port traffic including TCP, UDP, etc.

Install Monitorix on Ubuntu 16.04

Step 1. First add the Monitorix Repository, open /etc/apt/sources.list file as shown below.

nano /etc/apt/sources.list

Place the cursor to the end of the file and add this line and save the file and exit from the file.

deb http://apt.izzysoft.de/ubuntu generic universe

Once the repository is added, we have to download (or add) the PGP key and “install” it into the system as shown below:

wget http://apt.izzysoft.de/izzysoft.asc

Go to the directory where the .asc file is saved and run the following command:

sudo apt-key add izzysoft.asc

Now, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal:

apt-get update

Step 2. Installing Monitorix.

After updating the repository, run the following command to install Monitorix:

apt-get -y install monitorix apache2-utils

Step 3. Configure Monitorix.

To configure Monitorix, open /etc/monitorix/monitorix.conf file as shown below:

nano /etc/monitorix/monitorix.conf

Search for the following lines:

enabled = n
msg = Monitorix: Restricted access
htpasswd = /var/lib/monitorix/htpasswd

And enable authentication by changing it to “y”.

enabled = y
msg = Monitorix: Restricted access
htpasswd = /var/lib/monitorix/htpasswd

Save the file and exit.Once configured, we have to restart the monitorix service:

systemctl start monitorix

Create the password for Monitorix:

htpasswd -d -c /var/lib/monitorix/htpasswd admin

Step 4. Accessing MediaWiki.

Monitorix will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8080/monitorix/ or http://server-ip:8080/monitorix/. If you are using a firewall, please open port 80 to enable access to the control panel.
Monitorix-network-monitoring
Congratulation’s! You have successfully installed Monitorix. Thanks for using this tutorial for installing Monitorix Network Monitoring Tool in Ubuntu 16.04 LTS (Xenial Xerus) systems. For additional help or useful information, we recommend you to check the official Monitorix web site.

How To Install MyBB on Ubuntu 16.04

Install MyBB on Ubuntu 16

MyBB, also known as MyBBoard or MyBulletinBoard, is very popular and free forum software developed using PHP and MySQL. With everything from forums to threads, posts to private messages, search to profiles, and reputation to warnings, MyBB features everything you need to run an efficient and captivating community.

Install MyBB 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 MyBB 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 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 <code>php7.0-mcrypt
</code>

Step 3. Installing MyBB.

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

wget https://resources.mybb.com/downloads/mybb_1807.zip

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

unzip mybb_1807.zip -d /var/www/html

We will need to change some folders permissions:

chown -R www-data.www-data /var/www/html/mybb/

Step 4. Configuring MariaDB for MyBB.

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

MariaDB [(none)]&gt; create database mybb;
MariaDB [(none)]&gt; grant all privileges on mybb.* to mybbuser@localhost identified by 'your_password';
MariaDB [(none)]&gt; FLUSH PRIVILEGES;
MariaDB [(none)]&gt; \q

Step 4. Configuring Apache web server for MyBB.

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

sudo a2enmod rewrite
touch /etc/apache2/sites-available/mybb.conf
ln -s /etc/apache2/sites-available/mybb.conf /etc/apache2/sites-enabled/mybb.conf
nano /etc/apache2/sites-available/mybb.conf

Add the following lines:


ServerAdmin [email protected]
DocumentRoot /var/www/html/mybb/
ServerName your-domain.com
ServerAlias www.your-domain.com

Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

Next, rename the config.default.php file in the inc directory to config.php since you will be asked to do this later during the MyBB installation via browser. Execute the following:

mv inc/config.default.php inc/config.php

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

systemctl restart apache2.service

Step 5. Accessing MyBB.

MyBB 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 MyBB. Thanks for using this tutorial for installing MyBB in Ubuntu 16.04 LTS (Xenial Xerus) systems. For additional help or useful information, we recommend you to check the official MyBB web site.

How To Install Orangescrum on Ubuntu 16.04

Install Orangescrum on Ubuntu 16

Orangescrum is a free, open source, flexible project management web application written using CakePHP. It helps you to manage projects, teams, documents, and tasks, all in one place. Orangescrum provides various features like agile project management, collaboration, issue tracking, notifications, reporting, task management, and traditional project management functionality for small/medium businesses.

Install Orangescrum 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 Orangescrum 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

Step 3. Installing Orangescrum.

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

wget https://github.com/Orangescrum/orangescrum/archive/master.zip

After downloading Orangescrum you will need to unzip master.zip. To do this, run:

unzip master.php -d /var/www/html
mv /var/www/html/orangescrum-master/ /var/www/html/orangescrum

We will need to change some folders permissions:

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

Step 4. Configuring MariaDB for Orangescrum.

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

MariaDB [(none)]&gt; CREATE DATABASE orangescrum;
MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON orangescrum.* TO 'orangescrumuser'@'localhost' IDENTIFIED BY 'PASSWORD';
MariaDB [(none)]&gt; FLUSH PRIVILEGES;
MariaDB [(none)]&gt; \q

Now, change the current working directory and import the Orangescrum data from the database.sql dump file into the newly created MariaDB database:

cd /var/www/html/orangescrum/
mysql -u x2crmuser -p orangescrum &lt; database.sql
'persistent' =&gt; false,
'host' =&gt; 'localhost',
'login' =&gt; 'orangescrumuser',
'password' =&gt; 'PASSWORD',
'database' =&gt; 'orangescrum',
'prefix' =&gt; '',
'encoding' =&gt; 'utf8',
);

Next step, edit the ‘constants.php’ file and update the WEB_DOMAIN, FROM_EMAIL_NOTIFY and SUPPORT_EMAIL fields:

### nano app/Config/constants.php

define("WEB_DOMAIN", "YourDomain.com"); //ex. wpcademy.orangescrum.com
define('FROM_EMAIL_NOTIFY', '[email protected]'); //(REQUIRED)
define('SUPPORT_EMAIL', '[email protected]'); //(REQUIRED) From Email

Save and close the file.

Step 5. Configuring Apache web server for Orangescrum.

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

sudo a2enmod rewrite
rm /etc/apache2/sites-enabled/000-default.conf
touch /etc/apache2/sites-available/orangescrum.conf
ln -s /etc/apache2/sites-available/orangescrum.conf /etc/apache2/sites-enabled/orangescrum.conf
nano /etc/apache2/sites-available/orangescrum.conf

Add the following lines:


ServerAdmin [email protected]
DocumentRoot /var/www/html/orangescrum/
ServerName your-domain.com
ServerAlias www.your-domain.com

Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

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

systemctl restart apache2.service

Step 6. Accessing Orangescrum.

Orangescrum 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 Orangescrum. Thanks for using this tutorial for installing Orangescrum on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Orangescrum web site.

How To Install Google Fonts on Ubuntu 16.04

Install Google Fonts on Ubuntu 16

Google Fonts are free and open source fonts. It is huge repository of awesome fonts contributed by many designers.

Install Google Fonts 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 Google Fonts on a Ubuntu 16.04 (Xenial Xerus).

 

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

using command

Step 3. Create directory .fonts.

Now create a directory in user’s home directory:

mkdir ~/.fonts

Step 4. Download Google Fonts.

Download the google fonts inside directory ~/.fonts which we have just created, Also unzip the google fonts downloaded file inside same .fonts directory:

cd ~/.fonts &amp;amp;&amp;amp; wget https://github.com/google/fonts/archive/master.zip &amp;amp;&amp;amp; unzip master.zip

Next, build font information cache files:

fc-cache -fv

Wait for a few minutes till the command get successfully finish. That’s all, now in your Ubuntu system google fonts are available. You can find the google fonts available to others application also like gimp,gedit and many more.

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

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.