ubuntu | LinuxHostSupport Linux Tutorials and Guides Tue, 25 Jun 2024 15:54:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install MySQL on Ubuntu 24.04 https://linuxhostsupport.com/blog/how-to-install-mysql-on-ubuntu-24-04/ https://linuxhostsupport.com/blog/how-to-install-mysql-on-ubuntu-24-04/#respond Mon, 15 Jul 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2132 In this blog post, we will explain how to install MySQL on Ubuntu 24.04. MySQL is an open-source relational database management system written in C and C++ developed and maintained by the Oracle Corporation. MySQL offers a variety of features, such as speed, security, and replication, and it is one of the most popular databases. […]

The post How to Install MySQL on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
In this blog post, we will explain how to install MySQL on Ubuntu 24.04. MySQL is an open-source relational database management system written in C and C++ developed and maintained by the Oracle Corporation. MySQL offers a variety of features, such as speed, security, and replication, and it is one of the most popular databases. The data types provided by MySQL are int, tinyint, long, char, float, double, datetime, etc. In this tutorial, we will show you how to install MySQL, manage the MySQL services, and some simple operations about creating databases, users, etc.

This process will take up to 15 minutes. Let’s get started!

Prerequisites

  • A server running Ubuntu 24.04 OS
  • User privileges: root or non-root user with sudo privileges

Update the System

We assume that you have a fresh installation of Ubuntu 24.04, so it is recommended that the packages be updated to their latest version before we take any actions on the server.

sudo apt update -y && sudo apt upgrade -y

Install MySQL server

Once, the system is up to date, we can proceed with the MySQL installation. To install MySQL on your server execute the following command:

sudo apt install mysql-server

After this command, you should allow some time for the installation to complete.

Manage the MySQL service

Once the installation is completed we can proceed with managing the MySQL service.

To start and enable the service:

sudo systemctl start mysql && sudo systemctl enable mysql

You should receive the following output:

root@host:# sudo systemctl start mysql && sudo systemctl enable mysql
Synchronizing state of mysql.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable mysql

To check the status of the service execute the command below:

sudo systemctl status mysql

You should get the following output:

root@host:~# sudo systemctl status mysql
● mysql.service - MySQL Community Server
     Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-06-08 16:39:34 CDT; 2min 40s ago
   Main PID: 43182 (mysqld)
     Status: "Server is operational"
      Tasks: 37 (limit: 4613)
     Memory: 365.3M (peak: 379.7M)
        CPU: 2.968s
     CGroup: /system.slice/mysql.service
             └─43182 /usr/sbin/mysqld

Jun 08 16:39:32 host.test.vps systemd[1]: Starting mysql.service - MySQL Community Server...
Jun 08 16:39:34 host.test.vps systemd[1]: Started mysql.service - MySQL Community Server.

To restart the service you can use the following command:

sudo systemctl restart mysql

To stop the MySQL service:

sudo systemctl stop mysql

Create MySQL Database and User

Since we installed the MySQL database we will provide you with some simple tasks about creating a database and user in MySQL and assigning permissions between them. First log into the MySQL console with the following command:

mysql

You should see the following screen:

root@host:~# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.36-2ubuntu3 (Ubuntu)

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

To create a database execute the following command:

create database testdb;

After successful creation, you will get the following output:

mysql> create database testdb;
Query OK, 1 row affected (0.01 sec)

Now, let’s create a user:

create user testinguser@localhost IDENTIFIED BY 'StrongPasswordHere';

You will get the following output:

mysql> create user testuser;
Query OK, 0 rows affected (0.03 sec)

We have the database and the user. With the next command, we will grant access to the user on the database.

grant all ON testdb.* TO 'testinguser'@'localhost';
flush privileges;
 

There are many MySQL commands such as dumping and importing database, repairing tables, and optimizing MySQL configuration which will not be explained in this tutorial since it was only for the installation and the most common commands for creating database and user. Of course, you do not have to do this installation alone. You only need to sign up for our monthly server management or per-incident server support and submit a support ticket. Our admins will help you with any aspect of the MySQL installation and configuration on your server.

If you liked this post on how to install MySQL on Ubuntu 24.04, please share it with your friends and leave a comment below. Thanks.

The post How to Install MySQL on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-mysql-on-ubuntu-24-04/feed/ 0
How to Install Node.js and NPM on Ubuntu 24.04 https://linuxhostsupport.com/blog/how-to-install-node-js-and-npm-on-ubuntu-24-04/ https://linuxhostsupport.com/blog/how-to-install-node-js-and-npm-on-ubuntu-24-04/#respond Thu, 30 May 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2086 NodeJS is an open-source JavaScript runtime environment, one of the most popular tools among web developers. Developers typically use NodeJS to improve the functionality of web applications or create local development environments. This tutorial will guide you on how to install Node.JS and NPM on Ubuntu 24.04 using the default repository and NodeSource. You will […]

The post How to Install Node.js and NPM on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
NodeJS is an open-source JavaScript runtime environment, one of the most popular tools among web developers. Developers typically use NodeJS to improve the functionality of web applications or create local development environments. This tutorial will guide you on how to install Node.JS and NPM on Ubuntu 24.04 using the default repository and NodeSource. You will also learn how to install a specific version of NodeJS using NVM.

Prerequisites

  • An Ubuntu 24.04 VPS
  • SSH root access or user with sudo privileges

Conventions

# – given commands should be executed with root privileges either directly as a root user or by use of sudo command
$ – given commands should be executed as a regular user

Step 1. Login to the server

First, log in to your Ubuntu 24.04 server through SSH as the root user:

ssh master@IP_Address -p Port_number

You must replace ‘IP_Address‘ and ‘Port_number‘ with your server’s IP address and SSH port number. Additionally, replace ‘master’ with the username of the system user with sudo privileges.

You can check whether you have the proper Ubuntu version installed on your server with the following command:

$ lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Noble Numbat
Release: 24.04
Codename: noble

Step 2. Install Dependencies

To install NodeJS on our system, we need to install some dependencies. Let’s run the command below to install them.

$ sudo apt install curl apt-transport-https ca-certificates gnupg

Step 3. Install NodeJS and NPM from APT

The easiest way to install NodeJS and NPM on an Ubuntu 24.04 system is from the default APT repository. You will get NodeJS version 18 and NPM version 9 using this installation method. The installation is simple and straightforward. Let’s execute the command below to install NodeJS and NPM.

$ sudo apt install nodejs npm -y

Once installed, you can run this command to check the version.

$ nodejs -v; npm -v
master@ubuntu24:~$ nodejs -v; npm -v
v18.19.1
9.2.0

Step 4. Install NodeJS and NPM from NodeSource

We can install NodeJS from the Ubuntu default repository, but we will get an older version of NodeJS if we use this method. Alternatively, we will install NodeJS and npm through NodeJS repository to get the more recent version of it. If compared to Ubuntu’s default repository, NodeSource offer more versions to choose.

$ curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -

Once completed, we must download the package information from the newly added source above.

$ sudo apt update

Next, run the following command to install NodeJS and NPM.

$ sudo apt install nodejs

That’s it. NodeJS and NPM are installed. You can check the installed version by executing this one-liner:

$ node -v; npm -v

Now go to https://nodejs.org/en/download/ and see what is the LTS version. You have just installed the same version as shown there, and you will see an output like this after running the command above:

master@ubuntu24:~$ node -v; npm -v
v20.11.1
10.2.4

Again, this installation method is suitable if you want to get the LTS or a specific version. For example, if you want version 18, you can execute this command instead.

$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

Replace 18 with any version you want if you want another version.

Step 5. Install NodeJS and NPM using NVM

Another way to install NodeJS on Ubuntu is by using the Node Version Manager (NVM). NVM is a bash script used to manage several versions of NodeJS on your system. This installation method allows you to install and maintain different independent versions of NodeJS simultaneously.

Run this command below to download the script.

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Then, we need to source the script.

$ source ~/.bashrc

After executing the command, you can list the available version of NodeJS to install with this command:

$ nvm list-remote

The command will return a message containing a long list of NodeJS version to choose.

To install version 20.11.1, run this command

$ nvm install 20.11.1

As explained earlier, you can have multiple version of NodeJS, you can install another version using the same command with the different version in the command.

To switch between the installed version, you can run this command:

$ nvm use 18.19.1

Replace 18.19.1 with the version you want to switch to. Make sure the version is already installed.

Congratulation! You have successfully learned how to install Node.JS and NPM on your Ubuntu 24.04 VPS. For more information about NodeJS and NPM, please refer to the NodeJS website.

If you are still unsure, you don’t have to install NodeJS and NPM On Ubuntu 24.04 yourself. Our Linux admins will set up and configure a NodeJS and NPM VPS for you on our monthly management plans or per incident server support plans.

PS. If you liked this post on how to install NodeJS and NPM On Ubuntu 24.04, please share it with your friends on social networks using the buttons on the left or leave a reply below. Thanks.

The post How to Install Node.js and NPM on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-node-js-and-npm-on-ubuntu-24-04/feed/ 0
How to Install PHP 8.3 on Ubuntu 24.04 https://linuxhostsupport.com/blog/how-to-install-php-8-3-on-ubuntu-24-04/ https://linuxhostsupport.com/blog/how-to-install-php-8-3-on-ubuntu-24-04/#comments Tue, 30 Apr 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2078 This tutorial will teach you how to install PHP 8.3 on Ubuntu 24.04. PHP is a scripting language used for development purposes. It was an abbreviation for Personal Home Page, but now it stands for the recursive initialism known as PHP Hypertext Preprocessor. PHP is used for creating dynamic web pages, and according to the […]

The post How to Install PHP 8.3 on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
This tutorial will teach you how to install PHP 8.3 on Ubuntu 24.04. PHP is a scripting language used for development purposes. It was an abbreviation for Personal Home Page, but now it stands for the recursive initialism known as PHP Hypertext Preprocessor. PHP is used for creating dynamic web pages, and according to the reports in 2024, PHP is used by 76% of all websites whose programming language can be determined. Most popular CMS systems like WordPress, Drupal, or Joomla are written in PHP. The latest stable version of PHP is PHP 8.3.

Installing PHP 8.3 and its extensions is straightforward and may take a few minutes. Let’s get started!

Prerequisites to install PHP 8.3 on Ubuntu 24.04

  • A server running Ubuntu 24.04 or any Linux OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the system

We assume that you have a fresh installation of Ubuntu 24.04, and we need to update the system before we start installing PHP 8.3. To do that, execute the following commands:

sudo apt update -y && sudo apt upgrade -y

Step 2. Install PHP 8.3

Once the system is updated, we can install the latest stable version of PHP8.3. This version is, by default, enabled in the Ubuntu 24.04 repository, and we do not need to add any keys and repositories. The installation command is straightforward:

sudo apt install php8.3 -y

After successful installation, you can check the version of the PHP:

php -v

You should get the following output:

root@host:~# php -v
PHP 8.3.0-1ubuntu1 (cli) (built: Jan 19 2024 14:00:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.0-1ubuntu1, Copyright (c), by Zend Technologies

Step 3. Install PHP 8.3 extensions

Installation of the PHP itself will not run the websites smoothly. We need additional modules, such as PHP, to work with MySQL, with images, for HTTP requests, XML data, etc. In the next command, we will install a couple of PHP extensions that are very important for one website:

sudo apt install libapache2-mod-php php8.3-common php8.3-cli php8.3-mbstring php8.3-bcmath php8.3-fpm php8.3-mysql php8.3-zip php8.3-gd php8.3-curl php8.3-xml -y

After the installation, we can check the installed PHP modules with the command below:

php -m

We will get a long list of modules:

root@host:~# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
	.
	.
	.
	.
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib	

Step 4. Test PHP

Now, in this last step, we will make a test PHP file in our web server document root to test whether or not the PHP is working. But before that, we need to install the Apache Web server:

sudo apt install apache2 -y

After installation, start and enable the service:

sudo systemctl start apache2 && sudo systemctl enable apache2

If everything is ok, check the status of the service:

sudo systemctl status apache2

You should get output similar to this:

root@host:# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-03-14 07:33:03 CDT; 8min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 92315 (apache2)
      Tasks: 7 (limit: 4624)
     Memory: 16.1M (peak: 16.2M)
        CPU: 170ms
     CGroup: /system.slice/apache2.service

Next, go into your Apache document root:

cd /var/www/html

Create info.php file:

touch info.php

Open the file with your favorite editor and paste the following lines of code:

<?php
phpinfo();
?>

Save the file, close it, and restart the Apache service.

sudo systemctl restart apache2

Now you can access the file in the browser by vising the following URL: http:YourServerIPaddress:/info.php

Learn how to Install PHP 8.3 on Ubuntu 24.04

That’s it. You successfully learned how to install PHP 8.3 on Ubuntu 24.04. Of course, you do not have to do this on your own. Our admins can help you with any aspect of the PHP installation on your server. Feel free to contact us. We are available 24/7.

PS. If you liked this post on how to install PHP 8.3 on Ubuntu 24.04, please share it with your friends on social networks or leave a comment in the comments section. Thank you.

The post How to Install PHP 8.3 on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-php-8-3-on-ubuntu-24-04/feed/ 1
How to Install Adminer on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-adminer-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-adminer-on-ubuntu-22-04/#respond Thu, 30 Nov 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1948 In this tutorial, we are going to guide you on how to install Adminer on Ubuntu 22.04. Adminer, formerly phpMinAdmin is a software tool for managing the content of databases. Adminer is written in PHP and supports various database systems such as MySQL, PostgreSQL, MariaDB, SQLite, Elasticsearch, Oracle, etc. In this blog post, we will […]

The post How to Install Adminer on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to guide you on how to install Adminer on Ubuntu 22.04.

Adminer, formerly phpMinAdmin is a software tool for managing the content of databases. Adminer is written in PHP and supports various database systems such as MySQL, PostgreSQL, MariaDB, SQLite, Elasticsearch, Oracle, etc. In this blog post, we will install Adminer with the LAMP stack.

Installing Adminer on Ubuntu 22.04 with LAMP stack is a straightforward process that may take up to 15 minutes. Let’s get things going!

Prerequisites

  • A server running Ubuntu 22.04
  • User privileges: root user or non-root user with sudo privileges

Step 1. Update the System

Every fresh install of the OS needs its system packages to be updated to the latest versions available.

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install Apache Web Server

First, we will install the Apache Web server. Execute the following command to install it:

sudo apt-get install apache2 -y

Once, installed start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

oot@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-10-03 16:21:21 CDT; 35s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 3128 (apache2)
      Tasks: 6 (limit: 4558)
     Memory: 9.9M
        CPU: 183ms
     CGroup: /system.slice/apache2.service

Step 3. Install PHP 8.1 with Dependencies

Next up will be installing PHP 8.1 with all of the required extensions for running Adminer. To install it all in one go, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl php8.1-mysqli libapache2-mod-php php8.1-fpm -y

Step 4. Install MariaDB database server

Lastly, the LAMP stack isn’t complete without a database server. For the database server, we will install MariaDB.

sudo apt install mariadb-server -y

Start and enable the MariaDB service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the MariaDB service:

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-10-03 16:23:52 CDT; 22s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 4455 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 4558)
     Memory: 61.3M
        CPU: 1.056s
     CGroup: /system.slice/mariadb.service
             └─4455 /usr/sbin/mariadbd

Step 5. Secure MariaDB database service

MariaDB by default is not safe to use in a production environment. That’s why we will secure the MariaDB database service and set a root password. To do this, execute the following command:

mysql_secure_installation

You need to pass these steps with the following options:

Switch to unix_socket authentication [Y/n] Y

Change the root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

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

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB

With all of our required software and dependencies installed, let’s start the actual installation.

Step 6. Install Adminer

To install Adminer, execute the following command:

sudo apt install adminer -y

After successful installation, we need to enable PHP-FPM and enable the Adminer Apache configuration with the following commands:

sudo a2enconf php*-fpm

sudo a2enconf adminer

After this, restart the Apache web server.

systemctl reload apache2

Now you can access Adminer at http:YourServerIPAddress/adminer:

Logging in using the root password you set earlier will get you to the following screen:

You’re in! You successfully installed Adminer on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our Linux server support plans and submit a support ticket. Our admins are available 24/7 and will start work on your request immediately. Always trust our epic support.

If you liked this post on how to install Adminer on Ubuntu 22.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Adminer on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-adminer-on-ubuntu-22-04/feed/ 0
How to Install Bugzilla on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/#respond Wed, 15 Nov 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1938 Bugzilla is an open-source software for tracking bugs developed by Mozilla’s developers. It is written in Perl and supports various database systems such as MySQL, PostgreSQL, Oracle, and SQLite. Bugzilla’s system requirements include a compatible database management system, a suitable release of Perl 5, an assortment of Perl modules, a compatible web server, and a […]

The post How to Install Bugzilla on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Bugzilla is an open-source software for tracking bugs developed by Mozilla’s developers. It is written in Perl and supports various database systems such as MySQL, PostgreSQL, Oracle, and SQLite.

Bugzilla’s system requirements include a compatible database management system, a suitable release of Perl 5, an assortment of Perl modules, a compatible web server, and a qualified mail transfer agent.

Installing Bugzilla on Ubuntu 22.04 is a straightforward process and may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as the OS
  • At VPS with at least 4 GB of RAM available
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Since we have a fresh installation of Ubuntu 22.04, we need to update the packages to the latest versions available:

sudo apt update -y && sudo apt upgrade -y

Step 2. Install Perl

Bugzilla is written in Perl, so we need to install it along with of its dependencies.

sudo apt install build-essential libappconfig-perl libdate-calc-perl libtemplate-perl libmime-tools-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libfile-which-perl libauthen-sasl-perl libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libgd-dev libmysqlclient-dev graphviz sphinx-common rst2pdf libemail-address-perl libemail-reply-perl -y

After successful installation, check the installed Perl version:

perl --version

You should get output similar to this:

root@host:~# perl --version

This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

Step 3. Install MariaDB Database

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server -y

Start the MariaDB service and enable it to run at system startup with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the MariaDB service like so:

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 06:50:23 CDT; 18min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 88311 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 7 (limit: 4558)
     Memory: 59.4M
        CPU: 1.625s
     CGroup: /system.slice/mariadb.service
             └─88311 /usr/sbin/mariadbd

Step 4. Create Bugzilla database and user

To create the BugZilla database and user, log into the MariaDB command line as the root user:

mysql -u root -p

Then press [Enter] if you have not set a root password for MariaDB. Once logged in, execute the following commands on the MariaDB command line:

 CREATE USER 'bugzilla'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE bugzilla;
 GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzilla'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

With that done, you should now have a database and user ready for Bugzilla.

Step 5. Install Apache2 Webserver

We are going to use Apache as a web server in this tutorial. To install it, execute the command below:

sudo apt install apache2 -y

After successful installation, start and enable the service:

sudo systemctl start apache2 && sudo systemctl enable apache2

To check if everything is OK, execute the following command for the status of the Apache2 service:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 06:52:26 CDT; 25min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 93179 (/usr/sbin/apach)
      Tasks: 6 (limit: 4558)
     Memory: 13.3M
        CPU: 308ms
     CGroup: /system.slice/apache2.service

Step 6. Install Bugzilla

Download the latest stable version of Bugzilla into the Apache document root.

cd /var/www/html
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz

Once downloaded, extract the bugzilla directory.

tar -xvf bugzilla-5.0.6.tar.gz -C /var/www/html/

mv bugzilla-5.0.6 bugzilla 

Once this is done, go into the “bugzilla” directory and run the checksetup script to check your system’s setup.

cd /var/www/html/bugzilla/

./checksetup.pl

If there are missing modules, you need to execute the following command:

/usr/bin/perl install-module.pl --all

Now, if you execute the ./checksetup.pl it will return the following output:

There was an error connecting to MySQL:

    Access denied for user 'bugs'@'localhost' (using password: NO)

This is normal and expected because we haven’t set up the configuration file yet. Open the file /var/www/html/bugzilla/localconfig with your preferred text editor and edit it to look like this:

$webservergroup = 'www-data';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bugzilla';
$db_pass = 'YourStrongPasswordHere';
$db_port = 0;

Save the file and close it. After these settings are done run the ./checksetup.pl again.

./checksetup.pl

It should return back with no errors.

Next is to define your administrator’s email, username and password once the database connection is successful.

Enter the e-mail address of the administrator: admin@yourdomain.com
Enter the real name of the administrator: admin
Enter a password for the administrator account:
Please retype the password to verify:
admin@yourdomain.com is now set up as an administrator.
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.

Step 7. Create a Virtual Host configuration file

To access the Bugzilla Web interface, you need to create a virtual host configuration file where you can define your domain, document root, and some script parameters.

First, create the configuration file with the following command:

touch /etc/apache2/sites-available/bugzilla.conf

Open the file, and paste the following lines of code:

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/bugzilla/

<Directory /var/www/html/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options AuthConfig
</Directory>

ErrorLog /var/log/apache2/yourdomain.com.error_log
CustomLog /var/log/apache2/yourdomain.com.access_log common
</VirtualHost>

Make sure to replace yourdomain.com with the actual domain name you plan on using.

Enable the Apache2 configuration file and other modules:

sudo a2ensite bugzilla.conf

sudo a2enmod headers env rewrite expires cgi

Check the syntax of the Apache2 configuration.

apachectl -t

You should receive the following output:

root@host:~# apachectl -t
Syntax OK

If you receive this output, you can safely restart the Apache service.

sudo systemctl restart apache2

With all of this finally configured, you can now access the Bugzilla Web interface at http://YourDomain.com.

Congratulations! You successfully installed and configured Bugzilla on Ubuntu 22.04. Of course, if you use one of our Linux server support services, you do not have to do this on your own – you can always contact our technical support and they will do the rest for you. We are available 24/7.

If you liked this post on how to install Bugzilla on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Bugzilla on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/feed/ 0
How to Reset Your MySQL or MariaDB Root Password on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-22-04/#comments Mon, 30 Oct 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1905 In this tutorial we are going to explain how to reset MySQL or MariaDB Root password on Ubuntu 22.04. MySQL is an open-source SQL database management system distributed and supported by Oracle Corporation. It is a relational database management system that provides fast, reliable, scalable, and easy usage. MySQL works in client/server or embedded systems. […]

The post How to Reset Your MySQL or MariaDB Root Password on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to explain how to reset MySQL or MariaDB Root password on Ubuntu 22.04.

MySQL is an open-source SQL database management system distributed and supported by Oracle Corporation. It is a relational database management system that provides fast, reliable, scalable, and easy usage. MySQL works in client/server or embedded systems.

MariaDB is also a popular open-source relational database management system made by the original MySQL developers. In this tutorial, we are going to install the MariaDB database system and will explain how to reset the root password. Since it is made by MySQL developers, the same commands are applied for both systems.

Installing MariaDB or MySQL and resetting the root password is a straightforward process that may take up to 15 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Every fresh installation of Ubuntu 22.04 needs to be updated. That’s why we need to update the package to the latest versions available.

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install MariaDB database service.

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb 
● mariadb.service - MariaDB 10.6.12 database server 
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) 
Active: active (running) since Thu 2023-09-07 09:28:14 CDT; 17s ago 
Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ 
Main PID: 2722 (mariadbd) 
Status: "Taking your SQL requests now..." 
Tasks: 16 (limit: 4558) 
Memory: 61.2M 
CPU: 528ms 
CGroup: /system.slice/mariadb.service └─2722 /usr/sbin/mariadbd

Step 3. Secure MariaDB database service

Next we will secure the MariaDB database service and will set a root password. To do that execute the following command:

mysql_secure_installation

You need to pass these steps with the following options:

Switch to unix_socket authentication [Y/n] Y 
Change the root password? [Y/n] Y 
New password: 
Re-enter new password: 
Password updated successfully! 
Reloading privilege tables.. 
... Success! 
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 
All done! If you've completed all of the above steps, your MariaDB installation should now be secure. 
Thanks for using MariaDB

After installation login to the MySQL console will not ask for a password and will let you without any password, even though we set it in the previous step.

To set MySQL to ask you for a password execute the following command:

ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('YourStrongPasswordHere');

Now, if you try to log in only with this command: mysql you will get this message:

root@host:~# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

You need to use the following command and enter your password:

root@host:~# mysql -u root -p 
Enter password: 
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 64 Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04 

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
MariaDB [(none)]>

Step 4. Reset MariaDB Root password

In the previous step we set the root password for the MariaDB root user to be YourStrongPasswordHere. We know our root password but in some cases, the admins or developers manage to lose it and need to log in to the MySQL server.

So, to set a new root password we must follow the next steps:

First stop the MariaDB service with the following command:

systemctl stop mariadb

After stopping the service check the status:

systemctl status mariadb

You should get the following output:

root@host:~# systemctl status mariadb 
○ mariadb.service - MariaDB 10.6.12 database server 
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) 
Active: inactive (dead) since Thu 2023-09-07 10:13:33 CDT; 36s ago 
Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ 
Process: 2722 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS) 
Main PID: 2722 (code=exited, status=0/SUCCESS) 
Status: "MariaDB server is down" 
CPU: 1.760s

Now, when the service is stopped we need to start it without permission checking and without networking to prevent other users from connecting in the meantime:

sudo mysqld_safe --skip-grant-tables --skip-networking &

The ampersand will allow us to use the terminal. Now, execute the following command:

mysql -u root

This will connect us without a password. Flush the privileges first and then change the password with the commands below:

FLUSH PRIVILEGES; 
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NewStrongPasswordHere'); EXIT;

Now, the password is changed from YourStrongPasswordHere TO NewStrongPasswordHere.

Next we need to kill the process id manually for the mysql service. To find it execute the following command:

ps aux | grep mysqld_safe

You will get output similar to this: root@host:~#

ps aux | grep mysqld_safe 
root 3292 0.0 0.1 14100 5596 pts/0 S 05:18 0:00 sudo mysqld_safe --skip-grant-tables --skip-networking 
root 3293 0.0 0.0 14100 880 pts/1 Ss+ 05:18 0:00 sudo mysqld_safe --skip-grant-tables --skip-networking 
root 3294 0.0 0.0 2888 1732 pts/1 S 05:18 0:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables --skip-networking 
root 3427 0.0 0.0 9208 2288 pts/0 S+ 05:28 0:00 grep mysqld_saf

In our case, the process id is 3292. To kill this process execute the following command:

kill -9 3292

Now, we can start the MariaDB service normally:

sudo systemctl start mariadb

Now, you can use the NewStrongPasswordHere.

Congratulations! You just learned how to reset MySQL or MariaDB Root password on Ubuntu 22.04. Of course, you do not have to do this if you find any difficulties. You can contact our technical support by submitting a support ticket or live chat. We are available 24/7

If you liked this post on how to reset your MySQL or MariaDB root password on Ubuntu 22.04, please share it with your friends on the social networks or simply leave a reply below. Thanks.

The post How to Reset Your MySQL or MariaDB Root Password on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-22-04/feed/ 1
How to Install Go on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/#comments Sun, 15 Oct 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1899 Golang, also known as Go, is a modern programming language developed by Google in 2007 to improve its programming productivity. Go is open-source, and it is getting more and more popular and used in many applications such as Docker, Kubernetes, and static generators like Hugo. This language is well-designed to be used by professionals for […]

The post How to Install Go on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Golang, also known as Go, is a modern programming language developed by Google in 2007 to improve its programming productivity.

Go is open-source, and it is getting more and more popular and used in many applications such as Docker, Kubernetes, and static generators like Hugo.

This language is well-designed to be used by professionals for application development. Go is easy to create and maintain, making it an ideal programming language for building efficient software. Go is reliable, easy to build, and has efficient software that scales fast. In this tutorial, we will show you how to install Go on Ubuntu 22.04.

Prerequisites

  • Ubuntu 22.04
  • SSH access with root privileges or a regular system user with sudo privileges

Step 1. Log in to the server

First, log in to your Ubuntu 22.04 server through SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace “IP_Address” and “Port_number” with your server’s IP address and SSH port number, respectively. Additionally, replace “root” with the username of the system user with sudo privileges.

You can check whether you have the proper Ubuntu 22.04 version installed on your server with the following command:

# lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

# apt update -y

Step 2. Install Go

There are several methods of installing Go on Ubuntu 22.04. The first option is to install Go from the default Ubuntu 22.04 repository. The second option is to download the Go binary provided by their developer. And the third option is to install it from the source.

To install it from the default Ubuntu repository, we can simply execute this command to install Go.

# apt install golang-go

At the time of this writing, you will get Go version 1.18.1 after installing it from the Ubuntu repository; we can check it by running the command below.

# go version

The second method is to install Go by using the binary package. If you want the more recent version of Go and install it the easier way, we can download the binary distribution from the Go website. You can check and get the download link from their website at https://go.dev/dl/; let’s download Go now.

# wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz -O go.tar.gz

Once downloaded, we need to extract the file.

# tar -C /usr/local -xzvf go.tar.gz

The command above will extract the files and you should see the directory /usr/local/go/. So, at this moment, you can access the go executable at /usr/local/go/bin/go.

Next, we need to tell our system where to find the Go binary file. To do this, we need to set the PATH environment variable. We need to add a path to the ~/.profile or ~/.bashrc file for the current user.

# nano ~/.profile

Then, append these lines to the file:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Don’t forget to save the file and then load the new PATH variables into the current shell by running the following command.

# source ~/.profile

At this point, you can simply type ‘go’ every time you need to call /usr/local/bin/go. For example, let’s check the Go version:

# go version

The version of Go installed on your Ubuntu system will be displayed on the terminal. It will show you an output like this:

go version go1.21.0 linux/amd64

Step 3. Use Go

Once Go is downloaded and configured, it is time to test it. In this case, we will run a simple code written in the Go language to check if the environment is working on our Ubuntu 22.04 system. Let’s create a file.

# nano sample.go

Then, insert the following into the file.

package main
import "fmt"
func main() {
fmt.Printf("Hello World\n")
}

Save the file, then exit. Next, execute this command to run the script.

# go run sample.go

The command will return an output like this:

That’s it. You have successfully installed Go on your Ubuntu 22.04 system.

Of course, you don’t need to install Go on Ubuntu 22.04 VPS if you are using one of our Ubuntu VPS plans, which you can ask Linux experts to install Go on Ubuntu 22.04 system for you. Our administrators are available 24/7 and will start working on your request immediately; always trust our epic support.

PS. If you liked this article on how to install Go on Ubuntu 22.04, share it with your friends on social media or leave a comment in the comment section.

The post How to Install Go on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/feed/ 1
How to Install Contao on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/#comments Sat, 30 Sep 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1873 Contao is a robust open-source content management system that is user-friendly, instinctive, and adaptable, and it enables you to develop websites in various languages and designs. Contao can also be incorporated into a standard Symfony application. In this guide, we will demonstrate how to set up Contao on Ubuntu 22.04. Prerequisites Step 1. Log in […]

The post How to Install Contao on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Contao is a robust open-source content management system that is user-friendly, instinctive, and adaptable, and it enables you to develop websites in various languages and designs.

Contao can also be incorporated into a standard Symfony application. In this guide, we will demonstrate how to set up Contao on Ubuntu 22.04.

Prerequisites

  • An Ubuntu 22.04 VPS
  • SSH root access or a regular system user with sudo privileges

Step 1. Log in via SSH

Let’s log in to your Ubuntu 22.04 VPS with SSH as a root user or as a regular user with sudo privileges.

