bookmark_borderHow to Enable BBR on Ubuntu 22.10

Hello,

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

BBR stands for Bottleneck Bandwidth and RTT is a congestion control system. You can enable TCP BBR on your Linux desktop to improve the overall web surfing experience. By default, Linux uses the Reno and CUBIC congestion control algorithm.

Run the following command to check available congestion control algorithms,

sysctl net.ipv4.tcp_available_congestion_control

Output:

root@crown:~# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = reno cubic bbr

Run the below command to check the current congestion control algorithm used in your system,

sysctl net.ipv4.tcp_congestion_control

Output:

root@crown:~# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr

Enabling TCP BBR in Ubuntu

Open the following configuration file /etc/sysctl.conf to enable TCP BBR.

 nano /etc/sysctl.conf

At the end of the config file, add the following lines.

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

Save the file, and refresh your configuration by using this command,

sysctl -p

Output:

root@crown:~# sysctl -p
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

Now, Verify if BBR is enabled in your system,

sysctl net.ipv4.tcp_congestion_control

Output:

root@crown:~# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr

bookmark_border5 Free to use Control Panel Software to Manage your Website on a VPS

Has your website grown a large following recently, perhaps receiving a lot more web traffic and visitors than before? Well, congratulations! 

Now comes the important step of ensuring your website keeps growing and remains accessible to your new visitors, often websites hosted on shared hosting services have limits set on them by their web host, while some web hosts might be generous with their limits, most tend to restrict memory usage, IOps (Input output operations per second) and other variables like Entry processes which ultimately limit the number of people who can access your website at a given time.

Using a control panel like cPanel or DirectAdmin gives a sense of comfort and easy accessibility to various features like creating/managing databases, accessing webmail and other features like adding users, new domains and email accounts.

Moving to a VPS from Shared Hosting is the step often taken by most growing website owners to ensure that your website has more resources available for it, but this often brings along a few doubts about managing your website via the command line, while setting up a LAMP stack or LEMP stack isn’t difficult, but combined with managing things like a mail server and databases for multiple users or websites, it gets rather complex quickly.

Let’s take a look at 5 free to use control panels that make managing your website on a VPS just like it was on your shared hosting service,

