• Email Address: forum@outsourcepath.com
  • English
Topics related to auto installer

Install ClickHouse on Ubuntu 20.04 - Step by step process to perform it

This article covers how to install ClickHouse on Ubuntu. Basically, ClickHouse is an open-source analytics database developed for big data use cases. 

Install of ClickHouse on Ubuntu involves a series of steps that includes adjusting the configuration file to enable listening over other IP address and remote access. 

Column-oriented databases store records in blocks grouped by columns instead of rows. 

By not loading data for columns absent in the query, column-oriented databases spend less time reading data while completing queries. 

As a result, these databases can compute and return results much faster than traditional row-based systems for certain workloads, such as OLAP.

Online Analytics Processing (OLAP) systems allow for organizing large amounts of data and performing complex queries. 

They are capable of managing petabytes of data and returning query results quickly. 

In this way, OLAP is useful for work in areas like data science and business analytics.

Aggregation queries are queries that operate on a set of values and return single output values. 

In analytics databases, these queries are run frequently and are well optimized by the database. 

Some aggregate functions supported by ClickHouse are:

1. count: returns the count of rows matching the conditions specified.

2. sum: returns the sum of selected column values.

3. avg: returns the average of selected column values.

Some ClickHouse-specific aggregate functions include:

1. uniq: returns an approximate number of distinct rows matched.

2. topK: returns an array of the most frequent values of a specific column using an approximation algorithm.

You can set up a ClickHouse database instance on your server and create a database and table, add data, perform queries, and delete the database.

You can start, stop, and check the ClickHouse service with a few commands.

To start the clickhouse-server, use:

$ sudo systemctl start clickhouse-server

The output does not return a confirmation.

To check the ClickHouse service status, enter:

$ sudo systemctl status clickhouse-server

To stop the ClickHouse server, run this command:

$ sudo systemctl stop clickhouse-server

To enable ClickHouse on boot:

$ sudo systemctl enable clickhouse-server

To start working with ClickHouse databases, launch the ClickHouse client. 

When you start a session, the procedure is similar to other SQL management systems.

To start the client, use the command:

$ clickhouse-client

Install and Configure Mahara on Ubuntu

This article covers how to install Mahara. Basically, Mahara is a popular ePortfolio and social networking system that helps educators to develop a digital classroom in a remote learning environment and track student's progress. 

Mahara also has many non-student applications. You can use it to build a blog, a resume-builder, a file-repository, or a competency framework.

Mahara is a fully featured web application to build your electronic portfolio. 

You can upload files, create journals, embed social media resources from the web and collaborate with other users in groups. 

To install Mahara on Ubuntu:

1. 1. Login to your VPS via SSH

ssh user@vps

2. Update the system

[user]$ sudo apt-get update && sudo apt-get -y upgrade

3. Install MariaDB

To install MariaDB, run the following command:

[user]$ sudo apt-get install -y mariadb-server

4. Create MariaDB database for Mahara

Next, we need to create a database for our Mahara installation.

[user]$ mysql -u root -p
MariaDB [(none)]> CREATE DATABASE mahara character set UTF8;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON mahara.* TO 'maharauser'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> \q

Do not forget to replace 'your-password' with a strong password.

5. Install Apache2 Web Server

Install Apache2 web server

[user]$ sudo apt-get install apache2

6. Install PHP

Install PHP and required PHP modules

To install the latest stable version of PHP version 5 and all necessary modules, run:

[user]$ sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-gd

7. Download and extract Mahara

Download and extract the latest version of Mahara on your server:

[user]$ sudo cd /opt && wget https://launchpad.net/mahara/16.04/16.04.1/+download/mahara-16.04.1.zip
[user]$ sudo unzip mahara-16.04.1.zip
[user]$ sudo mv mahara-16.04.1 /var/www/html/mahara
Create Mahara’s upload directory
[user]$ sudo mkdir /var/www/html/mahara/upload/

8. Configure Mahara

Create Mahara’s config.php

In the Mahara ‘htdocs’ directory there is config-dist.php file. Make a copy of this called config.php.

[user]$ cd /var/www/html/mahara/htdocs/
[user]$ sudo cp config-dist.php config.php

Open the config.php and make the necessary changes where appropriate.

[user]$ sudo nano config.php
$cfg->dbtype   = 'mysql';
$cfg->dbhost   = 'localhost';
$cfg->dbport   = null;
$cfg->dbname   = 'mahara';
$cfg->dbuser   = 'maharauser';
$cfg->dbpass   = 'your-password';
$cfg->dataroot = '/var/www/html/mahara/upload/';

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/mahara/

9. Configure Apache Web Server

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

[user]$ sudo touch /etc/apache2/sites-available/mahara.conf
[user]$ sudo ln -s /etc/apache2/sites-available/mahara.conf /etc/apache2/sites-enabled/mahara.conf
[user]$ sudo nano /etc/apache2/sites-available/mahara.conf
Then, add the following lines:
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/mahara/htdocs/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/mahara/htdocs/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

10. Restart and Verify

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 Mahara installer should be starting.

How to install the Anaconda Python on Ubuntu

This article will guide you on how to install, setup, update, and uninstall Anaconda which involves a series of steps to install and setup the Anaconda environment.

Recent Post