<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: HostnExtra Technologies</title>
    <description>The latest articles on DEV Community by HostnExtra Technologies (@hostnextra).</description>
    <link>https://dev.to/hostnextra</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F488814%2Fd88a9c2e-3cb7-41c2-b6d7-a2e86d42e754.png</url>
      <title>DEV Community: HostnExtra Technologies</title>
      <link>https://dev.to/hostnextra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hostnextra"/>
    <language>en</language>
    <item>
      <title>Install NetBox on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Wed, 19 Oct 2022 13:01:08 +0000</pubDate>
      <link>https://dev.to/hostnextra/install-netbox-on-ubuntu-2204-hostnextra-5ekj</link>
      <guid>https://dev.to/hostnextra/install-netbox-on-ubuntu-2204-hostnextra-5ekj</guid>
      <description>&lt;p&gt;In this article, we'll explain how to install NetBox on Ubuntu 22.04. This will guide you with the installation and configuration process.&lt;/p&gt;

&lt;p&gt;NetBox is an infrastructure resource modeling (IRM) application designed to empower network automation. NetBox was developed specifically to address the needs of network and infrastructure engineers. It is intended to function as a domain-specific source of truth for network operations.&lt;/p&gt;

&lt;p&gt;NetBox runs as a web application atop the Django Python framework with a PostgreSQL database.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites:
&lt;/h4&gt;

&lt;p&gt;A Ubuntu 22.04 installed KVM VPS or dedicated server.&lt;br&gt;
A root user access or normal user with administrative privileges&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hostnextra.com/kb/install-netbox-on-ubuntu/"&gt;Install NetBox on Ubuntu 22.04&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  1. Keep the server up to date
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# apt update -y &amp;amp;&amp;amp; apt upgrade -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Install and Configure PostgreSQL Database
&lt;/h4&gt;

&lt;p&gt;We'll install and configure a local PostgreSQL database.&lt;/p&gt;

&lt;p&gt;Note: NetBox requires PostgreSQL 9.6 or higher. Please note that MySQL and other relational databases are not currently supported.&lt;/p&gt;

&lt;p&gt;Install PostgreSQL database using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install -y postgresql libpq-dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, we need to create a database for NetBox and assign it a username and password for authentication.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo -u postgres psql

postgres=# CREATE DATABASE netbox;

CREATE DATABASE

postgres=# CREATE USER netbox WITH PASSWORD 'r5t6^7$%gyuuyt4';

CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;

GRANT

postgres=# \q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Install Redis
&lt;/h4&gt;

&lt;p&gt;Redis is an in-memory key-value store which NetBox employs for caching and queuing. Use following command to install Redis:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install redis-server -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use the redis-cli utility to ensure the Redis service is functional:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# redis-cli ping

PONG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. Install and Configure NetBox
&lt;/h4&gt;

&lt;p&gt;There are two ways to install NetBox.&lt;/p&gt;

&lt;p&gt;Download a Release Archive&lt;br&gt;
Clone the Git Repository&lt;/p&gt;

&lt;p&gt;We'll install NetBox by cloning the Git repository.&lt;/p&gt;

