bookmark_borderInstalling Focalboard on Ubuntu 20.04

Hello,
In this week’s feature highlight, we look at How to Install Focalboard on Ubuntu 20.04

Focalboard is an open source, self-hosted alternative to Trello, Notion, and Asana. It’s a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view

Update the System.

apt update

apt upgrade

Install Focalboard

Download the focalboard packages and then move it into /opt/focalboard directory.

wget https://github.com/mattermost/focalboard/releases/download/v0.9.2/focalboard-server-linux-amd64.tar.gz
tar -xvzf focalboard-server-linux-amd64.tar.gz
sudo mv focalboard /opt

Install NGINX

Now install NGINX using the following command. By default, the Focalboard server runs on port 8000.

sudo apt install nginx

Adjust firewall setting as per your need. You can open port 8000 in the firewall or you can disable the firewall in your server.

Configure NGINX

Create new config site.

sudo nano /etc/nginx/sites-available/focalboard

Copy and paste this configuration.

upstream focalboard {
server localhost:8000;
keepalive 32;
}

server {
listen 80 default_server;

server_name focalboard.example.com;

location ~ /ws/* {
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "upgrade";
     client_max_body_size 50M;
     proxy_set_header Host $http_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 $scheme;
     proxy_set_header X-Frame-Options SAMEORIGIN;
     proxy_buffers 256 16k;
     proxy_buffer_size 16k;
     client_body_timeout 60;
     send_timeout 300;
     lingering_timeout 5;
     proxy_connect_timeout 1d;
     proxy_send_timeout 1d;
     proxy_read_timeout 1d;
     proxy_pass http://focalboard;
 }

 location / {
     client_max_body_size 50M;
     proxy_set_header Connection "";
     proxy_set_header Host $http_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 $scheme;
     proxy_set_header X-Frame-Options SAMEORIGIN;
     proxy_buffers 256 16k;
     proxy_buffer_size 16k;
     proxy_read_timeout 600s;
     proxy_cache_revalidate on;
     proxy_cache_min_uses 2;
     proxy_cache_use_stale timeout;
     proxy_cache_lock on;
     proxy_http_version 1.1;
     proxy_pass http://focalboard;
   }
}

If there is a default site, then delete it.

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

Test the config and reload NGINX using the following commands:

sudo ln -s /etc/nginx/sites-available/focalboard /etc/nginx/sites-enabled/focalboard
sudo nginx -t
sudo /etc/init.d/nginx reload

Install Postgresql

To install Postgresql, run the following commands on the server.

sudo apt install postgresql postgresql-contrib

Now login as a postgres user to create new database,

sudo --login --user postgres

psql

Currently you are in psql prompt, run the following commands,

CREATE DATABASE focal;
CREATE USER focaluser WITH PASSWORD 'focaluser-password';
\q

Exit the session.

exit

Edit the Focalboard /opt/focalboard/config.json,

nano /opt/focalboard/config.json

Modify the dbconfig in the file with the postgres database that was created.

"dbtype": "postgres",
"dbconfig": "postgres://boardsuser:boardsuser-password@localhost/boards?sslmode=disable&connect_timeout=10",

Move focalboard-server file in /opt/focalboard/ directory,

 mv /opt/focalboard/bin/focalboard-server /opt/focalboard/

Configure Focalboard Service

Create a new service config file,

sudo nano /lib/systemd/system/focalboard.service

And paste following lines in file.

[Unit]
Description=Focalboard server

[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/opt/focalboard/focalboard-server
WorkingDirectory=/opt/focalboard

[Install]
WantedBy=multi-user.target

Make systemd reload the new unit, and enable it.

sudo systemctl daemon-reload
sudo systemctl start focalboard.service
sudo systemctl enable focalboard.service

Enter the IP Address:8000 in browser to open the focalboar. You will see following screen.

image

You will see the Focalboard dashboard,

image

Done.

bookmark_borderInstalling and use Docker Compose on Ubuntu 21.04

Hello,
In this week’s feature highlight, we look at How to Install and use Docker Compose on Ubuntu 21.04

Installing Docker on Ubuntu

Check for system updates and install it.

apt update

apt upgrade

Install basic dependencies.

apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Output:

root@vps:~# apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20210119build1).
ca-certificates set to manually installed.
curl is already the newest version (7.74.0-1ubuntu2).
curl set to manually installed.
software-properties-common is already the newest version (0.99.10).
software-properties-common set to manually installed.
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-certifi python3-importlib-metadata python3-jinja2 python3-json-pointer
  python3-jsonpatch python3-jsonschema python3-markupsafe python3-more-itertools python3-pyrsistent
  python3-requests python3-urllib3 python3-zipp
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  apt-transport-https gnupg-agent
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,940 B of archives.
After this operation, 212 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Import docker repository GPG key.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Output:

root@vps:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK

Add Docker CE repository.

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Output:

root@vps:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Repository: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu hirsute stable'
Description:
Archive for codename: hirsute components: stable
More info: https://download.docker.com/linux/ubuntu
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-hirsute.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-hirsute.list
Hit:1 http://de.archive.ubuntu.com/ubuntu hirsute InRelease
Get:2 http://de.archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
Get:3 https://download.docker.com/linux/ubuntu hirsute InRelease [28.3 kB]
Hit:4 http://de.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Get:5 http://de.archive.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
Get:6 https://download.docker.com/linux/ubuntu hirsute/stable amd64 Packages [2,406 B]
Fetched 240 kB in 1s (364 kB/s)
Reading package lists... Done

Installing Docker CE.

apt install docker-ce

Output:

root@vps:~# apt install docker-ce
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-certifi python3-importlib-metadata python3-jinja2 python3-json-pointer
  python3-jsonpatch python3-jsonschema python3-markupsafe python3-more-itertools python3-pyrsistent
  python3-requests python3-urllib3 python3-zipp
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  containerd.io docker-ce-cli docker-ce-rootless-extras docker-scan-plugin libslirp0 pigz slirp4netns
Suggested packages:
  aufs-tools cgroupfs-mount | cgroup-lite
The following NEW packages will be installed:
  containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin libslirp0 pigz
  slirp4netns
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 108 MB of archives.
After this operation, 465 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

To check status.

systemctl status docker

Output:

root@vps:~# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-05-01 03:45:52 UTC; 1min 6s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 632611 (dockerd)
      Tasks: 8
     Memory: 41.1M
     CGroup: /system.slice/docker.service
             └─632611 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root@vps:~#

Installing Docker Compose on Ubuntu

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application’s services. Then, using a single command, you create and start all the services from your configuration.

Use curl to download the Compose file into the /usr/local/bin directory.

curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Output:

root@vps:~# curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   633  100   633    0     0    561      0  0:00:01  0:00:01 --:--:--   561
100 12.1M  100 12.1M    0     0  7465k      0  0:00:01  0:00:01 --:--:-- 32.2M

Next, set the correct permissions so that the docker-compose command is executable.

chmod +x /usr/local/bin/docker-compose

To verify that the installation was successful, you can run following command.

docker-compose --version

Output:

root@vps:~# docker-compose --version
docker-compose version 1.29.1, build c34c88b2

Setting Up a docker-compose.yml File

In this section, we’ll use Docker Compose to construct a multi-container WordPress utility.

creating a new directory in your home folder, and then moving into it.

mkdir my_app

cd my_app

Next, create the docker-compose.yml file.

nano docker-compose.yml

Paste the following content on your docker-compose.yml file.

version: '3'

services:
  db:
    image: mysql:5.7
    restart: always
    volumes:
      - db_data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wordpress

  wordpress:
    image: wordpress
    restart: always
    volumes:
      - ./wp_data:/var/www/html
    ports:
      - "8080:80"
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_NAME: wordpress
      WORDPRESS_DB_USER: root
      WORDPRESS_DB_PASSWORD: password
    depends_on:
       - db

volumes:
    db_data:
    wp_data:

In this example, we have services, db, and wordpress. Each service runs one image, and creates a separate container when docker-compose is run.

Start up the WordPress application by running the following command.

docker-compose up

Output:

root@vps:~# docker-compose up
Creating network "root_default" with the default driver
Creating volume "root_db_data" with default driver
Creating volume "root_wp_data" with default driver
Pulling db (mysql:5.7)...
5.7: Pulling from library/mysql
f7ec5a41d630: Pull complete
9444bb562699: Pull complete
6a4207b96940: Pull complete
181cefd361ce: Pull complete

Navigate to your browser. http://yourserver-ip-address:8080 and you will see the WordPress installation screen.

images

Start the Compose in a detached mode by following command.

docker-compose up -d

Output:

root@vps:~# docker-compose up -d
Starting root_db_1 ... done
Starting root_wordpress_1 ... done

To check the running services.

docker-compose ps

Output:

root@vps:~# docker-compose ps
  Name                    Command               State          Ports
--------------------------------------------------------------------------------
root_db_1          docker-entrypoint.sh mysqld      Up      3306/tcp, 33060/tcp
root_wordpress_1   docker-entrypoint.sh apach ...   Up      0.0.0.0:8080->80/tcp

To stop the services only.

docker-compose stop

To stop and remove containers and networks.

docker-compose down    


bookmark_borderHow to Install Python 3.9 on Ubuntu 21.04

Hello,
In this week’s feature highlight, we look at How to Install Python 3.9 on Ubuntu 21.04

Ubuntu has had Python installed by default since at least version 8.04 and since 18.04 LTS the python included in the base system is Python 3.

Use python command to run commands for any older Python 2.x version, to run a command using the newer version, use python3.

You can check the python version by executing the following command.

python3 --version

If python is not installed by default, you can install it by using the following command.

apt install python3

Output:

root@vps:~# apt install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libpython3-stdlib python3-minimal python3.9 python3.9-minimal
Suggested packages:
  python3-doc python3-tk python3-venv python3.9-venv python3.9-doc binutils
  binfmt-support
The following NEW packages will be installed:
  libpython3-stdlib python3 python3-minimal python3.9 python3.9-minimal
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,387 kB of archives.
After this operation, 6,460 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

Next, check the python version.

root@vps:~# python3 -V
Python 3.9.4

bookmark_borderAnnouncing cPanel SSD Powered Shared and Reseller hosting available!

Greetings,

We’re happy to announce a performance upgrade to our cPanel ATL and DE shared and reseller hosting available in Frankfurt, DE, and Atlanta, US.

The cPanel powered services are now powered by SSD-based storage with a much newer CPU and faster DDR4 memory as well.

SSD disks should net a 5-10x performance gain allowing your websites to load faster and serve your users quicker. The improved CPU performance as well will enable websites to load faster and run more stable as well with improved database performance as well.

To check out our cPanel SSD powered plans visit our website at

cPanel shared hosting

cPanel reseller hosting

Stay tuned for further updates!

Follow us on CrownCloud BlogTwitter, and Facebook for updates regarding current offers and other updates.

bookmark_borderInstalling LAMP Stack with MariaDB on Ubuntu 21.04

Hello,
In this week’s feature highlight, we look at How to Install LAMP Stack with MariaDB on Ubuntu 21.04

Update the system

First, lets check for any pending system package updates,

apt update
apt upgrade

Install Apache

A command to install apache2 and with its utilities.

apt install -y apache2 apache2-utils

Next, check the Status of Apache.

systemctl status apache2

Output:

root@server:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor prese>
     Active: active (running) since Thu 2021-04-29 16:37:46 UTC; 16s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 31366 (apache2)
      Tasks: 55 (limit: 2280)
     Memory: 5.5M
     CGroup: /system.slice/apache2.service
             ├─31366 /usr/sbin/apache2 -k start
             ├─31367 /usr/sbin/apache2 -k start
             └─31368 /usr/sbin/apache2 -k start

If Apache is not active can start using the following command.

systemctl start apache2

Use the following command to auto starts apache at boot time.

systemctl enable apache2

To check Apache Version.

apache2 -v

Output:

Server version: Apache/2.4.41 (Ubuntu)
Server built:   2020-08-12T19:46:17

Enabling the Firewall

Allow the port/service http via UFW

ufw allow http

Output:

Rules updated
Rules updated (v6)

You can now verify whether the Apache webserver is installed correctly and functioning via your web browser.

NOTE: Replace “ip-address” with your actual server IP-Address below.

http://ip-address
LAMP

Install MariaDB Server

Installing MariaDB

apt install mariadb-server mariadb-client

Checking MariaDB status

systemctl status mariadb

Output

root@server:~# systemctl status mariadb
● mariadb.service - MariaDB 10.3.25 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor prese>
     Active: active (running) since Thu 2021-04-29 16:41:06 UTC; 15s ago
       Docs: man:mysqld(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 33004 (mysqld)
     Status: "Taking your SQL requests now..."
      Tasks: 31 (limit: 2280)
     Memory: 64.7M
     CGroup: /system.slice/mariadb.service
             └─33004 /usr/sbin/mysqld

To start MariaDB if it is not active.

systemctl start mariadb

Use the following command to auto starts MariaDB at boot time.

systemctl enable mariadb

Next, MariaDB database security.

NOTE: In this step you will be prompted with several questions.

mysql_secure_installation

Output:

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

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

Login to MariaDB

 mariadb -u root

Exit from MariaDB

exit;

Checking the MariaDB Version

mariadb --version

Output:

root@server:~# mariadb --version
mariadb  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Installing PHP 7.4

Run the following commands to install PHP 7.4

apt install php7.4 libapache2-mod-php7.4 php7.4-mysql php-common php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline

Enable the php7.4 module for Apache and restart the Apache Web server.

a2enmod php7.4

systemctl restart apache2

Checking the PHP Version.

php --version

Output:

root@server:~# php --version
PHP 7.4.3 (cli) (built: Oct  6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

To ensure PHP is functioning correctly, lets create a test PHP script, for this we create a new file called info.php,

nano /var/www/html/info.php

Add the following into the file, info.php,

<?php phpinfo(); ?>

Visit the the following link in a web browser to verify that PHP is working fine,

NOTE: Replace “ip-address” with your actual server IP-Address below.

http://server-ip-address/info.php
LAMP

To Run Apache with PHP-FPM (Optional)

FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for heavy-loaded sites.

NOTE: This is an optional step if you wish to run your WordPress website with PHP-FPM.

First, disable normal/plain PHP 7.4,

a2dismod php7.4

Next, Install the php7.4-fpm package,

apt install php7.4-fpm

Enable the proxy_fcgi and setenvif module.

a2enmod proxy_fcgi setenvif

Output:

Considering dependency proxy for proxy_fcgi:
Enabling module proxy.
Enabling module proxy_fcgi.
Module setenvif already enabled
To activate the new configuration, you need to run:
  systemctl restart apache2

Enable the php7.4-fpm module in Apache,

a2enconf php7.4-fpm

Restart Apache,

systemctl restart apache2

Enable php7.4-fpm to start on boot, so anytime your system reboots, php7.4-fpm will start with it,

systemctl enable php7.4-fpm

Start the php7.4-fpm service,

systemctl start php7.4-fpm

If you wish to check the status of php7.4-fpm,

systemctl status php7.4-fpm

Output:

root@server:~# systemctl status php7.4-fpm
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: >
     Active: active (running) since Thu 2021-04-29 17:13:08 UTC; 15min ago
       Docs: man:php-fpm7.4(8)
    Process: 42271 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/>
   Main PID: 42263 (php-fpm7.4)
     Status: "Processes active: 0, idle: 2, Requests: 1, slow: 0, Traffic: 0req/sec"
      Tasks: 3 (limit: 2280)
     Memory: 8.1M
     CGroup: /system.slice/php7.4-fpm.service

To verify enter the following link in a web browser.

NOTE: Replace “ip-address” with your actual server IP-Address below.

http://server-ip-address/info.php
LAMP

Now you have successfully installed LAMP stack (Apache, MariaDB, and PHP7.4) on Ubuntu 21.04.

bookmark_borderInstalling WordPress on Ubuntu 21.04

Hello,

In this week’s feature highlight, we look at How to Install WordPress on Ubuntu 21.04

Prerequisites:

Creating database

Log into MySQL with the following command.

mysql

First, we’ll create a new database.

MariaDB [(none)]> CREATE DATABASE wordpress_db;

Next, create a new MySQL user account that we will use to operate on WordPress’s new database, with username “wordpress_user”.

MariaDB [(none)]> CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'password';

Link the user and DB together by granting our user access to the database.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpress_db.* to wordpress_user@'localhost';

Flush the privileges so that MySQL knows about the user permissions we just added.

MariaDB [(none)]> FLUSH PRIVILEGES;

Exit out of the MySQL command prompt by typing.

MariaDB [(none)]> exit

Output:

root@vps:~# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 61
Server version: 10.5.9-MariaDB-1 Ubuntu 21.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)]> CREATE DATABASE wordpress_db;
Query OK, 1 row affected (0.003 sec)

MariaDB [(none)]> CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.005 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpress_db.* to wordpress_user@'localhost';
Query OK, 0 rows affected (0.003 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.003 sec)

MariaDB [(none)]> exit
Bye

Download and install WordPress

Download WordPress.

wget -O /tmp/wordpress.tar.gz https://wordpress.org/latest.tar.gz

Unzip the downloaded WordPress file.

tar -xzvf /tmp/wordpress.tar.gz -C /var/www/html

Change the permission of the site directory.

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

Navigate to your browser.

http://IP_ADDRESS/wordpress

images

Start a WordPress installation by clicking on the Run the installation button.

images

Provide the requested information.

images

Once the WordPress is installed login with your new user credentials.

images
images

bookmark_borderInstalling LAMP Stack on Debian 11 bullseye

Hello,

In this week’s feature highlight, we look at How to Install LAMP Stack on Debian 11 bullseye

A LAMP stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MariaDB database, and dynamic content is processed by PHP.

Update Debian 11 Bullseye

apt update && apt -y upgrade

Install MaridaDB database server

To get started with MariaDB installation, follow the below steps:

apt install -y mariadb-server mariadb-client

Check the status of mariaDB database server.

systemctl status mariadb

Output:

root@server:~# systemctl status mariadb
● mariadb.service - MariaDB 10.5.11 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-08-03 19:42:28 IST; 36min ago
Docs: man:mariadbd(8)

Run the command below to secure your database server,

mysql_secure_installation

Using the above command, you can do the following,

  • Set root password.
  • Remove anonymous users.
  • Disable remote login for root user.
  • Remove test database and access to it.

You can log in as your root user and set up a regular user and a database.

mysql -u root -p

Output:

root@server:~# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 52
Server version: 10.5.11-MariaDB-1 Debian 11
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)]> 

Install Apache Web Server

Apache is one of the most commonly used web server. You can install by running the below command,

apt install -y apache2 apache2-utils

Output:

root@server:~# apt install -y apache2 apache2-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
apache2-utils is already the newest version (2.4.48-3.1).
Suggested packages: apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser

Check apache build and version.

apache2 -v

Output:

root@server:~# apache2 -v
Server version: Apache/2.4.41 (Debian)
Server built:   2021-07-05T07:16:56
root@server:~#

Check service status.

systemctl status apache2

Output:

root@server:~# 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 2021-08-03 20:22:39 IST; 8min ago
Docs: https://httpd.apache.org/docs/2.4/
Main PID: 20302 (apache2)

Restart service when a change is made & enable the service to start at boot.

systemctl reload apache2
systemctl enable apache2

Open server IP address on your browser(http://IPADDRESS) to see default Apache page.

Example

Install PHP

Follow the below steps to install PHP on the server,

apt install php libapache2-mod-php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd  php-mbstring php-curl php-xml php-pear php-bcmath

Output:

root@server:~# apt install php libapache2-mod-php php-cli php-fpm php-json php-pdo php-mysql php-zip php-   gd  php-mbstring php-curl php-xml php-pear           php-cmath
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'php7.4-common' instead of 'php-pdo'
The following additional packages will be installed:libapache2-mod-php7.4 php-common php7.4 php7.4-bcmath php7.4-cli php7.4-curl php7.4-fpm php7.4-gd             7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php7.4-zip

Enable Apache module if not already enabled then restart the Web Server.

a2enmod php7.4

Confirm the PHP version

php -v

Output:

root@server:~# php -v
PHP 7.4.21 (cli) (built: Jul  2 2021 03:59:48) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies

In order to test the PHP is working on the server, we will create a small file that will list out all the PHP information available.

Run the below command which will create a file,

echo "<?php phpinfo(); ?>" > /var/www/html/info.php

To view the PHP info on your browser, http://IP_address/phpinfo.php

Example.

PHP info

Once you confirmed that the PHP has been installed and working, remove the info.php for security reasons.

rm /var/www/html/info.php

bookmark_borderAlmaLinux ISO is now available for KVM

Hello,

We’re happy to announce that AlmaLinux ISO is now available as an operating system choice for our KVM based plans in our control panel.

You can refer to the following guide to install the operating system on KVM based VPS’s,

https://wiki.crowncloud.net/?how_to_install_almalinux8_4stable

Or, choose our 1-click install template and have it online in minutes.

https://wiki.crowncloud.net/?Reinstalling_your_kvm_vm_on_crownpanel

bookmark_borderRocky Linux ISO is now available for KVM

Hello,

We’re happy to announce that Rocky Linux ISO is now available as an operating system choice for our KVM based plans in our control panel.

You can refer to the following guide to install the operating system on KVM based VPS’s,

https://wiki.crowncloud.net/?How_to_Install_Rocky_Linux

Or, choose our 1-click install template and have it online in minutes.

https://wiki.crowncloud.net/?Reinstalling_your_kvm_vm_on_crownpanel

bookmark_borderDebian 11 ISO is now available for KVM

Hello,

We’re happy to announce that Debian 11 Bullseye ISO is now available as an operating system choice for our KVM based plans in our control panel.

You can refer to the following guide to install the operating system on KVM based VPS’s,

https://wiki.crowncloud.net/?How_to_install_debian11

We’re also working on a 1-click install template which will be available soon for all users!

Stay tuned for further updates!