ssh root@IP_Address -p Port_number

If you cannot log in as root, remember to replace “root” with a user that has sudo privileges. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port.

You can check whether you have the correct Ubuntu version installed on your server with the following command:

# lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Step 2. Install and Configure Apache

Contao was initially created for the well-known LAMP stack, but it can operate on any web server that offers an up-to-date edition of PHP and MySQL. In this step, we are going to install Apache as the webserver. Let’s install Apache now.

# apt install apache2

On Ubuntu machines, Apache will automatically start upon installation. To verify this, you can execute the command below.

# systemctl status apache2

You will see the status there, apache is functioning.

Contao requires mod_rewrite, and the rewrite module is not enabled by default, let’s enable it now.

# a2enmod rewrite

After enabling a module, we need to restart apache to activate the new configuration.

# systemctl restart apache2

Now, let’s create two directories for our Contao installation.

# mkdir -p /var/www/html/yourdomain.com/{web,contao-manager}

Then, let’s give them the appropriate permission.

# chown -R www-data. /var/www/html/yourdomain.com/

The next step is to create an apache virtual host.

# nano /etc/apache2/sites-available/yourdomain.com.conf

Then add the following in to the file

<VirtualHost *:80>

ServerAdmin admin@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/html/yourdomain.com/web

ErrorLog ${APACHE_LOG_DIR}/yourdomain.com_error.log
CustomLog ${APACHE_LOG_DIR}/domain2.com_access.log combined

<Directory  /var/www/html/yourdomain.com/web>
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

Save the file, then exit. Make sure to replace yourdomain.com with your actual domain name or subdomain name pointing to your server.

Once the virtual host is added, we need to activate it.

# a2ensite yourdomain.com

Then, restart or reload apache

# systemctl restart apache2

Step 3. Install MariaDB Server

Contao supports MySQL server version 8.0+ or equivalent MariaDB server. In this step, we are going to install the MariaDB server from the default Ubuntu repository. To install the MariaDB server, execute this command below:

# apt install mariadb-server

That’s it, the MariaDB server should be up and running now.

Step 4. Create a Database

After installing the MariaDB server on an Ubuntu system, the MariaDB server will run automatically. Therefore, we can now create a new database and database user for our Contao website. Let’s log in to MySQL shell as root users and create a database for our Contao website.

# mysql

Once logged in to MySQL shell, we can run the following commands.

mysql> CREATE DATABASE contao;
mysql> GRANT ALL on contao.* to contao@localhost identified by 'm0d1fyth15';
mysql> FLUSH PRIVILEGES;
mysql> \q

Make sure to create a more complicated database password, and replace m0d1fyth15 in the command above with a more secure one.

The next step is optional but highly recommended. We need to create a password for our MySQL root user. Let’s invoke this command to proceed.

Step 5. Install Composer

Contao utilizes Composer, a tool for managing dependencies, as the officially endorsed approach for installation. Let’s execute the following command below to download the Composer installer using wget command:

# wget -O composer-setup.php https://getcomposer.org/installer

Once downloaded, we need to execute the following command to install and setup composer on our Ubuntu machine:

# php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Verify the installation and check the installed build version of Composer:

# composer -V

The command above will return an output like this.

Composer version 2.5.8 2023-06-09 17:13:21

Step 6. Install PHP

Contao requires at least PHP 7.4, and specifically for Contao 5, PHP Version 8.1.0 or higher is required. On the Ubuntu 22.04 system, PHP 8.1 is the lowest version we can install. Let’s install PHP and its extensions from the Ubuntu repository.

# apt install php-{xml,pear,intl,common,json,curl,mbstring,mysql,gd,imagick,zip,opcache} libapache2-mod-php

Step 7. Install Contao

There are two methods to install Contao on your server, using Contao Manager and using the command line. In this tutorial, we will show you how to install Contao using Contao Manager.

First, let’s enter /var/www/html/domain1.com/web

# cd /var/www/html/domain1.com/web
# sudo -u www-data wget https://download.contao.org/contao-manager/stable/contao-manager.phar -O contao-manager.phar.php

Navigate to http://yourdomain.com/contao-manager.phar.php

Click on Create Account button

Click on the Setup button to install Contao

Click on Get Started button

Click Continue

Select distribution, we are going to install version 5.1; click Install

Please wait while the Contao Manager is running task operations in the background.

Once completed, you will be presented with a database configuration page.

Please fill the forms with the database details we created in the previous step in this tutorial. , make sure to choose MariaDB in the Server Version dropdown menu. Click the Save button to save the config.

Click on Check database

Now, click on the Execute button to create database tables, and once completed, click on the Confirm & Close button.

You will be brought to this page

Click on Continue to create a new account

Click on Add Account

That’s it! You have installed Contao on Ubuntu 22.04. You can click on Login to Contao to start using Contao

Login using the account credentials you created a moment ago.

You are logged in now, and you can start customizing your Contao website.

Congratulations! You have successfully installed Contao on Ubuntu 22.04.

Of course, if you are one of our Ubuntu Hosting customers, you don’t have to install Contao on Ubuntu 22.04 yourself – simply ask our admins, sit back, and relax. Our admins will install Contao on Ubuntu 22.04 for you immediately without any additional fee, along with many useful optimizations that we can do for you. Managing a Contao-based website is not just about the installation; we can help you with optimizing your Contao installation if you have an active VPS with us.

If you liked this post about how to install Contao on Ubuntu 22.04, please share it with your friends on social networks or simply leave a comment in the comments section. Thanks.

The post How to Install Contao on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/feed/ 2
How to Install Akaunting on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-akaunting-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-akaunting-on-ubuntu-22-04/#respond Fri, 15 Sep 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1864 Akaunting is a free and open-source software written in PHP using the Laravel framework and modern technologies such as VueJS, Tailwind, RESTful API and etc. The information is stored in MySQL database service, and for web servers, we can use Nginx, Apache, or LiteSpeed. In this blog post, we will install Akaunting with the LAMP […]

The post How to Install Akaunting on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Akaunting is a free and open-source software written in PHP using the Laravel framework and modern technologies such as VueJS, Tailwind, RESTful API and etc.

The information is stored in MySQL database service, and for web servers, we can use Nginx, Apache, or LiteSpeed. In this blog post, we will install Akaunting with the LAMP stack.

Installing Akaunting with LAMP stack on Ubuntu 22.04 is a straightforward process that may take up to 15 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges
  • A valid domain with pointed A record to the server IP address

Step 1. Update the System

Before we start with the installation of the LAMP stack and Akaunting, we will update the system packages to their latest versions available.

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install LAMP Stack

First, we will install the Apache Web server.

sudo apt-get install apache2 -y

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

oot@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-05 05:16:02 CDT; 1s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 70629 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 70633 (apache2)
      Tasks: 6 (limit: 4557)
     Memory: 13.6M
        CPU: 140ms
     CGroup: /system.slice/apache2.service

Next, we will install PHP8.1 with its extensions:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl php8.1-mysqli php8.1-intl php8.1-bcmath php8.1-gd libapache2-mod-php -y

To check the installed PHP version execute the php -v command:

root@host:~# php -v
Created directory: /var/lib/snmp/cert_indexes
PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.13, Copyright (c), by Zend Technologies

The last of the LAMP stack is the MariaDB database service:

sudo apt-get install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-05 05:19:21 CDT; 15s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 75849 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 4557)
     Memory: 61.3M
        CPU: 786ms
     CGroup: /system.slice/mariadb.service
             └─75849 /usr/sbin/mariadbd

Step 3. Create an Akaunting database and user

Next, we need to create an Akaunting database, the Akaunting user, and grant the permissions for that user to the database.

 CREATE USER 'akaunting'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE akaunting;
 GRANT ALL PRIVILEGES ON akaunting.* TO 'akaunting'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

Step 4. Download and install Akaunting

Before we install Akaunting, we first need to download it in the default Apache document root:

cd /var/www/html

wget -O Akaunting.zip https://akaunting.com/download.php?version=latest

unzip Akaunting.zip

rm Akaunting.zip

Set the right permissions to files and folders.

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

cd /var/www/html

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

Step 5. Create Apache Virtual Host File

Go into the Apache directory and create a configuration file for the Akaunting.

cd /etc/apache2/sites-available/

touch akaunting.conf

Open the file, paste the following lines of code, save the file and close it.

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html

<Directory /var/www/html/>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Enable the Apache configuration for Akaunting and rewrite the module.

sudo a2enmod rewrite

sudo a2ensite akaunting.conf

Check the syntax:

apachectl -t

You should receive the following output:

root@vps:~# apachectl -t
Syntax OK

If the syntax is OK, restart the Apache service.

systemctl reload apache2

Once the Apache service is restarted, you can finish the Akaunting installation at http://yourdomain.com

Step 6. Finish the Installation

On the first screen, choose your language and click on the Next button.

On the next screen, enter the database credentials you created in one of the previous steps:

Then create your company email and login credentials:

Once done, log in to the Akaunting dashboard.

Once logged in, you can click on Skip this step:

Add your currency and click on the Next button:

On the next window, click on the Skip this step, and you will be automatically redirected to the Akaunting Dashboard.

That was all. You successfully installed and configured Akaunting on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our NVMe VPS plans and submit a support ticket. Our admins are available 24/7 and will start to work on your request immediately. Always trust our epic support.

If you liked this post on how to install Akaunting on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Akaunting on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-akaunting-on-ubuntu-22-04/feed/ 0
How to Install Anaconda on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/#respond Tue, 15 Aug 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1854 Anaconda is an open-source environment and package manager, also a distribution of the Python programming language specifically designed for data science and machine learning tasks. One of the main advantages of Anaconda is its extensive library support. It includes popular libraries such as NumPy, Pandas, SciPy, Matplotlib, scikit-learn, and many others. These libraries are widely […]

The post How to Install Anaconda on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Anaconda is an open-source environment and package manager, also a distribution of the Python programming language specifically designed for data science and machine learning tasks.

One of the main advantages of Anaconda is its extensive library support. It includes popular libraries such as NumPy, Pandas, SciPy, Matplotlib, scikit-learn, and many others.

These libraries are widely used for numerical computing, data manipulation, visualization, machine learning, and other data-related tasks. Another key feature of Anaconda is its support for creating isolated environments. Environments allow you to create separate Python environments with specific versions of Python and libraries, ensuring project reproducibility and avoiding conflicts between different packages and versions. This feature is particularly useful when working on multiple projects with different requirements.

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Download the Anaconda installer

To download Anaconda from the anaconda repo, you can use the following command:

$ wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh

Please note, at the time of writing this article, the 2023.03-1 was the latest anaconda version available; you can check for the latest version at the anaconda repo.

Now you can rename the installation script to a shorter name, for example, anaconda.sh:

$ mv Anaconda3-2023.03-1-Linux-x86_64.sh anaconda.sh

To check the integrity of this installer file, you can use the following command for hash verification with SHA-256 checksum:

$ sha256sum anaconda.sh

95102d7c732411f1458a20bdf47e4c1b0b6c8a21a2edfe4052ca370aaae57bab anaconda.sh

The installer file is verified; now, you are ready to run the installer.

Step 2. Install Anaconda

To start the anaconda installation, run the command below in the directory where you downloaded the installer:

$ bash anaconda.sh

You will receive this output with several questions, which you should confirm and choose the location where you want to install Anaconda.

Welcome to Anaconda3 20223.03

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue

You can press ENTER to continue the installation, next you will have go through the license and approve the license terms with yes:

The next step is to specify the location for the anaconda3 installation, you enter a new location or use the default one.

Anaconda3 will now be installed into this location:
/home/user/anaconda3

Press ENTER to confirm the location

Press CTRL-C to abort the installation

Or specify a different location below

[/home/user/anaconda3] >>>

Once the installation is completed, you can use the following command to activate the installation:

$ source ~/.bashrc

Step 3. Using Anaconda

Anaconda has its own package manager called “conda,” which allows users to install, update, and manage packages and dependencies easily. Conda helps to ensure that all the required libraries and dependencies for a particular project are installed correctly and compatible, thus simplifying the setup process.
To list installed packages, you can type:

$ conda list

To install new Python packages, use conda install and the name of the package:

(base) user@server:$ conda install numpy

You should receive the following output:


Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: /home/ec2-user/anaconda3

added / updated specs:
- numpy

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
intel-openmp-2023.1.0      |   hdb19cb5_46305        17.1 MB
mkl-2023.1.0               |   h6d00ec8_46342       171.5 MB
mkl-service-2.4.0          |  py310h5eee18b_1          54 KB
mkl_fft-1.3.6              |  py310h1128e8f_1         207 KB
mkl_random-1.2.2           |  py310h1128e8f_1         284 KB
numpy-1.24.3               |  py310h5f9d8c6_1          11 KB
numpy-base-1.24.3          |  py310hb5e798b_1         6.2 MB
tbb-2021.8.0               |       hdb19cb5_0         1.6 MB
------------------------------------------------------------
                                       Total:       197.1 MB

The following NEW packages will be INSTALLED:

blas pkgs/main/linux-64::blas-1.0-mkl
intel-openmp pkgs/main/linux-64::intel-openmp-2023.1.0-hdb19cb5_46305
mkl pkgs/main/linux-64::mkl-2023.1.0-h6d00ec8_46342
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py310h5eee18b_1
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.6-py310h1128e8f_1
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py310h1128e8f_1
numpy pkgs/main/linux-64::numpy-1.24.3-py310h5f9d8c6_1
numpy-base pkgs/main/linux-64::numpy-base-1.24.3-py310hb5e798b_1
tbb pkgs/main/linux-64::tbb-2021.8.0-hdb19cb5_0

Proceed ([y]/n)? y

This will install the new conda package. You can also use the pip command to install some python packages or check the already installed python packages with pip list.

You can easily create Anaconda Environments using the following command:

$ conda create --name new-env

To specify which version you want python to be in this conda environment, you can use the command:

$ conda create -n env38 python=3.8

Once the environment has been created, you can activate it with the command:

$ conda activate env38

If you now check the Python version, you will notice that it is the Python 3.8 version, the one you specified previously.

$ python3 --version
Python 3.8.16

You can exit this environment with the command:

$ conda deactivate

Congratulations! You successfully installed Anaconda on Ubuntu 22.04. If you have any difficulties with the installation process, you can contact our technical support, and they will install and configure Anaconda for you. We are available 24/7. All you need to do is sign up for one of our NVMe VPS plans and submit a support ticket.

The post How to Install Anaconda on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/feed/ 0
How to Install and Switch Python Versions on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-22-04/#comments Sun, 30 Jul 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1840 In this tutorial, we are going to explain in step-by-step detail how to install multiple Python versions on Ubuntu 22.04 Python is a high-level, general-purpose programming language compatible with different operating systems such as MacOS, Windows, Linux and etc. In this blog post, we will focus on installing Python in the Linux distributions. Also, sometimes […]

The post How to Install and Switch Python Versions on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install multiple Python versions on Ubuntu 22.04

Python is a high-level, general-purpose programming language compatible with different operating systems such as MacOS, Windows, Linux and etc.

In this blog post, we will focus on installing Python in the Linux distributions. Also, sometimes on one Linux server, it is necessary to be installed multiple Python versions. This tutorial will teach you about installation and changing between different versions.

Installing multiple Python versions on Ubuntu 22.04 is a very easy and straightforward process that may take up to 15 minutes. Let’s get things done!

Prerequisites

  • Fresh install of Ubuntu 20.04
  • User privileges: root or non-root user with sudo privileges

Update the System

Every fresh installation of the operating system needs the packages to be updated to the latest versions available.

sudo apt update -y && sudo apt upgrade -y

Step 1. Install Python 3.10

We will start with the latest version available in the default repository of Ubuntu 22.04. To install python3.10 execute the following command:

sudo apt install python3.10 -y

To check the installed version, execute the command python3.10 -V. You should receive the following output:

root@host:~# python3.10 -V
Python 3.10.6

Step 2. Install Python 3.8

The second Python version on our list will be Python 3.8. To install it, execute the following command:

sudo apt install python3.8 -y

To check the installed version, execute the command python3.8 -V. You should receive the following output:

root@host:~# python3.8 -V
Python 3.8.16

Step 3. Install Python 3.6

The third Python version will be the Python 3.6 version. Let’s execute the following command:

sudo apt install python3.6 -y

As you noticed, the installation process failed with the following message:

root@host:~# sudo apt install python3.6 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by glob 'python3.6'

This means that Python3.6 is not in the default repository of Ubuntu 22.04. We will need to download the build from the source. To do that, execute the following command:

cd /opt

wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz

tar xfv Python-3.6.9.tgz

cd /Python-3.6.9

Before we proceed with installation, we need to install the prerequisites for the older Python versions:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev libgdbm-dev libnss3-dev libedit-dev libc6-dev

After all these preparations, we can finally build and install it with the following commands:

./configure --enable-optimizations

sudo make altinstall

To check the installed version, execute the command python3.6 -V. You should receive the following output:

root@host:/opt/Python-3.6.9# python3.6 -V
Python 3.6.9

Step 4. Install Python 3.5

The last version of Python in this blog post will be the Python3.5 version. We will download and install the same way as the Python3.6

cd /opt

wget https://www.python.org/ftp/python/3.5.10/Python-3.5.10.tgz

tar xfv Python-3.5.10.tgz

cd Python-3.5.10/

./configure --enable-optimizations

sudo make altinstall

To check the installed version, execute the command python3.5 -V. You should receive the following output:

root@host:/opt/Python-3.5.10# python3.5 -V
Python 3.5.10

Step 5. Switch between Python versions

In the last step of this tutorial, we are going to explain how you can switch between different Python versions. First, you need to know that the newer Python versions installed from the default repository are located in the /usr/bin directory on the server, while the older versions built from the source are located in /usr/local/bin directory.

We need to create symbolic links for every installed Python version, including the path of the installed Python version. Execute the following commands one by one:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.6 3
sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.5 4

Your command line should look like this:

root@host:/# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
update-alternatives: using /usr/bin/python3.10 to provide /usr/bin/python (python) in auto mode
root@host:/opt/Python-3.6.9# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
update-alternatives: using /usr/bin/python3.8 to provide /usr/bin/python (python) in auto mode
root@host:/opt/Python-3.6.9# sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.6 3
update-alternatives: renaming python link from /usr/bin/python to /usr/local/bin/python
update-alternatives: using /usr/local/bin/python3.6 to provide /usr/local/bin/python (python) in auto mode
root@host:/opt/Python-3.6.9# sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.5 4
update-alternatives: using /usr/local/bin/python3.5 to provide /usr/local/bin/python (python) in auto mode

To list and choose which Python version should be active, execute the following command:

sudo update-alternatives --config python

The output should look like this:

root@host:/# sudo update-alternatives --config python
There are 4 choices for the alternative python (providing /usr/local/bin/python).

  Selection    Path                      Priority   Status
------------------------------------------------------------
* 0            /usr/local/bin/python3.5   4         auto mode
  1            /usr/bin/python3.10        1         manual mode
  2            /usr/bin/python3.8         2         manual mode
  3            /usr/local/bin/python3.5   4         manual mode
  4            /usr/local/bin/python3.6   3         manual mode

You can enter any number and use that Python version. For example, we choose the Python3.10 by entering the number 1

Execute the command sudo update-alternatives –config python again, and you will notice the changed version:

root@host:/# sudo update-alternatives --config python
There are 4 choices for the alternative python (providing /usr/local/bin/python).

  Selection    Path                      Priority   Status
------------------------------------------------------------
  0            /usr/local/bin/python3.5   4         auto mode
* 1            /usr/bin/python3.10        1         manual mode
  2            /usr/bin/python3.8         2         manual mode
  3            /usr/local/bin/python3.5   4         manual mode
  4            /usr/local/bin/python3.6   3         manual mode

Congratulations! You successfully installed multiple Python versions on your system and learned how to switch them. Of course, you do not have to do this by yourself. You can contact our technical support, and the admins will help you with any aspect of the installation and configuration of Python versions. We are available 24/7.

If you liked this post on how to Install and Switch Python Versions in Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install and Switch Python Versions on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-22-04/feed/ 7
How to Install Icinga 2 on Ubuntu https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/ https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/#comments Fri, 30 Jun 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1799 In this tutorial, we are going to explain in step-by-step detail how to install Icinga 2 on Ubuntu 22.04 Icinga is a free and open-source monitoring tool used for sending alerts when failures occur on the servers. Icinga is written in C++ and PHP and stores the information in the MySQL database. It offers many […]

The post How to Install Icinga 2 on Ubuntu appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install Icinga 2 on Ubuntu 22.04

Icinga is a free and open-source monitoring tool used for sending alerts when failures occur on the servers. Icinga is written in C++ and PHP and stores the information in the MySQL database. It offers many features, such as modern user interface database connectors for MySQL, PostgreSQL, Oracle, REST API, etc. In this blog post, we will install Icinga 2 with the LAMP stack.

Installing Icinga 2 with LAMP stack is a process that may take up to 30 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start to install the software, we need to update the system packages to the latest versions available.

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install LAMP stack

First of the LAMP stack is the Apache Web server. To install it execute the following command:

sudo apt install apache2 -y

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-04-22 18:00:43 CDT; 17min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 792 (apache2)
      Tasks: 7 (limit: 4571)
     Memory: 22.5M
        CPU: 246ms
     CGroup: /system.slice/apache2.service

Next is PHP, along with its extensions. To install the PHP8.1 along with extensions, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl libapache2-mod-php

The last of the LAMP stack is the MariaDB database server. To install it execute the command below.

sudo apt install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-04-22 18:19:53 CDT; 9s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 5829 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 16 (limit: 4571)
     Memory: 61.4M
        CPU: 514ms
     CGroup: /system.slice/mariadb.service
             └─5829 /usr/sbin/mariadbd

Step 3. Install Icinga 2

First, we will add the GPG key, and will create a repository:

wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg

. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list

Update the system and install Icinga2

sudo apt update -y

sudo apt install icinga2 -y

After installation, start and enable the icinga2 service.

sudo systemctl start icinga2 && sudo systemctl enable icinga2

Check the status of Icinga 2:

sudo systemctl status icinga2

You should get the following output:

root@host:~# sudo systemctl status icinga2
● icinga2.service - Icinga host/service/network monitoring system
     Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/icinga2.service.d
             └─limits.conf
     Active: active (running) since Sat 2023-04-22 19:06:11 CDT; 4min 35s ago
   Main PID: 11632 (icinga2)
     Status: "Startup finished."
      Tasks: 16
     Memory: 14.3M
        CPU: 435ms
     CGroup: /system.slice/icinga2.service

Step 4. Install the Icinga2 IDO Module

To install the Icinga2 IDO module, execute the following command:

sudo apt install icinga2-ido-mysql -y

While installing, choose Yes on both windows. It is about Icinga2 using MySQL.

After this, we need to create an icinga2-ido-mysql database with the following commands:

CREATE DATABASE icinga_ido_db;
GRANT ALL ON icinga_ido_db.* TO 'icinga_ido_db'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
FLUSH PRIVILEGES;
EXIT;

Once the database is created, import the Icinga2 IDO schema with the following command:

sudo mysql -u root -p icinga_ido_db < /usr/share/icinga2-ido-mysql/schema/mysql.sql

Once the schema is imported, the next is to enable the Icinga2 IDO module:

nano /etc/icinga2/features-available/ido-mysql.conf

Paste the following lines of code:

/**
 * The db_ido_mysql library implements IDO functionality
 * for MySQL.
 */

library "db_ido_mysql"

object IdoMysqlConnection "ido-mysql" {
  user = "icinga_ido_db",
  password = "YourStrongPasswordHere",
  host = "localhost",
  database = "icinga_ido_db"
}

Save the file, close it and enable the Icinga2-ido-mysql with the following command:

sudo icinga2 feature enable ido-mysql

After this restart the Icinga2 service:

systemctl restart icinga2

Step 5. Install and Setup IcingaWeb2

To install Icinga Web execute the following commands:

sudo apt install icingaweb2 icingacli -y

Next is to create a second database for the Icinga web:

CREATE DATABASE icingaweb2;
GRANT ALL ON icingaweb2.* TO 'icingaweb2'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
FLUSH PRIVILEGES;
EXIT;

Next, we need to create an Icinga token:

root@host:~# sudo icingacli setup token create
The newly generated setup token is: dd3a1a8b218be0db

That was all with installing Icinga via the command line. The last step is about finishing the Icinga installation.

Step 6. Finish Icinga Installation

To finish the Icinga installation, you need to access it at http://YourServerIPaddress/icingaweb2/setup.

Enter the token, and follow the pictures if you want to finish the installation:

Set Administrative user and password:

The last is to set up Icinga2 IDO credentials you set before in Step 4.

Congratulations! You successfully installed and configured Icinga2 on Ubuntu 22.04. If you find any difficulties with installing Icinga 2, you can always contact our technical support. All you have to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7.

If you liked this post about installing Icinga2 on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below.

The post How to Install Icinga 2 on Ubuntu appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/feed/ 3
How to Install ProcessWire CMS on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-processwire-cms-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-processwire-cms-on-ubuntu-22-04/#respond Thu, 15 Jun 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1797 In this tutorial, we will show you how to install ProcessWire CMS on Ubuntu 22.04 OS. ProcessWire is a free, open-source content management system written in PHP. It offers many features such as jQuery-styled API, scaling, templates, multi languages, drag-and-drop page lists, and many more that are largely used for developing websites and applications. ProcessWire […]

The post How to Install ProcessWire CMS on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install ProcessWire CMS on Ubuntu 22.04 OS.

ProcessWire is a free, open-source content management system written in PHP. It offers many features such as jQuery-styled API, scaling, templates, multi languages, drag-and-drop page lists, and many more that are largely used for developing websites and applications. ProcessWire stores the data in the MySQL database server, and in this installation, we will install the ProcessWire CMS with the LAMP stack.

Installing ProcessWire CMS on Ubuntu 22.04 with LAMP stack is a straightforward process that may take up to 15 minutes. Let’s get things done!

Prerequisites

  • A server with Ubuntu 22.04 OS
  • A valid domain with pointed A record to the server IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

It is recommended to have a fresh installation of Ubuntu 22.04 for this setup. After every fresh installation of the OS, we need to update the system packages to the latest versions available.

sudo apt update -y && sudo apt upgrade -y

Step 2. Install Apache Web Server

To install the Apache Web server execute the following command:

sudo apt install apache2

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-05-04 11:02:35 CDT; 4min 53s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 446641 (apache2)
      Tasks: 6 (limit: 4571)
     Memory: 16.8M
        CPU: 558ms
     CGroup: /system.slice/apache2.service

Step 3. Install PHP8 with dependencies

To install the PHP8.1 along with extensions, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl libapache2-mod-php

To check the installed PHP version, execute the following command:

php -v

You should receive the following output:

root@host:~# php -v
PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies

Step 4. Install the MariaDB database server

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-05-04 11:06:40 CDT; 5min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 458296 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 458297 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 458299 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl >
    Process: 458481 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 458485 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 458336 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 11 (limit: 4571)

Step 5. Create ProcessWire database and user

Next, we need to create a ProcessWire database, the ProcessWire user, and grant the permissions for that user to the database.

 CREATE USER 'processwire'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE processwire;
 GRANT ALL PRIVILEGES ON processwire.* TO 'processwire'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

Step 6. Download and Install ProcessWire

Before we install ProcessWire, we first need to download it in the default Apache document root:

cd /var/www/html

wget https://github.com/processwire/processwire/archive/master.zip

unzip master.zip

mv processwire-master/ processwire/

Set the right permissions to files and folders.

chown -R www-data:www-data processwire/

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

Step 7. Create Apache Virtual Host File

Go into the Apache directory and create a configuration file for the ProcessWire CMS.

cd /etc/apache2/sites-available/

touch processwire.conf

Open the file, paste the following lines of code, save the file and close it.

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/processwire

<Directory /var/www/html/processwire>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Enable the Apache configuration for ProcessWire and rewrite module.

sudo a2enmod rewrite

sudo a2ensite processwire.conf

Check the syntax:

apachectl -t

You should receive the following output:

root@vps:~# apachectl -t
Syntax OK

If the syntax is OK, restart the Apache service.

systemctl reload apache2

Once the Apache service is restarted, you can finish the ProcessWire installation at http://yourdomain.com

Step 8. Finish ProcessWire installation

On the first window, click Get Started

On the next window, choose Blank

The third window is for configuration check:

Next, is to fill in the database credentials you set in Step 5

After successful database credentials, hit Continue, and you should see the following screen:

Scroll down and enter your admin credentials for future use:

Once done, the installation process will finish, and you will be able to login to the Admin dashboard

That was all. You successfully installed and configured ProcessWire CMS on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our NVMe VPS plans and submit a support ticket. Our admins are available 24/7 and will start work on your request immediately. Always trust our epic support.

If you liked this post on installing ProcessWire CMS on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install ProcessWire CMS on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-processwire-cms-on-ubuntu-22-04/feed/ 0
How to Install GitLab on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-gitlab-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-gitlab-on-almalinux-9/#respond Sun, 30 Apr 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1774 In this tutorial we are going to show you in step-by-step detail how to install Gitlab on AlmaLinux 9 OS. GitLab is open-source software written in Ruby, Go and JavaScript operated by GitLab Inc. GitLab offers a wide range of features such as CI/CD (Continous Integration, Continous Delivery) which makes the work of developers and […]

The post How to Install GitLab on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to show you in step-by-step detail how to install Gitlab on AlmaLinux 9 OS.

GitLab is open-source software written in Ruby, Go and JavaScript operated by GitLab Inc. GitLab offers a wide range of features such as CI/CD (Continous Integration, Continous Delivery) which makes the work of developers and administrators straightforward and simple.

Installing GitLab on AlmaLinux 9 is a straightforward process that may take up to 10 minutes. Let’s get started!

Prerequisites

  • A VPS with at least 4GB of RAM (Our NVMe 4 VPS plan)
  • Fresh install of AlmaLinux 9 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Update the system packages to their latest version available before installing anything on a fresh server.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install GitLab Dependencies

To install GitLab required package dependencies execute the following command:

sudo dnf install curl python3-policycoreutils git policycoreutils libxcrypt-compat gnupg2 git-core zlib zlib-devel gcc-c++ patch readline readline-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl tar sqlite-devel ruby ruby-devel -y

Step 3. Add GitLab Repository

First we will add the GitLab repo since it is not added by default in the AlmaLinux 9. Open the file /etc/yum.repos.d/gitlab_gitlab-ce.repo with your favorite editor and paste the following lines of code:

[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
       https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[gitlab_gitlab-ce-source]

name=gitlab_gitlab-ce-source baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/SRPMS repo_gpgcheck=1 gpgcheck=1 enabled=1 gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300

Save the file, close it and update the system

sudo dnf update -y

Step 4. Install GitLab

Now, when the repo is added we can install GitLab with the following command:

sudo dnf install gitlab-ce -y

After successfull installation start the GitLab service:

sudo gitlab-ctl start

You should receive the following output:

[root@host]# sudo gitlab-ctl stop
ok: down: alertmanager: 0s, normally up, want up
ok: down: gitaly: 0s, normally up
ok: down: gitlab-exporter: 0s, normally up
ok: down: gitlab-kas: 0s, normally up
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 1s, normally up
ok: down: nginx: 0s, normally up
ok: down: node-exporter: 1s, normally up
ok: down: postgres-exporter: 0s, normally up
ok: down: postgresql: 0s, normally up
ok: down: prometheus: 1s, normally up
ok: down: puma: 0s, normally up
ok: down: redis: 1s, normally up
ok: down: redis-exporter: 0s, normally up
ok: down: sidekiq: 0s, normally up
[root@host gems]# sudo gitlab-ctl start
ok: run: alertmanager: (pid 53445) 0s
ok: run: gitaly: (pid 53452) 0s
ok: run: gitlab-exporter: (pid 53469) 1s
ok: run: gitlab-kas: (pid 53473) 0s
ok: run: gitlab-workhorse: (pid 53490) 1s
ok: run: logrotate: (pid 53499) 0s
ok: run: nginx: (pid 53512) 0s
ok: run: node-exporter: (pid 53514) 1s
ok: run: postgres-exporter: (pid 53520) 0s
ok: run: postgresql: (pid 53534) 1s
ok: run: prometheus: (pid 53543) 0s
ok: run: puma: (pid 53559) 1s
ok: run: redis: (pid 53567) 0s
ok: run: redis-exporter: (pid 53573) 0s
ok: run: sidekiq: (pid 53587) 1s

To check the status of GitLab service execute the following command:

sudo gitlab-ctl status

You should receive the following output:

[root@host]# sudo gitlab-ctl status
down: alertmanager: 1s, normally up, want up; run: log: (pid 14903) 3685s
run: gitaly: (pid 53452) 33s; run: log: (pid 14315) 3889s
run: gitlab-exporter: (pid 53469) 33s; run: log: (pid 14808) 3703s
run: gitlab-kas: (pid 53473) 32s; run: log: (pid 14582) 3864s
run: gitlab-workhorse: (pid 53490) 32s; run: log: (pid 14731) 3724s
run: logrotate: (pid 53499) 31s; run: log: (pid 14247) 3905s
run: nginx: (pid 53893) 1s; run: log: (pid 14743) 3718s
run: node-exporter: (pid 53514) 31s; run: log: (pid 14785) 3710s
run: postgres-exporter: (pid 53520) 30s; run: log: (pid 14956) 3680s
run: postgresql: (pid 53534) 30s; run: log: (pid 14457) 3873s
run: prometheus: (pid 53543) 29s; run: log: (pid 14865) 3692s
run: puma: (pid 53559) 29s; run: log: (pid 14666) 3736s
run: redis: (pid 53567) 28s; run: log: (pid 14283) 3896s
run: redis-exporter: (pid 53573) 28s; run: log: (pid 14838) 3697s
run: sidekiq: (pid 53587) 28s; run: log: (pid 14683) 3732s

To check the GitLab ports execute the following command:

netstat -tunlp | grep gitlab

You should receive the following output:

[root@host]# netstat -tunlp | grep gitlab
tcp6       0      0 ::1:8153                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8155                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8154                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8151                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8150                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:9229                :::*                    LISTEN      53490/gitlab-workho

Step 5. Access GitLab with Domain

To access the GitLab in the browser via domain name, you need to configure it in the following file: /etc/gitlab/gitlab.rb.

Open it with your favore browser and edit the following lines by entering your domain name and setting your strong root password:

external_url 'http://YourDomainHere'

gitlab_rails['initial_root_password'] = 'YourStrongPasswordHere'

Save the file, close it and execute the following command:

gitlab-ctl reconfigure

After reconfiguring the application you can access GitLab at http://YourDomain using the root as username and your strong password you set above.

Congratulations! You successfully installed and configured GitLab on AlmaLinux 9 OS. If you have any difficulties completing this setup, feel free to contact our technical support and they will help you in no time. We are available 24/7. All you need to do is to sign up for one of our NVMe VPS plans and submit a support ticket.

If you liked this post on how to install GitLab on AlmaLinux 9, please share it with your friends on the social networks or simply leave a reply below. Thanks.

The post How to Install GitLab on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-gitlab-on-almalinux-9/feed/ 0
How To Install Plausible Analytics on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-plausible-analytics-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-plausible-analytics-on-ubuntu-22-04/#respond Tue, 28 Feb 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1764 Plausible Analytics is a free and open-source, self-hosted web analytics application that helps you to track your website visitors. It is a simple analytics alternative to Google Analytics. In this tutorial, we will install Plausible in a docker container and then install Apache as a reverse proxy for Plausible Analytics. Prerequisites Step 1. Log in […]

The post How To Install Plausible Analytics on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Plausible Analytics is a free and open-source, self-hosted web analytics application that helps you to track your website visitors. It is a simple analytics alternative to Google Analytics.

In this tutorial, we will install Plausible in a docker container and then install Apache as a reverse proxy for Plausible Analytics.

Prerequisites

  • An Ubuntu 22.04 VPS
  • Full SSH root access or a user with sudo privileges is required

Step 1. Log in to the server and update

Login to your Ubuntu 22.04 VPS via SSH. In this article, we will use ‘root’ to run the shell commands.

If you want to use your regular system user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

# ssh root@IP_Address -p Port_Number

You need to replace “IP_Address” and “Port_number” with your server’s IP address and SSH port number.

We can run these commands to ensure that all installed packages are up to date.

# apt update
# apt upgrade

Step 2. Install Docker CE and Docker Compose

By default, the latest Docker CE package is not available in the Ubuntu 22.04 default repository, so you will need to add the Docker CE official repository to your server.

Use the following command to install the dependencies or pre-requisite packages.

# apt-get install git apt-transport-https ca-certificates curl software-properties-common -y

Then, add the GPG key and repository with the following commands:

# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Now you can install Docker and Docker Compose with the following command:

# apt update
# apt-get install docker-ce docker-compose

Verify the Docker version with the following command:

# docker --version

Output:

Docker version 20.10.21, build baeda1f

Step 3. Download Plausible

Next, you need to clone the Plausible repository from the GitHub repository. To do this, go to the /opt directory with the following command:

# cd /opt

Then, you can download it with the following command:

# git clone https://github.com/plausible/hosting plausible

Now move into the new directory that you have created:

# cd plausible

Generate a secrete password with the following command:

# openssl rand 64 | base64 -w 0 ; echo

This command will create 64 random characters:

VSqCkxxFh0lQAcKgM+NmLzya28kbAr++FBL8b6qUxtAi9AeGScacv+fSGfYBqHiAVevv3H70qIJML1MabF+Klg==

Copy them, then open the Plausible configuration file with your favorite text editor:

# nano plausible-conf.env

The file contains five variables that you’ll need to fill in:

ADMIN_USER_EMAIL=admin@your-domain.com
ADMIN_USER_NAME=admin
ADMIN_USER_PWD=Str0ng_Passw0rd
BASE_URL=https://plausible.your-domain.com
SECRET_KEY_BASE=VSqCkxxFh0lQAcKgM+NmLzya28kbAr++FBL8b6qUxtAi9AeGScacv+fSGfYBqHiAVevv3H70qIJML1MabF+Klg==

Note:  The password you define here must be at least 6 characters.

Now you need to update the docker-compose.yml file. Open the file with the following command:

# nano docker-compose.yml

Find the Plausible section in the file and search for the ports, and update it to the following:

ports:
- 127.0.0.1:8000:8000

Then use the following command to download, configure, and launch the containers:

# docker-compose up --detach

This ensures that Plausible only listens on the localhost interface and is not publicly available.

Plausible Analytics has been installed and is now running on port 8000.

Step 4. Install Apache Web Server and Create Apache Virtual Host File

To install the Apache web server execute the command below:

# apt install apache2

Once installed, start and enable the service.

# systemctl enable apache2 && systemctl start apache2

Check if the service is up and running:

# systemctl status apache2

Enable the proxy and proxy_http modules in Apache using the following commands:

# a2enmod proxy
# a2enmod proxy_http

To access Plausible Analytics via domain name, we need to create Apache Virtual Host file.

First, create the configuration file with the following command:

# nano /etc/apache2/sites-available/plausible.conf

Open the file, and paste the following lines of code:

<VirtualHost *:80>
     ServerAdmin admin@your_domain.com
     ServerName plausible.your-domain.com

     ErrorLog ${APACHE_LOG_DIR}/plausible.your-domain_error.log
     CustomLog ${APACHE_LOG_DIR}/plausible.your-domain_access.log combined

        ProxyPreserveHost On
        ProxyPass / http://127.0.0.1:8000/
        ProxyPassReverse / http://127.0.0.1:8000/

</VirtualHost>

Enable the Apache2 configuration file and other modules:

# a2ensite plausible.conf

Check the syntax of the Apache2 configuration.

# apachectl -t

You should receive the following output:

root@host:~# apachectl -t
Syntax OK

If you receive this output, you can safely restart the Apache service.

# systemctl restart apache2

Step 5. Install an SSL Certificate

This step will show you how to install an SSL certificate for your Plausible website using the free one from Let’s Encrypt.

Install the required packages by running the following command:

# apt install python3-certbot-apache

Then run this command to install a new SSL certificate for your domain name:

# certbot --apache -d plausible.your-domain.com

Please select ‘2’ and choose to redirect HTTP traffic to HTTPS. It will update your Plausible Apache virtual host file to redirect all HTTP traffic to HTTPS.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

You should now be able to access your Plausible Analytics at https://plausible.your-domain.com

Plausible Analytics

If you are one of our web hosting clients and use our managed Ubuntu Hosting, you don’t have to follow this tutorial and install Plausible Analytics on your Ubuntu 22.04 server yourself. You can simply ask our expert Linux hosting admins to set all of these up for you quickly and easily.  They are available 24×7 and will respond to your request immediately.

PS. If you liked this post, please share it with your friends on social networks using the buttons below, or simply leave a comment in the comments section. Thank you.

The post How To Install Plausible Analytics on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-plausible-analytics-on-ubuntu-22-04/feed/ 0
How to Install Neos CMS on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-neos-cms-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-neos-cms-on-ubuntu-20-04/#respond Mon, 30 Aug 2021 17:45:57 +0000 https://linuxhostsupport.com/blog/?p=1506 Neos CMS is an open-source and PHP-based content management system created by over 100+ contributors around the world. It is highly extensible and follows a content repository pattern. Neos CMS can be integrated with other modern front-end technologies using JSON or GraphQL export formats. With Neos CMS, you can create your blog and website without […]

The post How to Install Neos CMS on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Neos CMS is an open-source and PHP-based content management system created by over 100+ contributors around the world. It is highly extensible and follows a content repository pattern. Neos CMS can be integrated with other modern front-end technologies using JSON or GraphQL export formats. With Neos CMS, you can create your blog and website without any programming knowledge.

This tutorial will explain how to install Neos CMS with Apache on Ubuntu 20.04.

Prerequisites

  • A fresh Ubuntu 20.04 VPS.
  • Access to the root user account (or access to an admin account with root privileges)

Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root‘ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu 20.04 OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y

Install Apache, MySQL and PHP

First, install the Apache web server and MySQL 8 on your server:

apt-get install apache2 mysql-server -y

After installing both packages, run the following command to install PHP with all required extensions:

apt-get install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-bcmath php7.4-xml php7.4-cli php7.4-gmagick php7.4-zip curl unzip git -y

Once all the packages are installed the start the Apache and MySQL service with the following command:

systemctl start apache2
systemctl start mysql

Create MySQL Database and User

Neos CMS uses MySQL or MariaDB as a database backend. So you will need to create a user and database for Neos CMS.

First, connect to the MySQL with the following command:

mysql

Next, create a database and user with the following command:

mysql> CREATE DATABASE neos CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
mysql> CREATE USER 'neos'@'localhost' IDENTIFIED BY 'securepassword';

Next, grant all the privileges on neos database with the following command:

mysql> GRANT ALL PRIVILEGES ON neos.* TO 'neos'@'localhost';

Next, flush the privileges and exit from the MySQL shell using the following command:

mysql> FLUSH PRIVILEGES;
mysql> EXIT;

Install Neos CMS

Before starting, you will need to install the Composer to your server. Run the following command to install Composer:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer

Next, change the directory to Apache webroot and download the Neos CMS using the Composer:

cd /var/www/html/
composer create-project --no-dev neos/neos-base-distribution neoscms

Next, install the required module and update the Composer with the following command:

composer require guzzlehttp/psr7 "^1.8.2"
composer update

Next, set proper permission and ownership to the neoscms directory:

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

Configure Apache for Neos CMS

Next, create an Apache virtual host configuration file for Neos CMS:

nano /etc/apache2/sites-available/neoscms.conf

Add the following lines:

<VirtualHost *:80>
     ServerAdmin admin@yourdomain.com
     DocumentRoot /var/www/html/neoscms/Web
     ServerName neos.yourdomain.com
     <Directory /var/www/html/neoscms/Web/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/neos_error.log
     CustomLog ${APACHE_LOG_DIR}/neos_access.log combined

     <Directory /var/www/html/neoscms/Web/>
            RewriteEngine on
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*) index.php [PT,L]
    </Directory>
</VirtualHost>

Save the file when you are done. Then, enable the Apache virtual host and rewrite module with the following command:

a2ensite neoscms.conf
a2enmod rewrite

Next, reload the Apache service to apply the configuration changes:

systemctl restart apache2

Access Neos CMS Installation Wizard

Now, you can access the Neos CMS web installation wizard using the URL http://neos.yourdomain.com as shown below:

install neos cms on ubuntu 20.04

Click on Go to setup button. You will be asked to provide a setup password as shown below:

installing neos cms on ubuntu 20.04

Type the password from the SetupPassword.txt file and click on the Login button. You should see the requirements check page:

set up neos cms on ubuntu 20.04

Click on the Next button. You should see the database configuration page:

configure neos cms on ubuntu 20.04

Provide your database details and click on the Next button. You should see the administrator account setup page:

installation of neos cms on ubuntu 20.04

Provide your admin username, password and click on the Next button. You should see the site configuration page:

guide on installing neos cms on ubuntu 20.04

Provide your Sitename and click on the Next button. Once the installation is completed, you should see the following page:

tutorial on installing neos cms on ubuntu 20.04

Click on the go to the backend. You should see the Neos CMS login page:

how do you install neos cms on ubuntu 20.04

Provide your admin username, password and click on the Login button. You will be redirected to the Neos CMS dashboard:

neos cms ubuntu 20.04

Of course, you don’t need to do any of this if your server is covered by our Managed Linux Support services in which case you can simply ask our expert Linux admins to install Neos CMS onto your Ubuntu 20.04 server for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comment section. Thanks

 

 

 

The post How to Install Neos CMS on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-neos-cms-on-ubuntu-20-04/feed/ 0
How to Install Thelia on Ubuntu 18.04 https://linuxhostsupport.com/blog/how-to-install-thelia-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/how-to-install-thelia-on-ubuntu-18-04/#respond Fri, 28 May 2021 12:24:34 +0000 https://linuxhostsupport.com/blog/?p=1407 We will show you how to install Thelia 2 on Ubuntu 18.04 using Apache web-server and a MySQL database. Thelia is an open-source tool for creating e-business websites and managing online content. It is written in PHP and it is published under a free license. Developed in accordance to web development standards and based on […]

The post How to Install Thelia on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
We will show you how to install Thelia 2 on Ubuntu 18.04 using Apache web-server and a MySQL database. Thelia is an open-source tool for creating e-business websites and managing online content. It is written in PHP and it is published under a free license. Developed in accordance to web development standards and based on Symfony 2, Thelia meets the following objectives: performance and scalability. It is fairly easy to install Thelia 2 on an Ubuntu 18.04 VPS. The installation process should take about 10 minutes if you follow the very easy steps described below.

Requirements

At the time of writing this tutorial, the latest stable version of Thelia is 2.3.4 and it requires:

  • PHP 5.5 or greater (preferably PHP 7.1), with openssl, GD, DOM, cURL, calendar, PDO_MySQL, and intl PHP extensions enabled. The memory_limit value set in PHP should be at least 128 megabytes, preferably 256 megabytes. Safe_mode should be disabled, and the date.timezone value in PHP should be set, so it can be used by all date/time functions in Thelia;
  • MySQL 5.6 or greater, or MariaDB installed on the Ubuntu server;
  • Apache web server 2.0 or higher compiled with mod_rewrite module. Alternatively, we can use Nginx as a web server.

Log in to the server update your server OS Packages

Log in to your Ubuntu 18.04 VPS with SSH as the root user:

ssh root@IP_Address -p Port_number

Before we can start with the Thelia installation, we have to make sure that all Ubuntu OS packages installed on the server are up to date. We can do this by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Install Apache web server

Check whether Apache is already installed and running on your server:

ps aux | grep apache2

We can also check if there are Apache2 packages installed on the server:

dpkg -l | grep apache2

If Apache is already installed on the server, we can skip the Apache installation steps and proceed with PHP installation.
If Apache is not installed, we can install it using:

apt-get install apache2

Once installed, start the Apache server and enable it to start on server boot:

systemctl start apache2
systemctl enable apache2

Install the required PHP extensions

The default PHP version available from the official Ubuntu 18.04 repository is PHP 7.2. Remove PHP 7.2 and install PHP 7.1 and all the required PHP extensions:

sudo apt-get remove php7.2*
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1 php7.1-common php7.1-curl php7.1-gd php7.1-curl php7.1-dom php7.1-mysql php7.1-intl
sudo a2dismod php7.2
sudo a2enmod php7.1

Configure PHP

Locate the PHP configuration file:

php -c /etc/php/7.1/apache2/ -i |grep "Loaded Configuration File"

The output should be something like this:

Loaded Configuration File => /etc/php/7.1/apache2/php.ini

Edit the php.ini configuration file:

vi /etc/php/7.1/apache2/php.ini

Add/modify the following options:

memory_limit = 256M 
file_uploads = On	
allow_url_fopen = On
allow_url_include = Off
post_max_size 32M
upload_max_filesize = 8M	
max_execution_time = 300
default_charset = "UTF-8"
date.timezone = "America/Chicago"

Enable Apache Rewrite Module

Enable Apache rewrite module if it is not already done so:

a2enmod rewrite

Restart the Apache service for the changes to take effect:

systemctl restart apache2

Install MariaDB

We will use MariaDB as a database engine. We can install MariaDB server from the Ubuntu base repository using the following commands:

sudo apt-get install mariadb-server-10.1 mariadb-server-core-10.1

Install Thelia

Download and extract the latest version of Thelia in the document root directory of your website ( e.g /var/www/html/your-domain.com).

