bookmark_borderInstalling Docker On Ubuntu 22.10

Hello,

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

What is docker?

Docker is basically a container engine that uses the Linux Kernel in order to create containers on top of an operating system. Which is used to create, deploy and run the applications.

Install Docker

Install the docker using the apt package manager.

apt install docker.io docker-compose

Start and enable the docker

systemctl enable --now docker

Check Docker service

systemctl status docker

Output:


root@crown:~# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; preset: enabl>
     Active: active (running) since Mon 2022-10-17 13:59:05 UTC; 52s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 5778 (dockerd)
      Tasks: 8
     Memory: 22.6M
        CPU: 358ms
     CGroup: /system.slice/docker.service

Create a group called docker,

groupadd docker

To add a user to the docker user group

usermod -aG docker $USER

If you want to add a different user, replace $USER with an existing username.

Check the docker version,

docker --version

Output:

root@crown:~# docker --version
Docker version 20.10.16, build 20.10.16-0ubuntu1

Test docker using the hello-world container.

docker run hello-world

Output:

root@crown:~# docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

bookmark_borderInstalling Webmin on Ubuntu 22.10

Hello,

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

Webmin is a web-based dashboard that allows sysadmins to manage Linux and Unix-like systems (especially servers). Webmin allows system administrators to manage user accounts, update packages, system log files, configure firewalls, email, database, postfix, etc.

Installing Webmin on Ubuntu

First, check for any pending system updates.

apt update
apt upgrade

Install the required packages.

apt install apt-transport-https

Import and Add Webmin Repository Key.

wget https://download.webmin.com/jcameron-key.asc

cat jcameron-key.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/jcameron-key.gpg

Install Webmin by running the following command.

apt update
apt install webmin

Start the Webmin by running the below command.

/etc/webmin/start

Output:

Webmin install complete. You can now login to https://vps.server.com:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.

To Configure the Firewall.

ufw allow 10000/tcp

Output:

root@crown:~# ufw allow 1000/tcp
Rules updated
Rules updated (v6)

To access Webmin, open the URL from your web browser: https://IP_address:10000

Note:

  1. When logging in for the first time, you will see an ‘invalid SSL’ warning.
  2. Simply click on the ‘Advanced’ tab and then ‘Accept the risk and Continue’.

Login to the Webmin web interface using your root user and password.

First

Once you log in, you will be redirected to the Webmin dashboard.

First

bookmark_borderInstalling Gitea on Ubuntu 22.10

Hello,

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

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

  • Full SSH root access or a user with Sudo privileges is required.
  • Gitea supports the following databases.
    • SQLite
    • PostgreSQL
    • MySQL
    • MariaDB

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 use the following command,

apt install sqlite3

To check the version,

sqlite3 --version

Output:

root@crown:~# sqlite3 --version
3.39.3 2022-09-05 11:02:23 4635f4a69c8c2a8df242b384a992aea71224e39a2ccab42d8c0b0  

Install Git

Gitea is a painless self-hosted Git service. With features similar to ones in GitHub, Bitbucket, or GitLab. Git is the standard for distributed version control systems and can be installed on Ubuntu systems using apt.

Check for system updates and install them.

apt update

apt upgrade

Install the Git package using the following command,

apt install git

You can check the version of Git installed with the following command,

git --version

Output:

root@crown:~# git --version
git version 2.37.2

Create a Git user,

  sudo adduser \
  --system \
  --shell /bin/bash \
  --gecos 'Git Version Control' \
  --group \
  --disabled-password \
  --home /home/git \
  git

Download the Gitea binary

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

 apt install wget

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

Output:

root@crown:~#  wget -O /tmp/gitea https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64
--2022-10-20 18:22:43--  https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64
Resolving dl.gitea.io (dl.gitea.io)... 84.17.46.53, 2400:52e0:1e01::883:1
Connecting to dl.gitea.io (dl.gitea.io)|84.17.46.53|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 112413616 (107M) [application/octet-stream]
Saving to: ‘/tmp/gitea’

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 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/main/contrib/systemd/gitea.service -P /etc/systemd/system/  

To reload and enable the Gitea service,

systemctl daemon-reload

systemctl enable --now gitea

Output:

root@crown:~# 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@crown:~# systemctl status gitea
● gitea.service - Gitea (Git with a cup of tea)
     Loaded: loaded (/etc/systemd/system/gitea.service; enabled; preset: enabled)
     Active: active (running) since Thu 2022-10-20 18:23:42 UTC; 15s ago
   Main PID: 14144 (gitea)
      Tasks: 8 (limit: 2227)
     Memory: 129.4M
        CPU: 1.190s
     CGroup: /system.slice/gitea.service
             └─14144 /usr/local/bin/gitea web --config /etc/gitea/app.ini

Configure Gitea

If you’re running ufw firewall on your server, allow the port 3000

ufw allow 3000/tcp

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

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 with your domain name 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

Upgrading Gitea

To upgrade to a new version first stop the Gitea service.

To stop the Gitea service.

systemctl stop gitea

Download the Gitea binary from download page.

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

VERSION=<THE_LATEST_GITEA_VERSION>