HestiaCP (https://www.hestiacp.com/)

HestiaCP is a fork of the popular control panel VestaCP which includes many enhancements and updates to it with a similar user interface,

Control Web Panel (also known as CentOS Web Panel) (https://control-webpanel.com/)

Originally called CentOS Web Panel, now renamed to Control Web Panel is another popular control panel used by many to manage their servers.

WebMin (https://www.webmin.com/)

A control panel that is both popular and has been around for a long time, WebMin is a time-tested solution that still works great in 2022.

VestaCP (https://vestacp.com/)

VestaCP is the popular and free-to-use control panel, with a nice UI and packed with features that make it super simple to manage your websites hosted on the VPS.

myVesta (https://www.myvestacp.com/)

myVesta is a fork of vestaCP with similar UI and features, but it is designed with a few additional features to improve performance and give end users more control such as limiting the maximum number of sent emails (per hour) per mail account and per hosting account.

bookmark_borderInstalling GCC on Ubuntu 22.10

Hello,

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

The default Ubuntu repositories contain a meta-package named “build-essential” that includes the GNU compiler collection, GNU debugger, and other development libraries and tools required for compiling software.

Update System

 apt update

Install the GCC package dependencies.

 apt install build-essential

To check GCC version

 gcc --version

Output:

root@crown:~# gcc --version
gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

That’s it. GCC tools and libraries have been installed on your Ubuntu system.

Compiling a Hello World Example

Compiling a basic C or C++ program using GCC is pretty easy. For example let’s create a hello world C program. Save the following code as hello.c text file:

 nano hello.c
// hello.c
#include <stdio.h>

int main() {
    printf("Hello, world!\n");
    return 0;
}

Save the file and compile it into an executable:

$ gcc -o hello hello.c 
$ ./hello 
 Hello, world!

Done.

bookmark_borderInstalling Planka with Docker on AlmaLinux 9

Hello,

In this week’s feature highlight, we look at How to Install Planka with Docker on AlmaLinux 9

Planka is a self-hosted Trello-like kanban board built with React and Redux.

In this article, we are going to learn how to install Planka on AlmaLinux 9. So, let’s get started.

Checkout the Plaka Project Here.

Try this wiki on our VPS. Starting at just $5/month with 24×7 In-house customer support.

Pre-requisites

  • A system with AlmaLinux 9 installed and running.
  • root access to the system.
  • Docker installed and running, for this, you can refer to one of our guides on installing Docker on AlmaLinux 9.
  • Docker-Compose installed and running, for this, you can refer to one of our guides on installing Docker-Compose on AlmaLinux 9.

Once you’re all set, we’ll proceed with Planka installation and configuration.

Install Planka with Docker

The following instructions use Docker-Compose and Docker service to install Planka using the Planka Docker Image. First, download the docker-compose configuration,

curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-compose.yml -o docker-compose.yml

Next, edit the docker-compose.yml file, and change the following variables

  • BASE_URL — Change localhost in the BASE_URL variable to the actual IP address of your server
  • SECRET_KEY — Change this to a random string/password other than notsecretkey
  • user-avatars — Set this to a path within your server, where the user-avatars would be stored
  • project-background-images — Set this to a path within your server, where the project-background-images would be stored
  • attachments — Set this to a path within your server, where the attachments would be stored
  • db-data — Set this to a path within your server, where the db-data would be stored

For example,

version: '3'

services:
  planka:
    image: ghcr.io/plankanban/planka:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          ./start.sh &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 seconds...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
    ports:
      - 3000:1337
    environment:
      - BASE_URL=http://localhost:3000 <<< CHANGE THIS
      - TRUST_PROXY=0
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=notsecretkey <<< CHANGE THIS
    depends_on:
      - postgres

  postgres:
    image: postgres:14-alpine
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust

volumes:
  user-avatars:  <<< CHANGE THIS
  project-background-images:  <<< CHANGE THIS
  attachments:  <<< CHANGE THIS
  db-data:  <<< CHANGE THIS

Next, run the docker-compose command to start the container,

docker-compose up -d

Wherein you’ll see the following output,

[+] Running 23/23d                                                        32.6s
 ⠿ postgres Pulled                                                        32.6s
   ⠿ ca7dd9ec2225 Pull complete                                           10.2s
   ⠿ 126ca7716c09 Pull complete                                           11.8s
   ⠿ 72a45366ffb3 Pull complete                                           13.0s
   ⠿ a83abc0b204f Pull complete                                           25.1s
   ⠿ 75b7878d77a7 Pull complete                                           25.8s
   ⠿ 885367a2605d Pull complete                                           26.5s
   ⠿ e21e95eec5ea Pull complete                                           27.1s
   ⠿ 8314321a0c7c Pull complete                                           27.8s
 ⠿ planka Pulled                                                          48.6s
   ⠿ df9b9388f04a Pull complete                                            5.2s
   ⠿ 70c90f7de7cb Pull complete                                           19.8s
   ⠿ f83937c3ce37 Pull complete                                           21.1s
   ⠿ 98b78bba1d70 Pull complete                                           21.7s
   ⠿ f691180aac9c Pull complete                                           36.9s
   ⠿ 22ea37fc2716 Pull complete                                           37.1s
   ⠿ d6a11a777488 Pull complete                                           37.3s
   ⠿ 9805222c040e Pull complete                                           45.9s
   ⠿ 96e449f43226 Pull complete                                           46.1s
   ⠿ 2b61d5091b2c Pull complete                                           46.4s
   ⠿ 459ac8f0ea37 Pull complete                                           46.6s
   ⠿ f74ffe3c6698 Pull complete                                           47.3s
   ⠿ 6e09b209a763 Pull complete                                           47.4s
[+] Running 7/7
 ⠿ Network root_default                     Crea...                        0.6s
 ⠿ Volume "root_user-avatars"               Created                        0.0s
 ⠿ Volume "root_project-background-images"  Created                        0.0s
 ⠿ Volume "root_attachments"                Created                        0.0s
 ⠿ Volume "root_db-data"                    Cre...                         0.0s
 ⠿ Container root-postgres-1                Started                        1.5s
 ⠿ Container root-planka-1                  S...                           3.0s

The installation process will start now. It may take 5-10 mins to complete.

To verify if the Planka container is running, you can check the output of docker ps,

[root@vps ~]# docker ps
CONTAINER ID   IMAGE                              COMMAND                  CREATED          STATUS          PORTS                                       NAMES
e22e9f27a1e4   ghcr.io/plankanban/planka:latest   "docker-entrypoint.s…"   19 minutes ago   Up 19 minutes   0.0.0.0:3000->1337/tcp, :::3000->1337/tcp   root-planka-1
7b15642535d3   postgres:14-alpine                 "docker-entrypoint.s…"   19 minutes ago   Up 19 minutes   5432/tcp                                    root-postgres-1
[root@vps ~]#

Accessing Planka

Now open the IP address or Domain name from your browser, this will redirect you to the Appwrite.

http://server.ip.address:3000/login

Replace the server.ip.address with the actual IP or domain configured on the server.

The default logins are defined as,

Username: demo@demo.demo Password: demo

Follow the below steps:

Once logged in, you can change the username, password, email ID and other information of the user from under the Settings menu,

Next,

Now you have successfully installed Planka with Docker on AlmaLinux 9.

bookmark_borderInstalling WordPress with LEMP Stack on Ubuntu 22.10

Hello,

In this week’s feature highlight, we look at How to Install WordPress with LEMP Stack on Ubuntu 22.10

WordPress is one of the most popular website-building tools available out there. It is a simple way to get your online presence and perfect for those who do not know how to code and want a simple and effective way to share and build your story on the internet.

Prerequisites:

Creating Database

Log into MySQL with the following command.

mysql -u root -p

First, we’ll create a new database.

CREATE DATABASE wordpress_db;

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

CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'password';

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

GRANT ALL PRIVILEGES ON wordpress_db.* to wordpress_user@'localhost';

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

FLUSH PRIVILEGES;

Exit out of the MySQL command prompt by typing.

exit

Output:

root@crown:~# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 42
Server version: 10.6.9-MariaDB-1 Ubuntu 22.10

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.001 sec)

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

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

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

MariaDB [(none)]> exit
Bye

Download and Install WordPress

Download the latest 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 WordPress has been installed log in with your new user credentials.

images
images

bookmark_borderNL1 Datacenter New Location Update

We are happy to announce that our NL1 datacenter is now located at the BiT datacenter in Ede, The Netherlands.

All existing customers of our NL1 setup are now located in the BiT datacenter, and any new order directed to the NL1 datacenter will be provisioned at this datacenter.

Datacenter Information:

Address: BIT datacenter Galileïlaan 19, 6716 BP Ede, Netherlands

Datacenter FeatureInformation
Fire detectionan independent, certified very early warning system with
automatic notification to fire brigade
Fire extinguishingcertified Argonite (Ar+N2) installation
Cooling installationN+1 computairs
N+1 cooling machines
Cooling power output1500 W/m²
Temperature25 ℃ (+/- 2 ℃) in cold paths
Lightning protection     certified according to NEN norms
Electrical installationtwo incoming feeds into rack
separate UPS for every feed
Emergency power supplyN+1 diesel aggregates
Diesel supply    48 hours
Power per rackup to 96 A
Information securityISO/IEC 27001 and NEN 7510 certified
Physical security             VEC certified safety class 4*
Alarmredundant connection to control centre
Surveillancetwo independent surveillance services
Camerasinside and outside the data centers
Access controltwo factor authentication
biometric iris scanners
RFID access passes

At the same time, one can find upto date and accurate information at the datacenters own website as well, https://www.bit.nl/en/datacenters-2/datasheet-facts

We hope this migration will ensure better stability and availability of services for our customers located at our NL1 datacenter.

For any further information or concerns, please feel free to contact us via the client area.

Thanks,

-Team CrownCloud

bookmark_borderInstalling LAMP Stack (MariaDB) on Ubuntu 22.10

Hello,

In this week’s feature highlight, we look at How to Install LAMP Stack (MariaDB) on Ubuntu 22.10

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 MySQL or MariaDB database, and dynamic content is processed by PHP.

First, check for any pending system upgrades.

apt update
apt upgrade

Install Apache

Command to install Apache along with its utilities.

apt install -y apache2 apache2-utils

Next, check the Status of Apache.

systemctl status apache2

Output:

root@crown:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: active (running) since Sat 2022-10-15 20:18:49 UTC; 10s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 3121 (apache2)
      Tasks: 55 (limit: 2227)
     Memory: 4.9M
        CPU: 43ms
     CGroup: /system.slice/apache2.service
             ├─3121 /usr/sbin/apache2 -k start
             ├─3123 /usr/sbin/apache2 -k start
             └─3124 /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-start Apache at boot time.

systemctl enable apache2

You can confirm the Apache2 version with the below command,

apache2 -v

Output:

root@crown:~# apache2 -v
Server version: Apache/2.4.54 (Ubuntu)
Server built:   2022-07-21T19:38:00

Enable and Configure the Firewall

To enable HTTP TCP port,

ufw allow http

Output:

root@crown:~# ufw allow http
Rules updated
Rules updated (v6)

Next, open your web browser and visit your servers IP address, for example:

http://ip-address

Note: Replace “IP-address” with your actual server IP address

You should then see a similar page as shown in the screenshot below,

images

Install MariaDB Server

To install MariaDB server, run the below command

apt install mariadb-server mariadb-client

To check the status of MariaDB.

systemctl status MariaDB

Output:

root@crown:~# systemctl status mariadb
● mariadb.service - MariaDB 10.6.9 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
     Active: active (running) since Sat 2022-10-15 20:21:08 UTC; 12s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 4193 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, s>
    Process: 4194 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, >
    Process: 4196 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/>
    Process: 4238 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited,>
    Process: 4240 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 4225 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 14 (limit: 2227)
     Memory: 61.5M
        CPU: 461ms
     CGroup: /system.slice/mariadb.service
             └─4225 /usr/sbin/mariadbd

To start MariaDB if it is not active.

systemctl start mariadb

Use the following command to auto start 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:

root@crown:~# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

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

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

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
 ... Success!

You already have your root account protected, so you can safely answer 'n'.

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

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

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

Thanks for using MariaDB!

To login to MariaDB.

 mariadb -u root -p

To exit from MariaDB.

exit

To check MariaDB Version.

mariadb --version

Output:

root@crown:~# mariadb --version
mariadb  Ver 15.1 Distrib 10.6.9-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper

Install PHP

PHP 8.1 is the default version of PHP that would be installed on Ubuntu 22.10.

To install PHP.

apt install php libapache2-mod-php php-mysql php-common php-cli php-common php-json php-opcache php-readline php-mbstring php-gd php-dom php-zip php-curl

Enable the Apache PHP module and restart the Apache Web server.

a2enmod php
systemctl restart apache2

To check PHP Version.

php --version

Output:

root@crown:~# php --version
PHP 8.1.7-1ubuntu3 (cli) (built: Sep 13 2022 14:02:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.7-1ubuntu3, Copyright (c), by Zend Technologies

To test PHP scripts we need to add the info.php file in the document.

nano /var/www/html/info.php

Add the following to the file.

<?php phpinfo(); ?>

To verify enter the following link in a web browser.

NOTE: Replace with your server IP address below.

http://ip-address/info.php
images

Run PHP-FPM with Apache [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, PHP 8.1 is used to run the PHP code but if you want to run PHP code with PHP-FPM follow the below steps.

First, Let us disable PHP,

a2dismod php

Next, Install PHP-FPM.

apt install php8.1-fpm

Enable proxy_fcgi and setenvif module.

a2enmod proxy_fcgi setenvif

Output:


root@crown:~# a2enmod proxy_fcgi setenvif
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

To enable php8.1-fpm file.

a2enconf php8.1-fpm

Restart the Apache.

systemctl restart apache2

To enable php-fpm.

systemctl enable php8.1-fpm

To start php-fpm.

systemctl start php8.1-fpm

To check the status of php-fpm.

systemctl status php8.1-fpm

Output:

root@crown:~# systemctl status php8.1-fpm
● php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php8.1-fpm.service; enabled; preset: enabled)
     Active: active (running) since Sat 2022-10-15 20:26:13 UTC; 58s ago
       Docs: man:php-fpm8.1(8)
   Main PID: 16630 (php-fpm8.1)
     Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
      Tasks: 3 (limit: 2227)
     Memory: 9.5M
        CPU: 75ms
     CGroup: /system.slice/php8.1-fpm.service
             ├─16630 "php-fpm: master process (/etc/php/8.1/fpm/php-fpm.conf)"
             ├─16631 "php-fpm: pool www"
             └─16632 "php-fpm: pool www"

Now you have successfully installed the LAMP stack (Apache, MariaDB, and PHP8.1) on Ubuntu 22.10.


bookmark_borderInstalling Ubuntu 22.10

Hello,

In this week’s feature highlight, we look at How to Install Ubuntu 22.10

Ubuntu is one of the most popular Linux distributions out there that is based on Debian and composed mostly of free and open-source software.

In this article, we will learn how to install Ubuntu 22.10 on a server.

Login to Crownpanel

Login to your CrownPanel account.

To start the installation, First, mount the Ubuntu 22.10 ISO.

To mount the ISO, click on CD-ROM and then select the “ubuntu 22.10 server amd64” ISO from the drop-down menu and click on the “Mount” button (It will take 2-3 minutes).

Once the ISO has mounted (the Task Log tab will show the status of the task), navigate to the “Power Control” tab and then perform a Reboot task on the server.

Next, Switch to the “VNC” Tab, Launch VNC to start the installation.

If VNC doesn’t show the Ubuntu 22.10 installer, please click on CTRL+ALT+DEL from the VNC console to send a reboot.

Start the Installation

Select the desired language and click on continue.

At the time of writing this article, there were no updates on the installer but later on, you may be prompted to update the installer in case there is a new version available. This is a recommended option to update it.

Select the desired keyboard layout and click on done.

Select the Network configuration and click done.

You can either set up a static network configuration or simply go ahead with DHCP (Simply press ENTER here).

You can configure a proxy for the server in this part of the process if needed. Ideally, in most cases you don’t need to, just leave it blank and proceed.

Next, in the mirror selection, we keep the default mirror address that Ubuntu detects for us,

Disk partitioning, we will keep it simple and go with automatic partitioning. Select the “Use an entire disk” option and continue.

Review the “partitions” and then proceed.

Since we’re installing a new operating system on the existing disk, you will be prompted to lose data on the selected disk. Confirm and select “Continue”.

Profile setup, You will be provided a form to enter your user information. These will be the login details that we’ll use later to connect to the server.

We will choose the package OpenSSH server to be installed as it is essential if you need to connect remotely after the installation.

The Ubuntu 22.10 installer also has other packages available for pre-install, you can pick any you wish to pre-install on your server, in this guide we will keep it at a bare minimal (ie, no extra packages selected),

At this stage, Ubuntu will start the installation of the disk.

Once the installation is complete, go ahead with the reboot.

After you select to reboot the VPS, Ubuntu will prompt you to unmount the installation medium.

To unmount the ISO, switch back to CrownPanel, Select the “CD-ROM” tab and click on “Unmount”.

Next, switch back to the VNC Window, and press ENTER to reboot the VPS,

The VPS will then reboot into your installation of Ubuntu 22.10

This completes the installation of Ubuntu 22.10

You can now log in to the server using the credentials that were set earlier (under the “Profile setup” part of this guide)

Check the Hostname using the below command,

hostnamectl

Sample Output:

crown@crown:~$ hostnamectl
 Static hostname: crown
       Icon name: computer
      Machine ID: 98ef1ad056e345ba99622d140a2f234e
         Boot ID: 1344ac34c125487080c6d75976753fc1
  Virtualization: kvm
Operating System: Ubuntu Kinetic Kudu (development branch)
          Kernel: Linux 5.19.0-21-generic
    Architecture: x86-64
 Hardware Vendor: Red Hat
  Hardware Model: KVM
Firmware Version: 0.5.1

We will then update the Ubuntu system with the below commands,

sudo apt update

sudo apt dist-upgrade

Once the updates are installed, we will push the server for a reboot to apply any modifications.

reboot

Done! You are now ready to use the Ubuntu 22.10 server as you like.

bookmark_borderInstalling Python 3.10 on Rocky Linux 9

Hello,

In this week’s feature highlight, we look at How to Install Python 3.10 on Rocky Linux 9

Python is an interpreted high-level general-purpose programming language. Its design philosophy emphasizes code readability with its use of significant indentation. Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

First, check for any pending system updates,

dnf update

Install required packages.

dnf install gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make

Install Python 3.10.5

By default, Rocky Linux 9 comes with Python version 3.9

In this article, we will install the latest version of Python that is available, 3.10.5, on the Rocky Linux 9 system. You can check their official website to find the latest version available and download its source code.

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

Extract the downloaded file.

tar xzf Python-3.10.5.tgz 

Change to the extracted directory with the following command.

cd Python-3.10.5 

Run configuration command.

./configure --enable-optimizations 

Complete the Python installation on the Rocky Linux system by running the following command.

make -j 2

nproc

make altinstall 

Once the Python has been installed, confirm the version that is available by,

python3.10 --version

Output:

[root@server Python-3.10.5]# python3.10 --version
Python 3.10.5

Using pip on Python 3.10.5

Check the installed version of a pip by running the following command,

pip3.10 -V

Output:

[root@server ~]# pip3.10 -V
pip 22.0.4 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)

bookmark_borderRunning your own self hosted Git service with Gitea on Rocky Linux 9

Hello,

In this week’s feature highlight, we look at Running your own self hosted Git service with Gitea on Rocky Linux 9

Gitea is an open-source forge software package for hosting software development version control using Git as well as other collaborative features like bug tracking, wikis, and code review. It supports self-hosting but also provides a free public first-party instance hosted in China on DiDi’s cloud.

Prerequisites

  • Rocky Linux 9 installed
  • Full SSH root access.
  • Gitea supports the following databases.
    • SQLite
    • PostgreSQL
    • MySQL
    • MariaDB
    • TiDB
    • MSSQL

In our guide below, we’ll use SQLite as the database for Gitea. You can pick any of the supported databases in your installation as needed.

To Install SQLite using the following command.

dnf install sqlite3

To check the version.

[root@server ~]# sqlite3 --version
3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ealt1

Install Git

To Install Git, use the following command.

dnf install git

To check the version of Git, run the following command.

git --version

Output:

[root@server ~]# git  --version
git version 2.31.1

Add the user that will run the Git application.

[root@server ~]# adduser --system --shell /bin/bash --comment 'Git Version Control' --create-home --home /home/git git

Download the Gitea Binary.Gitea is a painless self-hosted Git service. With features similar to ones in GitHub, Bitbucket, or GitLab.

Download the Gitea binary from download page and make it executable.

At the time of this article, the latest Gitea version is 1.16.9. If there is a the newer version is available on the link above, change the VERSION variable before using the following command.

dnf install wget

wget -O /tmp/gitea https://dl.gitea.io/gitea/1.16.9/gitea-1.16.9-linux-amd64

Output:

[root@server ~]# wget -O /tmp/gitea https://dl.gitea.io/gitea/1.16.9/gitea-1.16.9-linux-amd64
--2022-07-20 18:22:56--  https://dl.gitea.io/gitea/1.16.9/gitea-1.16.9-linux-amd64
Resolving dl.gitea.io (dl.gitea.io)... 172.67.74.188, 104.26.0.119, 104.26.1.119, ...
Connecting to dl.gitea.io (dl.gitea.io)|172.67.74.188|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 107593784 (103M) [application/octet-stream]
Saving to: ‘/tmp/gitea’

/tmp/gitea          100%[===================>] 102.61M  7.40MB/s    in 11s

2022-07-20 18:23:08 (8.93 MB/s) - ‘/tmp/gitea’ saved [107593784/107593784]

Move the Gitea binary file to “/usr/local/bin”.

mv /tmp/gitea /usr/local/bin

Make the binary executable.

chmod +x /usr/local/bin/gitea   

Create the directory structure and set the required permissions and ownership.

mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
chown git: /var/lib/gitea/{data,indexers,log}
chmod 750 /var/lib/gitea/{data,indexers,log}
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea

To give the file permission using the following command.

restorecon -rv /usr/local/bin/gitea

To create a Systemd Unit File.

Download the file to the “/etc/systemd/system/” directory using the following command.

wget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/  

To reload a Gitea service.

systemctl daemon-reload

To enable a Gitea service.

systemctl enable --now gitea

Output:

[root@server ~]# systemctl enable --now gitea
Created symlink /etc/systemd/system/multi-user.target.wants/gitea.service → /etc/systemd/system/gitea.service.

To check the status of the Gitea service.

systemctl status gitea

Output:

[root@server ~]# systemctl status gitea
● gitea.service - Gitea (Git with a cup of tea)
     Loaded: loaded (/etc/systemd/system/gitea.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-07-20 18:25:45 CEST; 23s ago
   Main PID: 14699 (gitea)
      Tasks: 8 (limit: 11120)
     Memory: 127.1M
        CPU: 896ms
     CGroup: /system.slice/gitea.service
             └─14699 /usr/local/bin/gitea web --config /etc/gitea/app.ini

Configure Gitea

To allow port using the following command.

firewall-cmd --permanent --zone=public --add-port=3000/tcp
firewall-cmd --reload

Navigate to your browser. http://yourserver-ip-address:3000 to access the Gitea application.

Follow the on-screen instructions to complete the Gitea setup. Click on Register to start the database initialization.

Database Settings:

  • Database Type: SQLite3
  • Path: Use an absolute path, /var/lib/gitea/data/gitea.db
image

Application General Settings:

  • Site Title: Enter username.
  • Repository Root Path: keep the default /home/git/gitea-repositories.
  • Git LFS Root Path: keep the default /var/lib/gitea/data/lfs.
  • Run As Username: git
  • SSH Server Domain: Enter your domain name or your IP address.
  • SSH Port: 22, change it if SSH is listening on other Port
  • Gitea HTTP Listen Port: 3000
  • Gitea Base URL: Use http and your domain or server IP address.
  • Log Path: Leave the default /var/lib/gitea/log

Click on Install to Install Gitea.

image

Once the installation is completed then create the first user. Open http://yourip:3000/user/sign_up in a web browser and fill in the required details.

image

Once the form has been submitted, you are logged into your Gitea account.

image

Done.