cd /opt/
wget https://thelia.net/download/thelia.zip
unzip thelia.zip
mkdir -p /var/www/html/your-domain.com
mv /opt/thelia_*/* /var/www/html/your-domain.com/
chown -R www-data:www-data /var/www/html/your-domain.com
rm thelia.zip

Create a Database for Thelia

Create a MySQL database for the Thelia website:

mysql -u root -p
MariaDB [(none)]> CREATE DATABASE thelia;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON thelia.* TO 'thelia'@'localhost' IDENTIFIED BY 'Str0ngPa55w0rd';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;

Don’t forget to replace ‘Str0ngPa55w0rd’ with an actual strong password.

Create a Virtual Host in Apache

Create a virtual host in Apache for your domain:

vi /etc/apache2/sites-available/your-domain.com.conf

And add the following content to the file:

<VirtualHost *:80>

ServerAdmin admin@your-domain.com
ServerName your-domain.com ServerAlias www.your-domain.com DocumentRoot /var/www/html/your-domain.com <Directory /var/www/html/your-domain.com> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined </VirtualHost>

Replace ‘your-domain.com’ with your actual domain.

To enable the virtual host we have just created, run the following command:

a2ensite your-domain.com.conf

Then, disable the default Apache configuration:

a2dissite 000-default.conf

Restart Apache service for the changes to take effect:

systemctl restart apache2

Open http://your-domain.com in a web browser and follow the on-screen instructions: Select the language you want to use, check the PHP version, required PHP extensions and file permissions, and if everything is OK, click on the ‘Continue’ button.

install thelia on ubuntu 18.04

On the next page, enter the database settings:

installing thelia on ubuntu 18.04

Click ‘Continue’ and choose ‘thelia’ as database. On the next page, create a new admin account.

Don’t forget to delete the web/install directory:

rm -rf /var/www/html/your-domain.com/web/install/

That’s it. If you followed all of the instructions properly you can now access the Thelia back-office at http://your-domain.com/web/admin/login

install thelia ubuntu 18.04

Of course, you don’t have to install Thelia on Ubuntu 18.04, if you use one of our Server Support Services solutions, in which case you can simply ask our expert Linux admins to set up Thelia on Ubuntu 18.04 for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to install Thelia on an Ubuntu 18.04 VPS, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Thelia on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-thelia-on-ubuntu-18-04/feed/ 0
How to Install Laravel on Ubuntu 18.04 https://linuxhostsupport.com/blog/how-to-install-laravel-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/how-to-install-laravel-on-ubuntu-18-04/#comments Wed, 21 Apr 2021 16:50:11 +0000 https://linuxhostsupport.com/blog/?p=1378   1. Connect to your server To connect to your server via SSH as user root, use the following command: ssh root@IP_ADDRESS -p PORT_NUMBER and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number. Once logged in, make sure that your server is up-to-date by running the following commands: apt-get […]

The post How to Install Laravel on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
 

1. Connect to your serverinstalling laravel on ubuntu 18.04

To connect to your server via SSH as user root, use the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number. Once logged in, make sure that your server is up-to-date by running the following commands:

apt-get update
apt-get upgrade

2. Install the MySQL Database server

MySQL is an open-source database management system. To install MySQL, run the following command:

$ apt-get install mysql-server

This will install MySQL 5.7 on your server. In order to improve the security of your MySQL server, we recommend that you run the mysql_secure_installation script by typing the following command:

mysql_secure_installation

This script will help you to perform important security tasks like setting up a root password, disable remote root login, remove anonymous users, etc.

3. Create a database for Laravel

Now, we will create our MySQL database for our Laravel site. Login to your MySQL server with the following command and enter your MySQL root password:

mysql -u root -p

In this section, we will create a new MySQL database laravel and assign user access to it to a new user admin_user with password Strong_Password

CREATE DATABASE laravel;
GRANT ALL PRIVILEGES ON laravel.* TO 'admin_user'@'localhost' IDENTIFIED BY 'Strong_Password';
FLUSH PRIVILEGES;
exit;

Don’t forget to replace ‘Strong_Password’ with an actual strong password.

4. Install PHP and required PHP modules

To install the PHP and all necessary modules, run:

sudo apt-get install php-cli php-mcrypt php-mbstring php-zip php-opcache php-gd php-xml

5. Install Composer

A composer is a dependency manager for PHP and of course Laravel, which you can install packages with. The composer will pull all the required libraries you need for your project.

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

6. Install Laravel

Install the latest version of Laravel, using the composer create-project command:

sudo composer create-project --prefer-dist laravel/laravel my_project

If the installation is successful, you will see the following lines:

Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.
> @php artisan key:generate
Application key [base64:NEu4D2s1Ai8HHZL3wPnrl+BVpSmcm7dMTStIBtMgSn0=] set successfully.

By default, Laravel is configured to use MySQL(MariaDB), but you need to give it the right information to connect to the database that you just set up. Next, go to the /var/www/Html/my_project/config directory, open the database.php file with your favorite text editor, for example:

nano database.php

And update the database settings, replacing them with your own details:

 'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'yourDBName'),
            'username' => env('DB_USERNAME', 'yourUserName'),
            'password' => env('DB_PASSWORD', 'yourPassword'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],

7. Server your application with Artisan serve command

Once the installation is completed you can use the artisan serve command to serve your application:

php artisan serve

The output should be something like this:

Laravel development server started: <http://127.0.0.1:8000>

You can now open your browser and access your new Laravel installation at: http://127.0.0.1:8000

8. Install and configure Apache webserver

In this part of the tutorial, we will show you how to install and configure Apache to serve your Laravel application. Run the following command to install Apache webserver from the official Ubuntu repositories:

apt-get install apache2

Change the ownership of the Laravel directory to the webserver user:

chown -R www-data:www-data /path/to/laravel
chmod -R 755 my_project/storage/

Create a new Apache virtual host with the following content:

sudo nano /etc/apache2/sites-available/your_domain.com
<VirtualHost *:80>
ServerName your_domain.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/my_project/public

<Directory /var/www/html/my_project>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Activate the virtual host by creating a symbolic link :

sudo ln -s /etc/apache2/sites-available/your_domain.com /etc/apache2/sites-enabled/your_domain.com
 

Your Laravel installation is now complete.  You have successfully installed Laravel on your Ubuntu 18.04 VPS. Visit the domain name with a web browser you will see the Laravel default page.   That’s it. If you followed all of the instructions properly now you should be able to access your Laravel installation on your Ubuntu 18.04 server.

 

installing laravel on ubuntu 18.04If you are one of our web hosting customers, and use our optimized Laravel Hosting, you don’t have to install Laravel on Ubuntu 18.04, our expert Linux admins will set up and optimize your Laravel VPS, for you. They are available 24×7 and will take care of your request immediately. As a Laravel developer, you should be focusing on Laravel development and improving your code and leave the server work to us. PS. If you liked this post, on how to install Laravel on Ubuntu 18.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.

The post How to Install Laravel on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-laravel-on-ubuntu-18-04/feed/ 3
How to Install Mahara on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-mahara-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-mahara-on-ubuntu-20-04/#respond Wed, 07 Apr 2021 16:28:36 +0000 https://linuxhostsupport.com/blog/?p=1377 Mahara is a free and open-source electronic portfolio management system written in PHP. It is a web-based application mainly used in academic institutions to provide a platform to share their knowledge. It helps you to create a digital classroom and organize a student’s progress. You can also create a blog, build a resume, file repository, […]

The post How to Install Mahara on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
installing mahara on ubuntu 20.04Mahara is a free and open-source electronic portfolio management system written in PHP. It is a web-based application mainly used in academic institutions to provide a platform to share their knowledge. It helps you to create a digital classroom and organize a student’s progress. You can also create a blog, build a resume, file repository, and a competency framework using Mahara. Compared to other Learning Management Systems, Mahara is distributed and user-focused.

In this tutorial, we will show you how to install Mahara on Ubuntu 20.04 server.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2: Install LAMP Server

Mahara runs on a web server, written in PHP and uses MySQL or PostgreSQL as a database backend. So LAMP server must be installed in your server. If not installed, you can install it with the following command:

apt-get install apache2 mariadb-server php libapache2-mod-php php-mysql php-gd php-curl php-json php-xml php-mbstring -y

Once all the required packages are installed, edit the php.ini file and make some changes:

nano /etc/php/7.4/apache2/php.ini

Change the following lines:

log_errors = On
upload_max_filesize = 50M
post_max_size = 100M

And, add the following lines at the end of the file:

register_globals = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
magic_quotes_gpc = Off
allow_call_time_pass_reference = Off

Save and close the file then restart the Apache service to apply the changes:

systemctl restart apache2

Step 3: Create a Database

Next, you will need to create a database and user for Mahara. First, connect to the MariaDB with the following command:

mysql

Once connected, create a database and user with the following command:

MariaDB [(none)]> create database maharadb character set utf8mb4;
MariaDB [(none)]> grant all on maharadb.* to 'mahara'@'localhost' identified by 'password';

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

Once the database is created, you can proceed to download Mahara.

Step 4: Install Mahara

First, visit the Mahara website and download the latest version of Mahara with the following command:

wget https://launchpad.net/mahara/20.10/20.10.0/+download/mahara-20.10.0.tar.bz2

Once the download is completed, extract the downloaded file with the following command:

bunzip2 mahara-20.10.0.tar.bz2 
tar -xvf mahara-20.10.0.tar

Next, move the extracted directory to the Apache web root with the following command:

mv mahara-20.10.0 /var/www/html/mahara

Next, create a data directory for Mahara with the following command:

mkdir /var/www/html/mahara/data

Next, set the ownership and permissions with the following command:

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

Next, change the directory to Mahara and generate a secrets with the following command:

cd /var/www/html/mahara/htdocs
openssl rand -base64 32

You should get the following output:

QaU6HjHs6N93JIFX1bysH6OwmNP/QnDsIGI7MiX0Yag=

Next, rename the default config.php file:

cp config-dist.php config.php

Next, edit the config.php file and define database settings, data directory and secrets:

nano config.php

Change the following lines:

$cfg->dbtype   = 'mysql';
$cfg->dbhost   = 'localhost';
$cfg->dbport   = null; // Change if you are using a non-standard port number for your database
$cfg->dbname   = 'maharadb';
$cfg->dbuser   = 'mahara';
$cfg->dbpass   = 'password';
$cfg->dataroot = '/var/www/html/mahara/data';
$cfg->passwordsaltmain = 'QaU6HjHs6N93JIFX1bysH6OwmNP/QnDsIGI7MiX0Yag=';
$cfg->urlsecret = 'mysupersecret';

Save and close the file when you are finished.

Step 5: Configure Apache for Mahara

Next, create an Apache virtual host configuration file with the following command:

nano /etc/apache2/sites-available/mahara.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/mahara/htdocs/
ServerName mahara.example.com
<Directory /var/www/html/mahara/htdocs/>
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>

Save and close the file then enable the Apache virtual host with the following command:

a2ensite mahara.conf

Next, reload the Apache service to apply the changes:

systemctl reload apache2

Step 6: Setup a Cron Job

In order to update the RSS feeds and send email notifications, you will need to set a cron jobs that run every minute.

You can set up it with the following command:

crontab -e

Add the following line:

* * * * * php /var/www/html/mahara/htdocs/lib/cron.php

Save and close the file when you are finished.

Step 7: Access Mahara Web Interface

Now, open your web browser and access the Mahara web UI using the URL http://mahara.example.com. You will be redirected to the following page:

install mahara on ubuntu 20.04

Click on the Install Mahara button to start the installation. Once the installation has been finished, you should see the following page:

install mahara ubuntu 20.04

Click on the Continue button. You should see the following page:

configure mahara on ubuntu 20.04

Set your admin password and click on the Submit button. You will be redirected to the Mahara dashboard in the following page:

how to install mahara on ubuntu

Congratulations! you have successfully installed Mahara on Ubuntu 20.04.

Of course, you don’t have to install Mahara on Ubuntu if you use one of our Server Support Services, in which case you can simply ask our expert Linux admins to install Mahara on Ubuntu, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Mahara on Ubuntu, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Mahara on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-mahara-on-ubuntu-20-04/feed/ 0
How to Install Magento 2 on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-magento-2-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-magento-2-on-ubuntu-20-04/#respond Mon, 01 Mar 2021 11:34:56 +0000 https://linuxhostsupport.com/blog/?p=1368 In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce platforms available, thanks to its customizability and flexibility. It is created using the Zend Framework and uses MySQL as its database management system. Magento provides online […]

The post How to Install Magento 2 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS.

Magento is one of the most popular open-source e-commerce platforms available, thanks to its customizability and flexibility. It is created using the Zend Framework and uses MySQL as its database management system. Magento provides online merchants with a very flexible shopping cart and it comes with a rich set of features.

Installing Magento 2 on Ubuntu 20.04 should take less than 10 minutes to complete. Let’s get started with the tutorial.

Prerequisites

  • An Ubuntu 20.04 VPS with root access enabled, or a user with or a user with Sudo privileges is also required
  • 2GB of RAM or higher
  • MySQL 5.6 or 5.7 version, (or MariaDB >= 10.0, or higher, Percona 5.7, or any other binary-compatible MySQL database server)
  • nginx, or Apache webserver with mod_rewrite module enabled
  • PHP 7.3 with bcmath, ctype, curl, dom, gd, hash, iconv, intl, libxml, mbstring, openssl, pdo_mysql, simplexml, soap, xsl and zip extensions enabled. Also, for performance reasons, it is a good idea to install and enable the opcache extension.
  • A valid domain name for accessing the Magento 2 website. Also, a valid SSL certificate is required for accessing the website using HTTPS.

Step 1: Login and Update the OS Packages

First, we’re going to need to log into our server using SSH. You can do that by entering this command:

ssh root@IP_Address -p Port_number

Replace “root” with a user that has sudo privileges if necessary. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port number.

Once you are logged in, you should update all of your Ubuntu OS packages to their latest available versions.

apt-get update 
apt-get upgrade

Once all the OS packages are up-to-date, restart your server if required to apply the configuration changes.

Step 2: Install LEMP

LEMP is an acronym that describes a Linux OS with an installed Nginx web server, i.e. LEMP consists of Linux, Nginx, MySQL, and PHP.

Install Nginx

If there is an Apache web server installed on the server, stop the Apache service and disable it to start on server boot:

systemctl stop apache2
systemctl disable apache2

Install Nginx with the following command:

apt-get install nginx

Install MySQL

Install the MySQL database server which will be used for storing the data of your Magento website, such as products, categories, customers, and orders.
For the purposes of this tutorial, we will install and use MariaDB. You can also install and use the MySQL 5.7 version. Please note, MySQL 8 version is not supported yet. To install the MariaDB database server, enter the following command:

apt install mariadb-server

Enable the MariaDB service to start on server boot:

systemctl enable mariadb.service

Install PHP 7.3

By default, Ubuntu 20.04 ships with PHP version 7.4. But, Magento 2.3 does not support PHP 7.4. So, we will need to remove PHP 7.4 version, install PHP 7.3 version and all the respective PHP extensions.
Remove the PHP 7.4 version:

apt-get remove php7.4 php7.4-common

Add PPA for PHP 7.3:

add-apt-repository ppa:ondrej/php

Next, update the OS package list and install PHP 7.3 with the following command:

apt-get update
apt-get install php7.3

Install all the required PHP extensions with the following command:

apt-get install php7.3-bcmath php7.3-common php7.3-curl php7.3-fpm php7.3-gd php7.3-intl php7.3-mbstring php7.3-mysql php7.3-soap php7.3-xml php7.3-xsl php7.3-zip

Once the PHP extensions have been installed on the server, install few other OS packages required for the Magento 2 installation:

apt-get install git curl software-properties-common

Next, open the main PHP configuration file /etc/php/7.3/fpm/php.ini and change the following PHP settings:

nano /etc/php/7.3/fpm/php.ini

Change the following settings:

memory_limit = 256M
upload_max_filesize = 128M
zlib.output_compression = On
max_execution_time = 600
max_input_time = 900
date.timezone = America/Chicago

Save and close the PHP configuration file.

Step 3: Create a Database for Magento 2

Next, we will create our MySQL user and database for our Magento 2 website. Log in to your MySQL server with the following command and enter your MySQL root password when prompted:

mysql -u root -p

To create a new database for our Magento 2 instance, run the following commands:

mysql> set global log_bin_trust_function_creators=1;
mysql> CREATE USER 'magento'@'localhost' IDENTIFIED WITH mysql_native_password BY 'strongPassword';
mysql> create database magentodb;
mysql> GRANT ALL PRIVILEGES ON magentodb.* TO 'magento'@'localhost';
mysql> flush privileges;
mysql> quit

Step 4: Install Magento 2

We can now proceed with the Magento 2 installation. At the time of writing this article, the latest stable version of Magento is version 2.3.5.
First, go to the GitHub repository and download the latest version of Magento with the following command:

mkdir -p /var/www/magento2/
cd /var/www/magento2/
git clone https://github.com/magento/magento2.git /var/www/magento2/

Next, check the latest version of Magento 2 with the following command:

git checkout $(git describe --tags $(git rev-list --tags --max-count=1))

Next, we will need to install Composer to install all necessary Magento components. You can install Composer by just running the following command:

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
cd /var/www/magento2
composer install
bin/magento setup:install --base-url=http://yourdomain.com/ --db-host=localhost --db-name=magentodb --db-user=magento --db-password=strongPassword --admin-firstname=FirstName --admin-lastname=LastName --admin-email=your@emailaddress.com --admin-user=magentoadmin --admin-password=strong-password --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

Do not forget to replace the domain name, database password, admin username, password, and admin email address accordingly.
Once the installation is complete, you should receive the following output:
[Progress: 699 / 701]
Post-installation file permissions check…
For security, remove write permissions from these directories: ‘/var/www/magento2/app/etc’
[Progress: 700 / 701]
Write installation date…
[Progress: 701 / 701]
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_1k4pc0
Nothing to import.

Remember the ‘Magento Admin URI’. You will need this info later when you need to log in to the Magento backend.

Change the ownership of the magento2 directory to www-data with the following command:

chown -R www-data:www-data /var/www/magento2/

Step 5: Create nginx Configuration File

upstream fastcgi_backend {
server unix:/run/php/php7.3-fpm.sock;
}

server {
server_name yourdomain.com;
listen 80;
set $MAGE_ROOT /var/www/magento2;
set $MAGE_MODE developer; # or production

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

include /var/www/magento2/nginx.conf.sample;
}

Remove the default nginx configuration file, if is not being used:

rm -f /etc/nginx/sites-enabled/default

Enable the newly created nginx configuration file, then test the nginx configuration and make sure that there are no errors:

ln -s /etc/nginx/sites-available/magento2 /etc/nginx/sites-enabled/magento2
nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Step 6: Install SSL Certificate

Add PPA for certbot

add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install certbot python3-certbot-nginx

Install a new SSL certificate on your domain name:

certbot --nginx -d yourdomain.com -d www.yourdomain.com

Please select ‘2’ and choose to redirect HTTP traffic to HTTPS:
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
1: No redirect – Make no further changes to the webserver configuration.
2: Redirect – Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you’re confident your site works on HTTPS. You can undo this
change by editing your web server’s configuration.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 2

Use the following Magento 2 CLI commands to update the Magento base-url and the base-url-secure values:

cd /var/www/magento2/
php bin/magento setup:store-config:set --base-url="https://yourdomain.com/"
php bin/magento setup:store-config:set --base-url-secure="https://yourdomain.com/"

Edit the nginx configuration file and enable HTTP/2:

nano /etc/nginx/sites-enabled/magento2

Replace:

listen 443 ssl;

With:

listen 443 ssl http2;

Restart the Nginx service for the changes to take effect:

systemctl restart cron.service

Step 7: Install Cron Job

Magento requires a cron job configuration for many important system functions, so create the following cron job:

crontab -u www-data -e
* * * * * /usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log

Restart the cron service:

systemctl restart cron.service

That is it. Magento 2 has been successfully installed on your server.

You can access the Magento front-end at http://yourdomain.com :
how to install magento 2 on ubuntu 20.04
Log in to the Magento 2 back-end at http://yourdomain.com/Magento Admin URI, and configure Magento according to your needs, install extensions, add products, categories etc.

magento2 back-end


Of course, you don’t have to install Magento 2 with LEMP stack on Ubuntu 20.04, if you use one of our Monthly Server Maintenance services, in which case you can simply ask our expert system administrators to install Magento 2 on Ubuntu 20.04 for you, using the LEMP stack or any other web hosting stack of your choice. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install Magento 2 with LEMP stack on Ubuntu 20.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.

The post How to Install Magento 2 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-magento-2-on-ubuntu-20-04/feed/ 0
How to Install Elasticsearch on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-elasticsearch-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-elasticsearch-on-ubuntu-20-04/#comments Wed, 03 Feb 2021 09:53:04 +0000 https://linuxhostsupport.com/blog/?p=1359 Elasticsearch is an open-source platform for full-text search and analytics engines. It allows you to store, search, and analyze a large amount of data in real-time. It is a popular search engine designed for applications that have complex search requirements. With Elasticsearch, you can build a complex search functionality similar to the Google search engine. […]

The post How to Install Elasticsearch on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
installing elasticsearch on ubuntu 20.04Elasticsearch is an open-source platform for full-text search and analytics engines. It allows you to store, search, and analyze a large amount of data in real-time. It is a popular search engine designed for applications that have complex search requirements. With Elasticsearch, you can build a complex search functionality similar to the Google search engine.

In this tutorial, we will show you how to install Elasticsearch on Ubuntu 20.04.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2: Add Elasticseach Repository

By default, Elasticsearch is not available in the Ubuntu standard OS repository. So you will need to add the Elasticsearch repository to your system.

First, install the required dependencies with the following command:

apt-get install apt-transport-https ca-certificates gnupg2 -y

Once all the dependencies are installed, import the GPG key with the following command:

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

Next, add the Elasticsearch repository with the following command:

sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'

Once the repository is added, you can proceed and install Elasticsearch.

Step 3: Install Elasticsearch

Now, update the repository cache and install the Elasticsearch with the following command:

apt-get update -y
apt-get install elasticsearch -y

Once the installation is completed, start the Elasticsearch service and enable it to start at system reboot with the following command:

systemctl start elasticsearch
systemctl enable elasticsearch

Next, verify whether Elasticsearch is running or not with the following command:

curl -X GET "localhost:9200"

You should get the following output:

{
  "name" : "ubuntu2004",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "JJY-gI6ESgqEvz1dSPxs3g",
  "version" : {
    "number" : "7.10.1",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "1c34507e66d7db1211f66f3513706fdf548736aa",
    "build_date" : "2020-12-05T01:00:33.671820Z",
    "build_snapshot" : false,
    "lucene_version" : "8.7.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Step 4: Configure Elasticsearch for Remote Access

By default, Elasticsearch is configured to listen on localhost only. If your application is hosted on the remote server and wants to use the Elasticsearch database then you will need to configure Elasticsearch to allow remote connection.

You can do it by editing Elasticsearch main configuration file:

nano /etc/elasticsearch/elasticsearch.yml

Uncomment and change the following line:

cluster.name: my-application
network.host: 192.168.0.100
discovery.seed_hosts: 192.168.0.100     

Save and close the file then restart the Elasticsearch service to apply the configuration changes:

systemctl restart elasticsearch

installing elasticsearch on ubuntu 20.04Congratulations! you have successfully installed Elasticsearch on an Ubuntu 20.04 VPS.installing Elasticsearch on Ubuntu 20.04

If you use one of our server management services, can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Elasticsearch on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-elasticsearch-on-ubuntu-20-04/feed/ 1
How to Install SOGo on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-sogo-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-sogo-on-ubuntu-20-04/#comments Wed, 20 Jan 2021 13:18:38 +0000 https://linuxhostsupport.com/blog/?p=1349 SOGo is a free and open-source collaborative software with a focus on simplicity and scalability. It provides an AJAX-based Web interface and supports multiple native clients through the use of standard protocols such as CalDAV, CardDAV, and GroupDAV, as well as Microsoft ActiveSync. It also offers address book management, calendaring, and Web-mail clients along with […]

The post How to Install SOGo on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
installing sogo on ubuntu 20.04SOGo is a free and open-source collaborative software with a focus on simplicity and scalability. It provides an AJAX-based Web interface and supports multiple native clients through the use of standard protocols such as CalDAV, CardDAV, and GroupDAV, as well as Microsoft ActiveSync. It also offers address book management, calendaring, and Web-mail clients along with resource sharing and permission handling.

In this tutorial, we will show you how to install SOGo on an Ubuntu 20.04 based virtual private server.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2: Install and Configure MariaDB Server

SOGo uses MariaDB, MySQL, or PostgreSQL as a database backend. So you will need to install the database server in your server.

You can install the MariaDB server by running the following command:

apt-get install mariadb-server -y

Once installed, log in to the MariaDB shell with the following command:

mysql

After login, create a database and use it for SOGo with the following command:

MariaDB [(none)]> CREATE DATABASE sogo;
MariaDB [(none)]> GRANT ALL ON sogo.* TO 'sogo'@'localhost' IDENTIFIED BY 'your-secure-password';

Next, change the database to SOGo and create a required table and insert some values with the following command:

MariaDB [(none)]> USE sogo;
MariaDB [sogo]> CREATE TABLE sogo_users (c_uid VARCHAR(10) PRIMARY KEY, c_name VARCHAR(10), c_password VARCHAR(32), c_cn VARCHAR(128), mail VARCHAR(128));
MariaDB [sogo]> INSERT INTO sogo_users VALUES ('admin1', 'admin1', MD5('your-secure-password'), 'SOGouser', 'sogo@example.com');

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [sogo]> flush privileges; 
MariaDB [sogo]> exit;

Now, the MariaDB database server is installed and configured.

Step 3: Install SOGo

By default, SOGo is not available in the Ubuntu 20.04 standard repository. So you will need to download their packages from the SOGo official website. All packages are available at Sope and Sogo

You can download all the packages using the following command:

wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo-activesync_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo-dbg_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo-dev_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsbjson2.3-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsbjson2.3_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-appserver4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-appserver4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-core4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-core4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-gdl1-4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-gdl1-4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-ldap4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-ldap4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-mime4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-xml4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-xml4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope4.9-dev_4.9.r1664.20201016_all.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-appserver_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-dbg_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-gdl1-mysql_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-gdl1-postgresql_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-libxmlsaxdriver_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-stxsaxdriver_4.9.r1664.20201016_amd64.deb

Once all the packages are downloaded, run the following command to install them:

dpkg -i *.deb

Next, run the following command to install all missing dependencies:

apt-get install -f

Once SOGo is installed, start the SOGo service and enable it to start at system reboot:

systemctl start sogo
systemctl enable sogo

Step 4: Install and Configure Apache

Next, you will need to install the Apache webserver for SOGo. You can install it with the following command:

apt-get install apache2 -y

Next, enable all required modules with the following command:

a2enmod proxy proxy_http headers rewrite
a2enconf SOGo.conf

Next, edit the SOGo virtual host configuration file:

nano /etc/apache2/conf-enabled/SOGo.conf

Find the following lines:

  RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST

And, replaced them with the following:

  RequestHeader set "x-webobjects-server-port" "80"
  RequestHeader set "x-webobjects-server-url" "http://%{HTTP_HOST}e" env=HTTP_HOST

Save and close the file then restart the Apache service to apply the changes:

systemctl restart apache2

Step 5: Configure SOGo

Next, you will need to configure SOGo to use MariaDB for authentication. You can do it by editing the SOGo main configuration file:

nano /etc/sogo/sogo.conf

Add the following lines at the end of the file as per your database settings:

SOGoProfileURL = "mysql://sogo:your-secure-password@localhost:3306/sogo/sogo_user_profile";
OCSFolderInfoURL = "mysql://sogo:your-secure-password@localhost:3306/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogo:your-secure-password@localhost:3306/sogo/sogo_sessions_folder";

SOGoPasswordChangeEnabled = YES;

SOGoUserSources =
  (
    {
      type = sql;
      id = users;
     viewURL = "mysql://sogo:your-secure-password@127.0.0.1:3306/sogo/sogo_users";
     canAuthenticate = YES;
     isAddressBook = NO;
      userPasswordAlgorithm = md5;
    }
  );

  SOGoPageTitle = SOGo;
  SOGoVacationEnabled = YES;
  SOGoForwardEnabled = YES;
  SOGoSieveScriptsEnabled = YES;
  SOGoMailAuxiliaryUserAccountsEnabled = YES;
  SOGoTrustProxyAuthentication = NO;
  SOGoXSRFValidationEnabled = YES;

  SOGoSuperUsernames = (admin1, admin2); // This is an array - keep the parents!

Save and close the file when you are finished then restart the SOGo service to apply the changes:

systemctl restart sogo

Step 6: Access SOGo Web UI

Now, open your web browser and type the URL http://your-domain.com/SOGo to access the SOGo web interface. You will be redirected to the SOGo login page as shown below:

install sogo ubuntu 20.04

Provide username as admin1 and password as “your-secure-password” then click on the > button. You will be redirected to the SOGo dashboard:

install sogo on ubuntu

That’s it. You have successfully installed SOGo on your Ubuntu 20.04 based VPS.

install sogo on ubuntu 20.04If you use one of our Server Management Services, you don’t have to install SoGo yourself, you can ask our system administrators and they will install SoGo on Ubuntu 20.04 or any other OS of your choice.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install SOGo on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-sogo-on-ubuntu-20-04/feed/ 12
How to Install Open Source Social Network on Ubuntu 18.04 https://linuxhostsupport.com/blog/how-to-install-open-source-social-network-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/how-to-install-open-source-social-network-on-ubuntu-18-04/#respond Wed, 07 Oct 2020 20:53:46 +0000 https://linuxhostsupport.com/blog/?p=1292 Open Source Social Network (OSSN) is a free and open source software used as a social networking engine for building your own social network with your friends and family. This open source application is written in PHP and is very easy to install. OSSN has user and admin dashboards that allow you to manage profiles […]

The post How to Install Open Source Social Network on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
open source social network apache lamp install guide ubuntuOpen Source Social Network (OSSN) is a free and open source software used as a social networking engine for building your own social network with your friends and family. This open source application is written in PHP and is very easy to install. OSSN has user and admin dashboards that allow you to manage profiles and help you to build content for many devices. This CMS has a lot of features, such as Photos, Emoji, Profiles, Search, Friends, Chat, and much more.

In this article, we will show you how to install Open Source Social Network on an Ubuntu 18.04 server.

At the time of writing this article, the latest stable version of Open Source Social Network is 5.0, and it requires:

  • PHP version 5.6, 7.0 or 7.1
  • MySQL 5 or higher
  • Apache
  • mod_rewrite Apache module
  • PHP cURL
  • PHP Mcrypt s
  • PHP GD Extension
  • PHP ZIP Extension
  • JSON Support
  • XML Support
  • PHP setting allow_url_fopen should be enabled

If you don’t have a LAMP stack set up, don’t worry – we’ll be showing you how to install that as well.

1. Connect to your server

Before we begin, you need to connect to your server via SSH as the root user. To do this, use the following command:

ssh root@IP_Address -p port_number

of course, you will need to replace IP_Address and port_number with your actual server IP address and SSH port number.

Once logged in, make sure that your server is up-to-date by running the following commands:

sudo apt update
sudo apt upgrade

2. Install LAMP

In order to run Open Source Social Network, it needs a web server, PHP, and a database server. That’s why we chose the LAMP stack. In this step, we will install Apache, PHP, and MariaDB to fulfill the requirements of this application.

Execute the following command to install Apache2:

sudo apt install apache2

Once the Apache2 web service is installed on the server, we can use the commands below to start, stop and enable the service.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

To confirm that Apache2 is installed properly, we can open a web browser and type the server IP address or domain name (we assume it is pointed to your server) – we should be able to view the Apache2 ‘Default Page’.

Now that our Apache installation is finished, let’s install MariaDB, an open-source equivalent of MySQL. Use the following command to install MariaDB on your server:

sudo apt install mariadb-server mariadb-client

Once MariaDB is installed on your server, you can use the commands below so that you can stop, start and enable the MariaDB service.

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

The next command is optional. You can run the command if you want to secure the MariaDB server by disallowing remote root access, remove the test database and create a root password.

sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the [Enter] key, there is no password set by default
Set root password? [Y/n]: Y
New password: Enter your password
Re-enter new password: Repeat your password
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

Restart the MariaDB server, so the changes will take effect.

sudo systemctl restart mariadb.service

Next, we will install PHP version 7.1 from Ondřej Surý’s repository.

Please note that OSSN does not support PHP 7.2 yet. With running these commands below, you will add Ondřej Surý’s PPA.

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

In order to install PHP 7.1 together with the modules that are required for running the OSSN, please run this command:

sudo apt install php7.1 php7.1-mysql php7.1-curl php7.1-json php7.1-cgi libapache2-mod-php7.1 php7.1-mcrypt php7.1-xmlrpc php7.1-gd php7.1-mbstring php7.1 php7.1-common php7.1-xmlrpc php7.1-soap php7.1-xml php7.1-intl php7.1-cli php7.1-ldap unzip php7.1-zip wget php7.1-readline php7.1-imap php7.1-tidy php7.1-recode php7.1-sq php7.1-intl -y

Once the installation is complete, check that all installed services work properly. If so, you can proceed to the next step.

3. Create and Configure Database on MariaDB

Now we need to create a database for OSSN. Log in to the MariaDB server with the command:

sudo mysql -u root -p

Then type the password you created in the previous step to sign in. Once you are in the MariaDB shell, you can use the following command and create a database called ossn_db for the OSSN application.

CREATE DATABASE ossn_db;

Then create a database user called ossn_user and replace Str0n9Pas$worD with your own password.

CREATE USER 'ossn_user'@'localhost' IDENTIFIED BY 'Str0n9Pas$worD';

To grant the user ossn_user with full access to the database ossn_db, run the command:

GRANT ALL ON ossn_db.* TO 'ossn_user'@'localhost' IDENTIFIED BY 'Str0n9Pas$worD' WITH GRANT OPTION;

Now we can use flush privileges operation to reload the grant tables and after that, we can exit from the MariaDB shell.

FLUSH PRIVILEGES;
EXIT;

4. Install OSSN

Use the command below to change the directory to /opt and download the Open Source Social Network.

cd /opt && wget https://www.opensource-socialnetwork.org/download_ossn/latest/build.zip

unzip the content and move the files to the Apache2 default root directory:

unzip build.zip 
sudo mv ossn /var/www/html/ossn

Create an OSSN data directory by running the commands:

sudo mkdir /var/www/html/ossn_data

Change the permissions and the ownership of the files:

sudo chown -R www-data:www-data /var/www/html/ossn/
sudo chmod 755 /var/www/html/ossn/
chown -R www-data:www-data /var/www/html/ossn_data

5. Configure Virtual Host for OSSN

Since we have Apache installed on your server, we can continue and show you how to create a virtual host for your domain that you want to use. We will use nano as our editor, but if you do not prefer nano, you can use any editor of your choice and create a new configuration file called ossn.conf

sudo nano /etc/apache2/sites-available/ossn.conf

Then paste the configuration from below into the file, and replace domain-name.com with your actual domain name.

<VirtualHost *:80>
     ServerAdmin admin@domain-name.com
     DocumentRoot /var/www/html/ossn
     ServerName domain-name.com
     
          Options FollowSymlinks
          AllowOverride All
          Require all granted

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

After you finish editing the file, save and close it.

Once you have configured the virtual host, you can enable it by executing the following commands.

Disable the default virtual host with:

sudo a2dissite 000-default

then, enable the OSSN virtual host:

sudo a2ensite ossn.conf

Also, you need to make sure that the mod_rewrite Apache module is enabled:

sudo a2enmod rewrite

Restart Apache for the changes to take effect.

sudo systemctl restart apache2.service

6. Access Open Source Social Network

Open your web browser and type your domain:
http://domain-name.com/
If you closely followed this article, you should be able to see the OSSN Installation wizard, as shown on the image below.

 

During the installation, you will create an administrator account that you can use it to manage the OSSN application. You can access the back-end by adding /administrator to the end of the URL.

http://domain-name.com/administrator

The administrator dashboard will look as shown on the following image.

 

Finally, you can access your http://domain-name.com and log in so you can create your first post.

 

Congratulations! You have successfully installed Open Source Social Network on your server.

In this article, we showed you how to install Apache2, PHP 7.1, MariaDB Database Server, created an OSSN database and of course installed Open Source Social Network. Now you can start creating your own private community and connect with your friends with this wonderful social media platform.


managed open source social network supportOf course, if you are one of our Managed Ubuntu Support customers, you don’t have to install Open Source Social Network on your Ubuntu 18.04 VPS – simply ask our admins, sit back, and relax. Our admins will install and configure Open Source Social Network on Ubuntu 18.04 for you immediately.

PS. If you liked this post about how to install Open Source Social Network on an Ubuntu 18.04 VPS, please share it with your friends on the social networks using the share buttons below, or simply leave a comment in the comments section. Thanks.

The post How to Install Open Source Social Network on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-open-source-social-network-on-ubuntu-18-04/feed/ 0
Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 https://linuxhostsupport.com/blog/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04/#respond Wed, 23 Sep 2020 21:09:08 +0000 https://linuxhostsupport.com/blog/?p=1274 In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04. PostfixAdmin is a free web-based interface. With PostfixAdmin, we can configure and manage a Postfix-based email server for many users. Postfix is a Mail Transfer Agent (MTA) that relays mail between different mail […]

The post Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04.

  • PostfixAdmin is a free web-based interface. With PostfixAdmin, we can configure and manage a Postfix-based email server for many users.
  • Postfix is a Mail Transfer Agent (MTA) that relays mail between different mail servers across the Internet.
  • Dovecot is a popular Local Delivery Agent (LDA) that deliver mail received from postfix into their final destinations (mailboxes, programs, etc..)

With these three packages combined, your server will be ready to send and receive emails, along with a web-based interface for managing your email server. Let’s begin.

Requirements:

  • For the purposes of this tutorial, we will use an Ubuntu 18.04 VPS.
  • Full SSH root access or a user with sudo privileges is also required.

Step 1 – Getting Started

Connect to your server via SSH as the root user using the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace IP_ADDRESS and PORT_NUMBER with your actual server IP address and SSH port number.

Before starting with the installation you will need to update your system packages to their latest version.

You can do this by running the following command:

apt-get update 
apt-get upgrade

Step 2 – Create a System User

Before we create a system user, we need to install some necessary packages.

sudo apt-get -y install wget nano dbconfig-common sqlite3

Now we will create a new system user with the following commands. This user will be the owner of all mailboxes.

sudo useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c "Virtual Mail User" vmail
sudo mkdir -p /var/vmail
sudo chmod -R 770 /var/vmail
sudo chown -R vmail:mail /var/vmail

Step 3 – Install PHP 7.3 and All Required PHP Modules

We will install the latest stable version of PHP 7.3 and all required PHP modules with the following commands:

apt install software-properties-common python-software-properties
add-apt-repository ppa:ondrej/php
apt update
sudo apt-get install php7.3 php7.3-cli php7.3-common php-fpm php-cli php7.3-mbstring php7.3-imap php7.3-sqlite3

Once these are installed, we can then install Nginx, which will serve as our web server for PostfixAdmin.

Step 4 – Install and configure Nginx

To install Nginx from the official Ubuntu repositories, we will run the following command:

sudo apt-get install nginx

Now we need to create a new Nginx server block with the following content. First, open the file:

sudo nano /etc/nginx/sites-available/postfixadmin.your_domain.com

Then add the following:

server {
listen 80;
server_name postfixadmin.your_domain.com;
root /var/www/postfixadmin-3.0;
index index.php;
charset utf-8;


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

location ~* \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}

Make sure you replace your_domain.com with your actual registered domain name.

To activate the server block, we will create a symbolic link:

sudo ln -s /etc/nginx/sites-available/postfixadmin.your_domain.com /etc/nginx/sites-enabled/postfixadmin.your_domain.com

To make Nginx aware of this, we’ll need to restart it.

sudo service nginx restart

Step 5 – Install and Configure PostfixAdmin

PostfixAdmin supports MySQL, PostgreSQL and SQLite databases. In this tutorial, we will use SQLite as our database system.

Now we will download PostfixAdmin and extract it to the /var/www/ directory:

wget -q -O - "http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-3.0/postfixadmin-3.0.tar.gz" | sudo tar -xzf - -C /var/www

Open the mail configuration file and edit the following values:

sudo nano /var/www/postfixadmin-3.0/config.inc.php
$CONF['configured'] = true;
$CONF['database_type'] = 'sqlite';
$CONF['database_name'] = '/var/vmail/postfixadmin.db';
// $CONF['database_host'] = 'localhost';
// $CONF['database_user'] = 'postfix';
// $CONF['database_password'] = 'postfixadmin';
// $CONF['database_name'] = 'postfix';

$CONF['domain_path'] = 'NO';
$CONF['domain_in_mailbox'] = 'YES';

Now, change the owner for the folder so that it belongs to the web server:

sudo chown -R www-data: /var/www/postfixadmin-3.0

We will then create the SQLite database:

sudo touch /var/vmail/postfixadmin.db
sudo chown vmail:mail /var/vmail/postfixadmin.db
sudo usermod -a -G mail www-data

If everything is set up correctly, you should open your browser and go to:
https://postfixadmin.your_domain.com/setup.php
You should see something like below:

  • Depends on: SQLite – OK
  • Testing database connection – OK – sqlite://:xxxxx@//var/vmail/postfixadmin.db

To create a new admin user, run the following command:

bash /var/www/postfixadmin-3.0/scripts/postfixadmin-cli admin add admin@your_domain.com --password strong_password --password2 strong_password --superadmin 1 --active 1

Make sure to replace strong_password with an actual strong password.

If you don’t want to do this using the command line, you can also create a new admin user from the PostfixAdmin Web Interface.

Step 6 – Install and Configure Postfix

We can install Postfix with the following command:

sudo apt-get install postfix

We need to create the following files:

sudo nano /etc/postfix/sqlite_virtual_alias_maps.cf

Add the following to the file:

dbpath = /var/vmail/postfixadmin.db
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'

Now the next file:

sudo nano /etc/postfix/sqlite_virtual_alias_domain_maps.cf

Add this to it:

dbpath = /var/vmail/postfixadmin.db
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = printf('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'

Save that file, then add the next one:

sudo nano /etc/postfix/sqlite_virtual_alias_domain_catchall_maps.cf

Insert this content into it:

dbpath = /var/vmail/postfixadmin.db
query  = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = printf('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'

Save and close the file. Let’s create the next one:

sudo nano /etc/postfix/sqlite_virtual_domains_maps.cf

Add this to the file:

dbpath = /var/vmail/postfixadmin.db
query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'

Save and close again. Once again, let’s create the next file that we need.

sudo nano /etc/postfix/sqlite_virtual_mailbox_maps.cf

This is what should be added as the content:

dbpath = /var/vmail/postfixadmin.db
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'

Onto the last file. Create it with this command:

sudo nano /etc/postfix/sqlite_virtual_alias_domain_mailbox_maps.cf

Then add this to it:

dbpath = /var/vmail/postfixadmin.db
query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = printf('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'

Finally, save and close the file.

Now we will edit the main.cf configuration file by executing the following command:

postconf -e "myhostname = $(hostname -A)"

We need to edit the file so that it looks like this. We’re adding all of the files that we just created:

 

postconf -e "virtual_mailbox_domains = sqlite:/etc/postfix/sqlite_virtual_domains_maps.cf"
postconf -e "virtual_alias_maps =  sqlite:/etc/postfix/sqlite_virtual_alias_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_catchall_maps.cf"
postconf -e "virtual_mailbox_maps = sqlite:/etc/postfix/sqlite_virtual_mailbox_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_mailbox_maps.cf"
 
postconf -e "smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem"
postconf -e "smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key"
postconf -e "smtpd_use_tls = yes"
postconf -e "smtpd_tls_auth_only = yes"
 
postconf -e "smtpd_sasl_type = dovecot"
postconf -e "smtpd_sasl_path = private/auth"
postconf -e "smtpd_sasl_auth_enable = yes"
postconf -e "smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination"
 
postconf -e "mydestination = localhost"
postconf -e "mynetworks = 127.0.0.0/8"
postconf -e "inet_protocols = ipv4"
 
postconf -e "virtual_transport = lmtp:unix:private/dovecot-lmtp"

Save and close the file once you are done.

Also, we need to edit the master.cf file. Open the file like so:

sudo nano /etc/postfix/master.cf

Find the submission inet n and smtps inet n sections, and make sure the file looks like this:

smtp      inet  n       -       y       -       -       smtpd
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       y       -       -       smtpd
  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

Save and close the file. Now restart the Postfix service and enable it.

systemctl enable postfix
systemctl restart postfix

Step 7 – Install and Configure Dovecot

Now that everything else is set up, we need to install Dovecot with SQLite support:

sudo apt-get install dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-sqlite

We need to open the /etc/dovecot/conf.d/10-mail.conf file and change the following values:

mail_location = maildir:/var/vmail/%d/%n
mail_privileged_group = mail
mail_uid = vmail
mail_gid = mail
first_valid_uid = 150
last_valid_uid = 150

We then need to open the /etc/dovecot/conf.d/10-auth.conf file and change the following values so that it looks like this:

auth_mechanisms = plain login
#!include auth-system.conf.ext
!include auth-sql.conf.ext

We will create a new dovecot-sql.conf.ext file:

sudo nano /etc/dovecot/dovecot-sql.conf.ext

Add this as the content:

driver = sqlite
connect = /var/vmail/postfixadmin.db
default_pass_scheme = MD5-CRYPT
password_query = \
  SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, \
  'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid \
  FROM mailbox WHERE username = '%u' AND active = '1'
user_query = \
  SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, \
  150 AS uid, 8 AS gid, printf('dirsize:storage=', quota) AS quota \
  FROM mailbox WHERE username = '%u' AND active = '1'

In the /etc/dovecot/conf.d/10-ssl.conf file, enable SSL support:

ssl = yes

We will open the /etc/dovecot/conf.d/15-lda.conf file and set the postmaster_address email address.

postmaster_address = postmaster@vps.your_domain.com

Make sure you replace your_domain.com with your domain name.

Also, we need to open the /etc/dovecot/conf.d/10-master.conf file, find the service lmtp section and change it so that it looks like this:

service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    mode = 0600
    user = postfix
    group = postfix
  }
}

Then find the service auth section and change it to this:

service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
    #group = vmail
  }
  user = dovecot
}

We will also change the service auth-worker section to the following:

service auth-worker {
  user = vmail
}

Close the file, and set the permissions:

chown -R vmail:dovecot /etc/dovecot
chmod -R o-rwx /etc/dovecot

Enable and restart the dovecot service:

systemctl enable dovecot 
systemctl restart dovecot

If everything is set up correctly, you should be able to log in to your PostfixAdmin Web interface and create your first virtual domain and mailbox.


Of course, you don’t have to set up and configure a mail server with PostfixAdmin on your Ubuntu 18.04 server if you use one of our Managed Server Support services, in which case you can simply ask our expert Linux admins to set up and configure a mail server with PostfixAdmin for you. They are available 24×7 and will take care of your request immediately. This can be especially helpful since setting up a mail server is not the simplest thing.

PS. If you liked this post, on how to Set up a mail server with PostfixAdmin on Ubuntu 18.04,  please share it with your friends on the social networks using the buttons below or simply leave a comment in the Comments Section below. Thanks.

The post Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04/feed/ 0
How to Install ClickHouse on Ubuntu 18.04 https://linuxhostsupport.com/blog/how-to-install-clickhouse-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/how-to-install-clickhouse-on-ubuntu-18-04/#respond Wed, 09 Sep 2020 19:10:25 +0000 https://linuxhostsupport.com/blog/?p=1261 ClickHouse is a fast and open source column-oriented analytics database system developed by Yandex. ClickHouse is built to process analytical queries while including high-availability features that work across clusters. If you are looking for a powerful column oriented database system with a high-availability system, you really should consider ClickHouse as your database system of choice. ClickHouse […]

The post How to Install ClickHouse on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
ClickHouse is a fast and open source column-oriented analytics database system developed by Yandex. ClickHouse is built to process analytical queries while including high-availability features that work across clusters. If you are looking for a powerful column oriented database system with a high-availability system, you really should consider ClickHouse as your database system of choice.

ClickHouse also provides multi-master synchronous replication, automatic fail-over, and self-organizing clusters. All in all, this makes ClickHouse a great choice for most users that need analytic features from their database system.

In this tutorial, we will show you how to install ClickHouse on an Ubuntu 18.04 server.

Prerequisites

  • Ubuntu 18.04 server or VPS. Other Ubuntu versions may work, but this tutorial is focused on Ubuntu 18.04.
  • SSH access with root privileges (a user account that has sudo access or the root account)

Step 1 – Getting Started – Login & Updates

Log in to your Ubuntu 18.04 VPS using SSH as the root user (or as a user that has sudo privileges)

ssh root@IP_Address -p Port_number

Don’t forget to replace IP_Address and Port_number with their respective values for your server. If you don’t know your server’s SSH port, it’s likely port 22.

You can check whether you have the proper Ubuntu version installed on your server with the following command:

# lsb_release -a

You should get this output:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

Again, if you have Ubuntu 16.04 or Ubuntu 20.04, this may work, but it’s not guaranteed.

Then, run the following command to make sure that all installed packages on the server are updated to the latest available version.

# apt update && apt upgrade

This maximizes compatibility and ensures that nothing is out of date.

Step 2 – Install ClickHouse

There are several ways to install ClickHouse on Ubuntu 18.04 (such as building it from source), but in this tutorial, we will install it using the ClickHouse official repository. This simplifies the install and gets you up and running in just a few minutes. You can add the key for the repository and then install the repository with these commands:

# apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4
# echo "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" | tee /etc/apt/sources.list.d/clickhouse.list

The command above will create a clickhouse.list file. We need to run the following commands to install ClickHouse now.

# apt update
# apt install clickhouse-server clickhouse-client

In the installation process, you will be asked to create a password for user ‘default’. Please create and save a copy of the password – you will need it to access your ClickHouse server.

Once the installation is completed, we can enable ClickHouse to run automatically on boot.

# systemctl enable clickhouse-server

Let’s start the ClickHouse service now.

# systemctl start clickhouse-server

Your ClickHouse server is now running, you can verify it by running this command:

# systemctl status clickhouse-server
root@ubuntu1804:~# systemctl status clickhouse-server
● clickhouse-server.service - ClickHouse Server (analytic DBMS for big data)
Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-07-01 03:37:57 CEST; 3s ago
Main PID: 19308 (clickhouse-serv)
Tasks: 36 (limit: 2299)
CGroup: /system.slice/clickhouse-server.service
└─19308 /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid

Jul 01 03:37:57 ubuntu1804 systemd[1]: Started ClickHouse Server (analytic DBMS for big data).
Jul 01 03:37:57 ubuntu1804 clickhouse-server[19308]: Include not found: clickhouse_remote_servers
Jul 01 03:37:57 ubuntu1804 clickhouse-server[19308]: Include not found: clickhouse_compression
Jul 01 03:37:57 ubuntu1804 clickhouse-server[19308]: Logging trace to /var/log/clickhouse-server/clickhouse-server.log
Jul 01 03:37:57 ubuntu1804 clickhouse-server[19308]: Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log
Jul 01 03:37:57 ubuntu1804 clickhouse-server[19308]: Include not found: networks
Jul 01 03:37:59 ubuntu1804 clickhouse-server[19308]: Include not found: clickhouse_remote_servers
Jul 01 03:37:59 ubuntu1804 clickhouse-server[19308]: Include not found: clickhouse_compression

Now that the server is running, you can access your ClickHouse server through the command line interface:

# clickhouse-client --password

You will be asked for the password that you created earlier.

root@ubuntu1804:~# clickhouse-client --password
ClickHouse client version 19.9.2.4 (official build).
Password for user (default):
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 19.9.2 revision 54421.

Here’s how you can show your databases in ClickHouse:

ubuntu1804.yourdomain.com :) show databases

SHOW DATABASES

┌─name────┐
│ default │
│ system │
└─────────┘

2 rows in set. Elapsed: 0.002 sec.

And here’s how you can select using ClickHouse.

ubuntu1804.yourdomain.com :) select 1

SELECT 1

┌─1─┐
│ 1 │
└───┘

1 rows in set. Elapsed: 0.002 sec.

As seen above, we can invoke the “show database” and “select” queries with no problems.

Step 3 – Configure ClickHouse

3.1 – Change listening IP address

Once the ClickHouse server is installed, you can only access it from the same server, as it only listens on localhost by default. To change the listening IP address, we need to edit the /etc/clickhouse-server/config.xml file.

# nano /etc/clickhouse-server/config.xml

Find the string listen_host, and uncomment the tag line. If you have several IP addresses and want to set ClickHouse server to listen only on a specific IP address, you can edit the line as follows – make sure that you replace 111.222.333.444 with your actual IP address:

<listen_host>111.222.333.444</listen_host>

3.2 – Enable Tabix

If you want to access the ClickHouse server through http or by using a web browser, you can enable Tabix by editing the same config.xml file as before. If you choose not to do this, you won’t be able to access and manage your databases through a web browser.

# nano /etc/clickhouse-server/config.xml

Find the string http_server_default_response, then uncomment the tag line.

After making changes to the config.xml file, we need to restart our clickhouse-server service.

# systemctl restart clickhouse-server

Now, you should be able to access http://Your_IP_Address:8123 and log in using the default user and password you specified earlier in the installation process.

 

Congratulations! At this point, you should be able to access ClickHouse using port 9000 and Tabix at http://111.222.333.444:8123. For more information about ClickHouse, its features, and configuration, please check their official documentation.


Setting up ClickHouse is easy, but maintaining it is a different story. This is where our Managed Ubuntu Support services can help you save a lot of time and money when running your business. We specialize in fully-managed support for almost any enterprise Linux server. Whether you need help optimizing your ClickHouse instance, or general maintenance and management of any other service, we’re here to help you 24 hours a day, 7 days a week.

If you found this tutorial helpful in setting up ClickHouse on your Ubuntu server, please consider sharing this post on social media with our share shortcuts, or leave a comment telling us how the install went in our comments section. Thanks.

The post How to Install ClickHouse on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-clickhouse-on-ubuntu-18-04/feed/ 0
Install Cockpit on Ubuntu 18.04 https://linuxhostsupport.com/blog/install-cockpit-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/install-cockpit-on-ubuntu-18-04/#respond Fri, 24 Jul 2020 20:04:56 +0000 https://linuxhostsupport.com/blog/?p=1207 In this tutorial, we will show you how to install Cockpit on an Ubuntu 18.04 Server. Cockpit is a web-based system administration service used to manage server services, server storage, configure networks, inspect logs, update server OS packages, and much more. Thanks to its web-based management, keeping track of what’s going on with your server […]

The post Install Cockpit on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install Cockpit on an Ubuntu 18.04 Server.

Cockpit is a web-based system administration service used to manage server services, server storage, configure networks, inspect logs, update server OS packages, and much more. Thanks to its web-based management, keeping track of what’s going on with your server is easier than ever. Cockpit also makes it easier for users that don’t have much experience with servers to better manage their systems without having to learn to use the command line. Let’s begin with the installation.

Requirements

  • An Ubuntu 18.04 Server
  • Access to the root user account (or access to an admin account with root privileges)

Step 1. Log in to the Server & Update all Server OS Packages

Log in to your Ubuntu 18.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number (if using a custom port number). Additionally, replace ‘root’ with the username of the admin account if necessary.

Before we can start with the Cockpit installation, we have to make sure that all Ubuntu OS packages installed on the server are up to date. We can do this by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Step 2. Install Cockpit

Run the following command to install the latest version of Cockpit available in the official Ubuntu repositories:

sudo apt-get install cockpit

In order to access Cockpit only by using your domain name, e.g.  https://your-domain.com, and without the port number 9090 in the URL, we need to install a web server, an SSL certificate on that domain and set Cockpit behind a reverse proxy. Don’t worry, we’ll be covering those steps in this tutorial as well.

Step 3. Install Apache

Check if Apache is already installed and running on the server:

dpkg -l | grep -i apache2
ps aux | grep apache2

If it is not installed, run the following command to install the Apache web server:

apt-get install apache2

Enable Apache service to start automatically upon server boot with:

systemctl enable apache2

We can also check the status of the Apache service with the following command. It should already be running, but let’s check:

systemctl status apache2

The output should look something like this:

● apache2.service – The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Sun 2019-06-30 11:12:05 CDT; 9min ago
Main PID: 9277 (apache2)
Tasks: 7 (limit: 2321)
CGroup: /system.slice/apache2.service
├─ 9277 /usr/sbin/apache2 -k start
├─ 9280 /usr/sbin/apache2 -k start
├─ 9281 /usr/sbin/apache2 -k start
├─ 9282 /usr/sbin/apache2 -k start
├─ 9283 /usr/sbin/apache2 -k start
├─ 9284 /usr/sbin/apache2 -k start
└─22386 /usr/sbin/apache2 -k start

Step 4. Install a Let’s Encrypt SSL certificate

Install Certbot, a program that automates SSL/TLS certificate installation using Let’s Encrypt Free SSL. This allows your website to be secure for free. Run this command to install the necessary packages for Let’s Encrypt:

sudo apt-get install certbot python-certbot-apache

Install a Let’s Encrypt SSL certificate on your domain. Certbot will automatically configure your Apache config file to use SSL:

sudo certbot --apache -d your-domain.com -d www.your-domain.com

Make sure to enter a valid e-mail address as that is where notifications about your certificate status (e.g. an expiring certificate) will arrive. During the installation, choose to redirect HTTP traffic to HTTPS.

Step 5. Set a Reverse Proxy in Apache

We can now set a reverse proxy in Apache. In order to do so, we need to enable some additional proxy modules in Apache. Run the following commands:

a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel

Restart Apache for the changes to take effect:

systemctl restart apache2

Once mod_proxy, mod_proxy_http and proxy_wstunnel are enabled in Apache, create a new configuration file for your domain with the following command:
NOTE: It’s very important you replace “your-domain.com” at ALL locations where it shows up in the config file and all other locations. If you don’t, your configuration may not work.

nano /etc/apache2/sites-available/your-domain.com.conf

And enter the following lines:

<VirtualHost *:80>

ServerName your-domain.com
ServerAlias www.your-domain.com

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.your-domain.com [OR]
RewriteCond %{SERVER_NAME} =your-domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>

<VirtualHost *:443>

ServerName your-domain.com
ServerAlias www.your-domain.com

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:9090/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://127.0.0.1:9090/$1 [P,L]

ProxyPass / http://127.0.0.1:9090/
ProxyPassReverse / http://127.0.0.1:9090/
<Location />
Order allow,deny
Allow from all
</Location>

SSLCertificateFile /etc/letsencrypt/live/your-domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/your-domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

</VirtualHost>

</IfModule>

Remember to replace your ‘your-domain.com‘ with your actual domain name. Save the file, close it and disable the default Apache configuration:

a2dissite 000-default

Enable the “your-domain.com.conf” configuration in Apache using:

a2ensite your-domain.com

Optionally, we can use this command to enable it:

ln -s /etc/apache2/sites-available/your-domain.com.conf /etc/apache2/sites-enabled/your-domain.com.conf

Then restart Apache for the changes to take effect:

systemctl restart apache2

Edit the Cockpit configuration file and add the following lines:

[WebService]
Origins = https://your-domain.com http://127.0.0.1:9090
ProtocolHeader = X-Forwarded-Proto
AllowUnencrypted = true

Restart Cockpit and enable it to start on server boot:

sudo systemctl restart cockpit.socket
sudo systemctl enable cockpit.socket

Now we can access Cockpit without needing to use port 9090 in a web browser – we can now access it using https://your-domain.com.

Log in as root, or use an existing system user account on the server.

 

If there are no user accounts created on the server yet, we can create it using this command:

adduser username

Replace username with the actual name of the new user account, and you will be prompted to set and confirm the new user account password. Make sure to use a strong password for the new account.

 

That’s it – you now have a working Cockpit installation running on your Ubuntu 18.04 server.


Of course, you don’t have to install Cockpit on Ubuntu 18.04, if you use one of our Managed Ubuntu Support solutions, in which case you can simply ask our expert Linux admins to setup Cockpit on Ubuntu 18.04 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Cockpit on an Ubuntu 18.04 VPS, please share it with your friends on the social networks using the share buttons below, or simply leave a comment down in the comments section. Thanks.

The post Install Cockpit on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/install-cockpit-on-ubuntu-18-04/feed/ 0
How to Install Gitea on Ubuntu 18.04 https://linuxhostsupport.com/blog/how-to-install-gitea-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/how-to-install-gitea-on-ubuntu-18-04/#comments Fri, 05 Jun 2020 20:54:22 +0000 https://linuxhostsupport.com/blog/?p=1159 In this article, we will show you how to install and configure Gitea service on Ubuntu 18.04. One of the best alternatives for GitHub is Gitea. Git with a cup of tea, also known as Gitea, is an open-source application that is a fork of Gogs and is functionally very similar to GitHub, Bitbucket, and […]

The post How to Install Gitea on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
In this article, we will show you how to install and configure Gitea service on Ubuntu 18.04. One of the best alternatives for GitHub is Gitea. Git with a cup of tea, also known as Gitea, is an open-source application that is a fork of Gogs and is functionally very similar to GitHub, Bitbucket, and Gitlab.

Gitea is written in the Go language and can be run anywhere that Go can be compiled, such as Linux, macOS, Windows, ARM and PowerPC architectures. Gitea has many features such as problems and time tracking, branch repository, file locking, and tagging, merging and more. By following the instructions below, you will install Nginx, MariaDB, Git, create a system user, install Gitea and configure Nginx as a reverse proxy. Lets begin.

Step 1. Connect to your Server

Before we begin, you need to connect to your server via SSH as the root user. To do this, use the following command:

ssh root@IP_Address -p Port_Number

of course, you will need to replace IP_Address and Port_Number with your actual server IP address and SSH port number. The default SSH port is 22, but it may be different for your server.

Once logged in, make sure that your server is up-to-date by running the following commands:

sudo apt update
sudo apt upgrade

Step 2. Install Nginx and Git

First, you need to install a web server to run Gitea. You can choose any web server that is available for Ubuntu 18.04 and install it on your server – however, in this tutorial we will be installing and using Nginx as our web server. It’s a very versatile and extremely popular web server, similar to Apache.

By executing the following command, you can install the Nginx Web server on your VPS.

sudo apt -y install nginx

When the installation will finish you can start Nginx and also enable it to start on server boot with these commands.

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

We can also install a couple of dependencies that we’ll need in order to continue with the Gitea installation.

sudo apt -y install git wget

You can verify the installed git version with the command:

git --version
Output: 
git version 2.17.1

Step 3. Install MariaDB Database Server

Gitea supports the following databases: MariaDB/MySQL, PostgreSQL, SQLite, and TiDB. However, in this tutorial, we will install and use the MariaDB server and client. To install the MariaDB server on your Ubuntu 18.04 Server, run the command:

sudo apt -y install mariadb-server mariadb-client

Once MariaDB is installed on your server, you can use the commands below so you can stop, start, and enable the MariaDB service.

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

The next command is optional. You can run the command if you want to secure the MariaDB server by disallowing remote root access, removing the test database and creating a root password.

sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the [Enter] key, no password is set
Set root password? [Y/n]: Y
New password: Enter your password
Re-enter new password: Repeat your password
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

Restart the MariaDB server so that the changes will take effect.

sudo systemctl restart mariadb.service

Step 4. Create a Database

You should now be able to log in to the MariaDB server with the command:

sudo mysql -u root -p

Then type the password you created above to sign on. Once you are in the MariaDB shell, you can use the following command and create a database called ‘gitea’ for the Gitea application.

CREATE DATABASE gitea;

Next, create a database user called ‘giteauser’ and replace New_Str0n9_Pas$worD with your own password.

CREATE USER 'giteauser'@'localhost' IDENTIFIED BY 'New_Str0n9_Pas$worD';

To grant the user ‘giteauser’ with full access to the database ‘gitea’ run the command:

GRANT ALL ON gitea.* TO 'giteauser'@'localhost' IDENTIFIED BY 'New_Str0n9_Pas$worD' WITH GRANT OPTION;

Now we can use flush privileges operation to reload the grant tables and after that, we can exit from the MariaDB shell.

FLUSH PRIVILEGES;
EXIT;

Step 5. Prepare the Gitea Environment

Now we need to create a git user that can manage Gitea on the system. To do that, run the command below:

sudo adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git

With the following commands, we will create the necessary directory structure and give them appropriate permissions.

sudo mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
sudo chown git:git /var/lib/gitea/{data,indexers,log}
sudo chmod 750 /var/lib/gitea/{data,indexers,log}
sudo mkdir /etc/gitea
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea

Step 6. Install Gitea

The current latest version of Gitea is 1.9, however, you can always check for a newer version so you can download and install it. Download Gitea version 1.9 with the following command:

sudo wget -O gitea https://dl.gitea.io/gitea/1.9/gitea-1.9-linux-amd64

Once the file will be downloaded, make it executable and move it into the /usr/local/bin directory.

sudo chmod +x gitea
sudo mv gitea /usr/local/bin/gitea

Step 7. Create a Service file to Start Gitea Automatically

We’ll also show you how to create a Gitea systemd script. Run the following command to create a new Gitea service:

sudo nano /etc/systemd/system/gitea.service

Then copy and paste the content below into the open file.

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
#After=mysqld.service
#After=postgresql.service
#After=memcached.service
#After=redis.service

[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
# If you want to bind Gitea to a port below 1024 uncomment
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

Save and close the file.

In order for the changes to take effect, we’ll need to reload systemd. Start the new Gitea service, and if everything works as expected, you can enable this service:

sudo systemctl daemon-reload
sudo systemctl enable gitea
sudo systemctl start gitea

Step 8. Configure Nginx as a Reverse Proxy

Since Nginx has been installed already, we can continue and show you how to create an Nginx server block with a reverse proxy for your domain that you want to use. In the following command, we will use nano as our editor, but if you do not prefer nano, you can use any editor of your choice and create a new server block called git.conf

sudo nano /etc/nginx/sites-available/git.conf

Then paste the configuration from below into the file, and replace your_domain_name.com with your actual domain name.

upstream gitea {
    server 127.0.0.1:3000;
}

server {
    listen 80 default_server;
    server_name your_domain_name.com;
    root /var/lib/gitea/public;
    access_log off;
    error_log off;

    location / {
      try_files maintain.html $uri $uri/index.html @node;
    }

    location @node {
      client_max_body_size 0;
      proxy_pass http://gitea;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $http_host;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_max_temp_file_size 0;
      proxy_redirect off;
      proxy_read_timeout 120;
    }
}

After you finish editing the file, save and close it.

Once you have configured the Nginx server block, you can enable it by executing the following command:

sudo ln -s /etc/nginx/sites-available/git.conf /etc/nginx/sites-enabled

Remove the default Nginx server block with:

sudo rm /etc/nginx/sites-enabled/default

Restart Nginx so the changes will take effect.

sudo systemctl reload nginx.service

Now, open your preferred web browser and type your domain, and append slash install (/install) to the URL:

http://your_domain_name.com/install

 

Follow the onscreen instructions to complete the Gitea setup.

That’s it! In this article, we showed you how to install Nginx, MariaDB, Git, create a system user, install Gitea and configure Nginx as a reverse proxy. Now you can start exploring this useful application.


Of course, if you are one of our Managed Linux Server Support customers, you don’t have to install Gitea on your Ubuntu 18.04 Server – simply ask our admins, sit back, and relax. Our admins will install and configure Gitea for you immediately.

PS. If you liked this post about how to install Gitea on an Ubuntu 18.04 Server, please share it with your friends on the social networks using the share buttons below, or simply leave a comment in the comments section. Thank you.

The post How to Install Gitea on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-gitea-on-ubuntu-18-04/feed/ 2
How to Install Prestashop on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-prestashop-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-prestashop-on-ubuntu-16-04/#respond Wed, 29 Aug 2018 09:59:35 +0000 https://linuxhostsupport.com/blog/?p=654 In this article we will show you how to install PrestaShop on an Ubuntu 16.04 server. Prestashop is an easy to use open source shopping cart application written in PHP used by website developers to build and run a successful online store. Requirements In order to run PrestaShop on your Ubuntu 16.04 VPS, we need the following […]

The post How to Install Prestashop on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this article we will show you how to install PrestaShop on an Ubuntu 16.04 server. Prestashop is an easy to use open source shopping cart application written in PHP used by website developers to build and run a successful online store.

Requirements

In order to run PrestaShop on your Ubuntu 16.04 VPS, we need the following requirements met:

  • Apache Web Server >= 2.0 compiled with mod_rewrite module, or Nginx
  • MySQL 5.5 or later is recommended, or MariaDB installed on your Linux virtual server.
  • PHP 5.4 or higher with the mcrypt, curl, gd, openssl, zip and pdo PHP extensions enabled. Optionally, you can install memcached PHP extension to improve PrestaShop performance.
  • Full SSH root access or a user with sudo privileges is also required

Step 1: Log in via SSH on the Ubuntu server:

Log in to the VPS via SSH as user root

ssh roo@IP_Address -p Port_number

Step 2: Update all packages

Once you are logged, run the following command to make sure that all installed OS packages are up to date:

apt-get update
apt-get upgrade

Step 3: Install Apache, MySQL (MariaDB) and PHP 7

Install Apache, MySQL (or MariaDB) and PHP 7 on your server using the following command:

apt-get install apache2 libapache2-mod-php mysql-server 
apt-get install php7.0-cli php7.0-common php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-xml php7.0-mcrypt php7.0-mbstring php7.0-json php7.0-intl

Enable the Apache mod_rewrite module:

sudo a2enmod rewrite

Locate the PHP configuration file:

# php -i | grep -i php.ini

Configuration File (php.ini) Path => /etc/php/7.0/cli
Loaded Configuration File => /etc/php/7.0/cli/php.ini

Edit the PHP configuration file (/etc/php/7.0/cli/php.ini):

vi /etc/php/7.0/cli/php.ini

and modify the memory_limit value to 128MB or higher:

memory_limit = 128M

Also, set upload_max_filesize to 32 MB (or more):

upload_max_filesize = 32M

Restart the Apache web server for the changes to take effect:

sudo systemctl restart apache2

Step 4: Create a MySQL database for PrestaShop

Log into MySQL console with the root account:

mysql -u root -p

Now we will create a MySQL database for PrestaShop using the following query:

mysql> CREATE DATABASE prestashop;

Then, execute the following query to add a separate user for PrestaShop that will interact with the database:

mysql> GRANT ALL PRIVILEGES ON prestashop.* to 'prestashop'@'localhost' IDENTIFIED BY '5tr0ng_Pa55w0rd';

Do not forget to replace ‘5tr0ng_Pa55w0rd’ with an actual strong password.

Execute the following command to apply the privileges we set:

mysql> FLUSH PRIVILEGES;

Now we can exit the MySQL session:

mysql> quit

Step 5: Install PrestaShop

Download the latest stable version of PrestaShop in the /opt directory on your server and extract it in the /var/www/html/ directory:

cd /opt
wget https://download.prestashop.com/download/releases/prestashop_1.7.4.2.zip
unzip prestashop_1.7.4.2.zip 
unzip prestashop.zip -d /var/www/html/prestashop/

Set the appropriate file permissions and ownership (www-data is the user of the Apache web server):

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

Step 6: Configure Apache to serve PrestaShop

Now we will have to setup the Apache configuration so it can serve the PrestaShop directory, add the following contents below to the /etc/apache2/sites-available/prestashop.conf file with nano or your favorite editor:

sudo nano /etc/apache2/sites-available/prestashop.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
ServerName your-domain.com
ServerAlias www.your-domain.com
DocumentRoot /var/www/html/prestashop

<Directory /var/www/html/prestashop>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog /var/log/apache2/prestashop-error_log
CustomLog /var/log/apache2/prestashop-access_log common
</VirtualHost>

Enable the Apache PrestaShop configuration:

sudo a2ensite prestashop.conf

Remove the default Apache configuration file:

rm /etc/apache2/sites-enabled/000-default.conf

Now restart the Apache web server:

sudo systemctl restart apache2

Open your favorite web browser and type in the following URL to access the PrestaShop web interface and start the setup:

http://your-domain.com/

From here you can finish the setup by selecting the installation language and entering the information about your PrestaShop store. Then, create an administrator account and enter the following information to configure the database:

Database server address: 127.0.0.1

Database name: prestashop

Database login: prestashop

Database password: enter the MySQL password for the prestashop MySQL user.

For security reason, you must delete the ‘install’ directory:

rm -rf /var/www/html/prestashop/install/

Once you deleted the installation directory, log in to the PrestaShop back-end by clicking on the ‘Manage your store’ button.

installing prestashop on ubuntu 16.04

Congratulations! PrestaShop has been successfully installed on your server. You can now start using PrestaShop and customize it according to your needs.


Install Prestashop on Ubuntu 16.04Of course, you don’t have to install PrestaShop on Ubuntu 16.04, if you use one of our Outsourced Server Support Services, in which case you can simply ask our expert system administrators to install PrestaShop on Ubuntu 16.04 for you, using the LAMP stack or any other web hosting stack of your choice. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install PrestaShop on Ubuntu 16.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.

The post How to Install Prestashop on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-prestashop-on-ubuntu-16-04/feed/ 0
How to Install GitLab on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-gitlab-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-gitlab-on-ubuntu-16-04/#respond Wed, 22 Aug 2018 08:33:28 +0000 https://linuxhostsupport.com/blog/?p=650 One of the alternatives for Github is the Gitlab git repository manager. In this tutorial, we are going to show you how to install GitLab (Community Edition) on Ubuntu 16.04. Gitlab offers outstanding features like repository branching, merging, file locking and tagging, time tracking and many more, so you can take full advantage of it. […]

The post How to Install GitLab on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
One of the alternatives for Github is the Gitlab git repository manager. In this tutorial, we are going to show you how to install GitLab (Community Edition) on Ubuntu 16.04.
Gitlab offers outstanding features like repository branching, merging, file locking and tagging, time tracking and many more, so you can take full advantage of it.
Gitlab has self-hosted and paid version (Enterprise Edition) and self-hosted and free (Community Edition). In this article, we will install the Community Edition by using the ‘omnibus’ package offered by official Gitlab.

Prerequisites

We will assume that you have a VPS with freshly installed Ubuntu 16.04. Other then the Ubuntu for recommended hardware requirements you will need:

2 cores
4GB of RAM
Root privileges

For more information about hardware requirements, you can check the official Gitlab page.

Install Required Packages

Before we begin the installation of GitLab, we need to be sure that Ubuntu already has the necessary packages installed to run GitLab. To install the necessary dependencies, we need to execute the command below:

sudo apt update
sudo apt install curl openssh-server ca-certificates

Also, we need to install Postfix MTA for notifications.

sudo apt install postfix

A configuration screen may appear during Postfix installation. Choose the “Internet Site” and press Enter. After this, need to provide a mail server name or IP address to configure how the system will send mail. You can proceed if additional screens appear and accept the default values.

Install and configure Gitlab packages

Now that dependencies are set, we can proceed with installing GitLab. This is a direct process that uses an installation script named ‘omnibus’ to configure your system with GitLab repositories.

We will add the repository for the GitLab package by running the following command:

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

Next step is to install the GitLab package. In the following command, you need to change the URL from http://your_domain.com to the domain you will use to access the GitLab instance. The domain you will set it will be configured automatically by the script we are using. After the installation, there is an additional configuration for setting up the HTTPS protocol.

sudo EXTERNAL_URL="http://your_domain.com" apt install gitlab-ee

If the upper instruction was carefully followed, now you have installed GitLab CE on your Ubuntu 16.04. server.

First browsing on your domain

When you access your_domain.com for the first time at your favorite browser, you will be redirected to the reset password screen. Of course in this screen, you need to enter your admin password and when you will finish with this, you will be redirected to the login screen again so you can log in for the first time. The username will be set by default as root, so you can use it when you try to log in.

Generate Let’s encrypt SSL certificates

In this section, we will install the free Let’s Encrypt SSL certificate for our newly installed GitLab. In order to generate a Let’s Encrypt Certificate, we will use the letsencrypt command tool.

To install the letsencrypt command-line tool on Ubuntu 16.04, run the following command:

sudo apt install letsencrypt

Using the below command you can generate a new Let’s Encrypt SSL certificate for your domain.

sudo letsencrypt certonly --standalone -d your_domain.com

After executing this command you need to enter your email address. Next step you can type ‘A’ so you Agree with the Terms of Service. After accepting on ToS there is one more step which is optional. You can choose ‘Y’ or ‘N’ and wait for the script to finish the installation of the SSL certificate for your_domain.com.

Please note: in some situations installation of the Let’s Encrypt SSL certificate may be not successful. So, you need to stop the application using sudo systemctl stop gitlab-runsvdir.service and re-run the letsencrypt tool. Once the script will finish you can start the GitLab application using sudo systemctl start gitlab-runsvdir.service.

Enable HTTPS for GitLab

Since we have generated an SSL certificate with Let’s Encrypt, in this step we will enable HTTPS connection and forward from all HTTP to HTTPS.

We will configure GitLab by editing the configuration file ‘gitlab.rb’ as an example shown below:

sudo nano /etc/gitlab/gitlab.rb

Change the HTTP to HTTPS at external_url:

external_url 'https://your_domain.com'

Modify and uncomment this configuration as the following example:

letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['sammy@yourdomain.com']
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/letsencrypt/live/your_domain.com/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/your_domain.com/privkey.pem"

After completing the modifications, save the changes and exit the nano.

Please note: You need to change your_domain.com with the GitLab domain that you used to configure.

The last step is to execute the following command and apply the GitLab configuration:

sudo gitlab-ctl reconfigure

In summary, we installed GitLab CE on Ubuntu 16.04. Also, we installed Let’s Encrypt SSL and configure GitLab to work on HTTPS. For more information about GitLab feel free to look at their official website documentation at https://docs.gitlab.com/


Install GitLab on Ubuntu 16.04 You don’t have to install GitLab on your Ubuntu 16.04 VPS if you use our server administration services, in which case you can simply ask our expert Linux admins to install GitLab for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on How to Install GitLab on Ubuntu 16.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.

The post How to Install GitLab on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-gitlab-on-ubuntu-16-04/feed/ 0
How to Install Asterisk on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-asterisk-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-asterisk-on-ubuntu-16-04/#comments Wed, 18 Jul 2018 09:57:44 +0000 https://linuxhostsupport.com/blog/?p=617 In this tutorial, we will show you how to install Asterisk on an Ubuntu 16.04 server. Asterisk is the most popular open source software implementation of a telephone private branch exchange (PBX). It includes many features such as: voicemail, conference calling, call recorder, automatic call distribution, interactive voice response, real time monitoring, debugging console and supports most […]

The post How to Install Asterisk on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install Asterisk on an Ubuntu 16.04 server. Asterisk is the most popular open source software implementation of a telephone private branch exchange (PBX). It includes many features such as: voicemail, conference calling, call recorder, automatic call distribution, interactive voice response, real time monitoring, debugging console and supports most of the standard voice over IP (VOIP) protocols including SIP, d H.323 and MGCP.

Login via SSH and update the OS

Make sure your server OS is fully up-to-date:

apt-get update
apt-get upgrade

Install all required packages and dependencies

Install all required packages on your Asterisk VPS with the following commands:

apt-get install build-essential
apt-get install git-core subversion libjansson-dev sqlite autoconf automake libxml2-dev libncurses5-dev libtool

Download Asterisk

At the time of the writing of this article the latest Asterisk version is 15.5.0, switch to the /usr/src/directory with:

cd /usr/src/

and download the asterisk archive with the following wget command:

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-15-current.tar.gz

When the download is completed extract the asterisk-15-current.tar.gz file by typing the following command:

tar -zxvf asterisk-15-current.tar.gz

Compile Asterisk

Once the asterisk archive is extracted, switch to the asterisk-15.5.0 directory with:

cd /usr/src/asterisk-15.5.0

Install all of the missing dependencies with the help of the install_prereq script:

./contrib/scripts/install_prereq install

Depending on the number of the missing packages the installation may take some time , once it is completed the output will look like this:

Current status: 7 (-2) upgradable.
#############################################
## install completed successfully
#############################################

Next step is to run the ./configure script which will check your system for missing libraries and dependencies and prepare the Asterisk code for the build process:

./configure 

The output of the successful completion should look like this:

configure: Menuselect build configuration successfully completed

               .$$$$$$$$=..
            .$7$7..          .7$7:.
          .$:.                 ,$7.7
        .$7.     7$$           .$77
     ..$.       $$$            .$$7
    ..7$   .?.   $$$   .?.       7$$.
   $.$.   .$$7. $$7 .7$$.      .$$.
 .777.   .$$$77$$77$$$7.      $$,
 $$~      .7$$$$$$$7.       .$$.
.$7          .7$$$$7:          ?$$.
$$          ?7$$$$$I        .$$7
$$       .7$$$$$$$$      :$$.
$$       $$$7$$$$$$    .$$.
$$        $$   7$$7  .$$    .$$.
$$             $$7         .$$.
7$$7            7$$        7$$
 $$$                        $$
  $$7.                       $  (TM)
   $$$$.           .7$$$  $
     $$$$$$7$$$$$.$$$
       $$$$$$$$.

configure: Package configured for:
configure: OS type  : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : pc : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu :

Once the configuration is completed start the compilation process using the make command by typing:

make

The build process may take several minutes depending on your system speed and once it is completed you will see the following message which means that the Asterisk was successfully compiled:

+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running:              +
+                                           +
+                make install               +
+-------------------------------------------+

The next step is to run the make install command which will install Asterisk and all compiled Asterisk modules:

make install

Upon successful Asterisk installation you will see the following message on your screen:

 +---- Asterisk Installation Complete -------+
 +                                           +
 +    YOU MUST READ THE SECURITY DOCUMENT    +
 +                                           +
 + Asterisk has successfully been installed. +
 + If you would like to install the sample   +
 + configuration files (overwriting any      +
 + existing config files), run:              +
 +                                           +
 + For generic reference documentation:      +
 +    make samples                           +
 +                                           +
 + For a sample basic PBX:                   +
 +    make basic-pbx                         +
 +                                           +
 +                                           +
 +-----------------  or ---------------------+
 +                                           +
 + You can go ahead and install the asterisk +
 + program documentation now or later run:   +
 +                                           +
 +               make progdocs               +
 +                                           +
 + **Note** This requires that you have      +
 + doxygen installed on your local system    +
 +-------------------------------------------+

As the message above says run the make samples command to install the Asterisk sample configuration files:

make samples

Install the initialization script so that you can manage your Asterisk service using the systemctl command :

make config

The command above will show no output.

You can also install the logrotation script with:

make install-logrotate

You will see the following output indicating that the logrotation configuration has been successfully created:

if [ ! -d "/etc/asterisk/../logrotate.d" ]; then \
        /usr/bin/install -c -d "/etc/asterisk/../logrotate.d" ; \
fi
sed 's#__LOGDIR__#/var/log/asterisk#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#/usr/sbin#g' > contrib/scripts/asterisk.logrotate.tmp
/usr/bin/install -c -m 0644 contrib/scripts/asterisk.logrotate.tmp "/etc/asterisk/../logrotate.d/asterisk"
rm -f contrib/scripts/asterisk.logrotate.

Start Asterisk

Now that you have Asterisk installed on your Ubuntu 16.04 VPS you can use the systemctl to start the Asterisk service:

systemctl start asterisk

To check if the Asterisk service is started use the systemctl status command:

systemctl status asterisk

If the service is running you will see the following message:

● asterisk.service - LSB: Asterisk PBX
   Loaded: loaded (/etc/init.d/asterisk; bad; vendor preset: enabled)
   Active: active (running) since Wed 2018-07-18 03:36:23 CDT; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 15427 ExecStart=/etc/init.d/asterisk start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/asterisk.service
           └─15440 /usr/sbin/asterisk

To enable the asterisk service to start on system boot type the following command:

systemctl enable asterisk

That is it. The Asterisk installation is complete.


Install Asterisk on Ubuntu 16.04Of course you don’t have to install Asterisk on Ubuntu 16.04 yourself if you use our Premium Server Support Services, in which case you can simply ask our expert Linux admins to install Asterisk on Ubuntu 16.04 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this on how to install Asterisk on Ubuntu 16.04, post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Asterisk on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-asterisk-on-ubuntu-16-04/feed/ 12
How to set up Apache Virtual Hosts on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04/#respond Wed, 20 Jun 2018 07:14:11 +0000 https://linuxhostsupport.com/blog/?p=585 Apache is a free and open source web server, it is the most popular web server in the world, and is commonly used in Linux servers. It is developed and maintained by Apache Software Foundation, over half of all servers around the world are running this fast and secure web server. In this tutorial, we […]

The post How to set up Apache Virtual Hosts on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Apache is a free and open source web server, it is the most popular web server in the world, and is commonly used in Linux servers. It is developed and maintained by Apache Software Foundation, over half of all servers around the world are running this fast and secure web server. In this tutorial, we will show you how to set up Apache virtual hosts on Ubuntu 16.04, to host as many websites as you want, the limit is your server’s resources like RAM, disk space, etc.

What is virtual host?

Virtual host is used to host a number of websites on the same web server. The web server could be Apache, nginx, Litespeed, etc. Apache supports two types of virtual host:

Name based virtual hosts
IP based virtual hosts

The name based virtual host is commonly used to host multiple websites on the same server, whereas in IP based virtual host we can only configure one website on one IP address. In this tutorial, we will show you how to create name based virtual hosts. We will host domainone.com and domaintwo.com on a server, please replace them with your actual domain names.

How to create virtual host

Let’s SSH in to the server and proceed to the next step.

ssh root@Your_IP_Address -p7022

Create directory for domains’ webroot

mkdir -p /var/www/html/{domainone.com,domaintwo.com}/{public_html,logs}
set up Apache Virtual Hosts on Ubuntu 16.04

The command above will create four directories, two of them will be our domains’ document root, and the other tw will be used to store our apache log files:

/var/www/html/domainone.com/public_html
/var/www/html/domaintwo.com/public_html
/var/www/html/domainone.com/logs
/var/www/html/domaintwo.com/logs

Create test pages

Now, let’s create a test page for domainone.com

nano /var/www/html/domainone.com/public_html/index.html

<html>
<body>
<center><h1>This is domainone.com!</h1></center>
</body>
</html>

 

Save and exit nano with Ctrl + O then Ctrl + X

Let’s copy the index test page to domaintwo.com

cp /var/www/html/domainone.com/public_html/index.html /var/www/html/domaintwo.com/public_html/

Okay, the index test page has been copied, but we need to edit the index page for domaintwo.com

sed -i 's/domainone.com/domaintwo.com/g' /var/www/html/domaintwo.com/public_html/index.html

We have successfully created an index test page for both domain names. Let’s give permission to user www-data, the default user who runs the apache.

chown -R www-data: /var/www/html/
Apache Virtual Hosts on Ubuntu 16.04

Create a virtual host

Now, let’s create a virtual host configuration file for domainone.com. The virtual host configuration file should be ended with .conf extension

nano /etc/apache2/sites-available/domainone.com.conf
ServerAdmin admin@domainone.com
ServerName domainone.com
ServerAlias www.domainone.com
DocumentRoot /var/www/html/domainone.com/public_html

ErrorLog /var/www/html/domainone.com/logs/error.log
CustomLog /var/www/html/domainone.com/logs/access.log combined

The virtual host configuration file for domainone.com has been created, now we only need to copy and edit it for domaintwo.com

cp /etc/apache2/sites-available/domainone.com.conf /etc/apache2/sites-available/domaintwo.com.conf
sed -i 's/domainone.com/domaintwo.com/g' /etc/apache2/sites-available/domaintwo.com.conf

We will give you a short explanation about the content of virtual host configuration file.

<VirtualHost *:80>
The virtual host is listening on port 80

ServerAdmin admin@domainone.com

The ServerAdmin sets the contact address that the server includes in any error messages it returns to the client. You can specify your email address here, or even remove the line.

ServerName domainone.com
ServerAlias www.domainone.com

This directive is needed, it tells Apache that Apache will process the domain request. Apache will search for virtual host files and process all request if domain/subdomain match with the one configured on ServerName or ServerAlias directive.

DocumentRoot /var/www/html/domainone.com/public_html

This directive is also important, we need to tell Apache where the document root of domaincone.com is. If we don’t specify it, apache will load the default document root, which is in /var/www/html

ErrorLog and CustomLog are the directives to save the log of a domain name hosted on the server.

Enable virtual host

In Ubuntu, we can simply issue the following commands to enable the virtual hosts

a2ensite domainone.com
a2ensite domaintwo.com

Setting up Apache Virtual Hosts on Ubuntu 16.04

 

 

 

 

 

Those commands will enable the virtual hosts, but we also need to reload/restart Apache after enabling/disabling the virtual host. The command actually creates a symbolic link in /etc/apache2/sites-enabled. You can also run the following commands instead of invoking the ‘a2ensite’ command:

ln -s /etc/apache2/sites-available/domainone.com.conf /etc/apache2/sites-enabled/
ln -s /etc/apache2/sites-available/domaintwo.com.conf /etc/apache2/sites-enabled/

Now, restart apache to activate the new configuration.

systemctl restart apache2

That is all, we successfully created two Apache virtual hosts for the two domains. You can now open your web browser and navigate to the domain name of the newly created virtual hosts.

http://domainone.com

How to Setup Apache Virtual Hosts on Ubuntu 16.04

 

 

 

http://domaintwo.com

How to do I set up Apache Virtual Hosts on Ubuntu 16.04

 


How to set up Apache Virtual Hosts on Ubuntu 16.04Of course, you don’t need to set up Apache Virtual Hosts on Ubuntu 16.04, if you use one of our Linux Server Management Services – in which case, our technical support team will help you creating the virtual hosts immediately. They are available 24/7, and can cater to any questions or requests.

PS. If you liked this post on How to set up Apache Virtual Hosts on Ubuntu 16.04, feel free to share it with your friends by using the social media share shortcuts below, or simply leave a comment. Thanks.

The post How to set up Apache Virtual Hosts on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04/feed/ 0
How to Install Virtual Environment on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-virtual-environment-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-virtual-environment-on-ubuntu-16-04/#comments Wed, 16 May 2018 07:02:49 +0000 https://linuxhostsupport.com/blog/?p=548 In today’s tutorial we will show you, how to install Virtual Environment on Ubuntu 16.04. We may face issues when our Linux distribution only offers certain versions of Python and its packages, when we actually need newer versions. We can install new versions of Python on the server, of course, but this will be more […]

The post How to Install Virtual Environment on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In today’s tutorial we will show you, how to install Virtual Environment on Ubuntu 16.04. We may face issues when our Linux distribution only offers certain versions of Python and its packages, when we actually need newer versions. We can install new versions of Python on the server, of course, but this will be more complex because we will have some dependency issues when trying to compile everything we need. Virtual environment make this very easy to manage and set up, we can have different versions of Python in each environment, and it will be isolated from the main system. Installing Virtual Environment on Ubuntu 16.04 is fairly easy task and it shouldn’t take more than 10 minutes to finish.

1. Install dependencies

:~$ sudo apt install python-pip

2. Create virtual environment directory

:~$ mkdir /home/rosehosting/python

Now go to the directory you just created

:~$ cd /home/rosehosting/python

3. Install virtualenv

:~/python$ sudo pip install virtualenv

4. Create a virtual environment

:~/python$ virtualenv rose

“rose” is the name of the virtual environment. We can see some sub directories inside “rose”. We will want to focus on the bin directory. The bin directory contains local copy of python binary and the pip installer.
For example, we want to install “requests” package there, we can invoke:

:~/python/rose$ bin/pip install requests
Collecting requests
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 2.0MB/s
Collecting certifi>=2017.4.17 (from requests)
Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
100% |████████████████████████████████| 153kB 2.5MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 2.6MB/s
Collecting idna<2.7,>=2.5 (from requests)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 3.0MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |████████████████████████████████| 133kB 2.7MB/s
Installing collected packages: certifi, chardet, idna, urllib3, requests
Successfully installed certifi-2018.1.18 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22

As you can see, we don’t use sudo, because we install it on a virtual environment, not server wide.

5. Run python shell inside the virtual environment

Now, to run python shell inside the virtual environment, we can do this:

:~/python/rose$ bin/python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get('https://rosehosting.com')

>>> quit()

To make the work even easier, we can go into the virtual environment to use pip and python command without typing bin/pyton and bin/pip

We have to activate the new virtual environment to be able to do works there

:~/python$ source rose/bin/activate

Now we can install a python app/package

(rose):~/python$ pip install requests

The command above is a command to install “requests”. This is the same with the one we previously installed. But, if you install it in a virtual environment, you only need to type pip install requests instead of bin/pip install requests

When you finished working on the virtual environment or wanted to switch to another one, you can deactivate the environment you are working on by invoking this command:

(rose):~/python$ deactivate

Of course, you don’t have to install and configure virtual environment on Ubuntu 16.04, if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install and configure virtual environment on Ubuntu 16.04 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install virtual environment on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Virtual Environment on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-virtual-environment-on-ubuntu-16-04/feed/ 1
How to Install Bro on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-bro-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-bro-on-ubuntu-16-04/#comments Wed, 18 Apr 2018 07:02:43 +0000 https://linuxhostsupport.com/blog/?p=526 Bro is an open-source highly-stateful network analysis framework. Although it’s mainly focused on network security monitoring, it provides a platform for general network traffic analysis as well. Bro is the monitoring backbone for many universities, research labs and supercomputing data-centers around the world. It is developed by Vern Paxson along with a team of researchers […]

The post How to Install Bro on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Bro is an open-source highly-stateful network analysis framework. Although it’s mainly focused on network security monitoring, it provides a platform for general network traffic analysis as well. Bro is the monitoring backbone for many universities, research labs and supercomputing data-centers around the world. It is developed by Vern Paxson along with a team of researchers at the International Computer Science Institute in Berkeley and the National Center for Supercomputing Applications in Urbana-Champaign. Today we are going to show you how to install Bro on an Ubuntu 16.04 VPS.

1. Upgrade the system

As usual make sure that your Ubuntu 16.04 server is up-to-date by running the following commands:

# apt-get upgrade && apt-get update

2. Install the Maxmind GeoIP Database

Bro needs an IP address Geolocation database to function, download both IPv4 and IPv6 databases:

# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz

Extract both archives:

# gzip -d GeoLiteCity.dat.gz
# gzip -d GeoLiteCityv6.dat.gz

Create the ‘/usr/share/GeoIP’ directory and move the files in it:

# mkdir /usr/share/GeoIP
# mv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat
# mv GeoLiteCityv6.dat /usr/share/GeoIP/GeoIPCityv6.dat

3. Install Bro on Ubuntu 16.04

First we will start by installing the pre-requisite packages for Bro:

# apt-get install git cmake make gcc g++ flex bison libpcap-dev libssl-dev python-dev swig zlib1g-dev

Now download the latest Bro version from the site which at the time of writing is version 2.5.3:

# wget https://www.bro.org/downloads/bro-2.5.3.tar.gz

Extract the archive:

# tar xzvf bro-2.5.3.tar.gz

Now enter the ‘bro-2.5.3’ directory and run configure:

# cd bro-2.5.3
# ./configure

After ‘configure’ has finished preparing the build, run the following command:

# make

Now ‘make’ should have built Bro from source, run the following command to install bro:

# make install

Bro should be installed in the ‘/usr/local/bro’ directory now.

4. Configure Bro

Let’s configure the mail notification settings first, to do that open the following file with your favorite editor(we’ll use nano):

# nano /usr/local/bro/etc/broctl.cfg

Find the ‘Mail Options’ section, and edit the ‘MailTo’ setting:

# Recipient address for emails sent out by Bro and BroControl
MailTo = admin@rosehosting.com

Save and close the file.
Now we need to make sure that Bro is operating on the correct network interface, to do that open the following file with your favorite editor:

# nano /usr/local/bro/etc/node.cfg

Find the ‘[bro]’ section, it should look something like this:

[bro]
type=standalone
host=localhost
interface=eth0

Make sure that the ‘interface’ setting is set to the public interface on your server.
The last step is to configure the networks Bro will monitor, to do that open the following file:

# nano /usr/local/bro/etc/networks.cfg

You should see the following contents:

# List of local networks in CIDR notation, optionally followed by a
# descriptive tag.
# For example, "10.0.0.0/8" or "fe80::/64" are valid prefixes.

10.0.0.0/8          Private IP space
172.16.0.0/12       Private IP space
192.168.0.0/16      Private IP space

Delete the three examples and add your own subnet entries like in the following example:

10.20.30.0/24       Private IP space
10.20.31.0/24       Private IP space

5. Managing Bro

Managing Bro is mostly done with the ‘broctl’ command, in order to access this command without providing the full path each time, we will add the following content to the bottom of the ‘~/.bashrc’ file:

# nano ~/.bashrc

PATH=$PATH:/usr/local/bro/bin

Restart the session by logging out and logging in to the server again.
Now you can check the status of Bro by running the following command:

# broctl status

Name         Type       Host          Status    Pid    Started
bro          standalone localhost     running   27534   12 Apr 13:42:19

You can also run the following command to list the various options ‘broctl’ offers:

# broctl help

BroControl Version 1.7

  capstats [] []      - Report interface statistics with capstats
  check []                  - Check configuration before installing it
  cleanup [--all] []        - Delete working dirs (flush state) on nodes
  config                           - Print broctl configuration
  cron [--no-watch]                - Perform jobs intended to run from cron
  cron enable|disable|?            - Enable/disable "cron" jobs
  deploy                           - Check, install, and restart
  df []                     - Print nodes' current disk usage
  diag []                   - Output diagnostics for nodes
  exec                  - Execute shell command on all hosts
  exit                             - Exit shell
  install                          - Update broctl installation/configuration
  netstats []               - Print nodes' current packet counters
  nodes                            - Print node configuration
  peerstatus []             - Print status of nodes' remote connections
  print  []             - Print values of script variable at nodes
  process  [] [-- ] - Run Bro (with options and scripts) on trace
  quit                             - Exit shell
  restart [--clean] []      - Stop and then restart processing
  scripts [-c] []           - List the Bro scripts the nodes will load
  start []                  - Start processing
  status []                 - Summarize node status
  stop []                   - Stop processing
  top []                    - Show Bro processes ala top
  update []                 - Update configuration of nodes on the fly

Commands provided by plugins:

  ps.bro []                 - Show Bro processes on nodes' systems

That’s it now you should have successfully installed and configured Bro on your Ubuntu 16.04 server.

Of course you don’t have to Install Bro on your Ubuntu 16.04 server, if you use one of our Linux server support services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on How To Install Bro on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Bro on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-bro-on-ubuntu-16-04/feed/ 2
How to Install OTRS on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-otrs-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-otrs-on-ubuntu-16-04/#comments Wed, 11 Apr 2018 07:06:54 +0000 https://linuxhostsupport.com/blog/?p=517 In this tutorial, we will show you how to install OTRS on Ubuntu 16.04. OTRS is a web-based ticketing system. It is one of the most flexible and super easy to use, web-based ticketing system, used for Help Desk, Service Management, Customer Service, and more.  OTRS is a cross-platform application and supports all the popular […]

The post How to Install OTRS on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install OTRS on Ubuntu 16.04. OTRS is a web-based ticketing system. It is one of the most flexible and super easy to use, web-based ticketing system, used for Help Desk, Service Management, Customer Service, and more.  OTRS is a cross-platform application and supports all the popular operating systems, but this tutorial was written for Ubuntu 16.04 OS. At the time of writing this tutorial, the latest stable version is OTRS 6, and it requires:

  • Perl 5.10 or higher
  • MySQL – 5.0 higher, PostgreSQL 9.0 or higher, Oracle 10g or higher or MariaDB.
  • Apache web server 2.2 or higher compiled with mod_perl2 or higher.
  • Postfix, Sendmail, Exim or you can use an external email provider.

This install guide assumes that Apache and MySQL/MariaDB are already installed and configured on your virtual server.

Let’s start with the installation procedure.

1. Update the System Packages

Make sure your server Ubuntu 16.04 OS packages are fully up-to-date:

apt-get update
apt-get upgrade

2. Install the Required Packages

Install the required packages for OTRS:

apt-get install libapache2-mod-perl2 libdbd-mysql-perl libtimedate-perl libnet-dns-perl libdatetime-perl libauthen-ntlm-perl libjson-xs-perl libapache-dbi-perl libxml-libxml-perl libxml-libxslt-perl libyaml-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl libdbd-mysql-perl libsoap-lite-perl libtext-csv-xs-perl libtemplate-perl libcrypt-ssleay-perl libnet-https-any-perl libarchive-zip-perl libcrypt-eksblowfish-perl libencode-hanextra-perl libmail-imapclient-perl

3. Enable Required Apache Modules

Enable the Apache modules required for OTRS to function properly:

a2enmod deflate
a2enmod headers
a2enmod perl

4. Restart Apache

Restart the Apache service for the changes to take effect:

service apache2 restart

5. Download OTRS

Download the latest stable version of OTRS in a directory of your server (e.g. opt):

cd /opt
wget http://ftp.otrs.org/pub/otrs/otrs-6.0.5.zip
unzip otrs-*.zip
rm otrs-*.zip
mv otrs-* /opt/otrs

6. Create a OTRS user:

sudo useradd -d /opt/otrs -c 'OTRS user' otrs
sudo usermod -G www-data otrs

7. Create MySQL Database and User

Create a new MySQL database and user:

mysql -u root -p
mysql> SET GLOBAL sql_mode='';
mysql> CREATE DATABASE otrsdb character set UTF8 collate utf8_bin;
mysql> CREATE USER 'otrsuser'@'localhost' IDENTIFIED BY 'y0uR-pa5sW0rd';
mysql> GRANT ALL PRIVILEGES ON otrsdb.* TO 'otrsuser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit

Do not forget to replace ‘y0uR-pa5sW0rd’ with a strong password.
Enable MySQL support:

nano /opt/otrs/scripts/apache2-perl-startup.pl

Remove the comment (# character) from the following lines:

use DBD::mysql ();
use Kernel::System::DB::mysql;

Edit the MySQL configuration file (/etc/mysql/mysql.conf.d/mysqld.cnf) and add following lines under the [mysqld] section:

max_allowed_packet   = 128M
query_cache_size     = 32M
innodb_log_file_size = 512M

Restart the MySQL service for the changes to take effect:

service mysql restart

9. Activate Default Config File and configure the Database settings:

cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm
nano /opt/otrs/Kernel/Config.pm
$Self->{Database} = 'otrsdb';
$Self->{DatabaseUser} = 'otrsuser';
$Self->{DatabasePw} = 'y0uR-pa5sW0rd';

10. Configure Apache for OTRS

sudo ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-available/otrs.conf
sudo a2ensite otrs

Set proper permissions to the /opt/otrs directory:

sudo /opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data

11. Install OTRS

Run the following script to check if all the required modules are installed.

perl /opt/otrs/bin/otrs.CheckModules.pl

Open http://your_server_ip/otrs/installer.pl in a web browser and follow the easy instructions: accept the license, select MySQL as database type, select ‘Use an existing database for OTRS’ and click on the ‘Next’ button. On the next page enter the following information:

User: ortsuser
Password: y0uR-pa5sW0rd
Host: 127.0.0.1
Database name: otrsdb

Click on the ‘Check database settings’ button and if the database check is successful, click on the ‘Next’ button and configure the Mail server settings (or skip that step and configure them later). On the next page you will be provided with the OTRS back-end URL and login credentials.
Log in at http://your_server_ip/otrs/index.pl , create new agents and work with these accounts instead the Superuser account.

How to Install OTRS on Ubuntu 16.04

 

Start the OTRS daemon and Cron.sh script as otrs user:

sudo su - otrs 
/opt/otrs/bin/otrs.Daemon.pl start
/opt/otrs/bin/Cron.sh start

The OTRS daemon is responsible for handling any asynchronous and recurring tasks.

That is it. OTRS has been successfully installed.


Of course you don’t have to install OTRS on Ubuntu 16.04, if you use one of our Server Support Services plans in which case you can simply ask our expert Linux admins to install OTRS for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install OTRS on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install OTRS on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-otrs-on-ubuntu-16-04/feed/ 7
How to install Easy Hosting Control Panel on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-easy-hosting-control-panel-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-easy-hosting-control-panel-on-ubuntu-16-04/#comments Wed, 21 Mar 2018 08:34:03 +0000 https://linuxhostsupport.com/blog/?p=496 Easy Hosting Control Panel (EHCP) is a free and open source control panel written in PHP, which can be used to host your websites on your virtual private server. Easy Hosting Control Panel provides a simple and easy to use interface, for creating and managing users, websites,  MySQL databases, DNS management, ftp and email accounts, and much more. […]

The post How to install Easy Hosting Control Panel on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Easy Hosting Control Panel (EHCP) is a free and open source control panel written in PHP, which can be used to host your websites on your virtual private server. Easy Hosting Control Panel provides a simple and easy to use interface, for creating and managing users, websites,  MySQL databases, DNS management, ftp and email accounts, and much more. In this tutorial, we will show you how to install the Easy Hosting Control Panel on Ubuntu 16.04. Let’s get started.

1. Log in via SSH and update the system

Before we begin, you will need to login to your server via SSH as user root:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.

Let’s also make sure that your Ubuntu 16.04 server is up-to-date by running the following commands:

apt-get update
apt-get upgrade

2. Download EHCP

You can download the latest EHCP version from the official website with the following command:

wget -O ehcp.tgz ehcp.net/ehcp_yeni.tgz

and then extract the archive by executing:

tar -zxvf ehcp.tgz

3. Install EHCP

Next, we can enter the ehcp directory with:

cd ehcp

and run the installation script in order to start the EHCP installation:

./install.sh

The installation script will install all the necessary packages and services.

We will go through all the required steps and make sure the installation is completed properly.

During the installation process please read and follow all the instructions carefully.

Let’s start by pressing Enter to continue.

STAGE 1
=====================================================================

--------------------EHCP PRE-INSTALLER 0.38.5.b -------------------------
-----Easy Hosting Control Panel for Ubuntu, Debian and alikes--------
-------------------------www.ehcp.net--------------------------------
---------------------------------------------------------------------

Now, ehcp pre-installer begins, a series of operations will be performed and main installer will be invoked.
If any problem occurs, refer to www.ehcp.net forum section, or contact us, mail:
info@ehcp.net
Please keep in mind, Ehcp 0.38.3 and later is for Ubuntu 16.04 and later. Ehcp is specifically tested for Ubuntu, but should also work on many Debian based distros.

For automated installs, use ./install.sh unattended (passwords are default in this case)
Please be patient, press enter to continue

Press Enter one more time:

Note that ehcp can only be installed automatically on Debian based Linux OS'es or Linux'es with apt-get enabled..(Ubuntu, Kubuntu, debian and so on) Do not try to install ehcp with this installer on redhat, centos and non-debian Linux's... To use ehcp on no-debian systems, you need to manually install..
This installer is for installing onto a clean, newly installed Ubuntu/Debian. If you install it on existing system, some existing packages will be removed after prompting, if they conflict with packages that are used in ehcp, so, be careful to answer yes/no when using in non-new system
Note that, this is just a utility.. use at your own risk.
Ehcp also sends some usage data to developer for statistical/improvement purposes

Outline of install process:
1- Update apt-get repo info (apt-get update)
2- Install Php (That will run Main installer)
3- Run Main installer (Run install_1.php and install_2.php to install other server related software, such as mysql/mariadb, apache, nginx, etc.)

Press enter to continue

 

The main installer will show you which EHCP version you are installing. You can press Enter again in order to continue:

-----------------------EHCP MAIN INSTALLER---------------------------
------Easy Hosting Control Panel for Ubuntu, Debian and alikes ------
--------------------------www.ehcp.net-------------------------------

---------------------------------------------------------------------
ehcp version 0.38.5.b
ehcp installer version 0.38.5.b
Unattended:

Starting Ehcp install, please read prompts/questions carefully !
Some install/usage info and your name/email is sent to ehcp developers for statistical purposes and for improvements
Ehcp now also has professional version and support, as described at http://ehcp.net/?q=node/1518

press enter to continue:
--------------

 

You will then be asked to either enter a new or leave the password for the MySQL “root” user unchanged.

You will also be asked to enter your name, email address and set up the MySQL and admin user password for the “ehcp” account. Make sure you replace STRONGPASSWORD with an actual strong password.

EHCP INSTALL - INPUTS/SETTINGS SECTION:

THIS SECTION IS VERY IMPORTANT FOR YOUR EHCP SECURITY AND PASSWORD SETTINGS.
PLEASE ANSWER ALL QUESTIONS CAREFULLY

Please enter your name:rosehosting
Please enter your/admin email (used to send your panel info, ehcp news)- Enter an already working email:admins@example.com
mysql root pass being checked ...

Your mysql root pass is identified as empty. Enter NEW PASSWORD for mysql user of `ehcp` (default 1234): 
Please pay attention that, you cannot use sign # in your password: STRONGPASSWORD
Enter ehcp panel admin NEW PASSWORD (default 1234): STRONGPASSWORD
Enter ehcp panel admin NEW PASSWORD AGAIN: STRONGPASSWORD

============== MYSQL PASSWORD SETTINGS COMPLETE ... see troubleshoot if your ehcp does not work ==============

 

Next, you will be asked for your Hostname, IP address and preferred language. You can just leave them all to the default settings by pressing Enter on each of the questions:

Enter your hostname, IP address, preferred language etc. If you want to leave defaults, just press Enter. In my case, I go with defaults.

Your hostname seems to be host, if it is different, enter it now, leave blank if correct

Hostname is set as host
Your ip seems to be 111.222.333.444, if it is different or you want to use a different (external) ip, enter it now, leave blank if correct

LANGUAGE SELECTION:

ehcp currently supports English,Turkish,German,Spanish,French (some of these partial) except installation
enter language file you want to use (en/tr/german/spanish/nl/fr/lv/pt_br [default en]):

Do you want to install some additional programs which are not essential but useful for a hosting environment, such as ffmpeg,... etc.. ? Answer no if you have small ram or you need a light/fast system (y/[n])

At some point during the installation you will be asked to configure the roundcube database. Press “Yes” and then enter a password for the roundcube database user.

The database for phpmyadmin also needs to be configured. When asked about it, select “Yes” and then enter a password for the phpmyadmin database user.

After you enter the password you will also be asked to choose the web server which will be configured to run phpMyAdmin. Since we have an Apache web server on our VPS we chose the “apache2” option (you can press SPACE on your keyboard to choose which server you would like and then press OK).

Next, we need to select the mail server configuration type based on our needs. In our case, we went with the default one “Internet Site” option.

We also need to enter the mail name of the server. This name should be a fully qualified domain name (FQDN).

Lastly, you will be asked to create directories for web-based administration. Select “Yes” to continue.

With this last step, the installation should be completed. The following output should appear on your screen:

ehcp run/restart complete..

if your server is behind a router/modem in your network, you need to Open/redirect necessary ports on your modem/router:
these ports need to be opened/redirected :
20,21,22,25,53,80,110,143 (tcp+udp)

ehcp install finished up to now. we are continuing on simplifying the install process.
sory for any inconvenience. you can contact email/msn: info@ehcp.net
you may join us in developing this control panel.

You may visit http://www.ehcp.net
You may support by donating cash, buying a pro license, doing php coding, html design, graphic design...
You may support by donating free dedicated or virtual servers for this project...

CURRENTLY WE NEED A DEDICATED SERVER WITH 8 CORE, 8GRAM, 500G hdd at least (or, you may consider to buy a pro license or donate..)

ehcp : Finished all operations.. go to your panel at http://yourip/ now...

3. Access EHCP dashboard

After the installation is complete, you can access the control panel through your browser with “http://your-ip-address”

install Easy Hosting Control Panel on Ubuntu 16.04

Once you open this page you can then click the link that says’ “Click here for the control panel on your server!”
This will take you the EHCP login screen. You can log in using “admin” as username and the password you have set during the installation. If you haven’t set any password you will need to use the default one “1234”.

That’s it. EasyHosting Control Panel has been successfully installed on your Ubuntu 16.04  server.

We can install, configure, set up and optimize Easy Hosting Control Panel on Ubuntu 16.04 for you if you are one of our Linux server support customer.  Our expert Linux administrators are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Easy Hosting Control Panel on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

 

The post How to install Easy Hosting Control Panel on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-easy-hosting-control-panel-on-ubuntu-16-04/feed/ 10
How to Install LiteCart on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-litecart-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-litecart-on-ubuntu-16-04/#respond Wed, 17 Jan 2018 08:49:20 +0000 https://linuxhostsupport.com/blog/?p=353 Today we’ll show you, how to install LiteCart on Ubuntu 16.04. LiteCart is a free and open source e-commerce platform which is developed in PHP, jQuery and HTML 5. In this tutorial, we will show how to install LiteCart on Ubuntu 16.04 VPS and setup a LAMP stack (Linux, Apache, MySQL, PHP) if you already […]

The post How to Install LiteCart on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Today we’ll show you, how to install LiteCart on Ubuntu 16.04. LiteCart is a free and open source e-commerce platform which is developed in PHP, jQuery and HTML 5. In this tutorial, we will show how to install LiteCart on Ubuntu 16.04 VPS and setup a LAMP stack (Linux, Apache, MySQL, PHP) if you already haven’t. Installing LiteCart on Ubuntu 16.04 is fairly easy task and should take less than 15 minutes.

1. Getting Started

First, you will need to login to your server via SSH as user root:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.

Once logged in, let’s make sure that your Ubuntu 16.04 server is up-to-date by running the following commands:

apt-get update
apt-get upgrade

2. Install Apache Web Server

To install the Apache web server, run the following command:

apt-get install apache2

After the installation is completed, you can enable the service to be started automatically upon system boot with:

systemctl enable apache2

To verify that the Apache server is running, you can run the following command:

systemctl status apache2

3. Install PHP 7.0

Next, let’s install PHP 7 with some additional PHP modules:

apt-get install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-gd php7.0-mcrypt php7.0-intl php7.0-curl php7.0-zip

4. Install MySQL Database Server

The next step is to install the MySQL database server. To do this, run the following command:

apt-get install mysql-server

After the installation is completed, you can start the database server and enable it to automatically start upon boot, with:

systemctl start mysql
systemctl enable mysql

You can also run the mysql_secure_installation script to harden the security of your MySQL database server:

mysql_secure_installation

After you have answered all the questions you can now go ahead and login to MySQL as root using your root password, with the following command:

mysql -u root -p

To create a new database for your LiteCart installation, run the following commands:

CREATE DATABASE litecart_db;
GRANT ALL PRIVILEGES ON litecart_db.* TO 'litecart_user'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
exit;

Make sure to replace “PASSWORD” with an actual, strong password.

5. Install LiteCart on Ubuntu 16.04

Now that our LAMP server is ready, we can finally install LiteCart.

First, let’s create a new directory for our LiteCart installation inside the Apache document root directory on your server:

mkdir /var/www/html/litecart

Next, download the latest LiteCart version from the official site and place it inside the newly created directory. Then you can extract the downloaded zip archive with the following command:

unzip litecart-2.0.2.zip

Change the ownership of the litecart directory:

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

6. Set up Apache Virtual Host

If you want to access your LiteCart installation using your own domain name, you will also need to create an Apache virtual host file:

nano /etc/apache2/sites-available/litecart.conf

And enter the following content inside this file:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/litecart
ServerName yourdomain.com
ServerAlias www.yourdomain.com

<Directory /var/www/html/litecart>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/apache2/litecart-error_log
CustomLog /var/log/apache2/litecart-access_log common
</VirtualHost>

7. Enable the Virtual Host File

Enable the virtual host file with:

ln -s /etc/apache2/sites-available/litecart.conf /etc/apache2/sites-enabled/litecart.conf

8. Restart Apache

Restart your Apache with:

systemctl restart apache2

9. Complete the LiteCart Installation via Web Browser

That’s it. You can now go to http://yourdomain.com (or http://YOUR_IP_ADDRESS) and follow the on-screen instructions to complete the LiteCart installation.

 

Of course, you don’t have to install LiteCart on Ubuntu 16.04, if you use one of our outsourced Linux server support, in which case you can simply ask our expert Linux admins to install LiteCart on Ubuntu 16.04, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install LiteCart on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install LiteCart on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-litecart-on-ubuntu-16-04/feed/ 0
How to install Collabtive 3.1 on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-collabtive-3-1-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-collabtive-3-1-on-ubuntu-16-04/#comments Wed, 10 Jan 2018 08:25:39 +0000 https://linuxhostsupport.com/blog/?p=340 In this tutorial, we will show how to install Collabtive 3.1 on Ubuntu 16.04. Collabtive is an open source web-based project management software written in PHP, that let you keep track of your projects. The main features of Collabtive are: task lists, milestones, time tracking, messaging / instant messaging, file management, role-based user permissions, reporting, […]

The post How to install Collabtive 3.1 on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show how to install Collabtive 3.1 on Ubuntu 16.04. Collabtive is an open source web-based project management software written in PHP, that let you keep track of your projects. The main features of Collabtive are: task lists, milestones, time tracking, messaging / instant messaging, file management, role-based user permissions, reporting, exporting, calendaring and multilingual interface. This tutorial was tested and written for Ubuntu 16.04, but it should work on any Linux distribution. The entire process of installing Collabtive 3.1 on Ubuntu 16.04, should not take more than 10 minutes.

1. Install Apache, PHP and MySQL

This install guide assumes that Apache, PHP and MySQL are already installed and configured on your Collabtive virtual server. At the time of writing this tutorial, the latest stable version of Collabtive 3.1 and it requires:

  • PHP 5.5 or PHP 7 with the mbstring and mysql (or sqlite) PHP extensions enabled.
  • Apache Web Server >= 2.0 compiled with mod_rewrite module and with the following directives allowed: DirectoryIndex, Deny, Allow, Options, Order, AddHandler, RewriteEngine, RewriteBase, RewriteCond and RewriteRule.
  • MySQL, MariaDB or SQLite installed on your server.

2. Install Collabtive

Download the latest version of Collabtive , then extract it using the following commands:

cd /opt
wget https://sourceforge.net/projects/collabtive/files/latest/download -O collabtive.zip
unzip collabtive.zip -d /var/www/html/collabtive/

3. Set up file ownership

The web server user (www-data) needs to be able to write to ‘config.php’ file, ‘files’ and ‘templates_c’ directories. It can easily be accomplished by executing the following commands:

sudo chown www-data:www-data -R /var/www/html/collabtive/
sudo chmod +w  /var/www/html/collabtive/config/standard/config.php
sudo chmod +w  /var/www/html/collabtive/files
sudo chmod +w  /var/www/html/collabtive/templates_c

4. Create virtual host

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

touch /etc/apache2/sites-available/collabtive.conf

5. Create a symbolic link

ln -s /etc/apache2/sites-available/collabtive.conf /etc/apache2/sites-enabled/collabtive.conf

Or, use the a2ensite to enable the ‘collabtive.conf’ configuration in Apache:

sudo a2ensite collabtive.conf

6. Configure collabtive.conf file

Edit the ‘collabtive.conf’ Apache configuration file:

vi /etc/apache2/sites-available/collabtive.conf

add the following lines:

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/collabtive/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/collabtive/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

7. Restart Apache web server

Restart the Apache web server for the changes to take effect:

service apache2 restart

8. Create new database and assign user with permissions

Create a new MySQL database for Collabtive to use and assign a user to it with full permissions:

mysql -u root -p
mysql> CREATE DATABASE collabtivedb;
mysql> GRANT ALL PRIVILEGES ON collabtivedb.* TO 'collabtiveuser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit

9. Continue with the installation via web installer

Open your favorite web browser and navigate to http://your-domain.com/install.php page. Once you do that, you will be taken to the first page of the Collabtive web installer. Choose the installer language, check if all of the system requirements are met, select MySQL as database driver, set MySQL database host, database name, database username and database password, then click to pursue the installation. On the next page, create an administrator user and set its password.

For security reason, it is recommended to delete ‘install.php’ and ‘update.php’ files from the server:

rm /var/www/html/collabtive/install.php
rm /var/www/html/collabtive/update.php

That is it. The Collabtive installation is now complete.

Log in to the Administrator back-end area at http://your-domain.com to configure Collabtive according to your needs, extend the functionality of your installation with plugins etc.

installing Collabtive 3.1 on Ubuntu 16.04

Of course you don’t have to install Collabtive 3.1 on Ubuntu 16.04, if you use one of our Linux server support services, in which case you can simply ask our expert Linux admins to install Collabtive 3.1 on Ubuntu 16.04, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install Collabtive 3.1 on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to install Collabtive 3.1 on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-collabtive-3-1-on-ubuntu-16-04/feed/ 5
How to Install Let’s Encrypt with Apache on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-lets-encrypt-with-apache-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-lets-encrypt-with-apache-on-ubuntu-16-04/#comments Wed, 13 Dec 2017 12:00:45 +0000 https://linuxhostsupport.com/blog/?p=295 In this tutorial we are going to show you, with step-by-step instructions on how to install Let’s Encrypt with Apache on Ubuntu 16.04. Let’s Encrypt is an open SSL Certificate Authority (CA) that offers free domain-validated (DV) certificates for your websites. SSL Certificates are used to establish a secure encrypted connection between a web server […]

The post How to Install Let’s Encrypt with Apache on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to show you, with step-by-step instructions on how to install Let’s Encrypt with Apache on Ubuntu 16.04. Let’s Encrypt is an open SSL Certificate Authority (CA) that offers free domain-validated (DV) certificates for your websites. SSL Certificates are used to establish a secure encrypted connection between a web server and a user’s web browser. The SSL certificates that have been issued by Let’s Encrypt are valid for 90 days and are trusted by most web browsers today.

1. Requirements

In order to start with the installation procedure, you need to have Apache or Nginx installed on your server. If there is no web server installed on your virtual server, please follow this tutorial to install Apache.
Also, you need a registered domain name with its A record pointing to your server’s IP address.  For the purposes of this tutorial, we will use ‘yourdomain.com’.

2. Install CertBot

Run the following commands:

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache

3. Install Let’s Encrypt SSL

Install Let’s Encrypt SSL certificate on your domain (do not forget to replace ‘yourdomain.com’ with your actual domain):

sudo certbot --apache -d yourdomain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): admin@yourdomain.com 

-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: N

Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for linuxhostsupport.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate for yourdomain.com to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf

4. Redirect HTTP traffic to HTTPS

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf

-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://yourdomain.com

5. Renew the SSL certificate with a cron job

Create a cron job so the SSL certificate is renewed automatically. Run:

crontab -e

and add the following line:

0 0 1 * * /usr/bin/letsencrypt renew >> /var/log/letsencrypt-renew.log

Save and close that file and restart cron service for the changes to take effect:

service cron restart

Open https://yourdomain.com in your favorite web browser, and check whether Let’s Encrypt SSL is installed properly:

Install-Lets-Encrypt-on-Ubuntu-16.04

That is it. Let’s Encrypt SSL certificate has been successfully installed on your website.

Of course you don’t have to Install Let’s Encrypt with Apache on Ubuntu 16.04, if you use one of our Linux Server Support services, in which case you can simply ask our expert Linux admins to  install Let’s Encrypt SSL certificate on Ubuntu 16.04 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on How to Install Let’s Encrypt with Apache on Ubuntu 16, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

 

The post How to Install Let’s Encrypt with Apache on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-lets-encrypt-with-apache-on-ubuntu-16-04/feed/ 10
How to Install Redmine on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-and-configure-redmine-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-and-configure-redmine-on-ubuntu-16-04/#respond Wed, 22 Nov 2017 13:00:43 +0000 https://linuxhostsupport.com/blog/?p=277 We will show you, how to install and configure Redmine on Ubuntu 16.04, with Nginx and MySQL. Redmine is completely free and open source issue tracking, and project management system designed to help teams to achieve their desired project goals. It allows users to configure it according to their needs and suit their business needs. […]

The post How to Install Redmine on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
We will show you, how to install and configure Redmine on Ubuntu 16.04, with Nginx and MySQL. Redmine is completely free and open source issue tracking, and project management system designed to help teams to achieve their desired project goals. It allows users to configure it according to their needs and suit their business needs. Redmine comes with a lot of useful features and plugins that can help you with the project management and all related processes. IInstalling Redmine on Ubuntu 16.04 is an easy task, just follow the steps below carefully.

1. Install dependencies

Login to your Ubuntu VPS via SSH as user root

ssh root@IP_Address -p Port_number

update all packages installed on your VPS to the latest version

apt-get update && apt-get upgrade

Run the following command to install all necessary dependencies

apt-get install python-software-properties curl autoconf subversion bison software-properties-common imagemagick libmagickwand-dev build-essential libssl-dev libreadline-dev libyaml-dev zlib1g-dev git libcurl4-openssl-dev

2. Install MySQL server

Redmin requires an empty MySQL database, so we will install MySQL server

apt-get install mysql-server mysql-client

Once the installation is completed run the mysql_secure_installation post installation script and follow the on-screen instructions to secure the installation and set your MySQL root password.

Next, login to the MySQL server as user root and create a new MySQL user and database

mysql -u root -p

CREATE DATABASE redmin
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
\q

Don’t forget to replace ‘PASSWORD’ with an actual, strong password.

3. Install Ruby and Ruby Version Manager (RVM)

Install the latest version of Ruby with the following command

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -L https://get.rvm.io | bash -s stable --ruby=2.4.1

Run the following commands to load RVM

source /usr/local/rvm/scripts/rvm
echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc

4. Install and configure Nginx and Phusion Passenger

Passenger is feature-rich web app server that integrates with Apache and Nginx. We will install it and integrate it with Nginx

gem install passenger --no-ri --no-rdoc
passenger-install-nginx-module

You will be prompted to select a language that will be supported, select Ruby. On the next step select the ‘Yes: download, compile and install Nginx for me. (recommended)’ option. The command will compile and install all necessary modules, including Nginx on your server and it may take some time.

Next, open the Nginx configuration file and update the server section as described below:

nano /opt/nginx/conf/nginx.conf

server {
        listen       80;
        server_name  yourdomain.com;

        root /var/www/html/redmine/public;
        passenger_enabled on;
        client_max_body_size      10m; # Max attachment size

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }

5. Configure Nginx to start as a service

To configure Nginx to start as a service, create a nginx.service file with the following content

nano /lib/systemd/system/nginx.service

[Unit]
Description=NGINX server
After=syslog.target network.target remote-fs.target nss-lookup.target
 
[Service]
Type=forking
PIDFile=/opt/nginx/logs/nginx.pid
ExecStartPre=/opt/nginx/sbin/nginx -t
ExecStart=/opt/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
 
[Install]
WantedBy=multi-user.target

Reload the systemd services and start Nginx

systemctl daemon-reload
systemctl start nginx

6.Install and configure Redmine

Download the latest version of Redmine (at the moment of writing this article it is version 3.4) using the svn command

cd /var/www/html
svn co http://svn.redmine.org/redmine/branches/3.4-stable redmine

Change the current working directory and the example configuration files

cd redmine
cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml

Make the following changes to the database.yml file

nano config/database.yml

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: PASSWORD
  encoding: utf8

Install the Ruby dependencies and migrate the database

gem install bundler --no-ri --no-rdoc
bundle install
bundle exec rake db:migrate
bundle exec rake redmine:plugins

Generate the secret token using the following command

bundle exec rake generate_secret_token

7. Restart the webserver

Restart the web server for the changes to take effect

systemctl restart nginx

That’s all. If you closely followed the steps in this tutorial, you should be able to access Redmine on your Ubuntu 16.04 server  at http://yourdomain.com using the default credentials (admin/admin).

For more information on how to configure and use Redmine, pleae check their official guide.


Of course, you don’t have to install Redmine on Ubuntu 16.04, if you use one of our Linux Server Support Services, in which case you can simply ask our expert Linux admins to install Redmine on Ubuntu 16.04 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Redmine on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Redmine on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-redmine-on-ubuntu-16-04/feed/ 0
How to Set Up a TeamSpeak Server on CentOS 7 https://linuxhostsupport.com/blog/how-to-set-up-a-teamspeak-server-on-centos-7/ https://linuxhostsupport.com/blog/how-to-set-up-a-teamspeak-server-on-centos-7/#comments Wed, 11 Oct 2017 12:00:50 +0000 https://linuxhostsupport.com/blog/?p=235 TeamSpeak 3 is voice-over-internet protocol (VOIP) software. It provides audio communication features, that can be used online gaming, educational training, internal business communication, and staying in touch with friends and family. TeamSpeak is easy to use and offers high security standards, excellent audio quality, and low system and bandwidth usage. Featuring a client-server architecture, TeamSpeak […]

The post How to Set Up a TeamSpeak Server on CentOS 7 appeared first on LinuxHostSupport.

]]>
TeamSpeak 3 is voice-over-internet protocol (VOIP) software. It provides audio communication features, that can be used online gaming, educational training, internal business communication, and staying in touch with friends and family. TeamSpeak is easy to use and offers high security standards, excellent audio quality, and low system and bandwidth usage. Featuring a client-server architecture, TeamSpeak 3 is literally capable of handling up to thousands of simultaneous users.

Listed below are some of the key TeamSpeak features:

  • Superior Voice Quality
  • High Scalability
  • Powerful File Transfer
  • Text Chat
  • 3D Sound Effects
  • Decentralized Infrastructure
  • Robust Permission System
  • Mobile applications for Android and iOS
  • In-Game Overlay
  • Limitless Customization

and many more…

In this tutorial we will guide you through the steps of installing TeamSpeak 3 Server on a CentOS 7 VPS.

Update the system

First thing you need to do is to log in to your CentOS 7 VPS via SSH as user root.

ssh root@IP_Address -p Port_Number

Before installing TeamSpeak Server it is recommended to update all packages installed on your server.

yum -y update

Install TeamSpeak Server

It is not recommended to run TeamSpeak as user root, so we will create a new system user by running the following command

adduser --shell /bin/false teamspeak -d /opt/teamspeak3 -M

Download TeamSpeak 3 Server for Linux from their official website

wget http://dl.4players.de/ts/releases/3.0.13.8/teamspeak3-server_linux_amd64-3.0.13.8.tar.bz2

unpack the downloaded archive, rename the directory and remove the downloaded archive

tar -jxvf teamspeak3-server_linux_amd64-3.0.13.8.tar.bz2
mv teamspeak3-server_linux_amd64 teamspeak3
rm -f teamspeak3-server_linux_amd64-3.0.13.8.tar.bz2

To start the TeamSpeak server switch the user

su teamspeak

and execute the following command

cd /opt/teamspeak
./ts3server_startscript.sh start

You should get the following output

Starting the TeamSpeak 3 server
TeamSpeak 3 server started, for details please view the log file
root@linuxhostsupporttest [/opt/teamspeak3]#
------------------------------------------------------------------
I M P O R T A N T
------------------------------------------------------------------
Server Query Admin Account created
loginname= "serveradmin", password= "KffDEVoW"
------------------------------------------------------------------

------------------------------------------------------------------
I M P O R T A N T
------------------------------------------------------------------
ServerAdmin privilege key created, please use it to gain
serveradmin rights for your virtualserver. please
also check the doc/privilegekey_guide.txt for details.

token=X3wT1SSVrW9VmwRkpNC32ezYhaSJ7bp8WOwBWOnB
------------------------------------------------------------------

If you want to stop the TeamSpeak server use the following command

./ts3server_startscript.sh stop

You can also create a systemd service to easily start/stop/restart TeamSpeak and start the service automatically on server boot. To do that, create a ‘teamspeak.service’ file with the following content

vim /lib/systemd/system/teamspeak.service

[Unit]
Description=TeamSpeak 3 Server Server
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/teamspeak3/
ExecStart=/opt/teamspeak3/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/opt/teamspeak3/ts3server_startscript.sh stop
User=teamspeak
Group=teamspeak
PIDFile=/opt/teamspeak3/ts3server.pid
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=teamspeak

[Install]
WantedBy=multi-user.target

Save the file and execute the following commands to enable and start the service

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

Installing TeamSpeak on a CentOS 7 server  is an easy task if you are using one of  our Linux Host Support Services. Feel free to ask our expert Linux Administrators to install TeamSpeak on a CentOS 7 these for you, and it will be taken care of immediately. They are available 24×7, so you can get the help you need at any time.

PS. Feel free to share this blog post if you liked it by using the social network shortcuts – you can also leave a comment instead, found under the share buttons.

The post How to Set Up a TeamSpeak Server on CentOS 7 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-set-up-a-teamspeak-server-on-centos-7/feed/ 1
Install Sentora on Ubuntu https://linuxhostsupport.com/blog/install-sentora-on-an-ubuntu-vps/ https://linuxhostsupport.com/blog/install-sentora-on-an-ubuntu-vps/#respond Wed, 13 Sep 2017 16:02:15 +0000 https://linuxhostsupport.com/blog/?p=213 We’ll show you, how to install Sentora on Ubuntu. Sentora is completely free web hosting control panel for Linux, UNIX and BSD based servers written in PHP. It is fully featured and easy to use hosting control panel that can help users to manage their servers with ease through the user interface. Its installation is […]

The post Install Sentora on Ubuntu appeared first on LinuxHostSupport.

]]>
We’ll show you, how to install Sentora on Ubuntu. Sentora is completely free web hosting control panel for Linux, UNIX and BSD based servers written in PHP. It is fully featured and easy to use hosting control panel that can help users to manage their servers with ease through the user interface. Its installation is pretty easy and fast and includes all the software you will need to manage multiple websites and clients on a single server. In this tutorial we will guide you through the steps of installing Sentora control panel on Ubuntu.

Sentora comes with the following services installed out of the box:

  • Apache HTTPd
  • PHP
  • MySQL/MariaDB
  • ProFTPd
  • Postfix
  • Dovecot

It comes with a lot of handy features such as:

  • Quota management
  • Multi-client environment
  • Custom Themes
  • API integration
  • Language translation packs
    and many more…

1. Login to your server via SSH

Login to your Ubuntu server via SSH as user root

ssh root@IP_Address -p Port_Number

2. Update the installed packages

and make sure that all installed packages are updated by running the following command

apt-get update && apt-get upgrade

3. Download Sentora installation script

Download the Sentora installation script to your server

wget http://sentora.org/install

4. Make the script executable

Once downloaded, make the script executable

chmod +x install

4. Run the script

and run the script to start Sentora’s installation

./install

Please note that there can be no other services such as Apache, Nginx, MySQL, PHP, FTP and mail server, etc… installed on your Ubuntu VPS prior to installing Sentora. If you already have some of these service installed, you will have to remove them in order to start the Sentora installation.

In our case, MySQL server is already installed on the VPS:

Welcome to the Official Sentora Installer 1.0.3  #
##################################################

Checking that minimal requirements are ok
Detected : Ubuntu  14.04  x86_64
Ok.
It appears that package mysql-server is already installed. This installer
is designed to install and configure Sentora on a clean OS installation only!

Please re-install your OS before attempting to install using this script.

5. Remove MySQL

So we have to remove it

apt-get remove mysql-server
apt-get purge mysql-server

6. Execute the installation script again

and execute the installation script again to start up the installer

./install

You will be prompted to select your geographic area and then the city or region the server timezone should be set in. After that you will have to enter your domain and IP address to access your control panel. You should use a subdomain to access the control panel, for example: sentora.yourdomain.com

After everything is successfully installed, you will get the following output:

########################################################
Congratulations Sentora has now been installed on your
server. Please review the log file left in /root/ for
any errors encountered during installation.

Login to Sentora at http://http://sentora.yourdomain.com
Sentora Username  : admin
Sentora Password  : YOURPASSWORD

MySQL Root Password      : ROOTPASSWORD
MySQL Postfix Password   : POSTFIXPASSWORD
MySQL ProFTPd Password   : PROFTPDPASSWORD
MySQL Roundcube Password : ROUNDCUBEPASSWORD
(theses passwords are saved in /root/passwords.txt)
########################################################

7. Access Sentora control panel via web browser

Once the installation is completed, open you favorite web browser and point it to http://sentora.yourdomain.com to access Sentora control panel.

For more information on how to install, configure and use Sentora control panel, please visit the official documentation.


Of course you don’t have to Install Sentora on an Ubuntu, if you use one of our Linux Host Support services, in which case you can simply ask our expert Linux admins to install Sentora on your Ubuntu server for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to Install Sentora on an Ubuntu, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post Install Sentora on Ubuntu appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/install-sentora-on-an-ubuntu-vps/feed/ 0
Install OpenLiteSpeed on Ubuntu 16.04 https://linuxhostsupport.com/blog/install-openlitespeed-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/install-openlitespeed-on-ubuntu-16-04/#comments Wed, 23 Aug 2017 08:51:32 +0000 https://linuxhostsupport.com/blog/?p=184 Today we will show you, how to install and configure OpenLiteSpeed on your Ubuntu 16.04 VPS. OpenLiteSpeed is a lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies, Inc. It provides a user friendly web interface and supports various operating systems, including Linux, Mac OS, SunOS and FreeBSD. It is fairly easy to […]

The post Install OpenLiteSpeed on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Today we will show you, how to install and configure OpenLiteSpeed on your Ubuntu 16.04 VPS. OpenLiteSpeed is a lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies, Inc. It provides a user friendly web interface and supports various operating systems, including Linux, Mac OS, SunOS and FreeBSD. It is fairly easy to install OpenLiteSpeed on an Ubuntu 16.04 VPS. The installation process should take about 10-15 minutes, if you follow the very easy steps described below.

INSTRUCTIONS:

First of all login to your Ubuntu 16.04 VPS via SSH as user root

ssh root@IP_address

At the very beginning, it is best to start a screen session by executing the following command

screen -U -S openlitespeed

Update the system:

apt-get update && apt-get -y upgrade

Make sure to always keep your server up to date.

Install necessary packages:

apt-get install build-essential libexpat1-dev libgeoip-dev libpcre3-dev zlib1g-dev libssl-dev libxml2-dev rcs libpng-dev

Download and extract the latest stable version of OpenLiteSpeed on your server. At the time of this writing, the latest stable version of OpenLiteSpeed is 1.4.26.

cd /opt && wget http://open.litespeedtech.com/packages/openlitespeed-1.4.26.tgz
tar -xvzf openlitespeed-1.4.24.tgz
cd openlitespeed-1.4.24

Then use the following command to configure the software and to compile it, This will install the entire OpenLiteSpeed system under the /usr/local/lsws location:

./configure
make
make install

Install MariaDB

To install MariaDB, run the following command:

apt-get install -y mariadb-server

When the installation is complete, run the following command to secure your installation:

mysql_secure_installation

Configure it like this:

Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password: 
Re-enter new password: 
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

Configure an administrative username and password for the OpenLiteSpeed’s web interface by running the following command:

/usr/local/lsws/admin/misc/admpass.sh

You will be asked to provide a username for the administrative user. If you just press ENTER, the username “admin” will be selected. Afterwards, you will be asked to select and confirm a new password for the account.

After setting up the username and the password use the following command to start the web server:

/etc/init.d/lsws start

Access OpenLiteSpeed

OpenLiteSpeed will be available on HTTP port 8080 by default and admin login using port 7080. Open your web browser and navigate to http://1your-domain-name.com:8080, you will see the default OpenLiteSpeed web page.

You can also access the administrative interface by navigating to http://your-domain-name.com:7080 on your web browser. You will be asked to enter the administrative username and password. After successful authentication, you will be redirected to the admin area.

That is it. The OpenLiteSpeed installation is now complete.

Of course you don’t have to do any of this if you use one of our Server Management Services, in which case you can simply ask our expert Linux admins to install OpenLiteSpeed for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post Install OpenLiteSpeed on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/install-openlitespeed-on-ubuntu-16-04/feed/ 1
How to Install Nextcloud 12 on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-nextcloud-12-on-an-ubuntu-16-04-vps/ https://linuxhostsupport.com/blog/how-to-install-nextcloud-12-on-an-ubuntu-16-04-vps/#comments Wed, 02 Aug 2017 20:49:19 +0000 https://linuxhostsupport.com/blog/?p=158 Today we will show you how to install Nextcloud on  Ubuntu 16.04, using Apache web-server and MySQL database. Nextcloud is open source self-hosted file sync and share application forked from ownCloud. It has a lot of extra Calendar, Sync and Contacts features, apart from their file hosting features and it is a great free alternative to […]

The post How to Install Nextcloud 12 on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Today we will show you how to install Nextcloud on  Ubuntu 16.04, using Apache web-server and MySQL database.

Nextcloud is open source self-hosted file sync and share application forked from ownCloud. It has a lot of extra Calendar, Sync and Contacts features, apart from their file hosting features and it is a great free alternative to some popular services such as Google Drive, Dropbox, Box, etc.

It is fairly easy to install Nextcloud on an Ubuntu 16.04 VPS. The installation process should take about 5-10 minutes if you follow the very easy steps described below.

At the time of writing this tutorial, Nextcloud 12.0.0 is the latest stable version available and it requires:

– Apache web server;
– PHP (5.6 or higher) along with the mbstring, curl, zip, xml, tidy, gd and mcrypt extensions. They are most generally active by default on a standard php installation.
– MySQL(version 5.5 or higher) installed on your Linux VPS;

 

1. Getting Started

First of all login to your Ubuntu 16.04 VPS via SSH as user root

ssh root@IP_address

At the very beginning, it is best to start a screen session by executing the following command

screen -U -S nextcloud

Update the system:

apt-get update && apt-get -y upgrade

Make sure to always keep your server up to date.

2. Install MariaDB 10.0

To install MariaDB, run the following command:

apt-get install -y mariadb-server

Next, we need to create a database for our Nextcloud installation.

mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE nextcloud;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Do not forget to replace ‘your-password’ with a strong password.

3. Install Apache2 web server

[user]$ sudo apt-get install apache2

4. Install PHP and required PHP modules

To install the latest stable version of PHP version 7 and all necessary modules, run:

[user]$ sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mbstring php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-bcmath php7.0-xml php7.0-json php7.0-tidy

5. Configure Apache Web Server

Enable the Apache2 rewrite module if it is not already done:

[user]$ sudo a2enmod rewrite

6. Restart Apache Web Server

In order to activate the new configuration, restart the Apache web server using the following command:

[user]$ sudo service apache2 restart

7. Download and Extract Nextcloud

Download and extract the latest version of Nextcloud on your server:

[user]$ sudo cd /opt && wget wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.zip
[user]$ sudo unzip nextcloud-12.0.0.zip
[user]$ sudo mv nextcloud/ /var/www/html/

8. Configure File Ownership

All files have to be readable by the web server, so we need to set a proper ownership

[user]$ sudo chown www-data:www-data -R /var/www/html/nextcloud/

9. Create Virtual Host in Apache

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

[user]$ sudo touch /etc/apache2/sites-available/nextcloud.conf
[user]$ sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
[user]$ sudo nano /etc/apache2/sites-available/nextcloud.conf

Then, add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/nextcloud/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/nextcloud/>
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>

10. Restart Apache Web Server

Restart the Apache web server for the changes to take effect:

[user]$ sudo service apache2 restart

11. Complete the Nextcloud Installation via Web Browser

Open your favorite web browser, navigate to http://your-domain.com/ and if you configured everything correctly the Nextcloud installer should be starting. You should follow the easy instructions on the install screen inserting the necessary information as requested.

That is it. The Nextcloud installation on Ubuntu 16.04, is now complete.

Of course, you don’t have to install Nextcloud 12 on Ubuntu 16.04, if you use one of our Software Installation Services, in which case you can simply ask our expert Linux admins to install Nextcloud 12 on Ubuntu 16.04, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install Nextcloud 12 on Ubuntu 16.04,  please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Nextcloud 12 on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-nextcloud-12-on-an-ubuntu-16-04-vps/feed/ 4
How to install phpBB on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-phpbb-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-phpbb-on-ubuntu-16-04/#respond Wed, 19 Jul 2017 15:14:11 +0000 https://linuxhostsupport.com/blog/?p=149 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. […]

The post How to install phpBB on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
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. With phpBB’s extensive features you can create your own forum in a matter of minutes and what’s most important, it’s completely free.

In this tutorial, we will show you how to install phpBB on an Ubuntu 16.04 VPS.

Installing the LAMP stack

First login as root so we don’t have to type sudo in front of every command:

# sudo su

Make sure your packages are up to date:

# apt-get update

Now run this command to install the LAMP stack with PHP7:

# apt-get -y install apache2 mysql-server mysql-client libapache2-mod-php7.0 php7.0-mysql php7.0-gd imagemagick unzip

Creating a database for phpBB

Log in to the MySQL server:

# mysql

Create a blank database for phpBB to use:

mysql> create database phpBB;

Create the database user, make sure to change the password randomgeneratedpassword with your own password.

mysql> create user 'phpBB_dbuser'@'localhost' identified by 'randomgeneratedpassword';

Grant all privileges to the user on the phpBB database:

mysql> grant all privileges on phpBB.* to 'phpBB_dbuser'@'localhost';

Apply the privileges we just gave to the user to the server:

mysql> flush privileges;

Installing phpBB

Change to Apache’s document root directory:

# cd /var/www/html

Delete Apache default files(You should skip this step if you have another site’s contents in this directory and install phpBB in a separate directory instead):

# rm -rf ./*

Download the latest phpBB version to your server(At the time of writing 3.2.0 is the latest version of phpBB):

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

Extract phpBB to the current directory:

# unzip phpBB-3.2.0.zip

Delete the archive file as we no longer need it:

# rm phpBB-3.2.0.zip

Move all the contents from the extracted directory to the current directory(Skip this step and the next step if you have another site’s contents in the /var/www/html directory):

# mv ./phpBB3/* .

Delete the empty phpBB3 directory:

# rm -rf ./phpBB3

Note: If you installed phpBB in a separate directory you can type in the following command if you want to rename the phpBB3 directory to something else like forum so phpBB would be accessible at http://yourdomain.com/forum:

# mv ./phpBB3 ./forum

Change the owner to the www-data user for all the files and sub-directories in /var/www/html:

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

If you installed phpBB in a separate directory make sure to change your working directory to that directory:

cd /var/www/html/your_phpBB_directory

Note: Replace your_phpBB_directory with the directory you installed phpBB in.

Give appropriate permissions to the config file and the following directories:

# chmod 660 images/avatars/upload/ config.php
# chmod 770 store/ cache/ files/

Completing the installation

Using your browser, go to http://yourdomain.com/install or if you installed phpBB in a separate directory http://yourdomain.com/your_phpBB_directory/install.
Click the INSTALL tab and then click the Install button.phpBB will ask you for credentials, be sure to substitute these credentials for your own:

Administrator username: admin
Contact email address: admin@yourdomain.com
Administrator password: admin_test1234-
Confirm administrator password: same as above

Click Submit when you are done.
Note: Make sure to use a secure password with at least 8 characters, 1 uppercase letter, 1 special character, and alphanumeric characters.

Now phpBB will ask you for details regarding your database, here’s our example:

Database Type: MySQL with MySQLi Extension
Database server hostname or DSN: localhost
Database server port: leave blank
Database username: phpBB_dbuser
Database password: randomgeneratedpassword
Database name: phpBB
Prefix for tables in database: phpbb_

Click Submit again.

In the next step, you should set up options according to your preference like providing your domain name or whether you would like to force SSL.After this step, you will be taken to the SMTP configuration page, if you don’t have an SMTP server you can leave this page as it is and click Submit to continue. Click Install again and wait for the installer to finish.When the installer finishes installing phpBB you can click the take me to the ACP link and set up your new phpBB installation.

That’s it, now you should have phpBB installed on your server.

Of course, you don’t have to do any of this if you use one of our Software Installation services, in which case you can simply ask our expert Linux admins to install phpBB for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

 

The post How to install phpBB on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-phpbb-on-ubuntu-16-04/feed/ 0
How to install SilverStripe CMS on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-silverstripe-cms-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-silverstripe-cms-on-ubuntu-16-04/#comments Wed, 12 Jul 2017 12:20:52 +0000 https://linuxhostsupport.com/blog/?p=142 Today, we will show you how to install SilverStripe on an Ubuntu 16.04 VPS using the Apache web-server and a MySQL database. SilverStripe is popular and widely-used open source CMS. It uses the SilverStripe framework (previously Sapphire Framework). Because of the framework, developers can easily customize and extend the CMS and make it their own. […]

The post How to install SilverStripe CMS on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Today, we will show you how to install SilverStripe on an Ubuntu 16.04 VPS using the Apache web-server and a MySQL database.

SilverStripe is popular and widely-used open source CMS. It uses the SilverStripe framework (previously Sapphire Framework). Because of the framework, developers can easily customize and extend the CMS and make it their own. With SilverStripe, you can create websites and applications with ease. It has all the features you’d need in a CMS. SilverStripe is a popular choice when looking for an alternative CMS to WordPress. It is fairly easy to install SilverStripe on an Ubuntu 16.04 VPS. The installation process should take about 5-10 minutes if you follow the very easy steps described below.

Requirements

At the time of writing this tutorial, SilverStripe 3.6.1 is the latest stable version available and it requires:

– Apache web server;
– PHP (5.3.3+, <7.2) along with the mbstring, curl, zip, bcmath, xml, tidy, gd and mcrypt extensions. They are most generally active by default on a standard php installation.
– MySQL(version 5.0 or higher) installed on your Linux VPS;

First of all login to your Ubuntu 16.04 VPS via SSH as user root

ssh root@IP_address

At the very beginning, it is best to start a screen session by executing the following command

screen -U -S sstripe

Update the system:

apt-get update && apt-get -y upgrade

Make sure to always keep your server up to date.

Install MariaDB 10.0

To install MariaDB, run the following command:

apt-get install -y mariadb-server

Next, we need to create a database for our Silverstripe installation.

mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE sstripe;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON sstripe.* TO 'sstripe'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Do not forget to replace ‘your-password’ with a strong password.

Install Apache2 web server

[user]$ sudo apt-get install apache2

Install PHP and required PHP modules

To install the latest stable version of PHP version 7 and all necessary modules, run:

[user]$ sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mbstring php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-bcmath php7.0-xml php7.0-json php7.0-tidy

Enable the Apache2 rewrite module if it is not already done:

[user]$ sudo a2enmod rewrite

In order to activate the new configuration, restart the Apache web server using the following command:

[user]$ sudo service apache2 restart

Download and install SilverStripe

Download and extract the latest version of SilverStripe on your server:

[user]$ sudo cd /opt && wget https://silverstripe-ssorg-releases.s3.amazonaws.com/sssites-ssorg-prod/assets/releases/SilverStripe-cms-v3.6.1.zip
[user]$ sudo unzip SilverStripe-cms-v3.6.1.zip -d sstripe
[user]$ sudo mv sstripe/ /var/www/html/sstripe

All files have to be readable by the web server, so we need to set a proper ownership

[user]$ sudo chown www-data:www-data -R /var/www/html/sstripe/

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

[user]$ sudo touch /etc/apache2/sites-available/sstripe.conf
[user]$ sudo ln -s /etc/apache2/sites-available/sstripe.conf /etc/apache2/sites-enabled/sstripe.conf
[user]$ sudo nano /etc/apache2/sites-available/sstripe.conf

Then, add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/sstripe/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/sstripe/>
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>

Restart the Apache web server for the changes to take effect:

[user]$ sudo service apache2 restart

Open your favorite web browser, navigate to http://your-domain.com/ and if you configured everything correctly the SilverStripe installer should be starting. You should follow the easy instructions on the install screen inserting the necessary information as requested.

That is it. The SilverStripe installation is now complete.

Of course, you don’t have to do any of this if you use one of our Software Installation services, in which case you can simply ask our expert Linux admins to install SilverStripe for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please, share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

 

The post How to install SilverStripe CMS on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-silverstripe-cms-on-ubuntu-16-04/feed/ 1
Virtual Users and Domains with Sendmail on Ubuntu 16.04 https://linuxhostsupport.com/blog/virtual-users-and-domains-with-sendmail-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/virtual-users-and-domains-with-sendmail-on-ubuntu-16-04/#respond Wed, 24 May 2017 14:55:50 +0000 https://linuxhostsupport.com/blog/?p=93 In this tutorial, we will show you how to configure Sendmail to use a virtual user table that’ll allow us to set up user-specific, domain-wide email aliases with multiple domains on our server. This guide should work on other Linux VPS systems as well but was tested and written for  Ubuntu 16.04. Configuring Sendmail to […]

The post Virtual Users and Domains with Sendmail on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to configure Sendmail to use a virtual user table that’ll allow us to set up user-specific, domain-wide email aliases with multiple domains on our server. This guide should work on other Linux VPS systems as well but was tested and written for  Ubuntu 16.04.

Configuring Sendmail to use our domains

Let’s begin by first checking if our server is configured to accept mail for the domains we want to set up aliases for:

# cat /etc/mail/local-host-names
test1.com
test2.com

In our case, the domains we want to set up email aliases for are test1.com and test2.com.
Make sure you have your domain’s MX records pointing to your VPS hostname before you configure Sendmail to use them.

Now if the user we wish to add an email alias to doesn’t exist on our server, we can create the user and set a password for the user by typing in the following commands:

# useradd testuser
# passwd testuser

Then we configure Sendmail to use the virtual user table by editing sendmail.mc and by entering in the following lines:

# nano /etc/mail/sendmail.mc
FEATURE(`virtusertable')dnl
VIRTUSER_DOMAIN_FILE(`-o /etc/mail/virtuserdomain')dnl

Make sure these lines are added before the MAILER() line, otherwise Sendmail will return a warning/error on compilation.

Next, we compile the Sendmail configuration by typing in the following commands:

# make
# sendmailconfig

The command sendmailmenuconfig will ask you a few questions whether you want to use the new configuration and reload it, answer y(or yes) on all.

Creating the virtual user table and mapping users to our domains

Now create the /etc/mail/virtuserdomain file by opening it with an editor and add your domains, our preferred editor is nano due to its simplicity:

# nano /etc/mail/virtuserdomain
test1.com
test2.com

Now let’s open the /etc/mail/virtusertable file and add the email aliases for our user:

# nano /etc/mail/virtusertable
testuser@test1.com   testuser
testuser@test2.com   testuser@someremotedomain.com

Let me explain what we did here, we added an email alias for testuser using the domain name test1.com and mapped it to the local mailbox of testuser and we also added an email alias for testuser using the domain name test2.com and mapped it to a remote email address(testuser@someremotedomain.com). These are some of the cool options virtusertable offers. You can also map an entire domain name to an email address or local mailbox the same way, except you would leave out the user portion of the first part of the address like this:

@test1.com   testuser
@test2.com   testuser@someremotedomain.com

And then we close the file and enter the following commands:

# makemap hash virtusertable < virtusertable
# /etc/init.d/sendmail reload

Create outgoing email aliases

Now if we want to create outgoing email addresses for our users we need to edit the sendmail.cf file first and add the following lines:

FEATURE(masquerade_envelope)
FEATURE(genericstable, `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')

Then we need to create the /etc/mail/genericstable file and edit it to contain our local users which will be mapped to the desired addresses:

testuser   testuser@test1.com
testuser2   testuser2@test1.com

And now we create the /etc/mail/generics-domains file containing the FQDN(fully qualified domain name) of the local mail server:

mail.test1.com

Finally, we will complete the procedure by generating new Sendmail configuration files with the following commands:

# make
# sendmailconfig

Again, answer yes to all the questions the sendmailconfig command asks you.
Note: Remember to replace the user and domain examples given in this tutorial with the names of your actual users and domains.

Of course, you don’t have to do any of this if you use one of our Service Configuration & Optimization Services, in which case you can simply ask our expert Linux admins to set up a mail server for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, about Virtual Users and Domains with Sendmail on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a comment in the Comments Section below. Thanks.

The post Virtual Users and Domains with Sendmail on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/virtual-users-and-domains-with-sendmail-on-ubuntu-16-04/feed/ 0
How To Upgrade Your Ubuntu VPS to 16.04 LTS https://linuxhostsupport.com/blog/upgrade-ubuntu-vps-to-16-04-lts/ https://linuxhostsupport.com/blog/upgrade-ubuntu-vps-to-16-04-lts/#comments Wed, 03 May 2017 12:15:11 +0000 https://linuxhostsupport.com/blog/?p=72 We’ll show you, How To Upgrade Your Ubuntu VPS to 16.04 LTS. When an Ubuntu OS release reaches its ‘end of life’ it receives no further maintenance updates, including critical security upgrades, so it is highly recommended to upgrade to the latest Ubuntu version. In this tutorial, we will show you how to upgrade your Ubuntu […]

The post How To Upgrade Your Ubuntu VPS to 16.04 LTS appeared first on LinuxHostSupport.

]]>
We’ll show you, How To Upgrade Your Ubuntu VPS to 16.04 LTS. When an Ubuntu OS release reaches its ‘end of life’ it receives no further maintenance updates, including critical security upgrades, so it is highly recommended to upgrade to the latest Ubuntu version. In this tutorial, we will show you how to upgrade your Ubuntu VPS from Ubuntu 14.04 LTS (Trusty Tahr) to Ubuntu 16.04 LTS version (Xenial Xerus), skipping the non-LTS releases in-between.

Important

Please note, it is recommended to backup your data including the MySQL databases and service configuration files before you continue to upgrade your server OS, because there is a risk of failure, misconfiguration of your server services or some data loss during the upgrade process. It’s highly important that you backup all your data before you proceed with the upgrade.

Upgrade at your own risk, or leave it to professionals to do it.

Log in to your virtual server and check the current OS version:

#cat /etc/issue
Ubuntu 14.04.5 LTS \n \l

Make sure your Ubuntu OS packages are up-to-date:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Start the Ubuntu upgrade procedure

Install the update-manager-core package is if it is not installed on your server yet:

sudo apt-get install update-manager-core

Run:

sudo do-release-upgrade -d
...
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade?


9 installed packages are no longer supported by Canonical. You can
still get support from the community.

20 packages are going to be removed. 109 new packages are going to be
installed. 477 packages are going to be upgraded.

You have to download a total of 214 M. This download will take about
51 seconds with your connection.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.

 Continue [yN]  Details [d]

Enter ‘d’ to see more details on which packages are going to be removed and which new packages are going to be installed.

Enter ‘y’ to continue and to start the upgrade process.

During the upgrade process, you will be prompted to install new package maintainer’s configuration files or keep your current configuration files.

Enter ‘D’ to see the differences between the versions.

Enter ‘N’ to keep your current configuration file.

You may be prompted to restart some services on your server. Enter ‘yes’ to restart the specific service and continue the upgrade process.

Also, you will be prompted to remove obsolete packages, for example:

...
Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done

Remove obsolete packages?


71 packages are going to be removed.

 Continue [yN]  Details [d]

Enter ‘d’ to check which packages are going to be removed.

Carefully go through the list and make sure you don’t need any of those packages. Enter ‘y’ to continue.

After the upgrade process is complete, you will be prompted to restart the server:

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN]

Enter ‘y’ to restart the server.

Or, enter ‘N’, then restart your server using the command below:

shutdown -r now

Once the server is restarted, log in to the server and run the command below to check your Ubuntu version:

#cat /etc/issue
Ubuntu 16.04.2 LTS \n \l

That is it. Your server has been successfully upgraded to Ubuntu 16.04 (Xerial Xerus) LTS. The process is similar when upgrading any Ubuntu distro.

Of course you don’t have to do any of this if you use one of our Server Security Patches and Updates Services, in which case you can simply ask our expert Linux admins to upgrade the server OS for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How To Upgrade Your Ubuntu VPS to 16.04 LTS appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/upgrade-ubuntu-vps-to-16-04-lts/feed/ 3
How to install ownCloud 9 on Ubuntu https://linuxhostsupport.com/blog/how-to-install-owncloud-9-on-ubuntu/ https://linuxhostsupport.com/blog/how-to-install-owncloud-9-on-ubuntu/#respond Wed, 26 Apr 2017 14:13:20 +0000 https://linuxhostsupport.com/blog/?p=69 In today’s tutorial, we will explain how to install ownCloud 9.0 on a fresh Ubuntu 16.04 LTS installation. ownCloud is a self-hosted, open source, file sync and share app platform written in PHP. With ownCloud you can sync and access your files through a web interface, create contacts, calendars and bookmarks, easily share your data […]

The post How to install ownCloud 9 on Ubuntu appeared first on LinuxHostSupport.

]]>
In today’s tutorial, we will explain how to install ownCloud 9.0 on a fresh Ubuntu 16.04 LTS installation. ownCloud is a self-hosted, open source, file sync and share app platform written in PHP. With ownCloud you can sync and access your files through a web interface, create contacts, calendars and bookmarks, easily share your data across devices, preview and edit your text files, documents and images and much more. It’s a great alternative to Dropbox, Google Drive and similar file-sharing services.

Log in to your server as root

ssh user@vps_IP

and make sure that all packages are up to date:

sudo apt update && sudo apt -y upgrade

Add ownCloud Repository

We will install the owncloud package from the official ownCloud repository. owncloud is a meta package which will install multiple packages including apache2, PHP 7.0 and all necessary PHP modules, basically you will get a complete installation with all dependencies.

Run the following commands to add the ownCloud repository PGP key to your system:

sudo wget -nv https://download.owncloud.org/download/repositories/9.1/Ubuntu_16.04/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo rm -f Release.key

Add the ownCloud repository to your system using the following command:

echo 'deb http://download.owncloud.org/download/repositories/9.1/Ubuntu_16.04/ /' | sudo tee --append /etc/apt/sources.list.d/owncloud.list > /dev/null

Install ownCloud

The ownCloud installation is pretty straightforward, once the repository is added update the apt package index, install the owncloud package:

sudo apt update
sudo apt install owncloud

You can choose between SQLite, MYSQL/MariaDB and PostgreSQL. SQLite is the default database but it is not recommended for production, MariaDB which we will be using in this tutorial is the ownCloud recommended database.

Install the MariaDB package using the following command:

sudo apt-get install mariadb-server

When the installation is complete, run the following command to secure your installation:

mysql_secure_installation

Next, we need to create a database for our ownCloud installation.

mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE owncloud;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'my_strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

To access the graphical ownCloud 9 installation wizard open the following URL in your browser http://your_ip_address/owncloud, enter the admin account username and password, select ‘MySQL/MariaDB’ and enter the database name, database user and password. Finally, click on the “Finish setup” button located on the bottom of the page.

That’s it. You have successfully installed ownCloud version 9 on your Ubuntu VPS.
For more information about how to manage your ownCloud installation, please refer to the ownCloud documentation.


Of course, you don’t have to do any of this if you use one of our Software Installation Services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to install ownCloud 9 on Ubuntu appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-owncloud-9-on-ubuntu/feed/ 0
How to Install, Configure and Deploy a Meteor.js App on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-configure-and-deploy-a-meteor-js-app-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-configure-and-deploy-a-meteor-js-app-on-ubuntu-16-04/#comments Wed, 05 Apr 2017 13:07:29 +0000 https://linuxhostsupport.com/blog/?p=57 MeteorJS or simply Meteor is an open-source framework based on JavaScript. It is written using Node.js and allows you to build apps for any device (web, iOS, Android, or desktop) using the same code. In this tutorial, we will show you how to deploy a simple Meteor application on a Linux VPS running Ubuntu 16.04 […]

The post How to Install, Configure and Deploy a Meteor.js App on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
MeteorJS or simply Meteor is an open-source framework based on JavaScript. It is written using Node.js and allows you to build apps for any device (web, iOS, Android, or desktop) using the same code. In this tutorial, we will show you how to deploy a simple Meteor application on a Linux VPS running Ubuntu 16.04 as an operating system.

Connect to your Linux server via SSH and install the MeteorJS framework using the command below:

sudo curl https://install.meteor.com/ | sh

This will install the latest official Meteor release on your Ubuntu VPS.

In case you get the following error message when you run the installation command:

-bash: curl: command not found

it means you don’t have curl installed on your server. To install the package use the commands below:

sudo apt-get update
sudo apt-get install curl

Once curl is installed, you can run the installation command for MeteorJS again and get the Meteor framework installed.

It will take a couple of minutes for the installation process to finish, and once it is completed you can verify that the installation is successful by checking the Meteor version:

meteor --version

This should provide you with output very similar to this one:

$ meteor --version
Meteor 1.4.3.2

If you are running the meteor command for the first time, it will take a couple of seconds for Meteor to be set up in your user’s home directory.

Now you are ready to create your first MeteorJS application. Navigate to your home directory:

cd ~

and run the following command:

meteor create firstApp

The application will be set up immediately. To run the application, use the following commands:

cd firstApp
meteor

Make sure that there are no errors in the output. It should be similar to the one below:

$ meteor
[[[[[ ~/firstApp ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Started your app.

=> App running at: http://localhost:3000/

Now the application is running on port 3000 and it is accessible from the local machine only. To make it accessible using a domain name you can set up Nginx as a reverse proxy on your Meteor VPS.

First, install Nginx and set up a server block.

Add the following lines to the Nginx server block for your Meteor application:

upstream meteor {
    server 127.0.0.1:3000;
}

server {
    listen      80;
    server_name your_domain;

    access_log  /var/log/nginx/meteor.access.log;
    error_log   /var/log/nginx/meteor.error.log;

    proxy_buffers 16 64k;
    proxy_buffer_size 128k;

location / {
        proxy_pass  http://meteor;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
        proxy_redirect off;

        proxy_set_header    Host            $host;
        proxy_set_header    X-Real-IP       $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto https;
    }
}

Replace your_domain with your actual domain name. Save and close the file, then check if there are errors:

sudo nginx -t

If there are no errors, restart nginx:

sudo systemctl restart nginx.service

Restart your Meteor application and open your web browser. You should be able to access the Meteor application you just deployed using your domain name. If you see the welcome screen like the one below it means your Meteor application is successfully deployed.

meteor welcome

To start building real applications with MeteorJS you can check the tutorials at https://www.meteor.com/tutorials

Of course, you don’t have to do any of this if you use one of our Software Installation Services, in which case you can simply ask our expert Linux admins to install MeteorJS on your server for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install, Configure and Deploy a Meteor.js App on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-configure-and-deploy-a-meteor-js-app-on-ubuntu-16-04/feed/ 4
How to install Caddy on Ubuntu 16.04 https://linuxhostsupport.com/blog/how-to-install-caddy-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/how-to-install-caddy-on-ubuntu-16-04/#respond Wed, 22 Mar 2017 12:45:35 +0000 https://linuxhostsupport.com/blog/?p=47 In this tutorial, we will show you how to install Caddy on a Ubuntu 16.04 VPS. 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 guide should work on other Linux VPS systems as well but was tested […]

The post How to install Caddy on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install Caddy on a Ubuntu 16.04 VPS. 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 guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 16.04 VPS.

Log in to your VPS via SSH

ssh user@vps_IP

Update the system and install all necessary packages

sudo apt-get update && apt-get -y upgrade
sudo apt-get install curl

Install Caddy

Installing Caddy is quick and easy:

curl https://getcaddy.com | bash

If you want to install Caddy with some extra features, you can use the -s switch with a comma-separated list of directives, like in the following example:

curl https://getcaddy.com | bash -s realip,expires,upload

Once the installation is completed, we need to add the cap_net_bind_servicecapability to the Caddy binary. This capability will allow the Caddy executable to bind to a port less than 1024.

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

Next, create the directories where we will store the Caddy configuration file Caddyfile and SSL certificates. The term “Caddyfile” is a plaintext configuration file used to configure how Caddy works. This configuration file is very similar in purpose to httpd.conf in Apache or nginx.conf in Nginx.

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

SystemD Configuration

We also need to create a new SystemD configuration script:

sudo nano /lib/systemd/system/caddy.service
[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

Enable Caddy to start on boot:

sudo systemctl enable caddy.service

Testing Caddy

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

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

and add our domain to the Caddy configuration file.

sudo nano /etc/caddy/Caddyfile
my-domain.com {
    root /var/www/my-domain.com
}

Start Caddy with the following command:

sudo systemctl start caddy.service

You can now access your domain at https://my-domain.com.

For more information about how to manage your Caddy web server, please refer to the Caddy documentation.


Of course, you don’t have to do any of this if you use one of our Server Setup and Optimization Services, in which case you can simply ask our expert Linux admins to install Caddy on your server for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to install Caddy on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-caddy-on-ubuntu-16-04/feed/ 0