wget -O /tmp/gitea https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64

Move the Gitea binary file to /usr/local/bin and make the binary executable.

mv /tmp/gitea /usr/local/bin

chmod +x /usr/local/bin/gitea

To restart the Gitea service,

systemctl restart gitea

Done.

bookmark_borderInstalling Node.js on Ubuntu 22.10

Hello,

Elevate Your Development Game with Node.js: A Beginner-Friendly Guide to Installing on Ubuntu 22.10

Login to the Ubuntu 22.10 server.

Install stable nodejs from the Ubuntu repository by running the following command.

apt install nodejs

Output:

root@crown:~# apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libevent-pthreads-2.1-7 libmecab2 libprotobuf-lite23 mecab-ipadic
  mecab-ipadic-utf8 mecab-utils
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libc-ares2 libnode108 nodejs-doc
Suggested packages:
  npm
The following NEW packages will be installed:
  libc-ares2 libnode108 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 15.0 MB of archives.

Then check the version of the nodejs once the installation is done.

node --version

Output:

root@crown:~# node --version
v18.7.0

Installing a different version of Node.js from the source

Install NVM manager by using “wget”.

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Output:

root@crown:~# wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
remote: Enumerating objects: 264, done.
remote: Counting objects: 100% (264/264), done.
remote: Compressing objects: 100% (230/230), done.
remote: Total 264 (delta 31), reused 100 (delta 24), pack-reused 0
Receiving objects: 100% (264/264), 116.37 KiB | 5.54 MiB/s, done.
Resolving deltas: 100% (31/31), done.
Note: switching to '7ad6d98cedde01809e32d56ab8ced064f6f28175'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain the commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

=> Compressing and cleaning up git repository

=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Update your shell ~/.profile by running following command

source ~/.profile

Next, Check if NVM is installed or not by checking for its version.

nvm --version

Output:

root@crown:~# nvm --version
0.33.8

List out all available Node.js versions. you can see all Node.js versions from the first version to the latest version.

nvm ls-remote

Output:

root@vps:~# nvm ls-remote
        v0.1.14
        v0.1.15
        v0.1.16
        ....
        v13.12.0
        v13.13.0
        v13.14.0
        v14.0.0
        v14.1.0
  v15.0.0
  v15.0.1
  v15.1.0
  v15.3.0
  v16.3.0
  v16.4.0
  v16.4.1
  v17.9.0
  v17.9.1
  v18.0.0
  v18.11.0

Now install Node.js with the version you want by running “nvm install” command.

eg: Here v18.11.0

 nvm install 18.11.0

Output:

root@crown:~# nvm install 18.11.0
Downloading and installing node v18.11.0...
Downloading https://nodejs.org/dist/v18.11.0/node-v18.11.0-linux-x64.tar.xz...
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v18.11.0 (npm v8.19.2)
Creating default alias: default -> 18.11.0 (-> v18.11.0)

And check the version of the nodejs once the installation is done.

node -v

Output:

root@crown:~# node -v
v18.11.0

Done!

bookmark_borderInstalling Answer Q&A Community Software on Ubuntu 22.04

Hello,

In this week’s feature highlight, we look at How To Install Answer Q&A Community Software on Ubuntu 22.04


Answer is a open-source knowledge based community software. You can use it to quickly build your Q&A community for product technical support, customer support, user communication, and more.

Prerequisites:

Install Docker Compose

To install Docker Compose, run the command,

apt install docker-compose

Running Answer with Docker

To install Answer via docker, run the command,

mkdir answer && cd answer
wget https://raw.githubusercontent.com/answerdev/answer/main/docker-compose.yaml
docker-compose up

Reboot the docker by running the following command,

systemctl restart docker

You can now navigate to your browser to the URL http://yourserver-ip-address:9080 and you will see the Answer Q&A Community Software installation screen.

Replace “yourserver-ip-address” with the actual IP Address of your server

Choose the language

images

Config database

Note – Answer supports MySQL, PostgreSQL, and SQLite as the database backend.

If you are testing Answers for the first time, you can go ahead with sqlite it does not require any additional configuration.

images
images

Enter the basic information

images

Complete

images

Running Answer in the background with Docker

To start Answers in the background (detached mode), you can use the following command.

docker-compose up --detach

Outout:

root@vps:~/answer# docker-compose up --detach
Starting answer_db_1 ... done
Starting answer_answer_1 ... done

This concludes the Installation and Answer Q&A Community Software on Ubuntu 22.04.

bookmark_borderInstalling Netdata on Ubuntu 22.10

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

Netdata is an Open Source real-time server monitoring tool. It collects real-time data like CPU usage, RAM usage, Load, SWAP usage, Bandwidth usage, Disk usage, etc.

Update the Server

Update the server using the following command.

apt update 

Downloading the Netdata package

Now you can proceed further to install the Netdata on the server. Run the following command on the server.

apt install netdata -y

The -y is use for the confirmation which will be prompted by the installer.

Netdata configuration file

We need a small change in the configuration file.

nano /etc/netdata/netdata.conf 

The configuration file will look like this

