How To Install WordPress on Ubuntu 17.04

Install WordPress on Ubuntu 17

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 17.04 Zesty Zapus server.
Install WordPress on Ubuntu 17.04 Zesty Zapus

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 17.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 WordPress on Ubuntu 17.04.

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.8:

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 character set utf8 collate utf8_bin;
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:

sudo a2enmod rewrite
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.0/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:

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 17.04. For additional help or useful information, we recommend you to check the official WordPress web site.

How To Install VirtualBox on Ubuntu 17.04

VirtualBox is a free and open-source hypervisor software, allows you to create and run a guest operating systems (“virtual machines”) such as Linux and Windows on top of the host operating system.VirtualBox supports both software-based and Hardware-assisted virtualization.

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 VirtualBox on a Ubuntu 17.04 (Zesty Zapus) server.

Install VirtualBox on Ubuntu 17.04 Zesty Zapus

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 VirtualBox on Ubuntu 17.04.

First, run the commands below to add VirtualBox repository key:

nano /etc/apt/sources.list

Add the following line to it:

deb http://download.virtualbox.org/virtualbox/debian zesty contrib

Next, we need to download and import the Oracle GPG public key to Ubuntu system with the following command:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Install the VirtualBox 5, command as follows:

apt-get update
apt-get install virtualbox-5.1

Step 4. Accessing VirtualBox.

Once it’s installed, start it from your application menu, or run the command below to start VirtualBox from terminal or find the application on your ubuntu dash and launch it.:

virtualbox

Install-VirtualBox
Congratulation’s! You have successfully installed VirtualBox. Thanks for using this tutorial for installing VirtualBox on Ubuntu 17.04 (Zesty Zapus) server. For additional help or useful information, we recommend you to check the official VirtualBox web site.

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 FFmpeg on Ubuntu 17.04

Install FFmpeg on Ubuntu

FFmpeg is a cross-platform solution for streaming audio and video as well as recording and conversion. There’s also a great PHP package called ffmpeg-php that allows for easy use of FFmpeg from inside PHP scripts. In this tutorial i will show you the easy way to install ffmpeg and ffmpeg-php (php extension).

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 FFmpeg on an Ubuntu 17.04 Zesty Zapus server.
Install FFmpeg on Ubuntu 17.04 Zesty Zapus

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 FFmpeg.
You’ll need to add FFmpeg’s PPA (personal package archive) to your system:

sudo add-apt-repository ppa:jonathonf/ffmpeg-3
sudo apt-get update
sudo apt upgrade

To undo the changes and restore to the stock version of FFmpeg in main Ubuntu repositories, purge the PPA via command:

sudo apt install ppa-purge
sudo ppa-purge ppa:jonathonf/ffmpeg-3

Congratulation’s! You have successfully installed FFmpeg. Thanks for using this tutorial for installing FFmpeg on your Ubuntu 17.04 Zesty Zapus. For additional help or useful information, we recommend you to check the official FFmpeg web site.