How To Install Django on Ubuntu 18.04 LTS – Step by Step

Install Django on Ubuntu 18

Django is a popular Python framework for writing web applications. Web frameworks like Django provide a set of tools which helps the developer to write the application faster as the framework takes care of the internal structure, thus the developer needs to take care of the application development only. Django is free and open source software.

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 Django on an Ubuntu 18.04 (Bionic Beaver) server.

Install Django on Ubuntu 18.04

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

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Python 3 and venv.

Now you can install pip using the following command:

sudo apt install python3-venv

Next, Creating Virtual Environment:

mkdir my_django_app
cd my_django_app

Once inside the directory, run the following command to create your new virtual environment:

python3 -m venv venv

To start using this virtual environment, you need to activate it by running the activate script:

source venv/bin/activate

Step 4. Installing Djanggo with pip install

Once the pip is installed, run the following command to install Django:

sudo pip install django

To verify the Django version, run:

python -m django --version

Step 5. Create a sample Django project.

Now that the Django framework has been installed, you can to give it a test drive by creating a sample project:

cd ~
django-admin startproject mysite

The command above will create a directory myproject in your working directory ~, and store all necessary files within.

Run the commands below in sequence to get your application started. Follow the instructions on screen to provide the superuser’s credentials:

cd myidproject/
python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py runserver

Step 6. Accessing Django.

Django will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8000 or http://server-ip:8000/admin
Django-installation

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

How To Install Joomla 3.9.5 With Nginx on Ubuntu 18.04 LTS

Install Joomla With Nginx on Ubuntu 18

Joomla is a free and open source popular content management that uses a PHP and a backend database, such as MySQL. It offers a wide variety of features that make it an incredibly flexible content management system right out of the box. Furthermore, there are hundreds of free extensions written for that allows users to extend its functionality and customize it to their own objectives. A major advantage of using a content management system (CMS) is that it requires almost no technical skill or knowledge to manage. if you are planning to publish content on your website frequently, then maybe using WordPress will be a better option for you.

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 Joomla with Nginx on an Ubuntu 18.04 (Bionic Beaver) server.