[global]
        run as user = netdata
        web files owner = root
        web files group = root
        # Netdata is not designed to be exposed to potentially hostile
        # networks. See https://github.com/netdata/netdata/issues/164
        bind socket to IP = 127.0.0.1

By default the bind socket to IP is set to 127.0.0.1. To access the dashboard using the IP address, you need to replace the 127.0.0.1 with your server IP address.

[global]
        run as user = netdata
        web files owner = root
        web files group = root
        # Netdata is not designed to be exposed to potentially hostile
        # networks. See https://github.com/netdata/netdata/issues/164
        bind socket to IP = <Enter your IP address here>

Now save the file and restart the netdata service using the following command.

systemctl restart netdata 

Firewall

If the firewall is enabled, then allow the port using the following command.

ufw allow 19999

Netdata Dashboard

Enter the following URL on the browser to access the Netdata dashboard. By default netdata works on 19999 port.

http://<Enter Your IP Here>:19999/

The dashboard will look like this.

image

bookmark_borderInstalling Linux kernel 6.0 on Ubuntu 22.10

Hello,

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

Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system. Kernel acts as a bridge between applications and data processing performed at hardware level using inter-process communication and system calls.

Step 1 – Update your system

First, Update the system packages to the latest versions using the below apt commands,

 apt update
 apt upgrade

Install some of the packages required for the Kernel upgrade,

 apt install gcc make perl wget

Step 2 – Installing Linux Kernel 6.0

By default on Ubuntu 22.10, The kernel version it ships with is version 5.19

Linux Kernel 6.0 is not available on Ubuntu 22.10 base repository. So we will manually download the required Linux Kernel packages from the official site and install.

You can check their official site for a list of available kernel versions that can be installed, kernel.ubuntu.com.

At the time of writing this article, version 6.0.9 was the only latest kernel we could install with.

If you find any newer versions that can be installed, please go ahead with it.

Some points to note, for selecting a different version of kernel.
Open the site kernel.ubuntu.com and scroll to the bottom of the page.
Find a version whose builds are successful, under that, navigate to “amd64” folder.
You will find the required four files to download on the ubuntu system, Linux Headers, Linux Image and Linux Modules.
A successful build looks like below:

Test amd64/build succeeded (rc=0, on=amd64, time=0:12:37, log=amd64/log)
amd64/linux-headers-6.0.9-060009-generic_6.0.9-060009.202211161102_amd64.deb
amd64/linux-headers-6.0.9-060009_6.0.9-060009.202211161102_all.deb
amd64/linux-image-unsigned-6.0.9-060009-generic_6.0.9-060009.202211161102_amd64.deb
amd64/linux-modules-6.0.9-060009-generic_6.0.9-060009.202211161102_amd64.deb

For upgrading to the latest kernel on Ubuntu, follow the given instructions:

wget https//:kernel.ubuntu.com/~kernel-ppa/mainline/v6.0.9/amd64/linux-headers-6.0.9-060009_6.0.9060009.202211161102_all.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0.9/amd64/linux-headers-6.0.9-060009-generic-6.0.9060009.202211161102_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0.9/amd64/linux-image-unsigned-6.0.9-060009-generic_6.0.9060009.202211161102_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0.9/amd64/linux-modules-6.0.9-060009-generic_6.0.9060009.202211161102_amd64.deb

Now, install the downloaded files using the dpkg command as shown below,

Ensure that there are no other .deb files apart from the ones that were downloaded.
If there are any other .deb files, recommended to remove them before proceeding.

dpkg -i *.deb

After installing the Linux Kernel 6.0, reboot the system to run the new Kernel

reboot

Step 3 – Verify the Kernel version

To verify the kernel installed and running after the reboot, use the uname command as shown below,

uname -r

Output:

root@vps:~# uname -r
6.0.9-060009-generic

This concludes the topic of installing the latest version of Kernel on a Ubuntu System.

bookmark_borderJanuary 2023 CentOS Templates Updated for KVM

Greetings, As part of our commitment to provide you with the latest and most ready-to-use service, we’ve updated the following templates for CentOS 7, CentOS 8-Stream, and CentOS 9-Stream.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

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

Stay tuned for more! – Team CrownCloud

bookmark_borderAlmaLinux Templates Updated for KVM Plans

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated our AlmaLinux Templates for AlmaLinux 8 and AlmaLinux 9.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

As always, any existing VPS can be updated at any time by the user, you may follow our guide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

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

Stay tuned for further updates!

Team CrownCloud

bookmark_borderJanuary 2023 Rocky Linux Templates Updated for KVM

Greetings,

As part of our commitment to providing you with the latest and most ready-to-use service, we’ve updated the Rocky Linux Templates for Rocky Linux 8 and Rocky Linux 9.

This template update process ensures that any new VPS deployed will come along with the latest available packages so you don’t have to spend time running a large initial update.

As always, any existing VPS can be updated at any time by the user, you may follow our gfuide for the steps required to update your VPS, Click here.

If you require any assistance at any time, please feel free to contact our support team via the client area and we’ll help you out.

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

Stay tuned for further updates!

Team CrownCloud