&lt;p&gt;First, install required packages and its dependencies:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install -y python3 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Update pip (Python's package management tool) to its latest release:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# pip3 install --upgrade pip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create the base directory /opt/netbox for the NetBox installation.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# mkdir -p /opt/netbox/ &amp;amp;&amp;amp; cd /opt/netbox/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, clone the master branch of the NetBox GitHub repository into the current directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git clone -b master https://github.com/netbox-community/netbox.git .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a system user account named netbox. We'll configure the WSGI and HTTP services to run under this account. We'll also assign this user ownership of the media directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# adduser --system --group netbox

# chown --recursive netbox /opt/netbox/netbox/media/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Move into the NetBox configuration directory and make a copy of configuration.example.py named configuration.py.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# cd /opt/netbox/netbox/netbox/

# cp configuration_example.py configuration.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a symbolic link of Python binary.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# ln -s /usr/bin/python3 /usr/bin/python&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Generate a random SECRET_KEY of at least 50 alphanumeric characters.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# /opt/netbox/netbox/generate_secret_key.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Above command will create a secret key, store it so that we can use it in the configuration.py.&lt;/p&gt;

&lt;p&gt;Open and edit the configuration file configuration.py.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nano /opt/netbox/netbox/netbox/configuration.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The final file should have the following configurations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ALLOWED_HOSTS = ['*']

DATABASE = {
'NAME': 'netbox', # Database name you created
'USER': 'netbox', # PostgreSQL username you created
'PASSWORD': 'r5t6^7$%gyuuyt4', # PostgreSQL password you set
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
}

SECRET_KEY = 'YOUR SECRET KEY'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can add your domain or server IP in ALLOWED_HOSTS = [''] or you can simple enter "*" for all.&lt;/p&gt;

&lt;p&gt;Once NetBox has been configured, we're ready to proceed with the actual installation.&lt;/p&gt;

&lt;p&gt;We'll run the packaged upgrade script (upgrade.sh) to perform the following actions:&lt;/p&gt;

&lt;p&gt;Create a Python virtual environment&lt;br&gt;
Install all required Python packages&lt;br&gt;
Run database schema migrations&lt;br&gt;
Aggregate static resource files on disk&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# /opt/netbox/upgrade.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Enter the Python virtual environment created by the upgrade script:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# source /opt/netbox/venv/bin/activate&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a superuser account using the createsuperuser&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# cd /opt/netbox/netbox

# python3 manage.py createsuperuser

Output:

Email address: admin@example.com

Password:

Password (again):

Superuser created successfully.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remember the username and password. It will require once we finish the installation process to login.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Configure Gunicorn
&lt;/h4&gt;

&lt;p&gt;NetBox ships with a default configuration file for gunicorn. To use it, copy /opt/netbox/contrib/gunicorn.py to /opt/netbox/gunicorn.py.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cp /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Copy contrib/netbox.service and contrib/netbox-rq.service to the /etc/systemd/system/ directory and reload the systemd dameon:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# cp -v /opt/netbox/contrib/*.service /etc/systemd/system/

# systemctl daemon-reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start and enable the netbox and netbox-rq services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# systemctl start netbox netbox-rq

# systemctl enable netbox netbox-rq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  6. Configure Nginx Web Server
&lt;/h4&gt;

&lt;p&gt;Install Nginx web server using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install -y nginx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Copy the nginx configuration file provided by NetBox to /etc/nginx/sites-available/netbox.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cp /opt/netbox/contrib/nginx.conf /etc/nginx/sites-available/netbox&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Edit the netbox configuration file and remove all the content and copy paste below contents:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nano /etc/nginx/sites-available/netbox&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remember to change server_name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
listen 80;

# CHANGE THIS TO YOUR SERVER'S NAME
server_name 127.0.0.1;

client_max_body_size 25m;

location /static/ {
alias /opt/netbox/netbox/static/;
}

location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, delete /etc/nginx/sites-enabled/default and create a symlink in the sites-enabled directory to the configuration file you just created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# rm /etc/nginx/sites-enabled/default

# ln -s /etc/nginx/sites-available/netbox /etc/nginx/sites-enabled/netbox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Above Nginx code will give you error if you use as it is, because it mentioned SSL configuration too. You need to install SSL after the above commands.&lt;/p&gt;

&lt;p&gt;Please refer our How to Install Let’s Encrypt on Nginx Ubuntu article to install SSL certificate.&lt;/p&gt;

&lt;p&gt;Now test Nginx configuration and restart the Nginx service:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nginx -t&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl restart nginx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's it we have successfully completed with the installation and configuration process.&lt;/p&gt;

&lt;p&gt;Navigate to your browser and access NetBox with using either server IP or domain name.&lt;/p&gt;

&lt;p&gt;In this article, we've seen how to install NetBox on Ubuntu 22.04.&lt;/p&gt;

</description>
      <category>netbox</category>
      <category>ubuntu</category>
      <category>django</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Install Caddy on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Tue, 18 Oct 2022 17:26:33 +0000</pubDate>
      <link>https://dev.to/hostnextra/install-caddy-on-ubuntu-2204-hostnextra-50ha</link>
      <guid>https://dev.to/hostnextra/install-caddy-on-ubuntu-2204-hostnextra-50ha</guid>
      <description>&lt;p&gt;In this article, we’ll explain you how to install Caddy on Ubuntu 22.04. This article will guide you with the installation process and host a website.&lt;/p&gt;

&lt;p&gt;The Caddy web server is an open-source web server written in Go. It is designed around simplicity and security that comes with a number of features that are useful for hosting websites. Caddy is both a flexible, efficient static file server and a powerful, scalable reverse proxy.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A Ubuntu install dedicated server or KVM VPS.&lt;/li&gt;
&lt;li&gt;A root user access or normal user with administrative privileges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.hostnextra.com/kb/install-caddy-on-ubuntu/"&gt;Install Caddy on Ubuntu 22.04&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Keep the server up to date
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;# apt update -y &amp;amp;&amp;amp; apt upgrade -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;WWWW2. Install Caddy&lt;/p&gt;

&lt;p&gt;Following command will install and automatically starts and runs Caddy for you as a systemd service named caddy using our official caddy.service unit file.&lt;/p&gt;

&lt;h4&gt;
  
  
  Install dependencies:
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;First, add GPG key using following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/gpg.key’ | sudo gpg –dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, add repository and update it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt’ | sudo tee /etc/apt/sources.list.d/caddy-stable.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;# apt update&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Finally, install Caddy using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install caddy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, navigate to your browser and enter your server IP or domain name:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://Server-IP"&gt;http://Server-IP&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;&lt;a href="http://example.com"&gt;http://example.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install Caddy on Ubuntu&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Configure Domain with Caddy
&lt;/h4&gt;

&lt;p&gt;Before moving following, first set up domain’s A/AAAA  DNS record at your registrar or control panel.&lt;/p&gt;

&lt;p&gt;Note: Replace hostnextra.com with your domain name&lt;/p&gt;

&lt;p&gt;Create a directory for your website files&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# mkdir -p /var/www/html/hostnextra.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, if you are using SELinux than you need to change the file security context for web content. (Optional)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# chcon -t httpd_sys_content_t /var/www/html/hostnextra.com -R
# chcon -t httpd_sys_rw_content_t /var/www/html/hostnextra.com -R
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, open Caddy’s configuration file and add your domain name and change website’s root directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nano /etc/caddy/Caddyfile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change the site root to /var/www/html/hostnextra.com (write your website path) as&lt;/p&gt;

&lt;p&gt;install Caddy HostnExtra&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to use SSL, you need to mention :443 SSL port and also install SSL certificate.&lt;/p&gt;

&lt;p&gt;You can run caddy trust command to install SSL local certificate. We’ve not tested it yet. If we perform it in future, we’ll update the tutorial. You can check the official document about Automatic HTTPS for more information.&lt;/p&gt;

&lt;p&gt;Once you done with the changes reload the caddy.service to reflect the changes.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl reload caddy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, create a index.html file in /var/www/html/hostnextra.com using following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# echo ‘&amp;lt;!doctype html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Hello from Caddy!&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1 style=”font-family: sans-serif”&amp;gt;This page is being served via Caddy&amp;lt;/h1&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;’ | sudo tee /var/www/html/hostnextra.com/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, refresh the page in your browser and you will see our newly created index.html.&lt;/p&gt;

&lt;p&gt;In this article, we have seen how to install Caddy on Ubuntu 22.04.&lt;/p&gt;

</description>
      <category>caddy</category>
      <category>webserver</category>
      <category>ubuntu</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Install Snipe-IT on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Mon, 17 Oct 2022 12:14:14 +0000</pubDate>
      <link>https://dev.to/hostnextra/install-snipe-it-on-ubuntu-2204-hostnextra-n2a</link>
      <guid>https://dev.to/hostnextra/install-snipe-it-on-ubuntu-2204-hostnextra-n2a</guid>
      <description>&lt;p&gt;In this article, we'll explain how to install Snipe-IT on Ubuntu 22.04.&lt;/p&gt;

&lt;p&gt;Snipe-IT was made for IT asset management, to enable IT departments to track who has which laptop, when it was purchased, which software licenses and accessories are available, and so on. Snipe-IT is a open-source IT asset management and it eliminates the need for complex IT asset tracking spreadsheets.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;An Ubuntu 22.04 installed &lt;a href="https://www.hostnextra.com/dedicated-server.html"&gt;dedicated server&lt;/a&gt; or &lt;a href="https://www.hostnextra.com/vps-hosting.html"&gt;KVM VPS&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A root user access or normal user with administrative privileges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.hostnextra.com/kb/install-snipe-it-on-ubuntu/"&gt;Install Snipe-IT on Ubuntu 22.04&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Update the server and install dependencies:
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo apt update -y &amp;amp;&amp;amp; apt upgrade -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install unzip dependency&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt-get install unzip git -y&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Install Apache Webserver
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install apache2 -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In case, you enabled firewall and firewall block requests of the apache web server, open a port in the firewall.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo ufw allow 80/tcp

# sudo ufw allow 443/tcp

# sudo ufw reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's verify the Apache installation. Open browser and test default page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;http://[SERVER IP]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enable Apache's mod_rewrite module. Snipe-IT requires this extension to rewrite URLs more cleanly.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo a2enmod rewrite&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart your Apache web server to apply the changes.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo systemctl restart apache2&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Install MariaDB
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install mariadb-server mariadb-client -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The default configuration of the MariaDB will not be secured. Let's secured the installation using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo mysql_secure_installation&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once the script gets executed, it will ask multiple questions.&lt;/p&gt;

&lt;p&gt;It will ask you to enter the current password for root (enter for none):&lt;/p&gt;

&lt;p&gt;Then enter yes/y to the following security questions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set a root password? [Y/n]: y
Remove anonymous users? : y
Disallow root login remotely? : y
Remove test database and access to it? : y
Reload privilege tables now? : y 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. Install PHP and PHP Composer
&lt;/h4&gt;

&lt;p&gt;Here we are installing the default PHP version 8.1 and other modules for web deployments using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo apt install php php-common php-bcmath php-bz2 php-intl php-gd php-mbstring php-mysql php-zip php-opcache php-intl php-json php-mysqli php-readline php-tokenizer php-curl php-ldap -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install PHP Composer, which is a PHP dependency management tool to install and update libraries in your Snipe-IT.&lt;/p&gt;

&lt;p&gt;Download the Composer installer.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo curl -sS https://getcomposer.org/installer | php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Move the composer.phar executable to /usr/local/bin/.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo mv composer.phar /usr/local/bin/composer&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Create a Database
&lt;/h4&gt;

&lt;p&gt;Create a database and database user for Snipe-IT. First login into MySQL/MariaDB as a root user.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo mysql -u root -p&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Run following commands to perform this task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE DATABASE snipe_it;
CREATE USER 'snipe_it_user'@'localhost' IDENTIFIED BY 'EXAMPLE_PASSWORD';
GRANT ALL PRIVILEGES ON snipe_it.* TO 'snipe_it_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: Replace snipe_it_user to your choice username and replace EXAMPLE_PASSWORD to you choice password.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Install Snipe-IT
&lt;/h4&gt;

&lt;p&gt;Navigate to the root directory of your web server.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cd /var/www/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use git to clone the latest Snipe-IT repository from the &lt;a href="https://github.com/snipe/snipe-it%C2%A0URL"&gt;https://github.com/snipe/snipe-it URL&lt;/a&gt; and copy the downloaded files to a snipe-it directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo git clone https://github.com/snipe/snipe-it snipe-it&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Switch to the snipe-it directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cd snipe-it&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Snipe-IT ships with a sample configuration file. Copy it to /var/www/snipe-it/.env.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo cp /var/www/snipe-it/.env.example /var/www/snipe-it/.env&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Edit the configuration file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo nano /var/www/snipe-it/.env&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the Snipe-IT configuration file, locate these settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_URL=null
APP_TIMEZONE='UTC'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set APP_URL to your server's Fully Qualified Domain Name, or it's public IP address. If you use a time zone other than UTC, change the timezone to a PHP-supported timezone, and enclose it in single quotes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_URL=example.com
APP_TIMEZONE='America/New_York'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Locate these settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change those values to the database information you set up in Step 3.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB_DATABASE=snipe_it
DB_USERNAME=snipe_it_user
DB_PASSWORD=EXAMPLE_PASSWORD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and close the file.&lt;/p&gt;

&lt;p&gt;Install the Snipe-IT dependencies with Composer. You'll receive a warning not to run this as root on each command. It's okay to continue as root for the Snipe-IT install, so type yes and hit ENTER.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# composer update --no-plugins --no-scripts&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# composer install --no-dev --prefer-source --no-plugins --no-scripts&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Set the correct ownership and permission for the Snipe-IT data directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo chown -R www-data:www-data /var/www/snipe-it&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# sudo chmod -R 777 storage&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once the Composer finishes running, generate a Laravel APP_Key value in the /var/www/snipe-it/.env configuration file you created earlier. Type yes and hit ENTER when prompted to continue.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo php artisan key:generate&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  7. Create a Virtual Host File
&lt;/h4&gt;

&lt;p&gt;First we'll disable default Apacheconf file and create new vhost conf file.&lt;/p&gt;

&lt;p&gt;Disable the default Apache configuration file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#sudo  a2dissite 000-default.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a new Apache configuration file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo nano /etc/apache2/sites-available/snipe-it.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Paste the information below and replace example.com with your server's domain name or public IP address.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;
ServerName example.com
DocumentRoot /var/www/snipe-it/public
&amp;lt;Directory /var/www/snipe-it/public&amp;gt;
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
&amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit the file.&lt;/p&gt;

&lt;p&gt;Enable your new configuration file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo a2ensite snipe-it.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart your Apache web server to apply the changes.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo systemctl restart apache2&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  8. Run the Setup Wizard
&lt;/h4&gt;

&lt;p&gt;Navigate to your browser and access the setup wizard using your server IP or domain name you have mentioned in vhost conf file.&lt;/p&gt;

&lt;p&gt;Once you complete the setup wizar your will redirect to dashbord&lt;/p&gt;

&lt;p&gt;In this article, we have seen how to install Snipe-IT on Ubuntu 22.04.&lt;/p&gt;

</description>
      <category>caddy</category>
      <category>webserver</category>
      <category>ubuntu</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Install CouchDB on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Thu, 13 Oct 2022 13:47:32 +0000</pubDate>
      <link>https://dev.to/hostnextra/install-couchdb-on-ubuntu-2204-hostnextra-42fp</link>
      <guid>https://dev.to/hostnextra/install-couchdb-on-ubuntu-2204-hostnextra-42fp</guid>
      <description>&lt;p&gt;In this article, we'll explain how to install CouchDB on Ubuntu 22.04 and configure it with Nginx proxy server and Certbot SSL.&lt;/p&gt;

&lt;p&gt;Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. Seamless multi-master sync, that scales from Big Data to Mobile, with an Intuitive HTTP/JSON API and designed for Reliability. Store your data safely, on your own servers, or with any leading cloud provider. Your web- and native applications love CouchDB, because it speaks JSON natively and supports binary data for all your data storage needs.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A Ubuntu 22.04 installed dedicated server or KVM VPS with root or non-root access (for non-root, use "sudo").&lt;/li&gt;
&lt;li&gt;A DNS A record that points your domain to the public IP address of the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's start with the installation process&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hostnextra.com/kb/install-couchdb-on-ubuntu/"&gt;Install CouchDB on Ubuntu&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Update the server and install dependency
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo apt update &amp;amp;&amp;amp; sudo apt install -y curl apt-transport-https gnupg&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Configure the CouchDB repository and key.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
# echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" | sudo tee /etc/apt/sources.list.d/couchdb.list &amp;gt;/dev/null
# sudo apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If you get following error, edit couchdb.list and add jammy before main. It will resolve it.

E: Malformed entry 1 in list file /etc/apt/sources.list.d/couchdb.list (Component)
E: The list of sources could not be read
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Install CouchDB
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install -y couchdb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The installation will ask few question.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. standalone 2. clustered 3. none
General type of CouchDB configuration: 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose according to your choice. We have select 1 for this demonstration purpose.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A CouchDB node has an Erlang magic cookie value set at startup.

This value must match for all nodes in the cluster. If they do not match, attempts to connect the node to the cluster will be rejected.

CouchDB Erlang magic cookie: monkey
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the Erlang Magic Cookie. This is a unique identifier to authenticate for your cluster, all nodes must have the same cookie. Here we have wrote monkey. You can write anything you want.&lt;/p&gt;

&lt;p&gt;The default is 127.0.0.1 (loopback) for standalone nodes, and 0.0.0.0 (all interfaces) for clustered nodes. In clustered mode, it is not allowed to bind to 127.0.0.1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CouchDB interface bind address: 0.0.0.0

Add bind address as 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A pre-existing admin user will not be overwritten by this package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Password for the CouchDB "admin" user:

Repeat password for the CouchDB "admin" user:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here add admin password as per your choice.&lt;/p&gt;

&lt;p&gt;The installation has been completed successfully. Navigate to browser and open http://:5984/_utils/&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Configure Nginx
&lt;/h4&gt;

&lt;p&gt;Now, let's configure Nginx proxy. Install Nginx using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt-get install -y nginx apache2-utils&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remove default Nginx config file, we'll create our own config file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo rm -rf /etc/nginx/sites-enabled/default&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now create a new config file&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nano /etc/nginx/sites-available/couchdb-site&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
listen 80 default_server;
server_name coachdb.local;

location / {
proxy_pass http://localhost:5984;
proxy_redirect off;

proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

}

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For security reason, you can change the default http 80 port to something else like 5000. So to access it you need to mention 5000 port at the end of website name. But it may create conflict with SSL. We've not test different port with SSL.&lt;/p&gt;

&lt;p&gt;Now, create a symbolic link and restart Nginx service using following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ln -s /etc/nginx/sites-available/couchdb-site /etc/nginx/sites-enabled/
# nginx -t
# systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5. Configure Firewall
&lt;/h4&gt;

&lt;p&gt;Enable UFW if its not enabled.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# ufw enable&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following ports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ufw allow 22/tcp

# ufw allow 80/tcp

# ufw allow 443/tcp

# ufw allow 5984/tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the status:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# ufw status&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your SSH port might be different.&lt;br&gt;
If you have custom Nginx web server port, add that port also.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Install certbot's nginx package
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# apt install certbot python3-certbot-nginx -y&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Obtaining a Certificate
&lt;/h4&gt;

&lt;p&gt;Obtain a certificate using certbot command. The Nginx plugin will take care of reconfiguring Nginx and reloading the config.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# certbot --nginx -d yoursite.com -d www.yousite.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;By running certbot first time, you will be prompted to enter an email address and agree to the terms of service.&lt;/p&gt;

&lt;p&gt;That's it, we have successfully install CouchDB on Ubuntu 22.04 and configured it with Nginx proxy server and Certbot SSL.&lt;/p&gt;

</description>
      <category>couchdb</category>
      <category>ubuntu</category>
      <category>database</category>
      <category>nginx</category>
    </item>
    <item>
      <title>Install Grafana on Rocky Linux 9 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Tue, 11 Oct 2022 11:57:12 +0000</pubDate>
      <link>https://dev.to/hostnextra/install-grafana-on-rocky-linux-9-hostnextra-1f4f</link>
      <guid>https://dev.to/hostnextra/install-grafana-on-rocky-linux-9-hostnextra-1f4f</guid>
      <description>&lt;p&gt;In this tutorial, we shall show you how to install Grafana on Rocky Linux 9. We shall install Grafana Enterprise  and Open Source CLI version 9.1.7-1 with PostgreSQL.&lt;/p&gt;

&lt;p&gt;Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;A Rocky Linux 9 dedicated server or KVM VPS.&lt;/p&gt;

&lt;p&gt;Supported databases are SQLite, MySQL, and PostgreSQL.&lt;br&gt;
A root user access or normal user with administrative privileges.&lt;/p&gt;

&lt;p&gt;By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location. In this tutorial we are going to install PostgreSQL and configure it.&lt;/p&gt;

&lt;p&gt;Let’s get started with the installation process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hostnextra.com/kb/how-to-install-grafana-on-rocky-linux/"&gt;Install Grafana on Rocky Linux 9&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 1 - Keep the server up to date
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# dnf update -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2 - Install PostgreSQL database
&lt;/h4&gt;

&lt;p&gt;Install PostgreSQL database using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install -y postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Start and enable PostgreSQL service:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl start postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl enable postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, we need to create a database for Grafana and assign it a username and password for authentication.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo -u postgres psql&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;postgres=# CREATE DATABASE grafana;

CREATE DATABASE

postgres=# CREATE USER grafana WITH PASSWORD 'grafana';

CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE grafana TO grafana;

GRANT

postgres=#\c grafana

You are now connected to database "grafana" as user "postgres".

postgres=#CREATE TABLE session ( key CHAR(16) NOT NULL, data bytea, expiry INT NOT NULL, PRIMARY KEY (key));

CREATE TABLE

postgres=# \q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;Use your own database name as well as username and set strong password.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3 - Create repository file
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# vi /etc/yum.repos.d/grafana.repo&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following lines:&lt;/p&gt;

&lt;p&gt;For Enterprise releases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[grafana]
name=grafana
baseurl=https://packages.grafana.com/enterprise/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For OSS releases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4 - Install Grafana
&lt;/h4&gt;

&lt;p&gt;Before you install Grafana, there is a one change we need to make. From RHEL 9 SHA-1 is deprecated and Grafana uses SHA-1 to GPG key. It will fail by default but if we update default crypto policies to SHA-1, it will not fail and get install successfully. Run following command to update it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# update-crypto-policies --set DEFAULT:SHA1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now we can install Grafana.&lt;/p&gt;

&lt;p&gt;For Enterprise:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# dnf install grafana-enterprise -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For Open Source.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# dnf install grafana -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add port 3000 in the firewall.&lt;/p&gt;

&lt;p&gt;If you are using firewalld:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# firewall-cmd --add-port=3000/tcp --permanent&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# firewall-cmd --reload&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you are using IPTables:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# iptables -A INPUT -p tcp --dport 3000 -j ACCEPT&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# iptables-save&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 5: Configure PostgreSQL:
&lt;/h4&gt;

&lt;p&gt;First edit pg_hba.conf file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# vi /var/lib/pgsql/14/data/pg_hba.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;host all grafana 0.0.0.0/0 trust
local all grafana trust
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;Finally, modify default database configuration and set to PostgreSQL database configuration.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# vi /etc/grafana/grafana.ini&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url properties.

# Either "mysql", "postgres" or "sqlite3", it's your choice
type = postgres
host = 127.0.0.1:5432
name = grafana
user = grafana
password = grafana
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;Change the name, user, and password as your configurations.&lt;/p&gt;

&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;To start and enable the service and verify that the service has started: grafana-server.service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# systemctl start grafana-server.service
# systemctl enable grafana-server.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Package details&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default file (environment vars) to /etc/sysconfig/grafana-server&lt;/li&gt;
&lt;li&gt;Configuration file to /etc/grafana/grafana.ini
systemd service (if systemd is available) name grafana-server.service&lt;/li&gt;
&lt;li&gt;The default configuration uses a log file at /var/log/grafana/grafana.log&lt;/li&gt;
&lt;li&gt;The default configuration specifies an sqlite3 database at /var/lib/grafana/grafana.db&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JKis3Tla--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opldnmlk8lt0pwd06tfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JKis3Tla--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opldnmlk8lt0pwd06tfs.png" alt="Image description" width="880" height="733"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The installation is completed successfully.&lt;/p&gt;

&lt;p&gt;In this tutorial, you have learnt how to install Grafana on Rocky Linux 9.&lt;/p&gt;

</description>
      <category>rockylinux</category>
      <category>grafana</category>
      <category>postgres</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How To Install Grafana on AlmaLinux 9 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Mon, 10 Oct 2022 13:55:48 +0000</pubDate>
      <link>https://dev.to/hostnextra/how-to-install-grafana-on-almalinux-9-4h26</link>
      <guid>https://dev.to/hostnextra/how-to-install-grafana-on-almalinux-9-4h26</guid>
      <description>&lt;p&gt;In this tutorial, we shall show you how to install Grafana on AlmaLinux 9. We shall install Grafana Enterprise  and Open Source CLI version 9.1.7-1 with PostgreSQL.&lt;/p&gt;

&lt;p&gt;Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;A AlmaLinux 9 dedicated server or KVM VPS.&lt;/p&gt;

&lt;p&gt;Supported databases are SQLite, MySQL, and PostgreSQL.&lt;br&gt;
A root user access or normal user with administrative privileges.&lt;/p&gt;

&lt;p&gt;By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location. In this tutorial we are going to install PostgreSQL and configure it.&lt;/p&gt;

&lt;p&gt;Let’s get started with the installation process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hostnextra.com/kb/how-to-install-grafana-on-almalinux/"&gt;Install Grafana on AlmaLinux 9&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 1 - Keep the server up to date
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# dnf update -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2 - Install PostgreSQL database
&lt;/h4&gt;

&lt;p&gt;Before you install PostgreSQL, check the current version here and download.&lt;/p&gt;

&lt;p&gt;Install the repository RPM:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Disable the built-in PostgreSQL module:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# dnf -qy module disable postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install PostgreSQL database using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# dnf install -y postgresql14-server&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Initialize, start, and enable PostgreSQL service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo /usr/pgsql-14/bin/postgresql-14-setup initdb

# systemctl start postgresql-14

# systemctl enable postgresql-14
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we need to create a database for Grafana and assign it a username and password for authentication.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo -u postgres psql&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;postgres=# CREATE DATABASE grafana;

CREATE DATABASE

postgres=# CREATE USER grafana WITH PASSWORD 'grafana';

CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE grafana TO grafana;

GRANT

postgres=#\c grafana

You are now connected to database "grafana" as user "postgres".

postgres=#CREATE TABLE session ( key CHAR(16) NOT NULL, data bytea, expiry INT NOT NULL, PRIMARY KEY (key));

CREATE TABLE

postgres=# \q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use your own database name as well as username and set strong password.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3 - Create repository file
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# vi /etc/yum.repos.d/grafana.repo&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following lines:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Enterprise releases:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[grafana]
name=grafana
baseurl=https://packages.grafana.com/enterprise/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For OSS releases:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4 - Install Grafana
&lt;/h4&gt;

&lt;p&gt;Before you install Grafana, there is a one change we need to make. From RHEL 9 SHA-1 is deprecated and Grafana uses SHA-1 to GPG key. It will fail by default but if we update default crypto policies to SHA-1, it will not fail and get install successfully. Run following command to update it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# update-crypto-policies --set DEFAULT:SHA1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now we can install Grafana.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# dnf install grafana-enterprise -y

or

# dnf install grafana -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add port 3000 in the firewall.&lt;/p&gt;

&lt;p&gt;If you are using firewalld:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# firewall-cmd --add-port=3000/tcp --permanent

# firewall-cmd --reload

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are using IPTables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# iptables -A INPUT -p tcp --dport 3000 -j ACCEPT

# iptables-save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 5: Configure PostgreSQL:
&lt;/h4&gt;

&lt;p&gt;First edit pg_hba.conf file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# vi /var/lib/pgsql/14/data/pg_hba.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;host all grafana 0.0.0.0/0 trust
local all grafana trust
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;Finally, modify default database configuration and set to PostgreSQL database configuration.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# vi /etc/grafana/grafana.ini&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url properties.

# Either "mysql", "postgres" or "sqlite3", it's your choice
type = postgres
host = 127.0.0.1:5432
name = grafana
user = grafana
password = grafana
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Change the name, user, and password as your configurations.&lt;/p&gt;

&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;To start and enable the service and verify that the service has started: grafana-server.service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# systemctl start grafana-server.service
# systemctl enable grafana-server.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Package details&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Default file (environment vars) to /etc/sysconfig/grafana-server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configuration file to /etc/grafana/grafana.ini&lt;br&gt;
systemd service (if systemd is available) name grafana-server.service&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The default configuration uses a log file at /var/log/grafana/grafana.log&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The default configuration specifies an sqlite3 database at /var/lib/grafana/grafana.db&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The installation is completed successfully.&lt;/p&gt;

&lt;p&gt;In this tutorial, you have learnt how to install Grafana on AlmaLinux 9.&lt;/p&gt;

</description>
      <category>almalinux</category>
      <category>grafana</category>
      <category>tutorial</category>
      <category>opensource</category>
    </item>
    <item>
      <title>A Guide to Install Grafana on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Wed, 05 Oct 2022 11:01:37 +0000</pubDate>
      <link>https://dev.to/hostnextra/a-guide-to-install-grafana-on-ubuntu-2204-2ch2</link>
      <guid>https://dev.to/hostnextra/a-guide-to-install-grafana-on-ubuntu-2204-2ch2</guid>
      <description>&lt;p&gt;In this tutorial, you will learn how to install Grafana on Ubuntu 22.04 with PostgreSQL DB. We shall install Grafana Enterprise  and Open Source CLI version 9.1.6.&lt;/p&gt;

&lt;p&gt;Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;A Ubuntu 22.04 dedicated server or KVM VPS.&lt;/p&gt;

&lt;p&gt;Supported databases are SQLite, MySQL, and PostgreSQL.&lt;br&gt;
A root user access or normal user with administrative privileges.&lt;/p&gt;

&lt;p&gt;By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location. Here we're installing PostgreSQL database.&lt;/p&gt;

&lt;p&gt;Let's get started with the installation process.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;a href="https://www.hostnextra.com/kb/a-guide-to-install-grafana-on-ubuntu/"&gt;Install Grafana on Ubuntu 22.04&lt;/a&gt;
&lt;/h4&gt;
&lt;h4&gt;
  
  
  Step 1 - Keep the server up to date
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# apt update -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt upgrade -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2 - Install PostgreSQL database
&lt;/h4&gt;

&lt;p&gt;Install PostgreSQL database using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt install -y postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Start and enable PostgreSQL service:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl start postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl enable postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, we need to create a database for Grafana and assign it a username and password for authentication.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo -u postgres psql

postgres=# CREATE DATABASE grafana;

CREATE DATABASE

postgres=# CREATE USER grafana WITH PASSWORD 'grafana';

CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE grafana TO grafana;

GRANT

postgres=#\c grafana

You are now connected to database "grafana" as user "postgres".

postgres=#CREATE TABLE session ( key CHAR(16) NOT NULL, data bytea, expiry INT NOT NULL, PRIMARY KEY (key));

CREATE TABLE

postgres=# \q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;Use your own database name as well as username and set strong password.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2 - Install required package and add GPG key
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# apt-get install apt-transport-https -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3 - Add this repository for stable releases
&lt;/h4&gt;

&lt;p&gt;Latest Enterprise edition&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# echo "deb https://packages.grafana.com/enterprise/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Latest OSS release&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4 - Install Grafana Enterprise
&lt;/h4&gt;

&lt;p&gt;After you add the repository first update the server and install the Grafana Enterprise.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt-get update -y&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# apt-get install grafana-enterprise -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To install OSS release:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt-get update -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# apt-get install grafana -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Configure PostgreSQL:&lt;/p&gt;

&lt;p&gt;First edit pg_hba.conf file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nano /etc/postgresql/14/main/pg_hba.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;host all grafana 0.0.0.0/0 trust
local all grafana trust
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;Finally, modify default database configuration and set to PostgreSQL database configuration.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# nano /etc/grafana/grafana.ini&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url properties.

# Either "mysql", "postgres" or "sqlite3", it's your choice
type = postgres
host = 127.0.0.1:5432
name = grafana
user = grafana
password = grafana
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;Change the name, user, and password as your configurations.&lt;/p&gt;

&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;To start and enable the service and verify that the service has started: grafana-server.service.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# systemctl start grafana-server.service&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# systemctl enable grafana-server.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Package details&lt;br&gt;
Default file (environment vars) to /etc/default/grafana-server&lt;br&gt;
Configuration file to /etc/grafana/grafana.ini&lt;br&gt;
systemd service (if systemd is available) name grafana-server.service&lt;br&gt;
The default configuration sets the log file at /var/log/grafana/grafana.log&lt;br&gt;
HTML/JS/CSS and other Grafana files at /usr/share/grafana&lt;br&gt;
Step 5 - Log in into dashboard&lt;/p&gt;

&lt;p&gt;To log in to Grafana for the first time:&lt;/p&gt;

&lt;p&gt;Open your web browser and go to &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt;. The default HTTP port that Grafana listens to is 3000 unless you have configured a different port.&lt;br&gt;
On the login page, enter admin for username and password.&lt;br&gt;
Click Log In. If login is successful, then you will see a prompt to change the password.&lt;br&gt;
Click OK on the prompt, then change your password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KS7jWnpX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6ssof8q3ri8iuacaguv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KS7jWnpX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6ssof8q3ri8iuacaguv.png" alt="Image description" width="880" height="733"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The installation is completed successfully.&lt;/p&gt;

&lt;p&gt;In this tutorial, you have learnt how to install Grafana on Ubuntu 22.04.&lt;/p&gt;

</description>
      <category>grafana</category>
      <category>ubuntu</category>
      <category>postgres</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How To Install Git Server on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Thu, 29 Sep 2022 11:45:48 +0000</pubDate>
      <link>https://dev.to/hostnextra/how-to-install-git-server-on-ubuntu-2204-hostnextra-31g4</link>
      <guid>https://dev.to/hostnextra/how-to-install-git-server-on-ubuntu-2204-hostnextra-31g4</guid>
      <description>&lt;p&gt;In this tutorial, we will see how to install Git server on Ubuntu 22.04. You will learn to install and configure Git server.&lt;/p&gt;

&lt;p&gt;Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.&lt;/p&gt;

&lt;p&gt;Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;A Ubuntu 22.04 installed dedicated server or KVM VPS.&lt;br&gt;
A root user access or normal user with administrative privileges.&lt;br&gt;
Add DNS A record of your server's hostname. For example we are using hub.hostnextra.com as our server hostname. Or else use your server IP address in the place of hub.hostnextra.com.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;a href="https://www.hostnextra.com/kb/how-to-install-git-server-on-ubuntu/"&gt;Install Git Server on Ubuntu 22.04&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Let's get started with installation. There are two ways to install Git.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 1 is install Git using APT
&lt;/h4&gt;

&lt;p&gt;Keep the server up-to-date&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt update -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install Git&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install git -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Verify the installation:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git --version&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2 is install git from source
&lt;/h4&gt;

&lt;p&gt;You can download latest version of Git from release page. It make take longer time and will not be updated and maintained through the yum package manager. But it will allow you to download a newer version than what is available through the CentOS repositories, and will give you some control over the options that you can include.&lt;/p&gt;

&lt;p&gt;First, install dependencies&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After the installation complete, go to release page and copy the download link. You can find tar.gz, right click on it and copy the link.&lt;/p&gt;

&lt;p&gt;Now, download it in the server using wget command and rename it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo wget https://github.com/git/git/archive/refs/heads/master.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once the download is complete, we can extract the tar file&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# unzip master.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, go to that directory to begin configuring our build.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cd git-master&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, you can make the package and install it by typing these two commands:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo make prefix=/usr/local all&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# sudo make prefix=/usr/local install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, replace the shell process so that the version of Git we just installed will be used:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# exec bash&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We have built and installed Git successfully. To verify it check the version using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Configure Git&lt;/p&gt;

&lt;p&gt;Add user to handle the repositories:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo adduser git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Log in as a git user&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo su - git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Initiate a new empty repository using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git init --bare ~/hostnextra.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Enable post-update hook by copying the sample file as follows:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cd hostnextra.git/hooks/&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# cp post-update.sample post-update&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's it for server side.&lt;/p&gt;

&lt;p&gt;Now let's go to client side:&lt;/p&gt;

&lt;p&gt;Install Git&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt install git -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once the installation gets completed, start the configuring the Git&lt;/p&gt;

&lt;p&gt;Configure Git&lt;/p&gt;

&lt;p&gt;Submit inflammation about yourself so that commit messages will be generated with correct information attached:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git config --global user.name "git"&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# git config --global user.email "git@hub.hostnextra.com"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a directory where you can keep all your projects&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# mkdir ~/dev&lt;/code&gt;&lt;br&gt;
&lt;code&gt;# cd ~/dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, create a clone the hostnextra.git repository that we have created earlier in the server&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git clone git@hub.hostnextra.com:~/hostnextra.git hostnextra.git&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cloning into 'hostnextra.git'...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It will ask to enter git user password:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="mailto:git@hub.hostnextra.com"&gt;git@hub.hostnextra.com&lt;/a&gt;'s password:&lt;br&gt;
warning: You appear to have cloned an empty repository.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Go to respository&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# cd hostnextra.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can see the repository is empty, so lets create some files&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# echo "my test file" &amp;gt; file1.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add these file to our git repository&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git add .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Commit the changes&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git commit -am "My First Commit"&lt;br&gt;
[master (root-commit) b337197] My First Commit&lt;br&gt;
1 file changed, 1 insertion(+)&lt;br&gt;
create mode 100644 file1.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Push these changes to the remote git repository at hub.hostnextra.com&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git push origin master&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;you will be asked for password, enter git user password&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git@hub.hostnextra.com's password:
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 229 bytes | 76.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To hub.hostnextra.com:~/hostnextra.git
* [new branch] master -&amp;gt; master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the changes, access the git server and run following command to check the logs&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# git log&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output will be similar like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;commit b3371975bd44fb4aca344e365fa635180967f7fe (HEAD -&amp;gt; master)&lt;br&gt;
Author: git &lt;a href="mailto:git@hub.hostnextra.com"&gt;git@hub.hostnextra.com&lt;/a&gt;&lt;br&gt;
Date: Wed Apr 14 10:06:06 2021 +0000&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My First Commit&lt;/p&gt;

&lt;p&gt;We have successfully install Git server on Ubuntu 22.04.&lt;/p&gt;

</description>
      <category>git</category>
      <category>ubuntu</category>
      <category>linux</category>
      <category>hostnextra</category>
    </item>
    <item>
      <title>Install Portainer on Ubuntu 22.04 with Docker - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Tue, 27 Sep 2022 11:54:23 +0000</pubDate>
      <link>https://dev.to/hostnextra/install-portainer-on-ubuntu-2204-with-docker-hostnextra-ibe</link>
      <guid>https://dev.to/hostnextra/install-portainer-on-ubuntu-2204-with-docker-hostnextra-ibe</guid>
      <description>&lt;p&gt;In this article, we'll explain how to install Portainer on Ubuntu 22.04 with Docker.&lt;/p&gt;

&lt;p&gt;Portainer is powerful, open-source toolset that allows you to easily build and manage containers in Docker, Swarm, Kubernetes and Azure ACI. It works by hiding the complexity that makes managing containers hard, behind an easy to use GUI.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;Ubuntu 22.04 installed dedicated server or KVM VPS.&lt;br&gt;
A root user access or normal user with administrative privileges.&lt;br&gt;
Add A record of your preferred domain like port.example.com&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;a href="https://www.hostnextra.com/kb/how-to-install-portainer-on-ubuntu/"&gt;Install Portainer on Ubuntu 22.04 with Docker&lt;/a&gt;
&lt;/h4&gt;
&lt;h4&gt;
  
  
  1. Keep server updated
&lt;/h4&gt;

&lt;p&gt;Always keep your server up-to-date for security purpose.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt-get update -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Install Docker
&lt;/h4&gt;

&lt;p&gt;Install the required dependencies for Docker:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, run the commands below to download and install Docker’s official GPG key. The key is used to validate packages installed from Docker’s repository making sure they’re trusted.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -&lt;br&gt;
sudo apt-key fingerprint 0EBFCD88&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the Docker Repository&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The following command will download Docker and install it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt-get update -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo apt-get install docker-ce -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  3. Create a container
&lt;/h4&gt;

&lt;p&gt;We'll show you two ways to deploy the container.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you want to use domain name to access Portainer, use following command to deploy the container:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;# sudo docker run --restart always -d --name=portainer -v /var/run/docker.sock:/var/run/docker.sock -v /vol/portainer/data:/data -e VIRTUAL_HOST=port.example.com -e VIRTUAL_PORT=9000 portainer/portainer-ce -H unix:///var/run/docker.sock&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;-v /var/run/docker.sock:/var/run/docker.sock means mounting /var/run/docker.sock to the container so portainer can control the Docker.&lt;br&gt;
-v /vol/portainer/data:/data means storing data of portainer on directory /vol/portainer/data.&lt;br&gt;
port.example.com is your domain to access the portainer.&lt;/p&gt;
&lt;h4&gt;
  
  
  2. If you want to access Portainer using server IP, use following command to deploy the container:
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;# sudo docker volume create portainer_data&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  4. Configure Reverse Proxy for Portainer (Optional if you will use domain name)
&lt;/h4&gt;

&lt;p&gt;Caddyfile is a reverse proxy server. It is necessary to secure the connection to prevent network hijacking. Caddyfile can obtains and automatically maintains SSL certificate.&lt;/p&gt;

&lt;p&gt;Create a Caddyfile. Caddyfile is a document containing configs for your sites:&lt;/p&gt;

&lt;p&gt;`# sudo mkdir -p /vol/caddy/configs&lt;/p&gt;
&lt;h1&gt;
  
  
  sudo vim /vol/caddy/configs/Caddyfile`
&lt;/h1&gt;

&lt;p&gt;Add following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;port.example.com {
tls youremail@example.com
reverse_proxy portainer:8000
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace: port.example.com with your domain name and &lt;a href="mailto:youremail@example.com"&gt;youremail@example.com&lt;/a&gt; with your actual email id.&lt;/p&gt;

&lt;p&gt;Save and exit.&lt;/p&gt;

&lt;p&gt;Finally, create a Caddy container using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# sudo docker run --restart always -d -p 80:80 -p 443:443 -v "/vol/caddy/data:/data/caddy" -v "/vol/caddy/configs:/etc/caddy" --link portainer --name caddy caddy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;-p 80:80 -p 443:443 means publish its 80 and 443 port to your host so you can access it with those ports.&lt;br&gt;
-v "/vol/caddy/data:/data/caddy" means mount caddy working directory to your host to persist data such as certificates.&lt;br&gt;
-v "/vol/caddy/configs:/etc/caddy" means mount caddy configuration directory to your host to persist configurations.&lt;br&gt;
--link portainer means link container caddy with portainer so they can access with each other.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Access Portainer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Navigate to your browser and access the Portainer by using either your domain or server IP and set admin password and finish the installment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tm09TiMj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmcvvxhvsjviczvre6mx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tm09TiMj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmcvvxhvsjviczvre6mx.png" alt="Image description" width="880" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. The installation has been completed successfully.&lt;/p&gt;

&lt;p&gt;In this article, we've have seen how to install Portainer on Ubuntu 22.04 with Docker.&lt;/p&gt;

</description>
      <category>portainer</category>
      <category>ubuntu</category>
      <category>tutorial</category>
      <category>hostnextra</category>
    </item>
    <item>
      <title>How to Install Vue CLI on Ubuntu 22.04 - HostnExtra</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Tue, 27 Sep 2022 11:46:52 +0000</pubDate>
      <link>https://dev.to/hostnextra/how-to-install-vue-cli-on-ubuntu-2204-hostnextra-1e5f</link>
      <guid>https://dev.to/hostnextra/how-to-install-vue-cli-on-ubuntu-2204-hostnextra-1e5f</guid>
      <description>&lt;p&gt;In this article, we’ll explain how to install Vue CLI on Ubuntu 22.04.&lt;/p&gt;

&lt;p&gt;Vue.js is an open-source model-view-viewmodel front end JavaScript framework. This article will guide you the installation process and creating hello world first project.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisites
&lt;/h4&gt;

&lt;p&gt;A Ubuntu 22.04 installed dedicated server or KVM VPS.&lt;br&gt;
A root user access or normal user with administrative privileges.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.hostnextra.com/kb/how-to-install-vue-cli-on-ubuntu-22-04/"&gt;Install Vue CLI on Ubuntu 22.04&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  1 - User management
&lt;/h4&gt;

&lt;p&gt;Add user&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# adduser &amp;lt;user name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will ask you to enter the password for the new user.&lt;/p&gt;

&lt;p&gt;Add user in sudo group&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# usermod -aG sudo block&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Login with new user&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# su - &amp;lt;username&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2 - Keep the server up to date
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ sudo apt update -y&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3 - Download NodeJS
&lt;/h4&gt;

&lt;p&gt;Download latest stable release of NodeJS.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4 - Install NodeJS
&lt;/h4&gt;

&lt;p&gt;Next, install the NodeJS using following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo apt-get install -y nodejs&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5 - Verify the installation
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ node -v &amp;amp;&amp;amp; npm -v&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;v18.9.0&lt;br&gt;
8.19.1&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  6. Install Vue CLI
&lt;/h4&gt;

&lt;p&gt;Following command will install Vue CLI.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo npm install -g @vue/cli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Verify the installation:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ vue --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;@vue/cli 5.0.8&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  7. Create Vue project
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ vue create hello-world&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will be prompted to pick a preset. You can either choose the default preset which comes with a basic Babel + ESLint setup, or select "Manually select features" to pick the features you need.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Output:&lt;br&gt;
Vue CLI v5.0.8`&lt;br&gt;
? Please pick a preset: (Use arrow keys)&lt;br&gt;
❯ Default ([Vue 2] babel, eslint)&lt;br&gt;
Default (Vue 3 Preview) ([Vue 3] babel, eslint)&lt;br&gt;
Manually select features&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Successfully created project hello-world.&lt;br&gt;
Get started with the following commands:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ cd hello-world&lt;br&gt;
$ sudo npm run serve&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;App running at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local: &lt;a href="http://localhost:8080/"&gt;http://localhost:8080/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Network: &lt;a href="http://192.168.0.106:8080/"&gt;http://192.168.0.106:8080/&lt;/a&gt;
Note that the development build is not optimized.
To create a production build, run npm run build.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Navigate to your browser and open http://[server_IP]:8080.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BCdzyx7h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ygxopgfubbwtl9xhcesl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BCdzyx7h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ygxopgfubbwtl9xhcesl.png" alt="Image description" width="795" height="832"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it. The installation has been completed.&lt;/p&gt;

&lt;p&gt;In this article, we have seen how to install Vue CLI on Ubuntu 22.04.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>vue</category>
      <category>ubuntu</category>
      <category>linux</category>
    </item>
    <item>
      <title>How To Install Gatsby on Ubuntu 22.04</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Tue, 27 Sep 2022 10:56:36 +0000</pubDate>
      <link>https://dev.to/hostnextra/how-to-install-gatsby-on-ubuntu-2204-41b6</link>
      <guid>https://dev.to/hostnextra/how-to-install-gatsby-on-ubuntu-2204-41b6</guid>
      <description>&lt;p&gt;In this article, we’ll explain how to install Gatsby on Ubuntu 22.04.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.gatsbyjs.com/"&gt;Gatsby&lt;/a&gt; is a React-based open-source framework for creating websites and apps. It’s great whether you’re building a portfolio site or blog, or a high-traffic e-commerce store or company homepage. Create blazing fast websites and apps AND harness the power of 2000+ plugins. Build sites with the services you want, like Shopify, Stripe, and WordPress, quickly and easily with Gatsby’s 2000+ plugins. Integrate data from anywhere: APIs, databases, CMSs, static files — or multiple sources at once&lt;/p&gt;

&lt;p&gt;This article will guide you with the installation process and deploying default starter Gatsby site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
A Ubuntu 22.04 installed dedicated server or KVM VPS.&lt;br&gt;
A root user or normal user with sudo administrator privileges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learn more:&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://www.hostnextra.com/kb/how-to-install-gatsby-on-ubuntu-22-04/"&gt;Install Gatsby on Ubuntu 22.04&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gatsby</category>
      <category>ubuntu</category>
      <category>hostnextra</category>
    </item>
    <item>
      <title>JSON Web Token Refreshing a token</title>
      <dc:creator>HostnExtra Technologies</dc:creator>
      <pubDate>Tue, 22 Jun 2021 05:16:42 +0000</pubDate>
      <link>https://dev.to/hostnextra/json-web-token-refreshing-a-token-4dmi</link>
      <guid>https://dev.to/hostnextra/json-web-token-refreshing-a-token-4dmi</guid>
      <description>&lt;p&gt;In this article, we'll explain about JSON Web Token Refreshing a token.&lt;/p&gt;

&lt;h4&gt;Introduction&lt;/h4&gt;

&lt;p&gt;In this section we touch upon refreshing an access token.&lt;br&gt;
&lt;a href="https://www.hostnextra.com/kb/json-web-token-refreshing-a-token/"&gt;JSON Web Token Refreshing a token&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Types of tokens&lt;/h4&gt;

&lt;p&gt;In general there are two type of tokens: access token and a refresh token. The access token is used for making API calls towards the server. Access tokens have a limited life span, that’s where the refresh token comes in. Once the access token is no longer valid a request can me made towards the server to get a new access token by presenting the refresh token. The refresh token can expire but their life span is much longer. This solves the problem of a user having to authenticate again with their credentials. Whether you should use a refresh token and access token depends.&lt;/p&gt;

&lt;p&gt;The refresh token is a random string which the server can keep track of (in memory or store in a database) in order to match the refresh token to the user the refresh token was granted to. So in this case whenever the access token is still valid we can speak of a "stateless" session, there is no burden on the server side to setup the user session, the token is self contained. When the access token is no longer valid the server needs to query for the stored refresh token to make sure the token is not blocked in any way.&lt;/p&gt;

&lt;p&gt;Whenever the attacker gets a hold on an access token it is only valid for a certain amount of time (say 10 minutes). The attacker then needs the refresh token to get a new access token. That is why the refresh token needs better protection. It is also possible to make the refresh token stateless but this means it will become more difficult to see if the user revoked the tokens. After the server made all the validations it must return a new refresh token and a new access token to the client. The client can use the new access token to make the API call.&lt;/p&gt;

&lt;h4&gt;What should you check for?&lt;/h4&gt;

&lt;p&gt;Regardless of the chosen solution you should store enough information on the server side to validate whether the user is still trusted. You can think of many things, like store the ip address, keep track of how many times the refresh token is used (using the refresh token multiple times in the valid time window of the access token might indicate strange behavior, you can revoke all the tokens an let the user authenticate again).&lt;/p&gt;

&lt;p&gt;Also keep track of which access token belonged to which refresh token otherwise an attacker might be able to get a new access token for a different user with the refresh token of the attacker (see &lt;a href="https://emtunc.org/blog/11/2017/jwt-refresh-token-manipulation/"&gt;https://emtunc.org/blog/11/2017/jwt-refresh-token-manipulation/&lt;/a&gt; for a nice write up about how this attack works) Also a good thing to check for is the ip address or geolocation of the user. If you need to give out a new token check whether the location is still the same if not revoke all the tokens and let the user authenticate again.&lt;/p&gt;

&lt;h4&gt;Need for refresh tokens&lt;/h4&gt;

&lt;p&gt;Does it make sense to use a refresh token in a modern single page application (SPA)? As we have seen in the section about storing tokens there are two options: web storage or a cookie which mean a refresh token is right beside an access token, so if the access token is leaked chances are the refresh token will also be compromised. Most of the time there is a difference of course. The access token is sent when you make an API call, the refresh token is only sent when a new access token should be obtained, which in most cases is a different endpoint. If you end up on the same server you can choose to only use the access token.&lt;/p&gt;

&lt;p&gt;As stated above using an access token and a separate refresh token gives some leverage for the server not to check the access token over and over. Only perform the check when the user needs a new access token. It is certainly possible to only use an access token. At the server you store the exact same information you would store for a refresh token, see previous paragraph. This way you need to check the token each time but this might be suitable depending on the application. In the case the refresh tokens are stored for validation it is important to protect these tokens as well (at least use a hash function to store them in your database).&lt;/p&gt;

&lt;h4&gt;JWT a good idea?&lt;/h4&gt;

&lt;p&gt;There are a lot of resources available which question the usecase for using JWT token for client to server authentication with regards to cookies. The best place to use a JWT token is between server to server communication. In a normal web application you are better of using plain old cookies. See for more information:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/" rel="noopener"&gt;stop-using-jwt-for-sessions&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/" rel="noopener"&gt;stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://cryto.net/~joepie91/blog/attachments/jwt-flowchart.png" rel="noopener"&gt;flowchart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reference: &lt;a href="https://github.com/WebGoat/WebGoat" rel="noopener"&gt;OWASP WebGoat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, we've seen about JSON Web Token Refreshing a token.&lt;/p&gt;

</description>
      <category>json</category>
      <category>jsonwebtoken</category>
      <category>hostnextra</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