Install Joomla With Nginx on Ubuntu 18.04

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 LEMP (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

Step 3. Installing Joomla with Nginx on Ubuntu 18.04.

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

wget https://downloads.joomla.org/us/cms/joomla3/3-8-12/Joomla_3-8-12-Stable-Full_Package.zip
mkdir /var/www/html/joomla
unzip Joomla*.zip -d /var/www/html/joomla

We will need to change some folders permissions:

chown -R www-data.www-data /var/www/html
chmod -R 755 /var/www/html

Step 4. Configuring MariaDB for Joomla.

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

CREATE DATABASE joomladb;
CREATE USER joomlauser@localhost;
SET PASSWORD FOR 'joomlauser'@'localhost' = PASSWORD("your-password");
GRANT ALL PRIVILEGES ON joomladb.* TO 'joomlauser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit

Step 5. Configuring Nginx web server for Joomla.

Finally, configure Nginx site configuration file for Joomla. Run the commands below to create a new configuration file called joomla:

nano /etc/nginx/sites-available/joomla

Add the following lines:

server {
    listen 80;
    listen [::]:80;
    root /var/www/html/joomla;
    index  index.php index.html index.htm;
    server_name  example.com www.example.com;

    location / {
        try_files $uri $uri/ /index.php?$args;        
    }

    location ~ \.php$ {
         include snippets/fastcgi-php.conf;
         fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include fastcgi_params;
    }

After configuring the VirtualHost above, enable it by running the commands below:

ln -s /etc/nginx/sites-available/joomla /etc/nginx/sites-enabled/

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

nginx -t
systemctl restart nginx
systemctl restart php7.1-fpm

Step 6. Accessing Joomla.

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

joomla-web-interface

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

Congratulation’s! You have successfully installed Joomla. Thanks for using this tutorial for installing Joomla CMS (content management system) with Nginx on Ubuntu 18.04 LTS systems. For additional help or useful information, we recommend you to check the official Joomla web site.

How To Install PHP 7.2 on Ubuntu 18.04 LTS

Install PHP 7.2 on Ubuntu 18

PHP (recursive acronym for PHP: Hypertext Preprocessor) is an open source, popular general-purpose scripting language that is widely-used and best suited for developing websites and web-based applications. It is a server-side scripting language that can be embedded in HTML.

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 PHP 7.2 on a Ubuntu 18.04 (Bionic Beaver) server.

Install PHP 7.2 on Ubuntu 18.04 LTS

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

sudo apt update
sudo apt upgrade

Step 2. Installing PHP 7.2 on Ubuntu 18.04 LTS.

If Apache is installed and configured as your web server, then you can follow the steps below to install PHP 7.2:

sudo apt install php libapache2-mod-php

Once, the process is complete, execute the following command to restart your Apache service:

sudo systemctl restart apache2

Step 3. Installing PHP With Nginx Web Server.

Run the command below to install the latest version of PHP and the required PHP FPM packages:

sudo apt install php-fpm
[php]

Once the modules are installed, you can run the command below to check the status of your PHP FPM service:
[php]
systemctl status php7.2-fpm

Then, edit your Nginx server block and include the lines below to enable Nginx web server to process PHP files:

server {
        # . . . other code
        location~ .php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        }
    }

Restart your Nginx web server for the configuration changes to take effect:

sudo systemctl restart nginx

Step 4. Installing PHP Extensions.

First, execute the command below to see all the available PHP modules:

sudo apt-cachesearch php7.2

To install one PHP 7.2 extension run the command:

sudo apt install php-[package name]

To test PHP, create a test file named info.php with he content below. Save the file, then browse to it to see if PHP is working:

nano /var/www/html/info.php

In this file, paste the following code:


<?php
phpinfo();
?>

php_ubuntu_test_18.04_LTS.

Try to access it at http://your_server_ip/info.php . If the PHP info page is rendered in your browser then everything looks good and you are ready to proceed further.

 

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

How To Install XAMPP7.3.4 on Ubuntu 18.04 LTS

Install XAMPP on Ubuntu 18

XAMPP is an open source software that provides users with an out-of-the-box server experience. It is a complex, yet very easy-to-use AMPP (Apache, MySQL, PHP and Perl) distribution that’s compatible with the Linux, Microsoft Windows and Mac OS X operating systems. The best tool for those who want to install a fully functional web development environment.

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 XAMPP stack on a Ubuntu 18.04 (Bionic Beaver) server.

Features XAMPP:

  • Regularly updated to the latest versions of Apache, MariaDB, PHP and Perl.
  • Supports other modules like OpenSSL, phpMyAdmin, MediaWiki, Joomla, WordPress etc.,
  • Tests the website designers and programmers work without Internet.
    Secured package.
  • Allows creation and manipulation of databases in MariaDB and SQLite.

Install XAMPP 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. Installing XAMPPon Ubuntu 18.04 LTS.

The first step is to download script from official xampp and to add the code in a new .run file on your Ubuntu machine, wherever you’d like this:

wget https://www.apachefriends.org/xampp-files/7.2.9/xampp-linux-x64-7.2.9-0-installer.run

Next, run the following command to make XAMPP executable:

chmod +x xampp-linux-x64-7.2.9-0-installer.run

Run the xampp-linux-x64-7.1.1-0-installer.run script and wait until xampp is fully installed:

./xampp-linux-x64-7.2.9-0-installer.run

That should start the XAMPP installation setup. Continue with the installation as you usually do:

xampp6

xampp5

xampp4

xampp3

xampp2

XAMPP1

Once the setup is finished, XAMPP should be available for its usage in your Desktop or open your browser and follow this link : http://localhost/dashboard/

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

How To Install GUI Gnome on Ubuntu 18.04 LTS

Install GUI Gnome on Ubuntu 18

Installing GNOME desktop on Ubuntu is faily straightforward. Most Ubuntu servers are run on CLI (Command-Line Interface) mode. But in some cases, one may need to have a desktop to install some applications with GUI (Grapich User Interface) mode. In this case, we will use Gnome, the most popular user-friendly desktop for any UNIX based system.

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 GUI Gnome on an Ubuntu 18.04 Bionic Beaver server.

Install GUI Gnome on Ubuntu 18.04 LTS

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

sudo apt update
sudo apt upgrade

Step 2. Installing GUI Gnome on Ubuntu 18.04.

Use the command below to install GNOME desktop:

sudo apt install gnome-session gdm3

Before we can switch the new desktop and theme, we need to install the Vanilla Gnome theme:

sudo update-alternatives --config gdm3.css

After installation, reboot. In the login prompt, choose GNOME:
Ubuntu-18.04-Desktop-Gnome

Congratulation’s! You have successfully installed Gnome. Thanks for using this tutorial for installing GUI Gnome in Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official Gnome web site.

How To Install Magento 2.3 on Ubuntu 18.04 LTS

Install Magento on Ubuntu 18

Magento is one of the worlds most widely used applications for managing E-Commerce sites. Magento is fully customizable to meet the users requirements and allowing them to create and launch a fully functional online store in minutes. Magento employs the MySQL relational database management system, the PHP programming language, and elements of the Zend Framework.

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 Magento on an Ubuntu 18.04 Bionic Beaver server.

Magento Features:

  • Analytics and Reporting – the script is integrated with Google Analytics and offers many different reports.
  • Product Browsing – multiple images for products, options for extensive reviews, wishlists and much more.
  • Catalog Browsing – easy navigation, advanced product filtering system, product comparison.
  • Catalog Management – inventory management, batch import and export of products, different tax rates per location, additional product attributes.
  • Customer Accounts – order status and history, e-mail and RSS feeds for products in the wishlist, newsletter subscription, default billing and shipping address.
  • Customer Service – enhanced features for customers’ accounts, Contact Us form, comprehensive order tracking and history, customizable order e-mails.
  • Order Management – create orders through admin area, create multiple invoices shipments and credit memos, call center order creation option.
  • Payment – different payment methods: credit cards, PayPal, Authorize.net,
  • Google Checkout, checks, money orders, support of external payment modules like Cybersource, ePay, eWAY and many more.
  • Shipping – shipping to multiple addresses, flat rating shipping, supports UPS,
  • UPS XML (account rates), FedEx (account rates), USPS and DHL.
  • Checkout – one page checkout, SSL support, checkout without having an account.
  • Search Engine Optimization – 100% Search Engine Friendly, Google SiteMap support.
  • International Support – multiple languages and currencies, list of allowed countries for registration, purchasing and shipping, localization.
  • Marketing Promotions and Tools – coupons, discounts and different promotion options.
  • Site Management – control of multiple web sites, multiple languages, tax rate with support for US and International markets, customizable outlook through templates.

Install Magento on Ubuntu 18.04 LTS

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

sudo apt update
sudo apt 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. Installing Magento on Ubuntu 18.04.
First thing to do is to go to Magento’s download page and download the latest stable version of Magento, At the moment of writing this article it is version 2.3.0.

Next, unpack the Magento archive to the document root directory on your server:

unzip magento*.zip
cp -rf magento/* /var/www/html/

We will need to change some folders permissions:

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

Step 4. Configuring MariaDB for Magento.

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

CREATE DATABASE magentodb;
GRANT ALL PRIVILEGES ON magentodb . * TO magento@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
flush privileges;
exit

Step 5. Configuring Apache web server for Magento.

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

touch /etc/apache2/sites-available/magento.conf
ln -s /etc/apache2/sites-available/magento.conf /etc/apache2/sites-enabled/magento.conf
nano /etc/apache2/sites-available/magento.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
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

Save and close the file. Restart the apache service for the changes to take effects:

sudo a2ensite magento.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 6. Configure PHP for Magento.

Now here we should allow Magento to use enough PHP memory (it is recommended that PHP should be allowed 512 MB of RAM). To do that, run the commands below to open the configuration file:

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

Search for the line ‘memory_limit‘ in the file:

memory_limit = 128M
### And change the value to 512 ###
memory_limit = 512M

Restart Apache for the changes to take effect using the following command:

systemctl restart apache2

Step 7. Accessing Magento.

Magento 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 Magento. Thanks for using this tutorial for installing Magento eCommerce in Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official Magento web site.

How To Install XRDP-v0.6.1 on Ubuntu 18.04 LTS

Install XRDP on Ubuntu 18

xrdp provides a graphical login to remote machines using RDP (Microsoft Remote Desktop Protocol). xrdp accepts connections from variety of RDP clients: FreeRDP, rdesktop, NeutrinoRDP and Microsoft Remote Desktop Client (for Windows, macOS, iOS and Android).

As Windows-to-Windows Remote Desktop can, xrdp supports not only graphics remoting but also

  • two-way clipboard transfer (text, bitmap, file)
  • audio redirection
  • drive redirection (mount local client drives on remote machine)

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 Wine on an Ubuntu 18.04 (Bionic Beaver) server.

Install XRDP on Ubuntu 18.04 LTS

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

sudo apt update
sudo apt upgrade

Step 2. Installing XRDP on Ubuntu 18.04.

Now, Run the following command to install xrdp on Ubuntu:

sudo apt install xrdp

After installing, Setup the Xsession file for xrdp.Run the following command:

echo mate-session> ~/.xsession

Now, Install Mate-Core Package. To install mate-core package, you need to run the following command:

sudo apt-get install mate-core

Step 3. Configure firewall.

Allow just RDP through the local firewall:

sudo ufw allow 3389/tcp

You should be able to connect now. I use Remmina to connect from my laptop running Ubuntu. Windows users have a RDP connection application by default on their machine.

Congratulation’s! You have successfully installed XRDP. Thanks for using this tutorial for installing XRDP open source remote desktop protocol on Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official XRDP web site.