Open-source | LinuxHostSupport https://linuxhostsupport.com/blog/category/open-source/ Linux Tutorials and Guides Tue, 23 Jan 2024 13:50:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install XWiki on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/#respond Sat, 30 Dec 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1993 XWiki is a free and open-source platform written in Java used for storing structured data and running the server-side code that creates the wiki interface. In this tutorial, we are going to explain how to install XWiki on AlmaLinux 9. XWiki offers a variety of features such as structured content, PDF export, Version control, plugins, […]

The post How to Install XWiki on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
XWiki is a free and open-source platform written in Java used for storing structured data and running the server-side code that creates the wiki interface. In this tutorial, we are going to explain how to install XWiki on AlmaLinux 9.

XWiki offers a variety of features such as structured content, PDF export, Version control, plugins, API programming, and many more. XWiki stores the data into the MySQL database server, and alongside Tomcat we will install the MariaDB database server.

Installing XWiki with all of its requirements will take up to 20 minutes. Let’s get started!

Prerequisites

  • A server running AlmaLinux 9
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation of XWiki, we need to update the system packages to their latest versions available:

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

To install Java, execute the following command:

dnf install java

Once Java is installed, you can check the version with the command below:

java --version

You should get the following output:

[root@host ~]# java --version
openjdk 11.0.21 2023-10-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS, mixed mode, sharing)

Step 3. Install Tomcat

To install Tomcat, execute the following commands one by one:

groupadd tomcat

useradd -g tomcat -d /opt/tomcat tomcat

su - tomcat

wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.96/bin/apache-tomcat-8.5.96.tar.gz -O tomcat8.tar.gz

tar -xzvf tomcat8.tar.gz --strip-components=1

exit

Next, we need to create a service file for Tomcat:

touch /etc/systemd/system/tomcat8.service

Once the file is created, open it with your preferred text editor and paste the following lines of code:

[Unit]
Description=Tomcat 8
After=syslog.target network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -XX:MaxPermSize=192m -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

[Install]
WantedBy=multi-user.target

Save the file and close it. Once done, reload the SystemD daemon. start the service, and configure it to start on boot:

systemctl daemon-reload

systemctl start tomcat8

systemctl enable tomcat8

To check the status of the Tomcat service, execute the following command:

systemctl status tomcat8

You should get the following output:

[root@host ~]# systemctl status tomcat8
● tomcat8.service
     Loaded: loaded (/etc/systemd/system/tomcat8.service; disabled; preset: disabled)
     Active: active (running) since Sun 2023-11-19 14:25:10 CST; 2min 21s ago
    Process: 7503 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
   Main PID: 7510 (java)
      Tasks: 28 (limit: 23116)
     Memory: 155.7M
        CPU: 8.996s
     CGroup: /system.slice/tomcat8.service
             └─7510 /usr/lib/jvm/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager>

Nov 19 14:25:10 host.test.vps systemd[1]: Starting tomcat8.service...
Nov 19 14:25:10 host.test.vps startup.sh[7503]: Tomcat started.
Nov 19 14:25:10 host.test.vps systemd[1]: Started tomcat8.service.

Step 4. Install MariaDB database server

To install the MariaDB database server, execute the following command:

dnf install mariadb-server -y

After installation, start and enable the service:

sudo systemctl start mariadb && sudo systemctl enable mariadb

To check the status of the service execute the following command:

sudo systemctl status mariadb

You should get the following output:

[root@host ~]# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.5 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
     Active: active (running) since Sun 2023-11-19 14:33:59 CST; 49s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 8446 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 16 (limit: 23116)
     Memory: 75.5M
        CPU: 670ms
     CGroup: /system.slice/mariadb.service
             └─8446 /usr/libexec/mariadbd --basedir=/usr

Step 5. Create a MariaDB database and User

Now, we need to create a database and user for our XWiki installation. To do that, login to the MariaDB console with the mysql command and execute the following queries:

MariaDB [(none)]> CREATE DATABASE xwiki default character set utf8mb4 collate utf8mb4_bin;
MariaDB [(none)]> CREATE USER 'xwiki'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
MariaDB [(none)]> GRANT all privileges on *.* to xwiki@localhost;
MariaDB [(none)]> EXIT;

Make sure to replace YourStrongPasswordHere with a unique, strong password. Remember it, because we’ll need it later.

Step 6. Download XWiki

Finally, we are at the most important step of the installation. We need to download the XWiki installation, place it into the Tomcat webapps folder, and configure the MariaDB database Java connector.

cd /opt/tomcat/webapps

wget https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-war/15.8/xwiki-platform-distribution-war-15.8.war -O xwiki.war

Next we need to download the MariaDB Java connector and move it into the lib folder of our XWiki application:

wget https://dlm.mariadb.com/3478935/Connectors/java/connector-java-3.3.0/mariadb-java-client-3.3.0.jar

mv mariadb-java-client-3.3.0.jar /opt/tomcat/webapps/xwiki/WEB-INF/lib/

To configure MariaDB, to be the main database server for XWiki, open the following file:

nano /opt/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml

Comment the HSQLDB configuration and uncomment the section for MariaDB configuration:

Save the file and close it.

Now, you can access your XWiki installation at http://YourServerIPAddress:8080/xwiki

Step 7. Finish XWiki Installation

On the first screen, click on the Continue button

In this step, set the administrator username, a strong password and email.

On the third screen, click on the Continue button:

Next choose the wiki to be empty and hit on the Continue button:

On the last window click on the Continue button as well:

Congratulations! You successfully installed XWiki on AlmaLinux 9 with the MariaDB java connector:

Of course, you don’t have to spend your time installing XWiki on AlmaLinux 9 if you have a managed Linux server support plan with us. If you do, you can simply ask our support team to install XWiki on AlmaLinux 9 for you. They are available 24/7 and will be able to help you with the installation of XWiki as well as any additional requirements that you may have.

PS. If you liked this post, please share it with your friends on social networks, or simply leave a reply below if this guide worked for you. Thanks.

The post How to Install XWiki on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/feed/ 0
How to Install Jellyfin Media Server on Debian 12 https://linuxhostsupport.com/blog/how-to-install-jellyfin-media-server-on-debian-12/ https://linuxhostsupport.com/blog/how-to-install-jellyfin-media-server-on-debian-12/#respond Fri, 15 Dec 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1957 Jellyfin is a free and open-source media server solution that allows you to control and manage your streaming media. In this tutorial, we will show you how to install Jellyfin on Debian 12. Jellyfin is an alternative to the proprietary Emby and Plex, designed to provide media from a server to end-user devices through a […]

The post How to Install Jellyfin Media Server on Debian 12 appeared first on LinuxHostSupport.

]]>
Jellyfin is a free and open-source media server solution that allows you to control and manage your streaming media. In this tutorial, we will show you how to install Jellyfin on Debian 12.

Jellyfin is an alternative to the proprietary Emby and Plex, designed to provide media from a server to end-user devices through a number of client applications. Media content can be accessed through specialized Jellyfin applications, extensions designed for various streaming platforms, a web interface, or by means of DLNA uPnP streaming to a wide range of compatible devices. Let’s start with the installation.

Prerequisites

  • A Debian 12 server or VPS
  • SSH access with sudo privileges, or root access.

Step 1. Log in to your VPS and Update the System

First of all, we need to log in to our Debian 12 VPS through SSH:

ssh root@IP_Address -p Port_number

Replace “root” with a user that has sudo privileges or root if necessary. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port number.

Next, let’s make sure that we’re on Debian 12. You can do that like this:

# lsb_release -a

The command should return an output similar to this:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

Step 2. Install Dependencies

Installing Jellyfin requires some packages. So, before starting, we will install the dependencies on our Debian 12 system. Let’s execute the command below to proceed.

# apt install gnupg curl apt-transport-https ca-certificates -y

Step 3. Add the Jellyfin Repository

There are two ways to install Jellyfin on Debian 12; we can install it using the repository or the deb package. In this tutorial, we are going to use the repository to install Jellyfin on Debian 12.

# curl -fsSL https://repo.Jellyfin.org/Jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/Jellyfin.gpg

Then, we’ll create our Jellyfin source list.

# nano /etc/apt/sources.list.d/Jellyfin.sources

Insert the following into the file.

Types: deb
URIs: https://repo.Jellyfin.org/debian
Suites: bookworm
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/Jellyfin.gpg

Save the file then exit from the editor.

Next, we need to update the package index files on the system.

# apt update

Step 4. Install Jellyfin

After adding the Jellyfin repository and updating the package index files in the previous step, we should be able to install Jellyfin from its repository now. Simply execute this command below.

# apt install jellyfin -y

Once installed, Jellyfin should be up and running on a Debian 12, you can verify this by executing the command below.

# systemctl status Jellyfin

The command should return an output similar to this:

root@debian12:~# systemctl status jellyfin
● jellyfin.service - Jellyfin Media Server
     Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/Jellyfin.service.d
             └─jellyfin.service.conf
     Active: active (running) since Mon 2023-10-16 04:59:06 CDT; 2min 19s ago
   Main PID: 590854 (Jellyfin)
      Tasks: 15 (limit: 2306)
     Memory: 183.4M
        CPU: 28.848s
     CGroup: /system.slice/jellyfin.service
             └─590854 /usr/bin/Jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin-ff>

Oct 16 04:59:33 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:33] [INF] ServerId: c580665228f148dc8e24e556ee48d263
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Executed all pre-startup entry points in 0:00:00.430609
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Core startup complete
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] StartupTrigger fired for task: Update Plugins
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Queuing task PluginUpdateTask
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Executing Update Plugins
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Executed all post-startup entry points in 0:00:00.7256918
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Startup complete 0:00:25.7226079
Oct 16 04:59:36 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:36] [INF] Update Plugins Completed after 0 minute(s) and 2 seconds
Oct 16 04:59:36 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:36] [INF] ExecuteQueuedTasks

You should be able to access Jellyfin at http://YOUR_SERVER_IP_ADDRESS:8096

Step 5. Install and Configure Nginx

To access Jellyfin using your domain or subdomain, we need to install and configure a reverse proxy. In this step, we will install Nginx and create an Nginx server block for our Jellyfin website.

# apt install nginx

Once installed, we can create a new configuration file.

# nano /etc/nginx/sites-enabled/Jellyfin.yourdomain.com.conf

Insert the following into the file.

upstream jellyfin {
 server 127.0.0.1:8096;
}

server {
      listen 80;
      server_name jellyfin.yourdomain.com;

      access_log /var/log/nginx/jellyfin.access.log;
      error_log /var/log/nginx/jellyfin.error.log;

    resolver 127.0.0.1 valid=30;

    
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";


    location / {
        
        proxy_pass http://jellyfin;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;

        proxy_buffering off;
    }

    
    location = /web/ {
        
        proxy_pass http://jellyfin/web/index.html;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }

    location /socket {
        
        proxy_pass http://jellyfin/socket;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }
}

Do not forget to replace jellyfin.yourdomain.com with your actual domain or subdomain name which is already pointing to your server IP address. Then, save the file, exit, and restart Nginx.

# systemctl restart nginx

At this point, you should be able to access your Jellyfin website at http://jellyfin.yourdomain.com

Choose your language then click on the Next button.

In this step, we can create a new account. Fill in the blanks with your preferred values, then click Next to proceed.

In this step, you can create a media library or simply hit the Next button to skip it.

Here, you can choose your language then country, and click Next to continue.

Check the “Allow remote connections to this server” then click Next.

Click Finish, then you will be brought to the login page.

Log in using the credentials you created earlier to access the backend.

Once logged, in you can navigate to the dashboard and customize your Jellyfin installation.

Congratulations! You have successfully installed Jellyfin on Debian 12.

Of course, if you are one of our Managed Linux Support customers, you don’t have to install Jellyfin on Debian 12 yourself – simply ask our admins, sit back, and relax. Our support team will install Jellyfin on Debian 12 for you immediately without any additional fee, along with anything else you need.

If you liked this post about how to install Jellyfin on Debian 12, please share it with your friends on social networks using the share buttons, or simply leave a comment in the comments section. Thanks.

The post How to Install Jellyfin Media Server on Debian 12 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-jellyfin-media-server-on-debian-12/feed/ 0
How to Install Bugzilla on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/#respond Wed, 15 Nov 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1938 Bugzilla is an open-source software for tracking bugs developed by Mozilla’s developers. It is written in Perl and supports various database systems such as MySQL, PostgreSQL, Oracle, and SQLite. Bugzilla’s system requirements include a compatible database management system, a suitable release of Perl 5, an assortment of Perl modules, a compatible web server, and a […]

The post How to Install Bugzilla on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Bugzilla is an open-source software for tracking bugs developed by Mozilla’s developers. It is written in Perl and supports various database systems such as MySQL, PostgreSQL, Oracle, and SQLite.

Bugzilla’s system requirements include a compatible database management system, a suitable release of Perl 5, an assortment of Perl modules, a compatible web server, and a qualified mail transfer agent.

Installing Bugzilla on Ubuntu 22.04 is a straightforward process and may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as the OS
  • At VPS with at least 4 GB of RAM available
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Since we have a fresh installation of Ubuntu 22.04, we need to update the packages to the latest versions available:

sudo apt update -y && sudo apt upgrade -y

Step 2. Install Perl

Bugzilla is written in Perl, so we need to install it along with of its dependencies.

sudo apt install build-essential libappconfig-perl libdate-calc-perl libtemplate-perl libmime-tools-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libfile-which-perl libauthen-sasl-perl libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libgd-dev libmysqlclient-dev graphviz sphinx-common rst2pdf libemail-address-perl libemail-reply-perl -y

After successful installation, check the installed Perl version:

perl --version

You should get output similar to this:

root@host:~# perl --version

This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

Step 3. Install MariaDB Database

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server -y

Start the MariaDB service and enable it to run at system startup with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the MariaDB service like so:

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 06:50:23 CDT; 18min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 88311 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 7 (limit: 4558)
     Memory: 59.4M
        CPU: 1.625s
     CGroup: /system.slice/mariadb.service
             └─88311 /usr/sbin/mariadbd

Step 4. Create Bugzilla database and user

To create the BugZilla database and user, log into the MariaDB command line as the root user:

mysql -u root -p

Then press [Enter] if you have not set a root password for MariaDB. Once logged in, execute the following commands on the MariaDB command line:

 CREATE USER 'bugzilla'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE bugzilla;
 GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzilla'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

With that done, you should now have a database and user ready for Bugzilla.

Step 5. Install Apache2 Webserver

We are going to use Apache as a web server in this tutorial. To install it, execute the command below:

sudo apt install apache2 -y

After successful installation, start and enable the service:

sudo systemctl start apache2 && sudo systemctl enable apache2

To check if everything is OK, execute the following command for the status of the Apache2 service:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 06:52:26 CDT; 25min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 93179 (/usr/sbin/apach)
      Tasks: 6 (limit: 4558)
     Memory: 13.3M
        CPU: 308ms
     CGroup: /system.slice/apache2.service

Step 6. Install Bugzilla

Download the latest stable version of Bugzilla into the Apache document root.

cd /var/www/html
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz

Once downloaded, extract the bugzilla directory.

tar -xvf bugzilla-5.0.6.tar.gz -C /var/www/html/

mv bugzilla-5.0.6 bugzilla 

Once this is done, go into the “bugzilla” directory and run the checksetup script to check your system’s setup.

cd /var/www/html/bugzilla/

./checksetup.pl

If there are missing modules, you need to execute the following command:

/usr/bin/perl install-module.pl --all

Now, if you execute the ./checksetup.pl it will return the following output:

There was an error connecting to MySQL:

    Access denied for user 'bugs'@'localhost' (using password: NO)

This is normal and expected because we haven’t set up the configuration file yet. Open the file /var/www/html/bugzilla/localconfig with your preferred text editor and edit it to look like this:

$webservergroup = 'www-data';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bugzilla';
$db_pass = 'YourStrongPasswordHere';
$db_port = 0;

Save the file and close it. After these settings are done run the ./checksetup.pl again.

./checksetup.pl

It should return back with no errors.

Next is to define your administrator’s email, username and password once the database connection is successful.

Enter the e-mail address of the administrator: admin@yourdomain.com
Enter the real name of the administrator: admin
Enter a password for the administrator account:
Please retype the password to verify:
admin@yourdomain.com is now set up as an administrator.
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.

Step 7. Create a Virtual Host configuration file

To access the Bugzilla Web interface, you need to create a virtual host configuration file where you can define your domain, document root, and some script parameters.

First, create the configuration file with the following command:

touch /etc/apache2/sites-available/bugzilla.conf

Open the file, and paste the following lines of code:

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/bugzilla/

<Directory /var/www/html/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options AuthConfig
</Directory>

ErrorLog /var/log/apache2/yourdomain.com.error_log
CustomLog /var/log/apache2/yourdomain.com.access_log common
</VirtualHost>

Make sure to replace yourdomain.com with the actual domain name you plan on using.

Enable the Apache2 configuration file and other modules:

sudo a2ensite bugzilla.conf

sudo a2enmod headers env rewrite expires cgi

Check the syntax of the Apache2 configuration.

apachectl -t

You should receive the following output:

root@host:~# apachectl -t
Syntax OK

If you receive this output, you can safely restart the Apache service.

sudo systemctl restart apache2

With all of this finally configured, you can now access the Bugzilla Web interface at http://YourDomain.com.

Congratulations! You successfully installed and configured Bugzilla on Ubuntu 22.04. Of course, if you use one of our Linux server support services, you do not have to do this on your own – you can always contact our technical support and they will do the rest for you. We are available 24/7.

If you liked this post on how to install Bugzilla on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Bugzilla on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/feed/ 0
How to Install Go on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/#comments Sun, 15 Oct 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1899 Golang, also known as Go, is a modern programming language developed by Google in 2007 to improve its programming productivity. Go is open-source, and it is getting more and more popular and used in many applications such as Docker, Kubernetes, and static generators like Hugo. This language is well-designed to be used by professionals for […]

The post How to Install Go on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Golang, also known as Go, is a modern programming language developed by Google in 2007 to improve its programming productivity.

Go is open-source, and it is getting more and more popular and used in many applications such as Docker, Kubernetes, and static generators like Hugo.

This language is well-designed to be used by professionals for application development. Go is easy to create and maintain, making it an ideal programming language for building efficient software. Go is reliable, easy to build, and has efficient software that scales fast. In this tutorial, we will show you how to install Go on Ubuntu 22.04.

Prerequisites

  • Ubuntu 22.04
  • SSH access with root privileges or a regular system user with sudo privileges

Step 1. Log in to the server

First, log in to your Ubuntu 22.04 server through SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace “IP_Address” and “Port_number” with your server’s IP address and SSH port number, respectively. Additionally, replace “root” with the username of the system user with sudo privileges.

You can check whether you have the proper Ubuntu 22.04 version installed on your server with the following command:

# lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

# apt update -y

Step 2. Install Go

There are several methods of installing Go on Ubuntu 22.04. The first option is to install Go from the default Ubuntu 22.04 repository. The second option is to download the Go binary provided by their developer. And the third option is to install it from the source.

To install it from the default Ubuntu repository, we can simply execute this command to install Go.

# apt install golang-go

At the time of this writing, you will get Go version 1.18.1 after installing it from the Ubuntu repository; we can check it by running the command below.

# go version

The second method is to install Go by using the binary package. If you want the more recent version of Go and install it the easier way, we can download the binary distribution from the Go website. You can check and get the download link from their website at https://go.dev/dl/; let’s download Go now.

# wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz -O go.tar.gz

Once downloaded, we need to extract the file.

# tar -C /usr/local -xzvf go.tar.gz

The command above will extract the files and you should see the directory /usr/local/go/. So, at this moment, you can access the go executable at /usr/local/go/bin/go.

Next, we need to tell our system where to find the Go binary file. To do this, we need to set the PATH environment variable. We need to add a path to the ~/.profile or ~/.bashrc file for the current user.

# nano ~/.profile

Then, append these lines to the file:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Don’t forget to save the file and then load the new PATH variables into the current shell by running the following command.

# source ~/.profile

At this point, you can simply type ‘go’ every time you need to call /usr/local/bin/go. For example, let’s check the Go version:

# go version

The version of Go installed on your Ubuntu system will be displayed on the terminal. It will show you an output like this:

go version go1.21.0 linux/amd64

Step 3. Use Go

Once Go is downloaded and configured, it is time to test it. In this case, we will run a simple code written in the Go language to check if the environment is working on our Ubuntu 22.04 system. Let’s create a file.

# nano sample.go

Then, insert the following into the file.

package main
import "fmt"
func main() {
fmt.Printf("Hello World\n")
}

Save the file, then exit. Next, execute this command to run the script.

# go run sample.go

The command will return an output like this:

That’s it. You have successfully installed Go on your Ubuntu 22.04 system.

Of course, you don’t need to install Go on Ubuntu 22.04 VPS if you are using one of our Ubuntu VPS plans, which you can ask Linux experts to install Go on Ubuntu 22.04 system for you. Our administrators are available 24/7 and will start working on your request immediately; always trust our epic support.

PS. If you liked this article on how to install Go on Ubuntu 22.04, share it with your friends on social media or leave a comment in the comment section.

The post How to Install Go on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/feed/ 1
How to Install Contao on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/#comments Sat, 30 Sep 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1873 Contao is a robust open-source content management system that is user-friendly, instinctive, and adaptable, and it enables you to develop websites in various languages and designs. Contao can also be incorporated into a standard Symfony application. In this guide, we will demonstrate how to set up Contao on Ubuntu 22.04. Prerequisites Step 1. Log in […]

The post How to Install Contao on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Contao is a robust open-source content management system that is user-friendly, instinctive, and adaptable, and it enables you to develop websites in various languages and designs.

Contao can also be incorporated into a standard Symfony application. In this guide, we will demonstrate how to set up Contao on Ubuntu 22.04.

Prerequisites

  • An Ubuntu 22.04 VPS
  • SSH root access or a regular system user with sudo privileges

Step 1. Log in via SSH

Let’s log in to your Ubuntu 22.04 VPS with SSH as a root user or as a regular user with sudo privileges.

ssh root@IP_Address -p Port_number

If you cannot log in as root, remember to replace “root” with a user that has sudo privileges. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port.

You can check whether you have the correct Ubuntu version installed on your server with the following command:

# lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Step 2. Install and Configure Apache

Contao was initially created for the well-known LAMP stack, but it can operate on any web server that offers an up-to-date edition of PHP and MySQL. In this step, we are going to install Apache as the webserver. Let’s install Apache now.

# apt install apache2

On Ubuntu machines, Apache will automatically start upon installation. To verify this, you can execute the command below.

# systemctl status apache2

You will see the status there, apache is functioning.

Contao requires mod_rewrite, and the rewrite module is not enabled by default, let’s enable it now.

# a2enmod rewrite

After enabling a module, we need to restart apache to activate the new configuration.

# systemctl restart apache2

Now, let’s create two directories for our Contao installation.

# mkdir -p /var/www/html/yourdomain.com/{web,contao-manager}

Then, let’s give them the appropriate permission.

# chown -R www-data. /var/www/html/yourdomain.com/

The next step is to create an apache virtual host.

# nano /etc/apache2/sites-available/yourdomain.com.conf

Then add the following in to the file

<VirtualHost *:80>

ServerAdmin admin@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/html/yourdomain.com/web

ErrorLog ${APACHE_LOG_DIR}/yourdomain.com_error.log
CustomLog ${APACHE_LOG_DIR}/domain2.com_access.log combined

<Directory  /var/www/html/yourdomain.com/web>
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

Save the file, then exit. Make sure to replace yourdomain.com with your actual domain name or subdomain name pointing to your server.

Once the virtual host is added, we need to activate it.

# a2ensite yourdomain.com

Then, restart or reload apache

# systemctl restart apache2

Step 3. Install MariaDB Server

Contao supports MySQL server version 8.0+ or equivalent MariaDB server. In this step, we are going to install the MariaDB server from the default Ubuntu repository. To install the MariaDB server, execute this command below:

# apt install mariadb-server

That’s it, the MariaDB server should be up and running now.

Step 4. Create a Database

After installing the MariaDB server on an Ubuntu system, the MariaDB server will run automatically. Therefore, we can now create a new database and database user for our Contao website. Let’s log in to MySQL shell as root users and create a database for our Contao website.

# mysql

Once logged in to MySQL shell, we can run the following commands.

mysql> CREATE DATABASE contao;
mysql> GRANT ALL on contao.* to contao@localhost identified by 'm0d1fyth15';
mysql> FLUSH PRIVILEGES;
mysql> \q

Make sure to create a more complicated database password, and replace m0d1fyth15 in the command above with a more secure one.

The next step is optional but highly recommended. We need to create a password for our MySQL root user. Let’s invoke this command to proceed.

Step 5. Install Composer

Contao utilizes Composer, a tool for managing dependencies, as the officially endorsed approach for installation. Let’s execute the following command below to download the Composer installer using wget command:

# wget -O composer-setup.php https://getcomposer.org/installer

Once downloaded, we need to execute the following command to install and setup composer on our Ubuntu machine:

# php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Verify the installation and check the installed build version of Composer:

# composer -V

The command above will return an output like this.

Composer version 2.5.8 2023-06-09 17:13:21

Step 6. Install PHP

Contao requires at least PHP 7.4, and specifically for Contao 5, PHP Version 8.1.0 or higher is required. On the Ubuntu 22.04 system, PHP 8.1 is the lowest version we can install. Let’s install PHP and its extensions from the Ubuntu repository.

# apt install php-{xml,pear,intl,common,json,curl,mbstring,mysql,gd,imagick,zip,opcache} libapache2-mod-php

Step 7. Install Contao

There are two methods to install Contao on your server, using Contao Manager and using the command line. In this tutorial, we will show you how to install Contao using Contao Manager.

First, let’s enter /var/www/html/domain1.com/web

# cd /var/www/html/domain1.com/web
# sudo -u www-data wget https://download.contao.org/contao-manager/stable/contao-manager.phar -O contao-manager.phar.php

Navigate to http://yourdomain.com/contao-manager.phar.php

Click on Create Account button

Click on the Setup button to install Contao

Click on Get Started button

Click Continue

Select distribution, we are going to install version 5.1; click Install

Please wait while the Contao Manager is running task operations in the background.

Once completed, you will be presented with a database configuration page.

Please fill the forms with the database details we created in the previous step in this tutorial. , make sure to choose MariaDB in the Server Version dropdown menu. Click the Save button to save the config.

Click on Check database

Now, click on the Execute button to create database tables, and once completed, click on the Confirm & Close button.

You will be brought to this page

Click on Continue to create a new account

Click on Add Account

That’s it! You have installed Contao on Ubuntu 22.04. You can click on Login to Contao to start using Contao

Login using the account credentials you created a moment ago.

You are logged in now, and you can start customizing your Contao website.

Congratulations! You have successfully installed Contao on Ubuntu 22.04.

Of course, if you are one of our Ubuntu Hosting customers, you don’t have to install Contao on Ubuntu 22.04 yourself – simply ask our admins, sit back, and relax. Our admins will install Contao on Ubuntu 22.04 for you immediately without any additional fee, along with many useful optimizations that we can do for you. Managing a Contao-based website is not just about the installation; we can help you with optimizing your Contao installation if you have an active VPS with us.

If you liked this post about how to install Contao on Ubuntu 22.04, please share it with your friends on social networks or simply leave a comment in the comments section. Thanks.

The post How to Install Contao on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/feed/ 2
How to Set Up an OpenVPN Server on Debian 11 https://linuxhostsupport.com/blog/how-to-set-up-an-openvpn-server-on-debian-11/ https://linuxhostsupport.com/blog/how-to-set-up-an-openvpn-server-on-debian-11/#respond Wed, 30 Aug 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1858 OpenVPN is a well-known VPN protocol that secures your connection when accessing the internet. It is a tool that lets you browse the internet world with some level of anonymity. OpenVPN is an open-source network protocol to facilitate a secure connection between two points in a network. In this tutorial, we will show you how […]

The post How to Set Up an OpenVPN Server on Debian 11 appeared first on LinuxHostSupport.

]]>
OpenVPN is a well-known VPN protocol that secures your connection when accessing the internet. It is a tool that lets you browse the internet world with some level of anonymity.

OpenVPN is an open-source network protocol to facilitate a secure connection between two points in a network. In this tutorial, we will show you how to install OpenVPN on the Debian 11 server.

Prerequisites

  • A Debian 11 VPS
  • SSH root access or a user with sudo privileges

Step 1. Log in to your server via SSH

First, you will need to log in to your Debian 11 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.

You can check whether you have the proper Debian 11 installed on your server with the following command:

# lsb_release -a

The command will show you an output like this.

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Then, run the following command to make sure that all installed packages on the server are updated to their latest available versions:

# apt update

Step 2. Install OpenVPN Server

OpenVPN server packages are available in the default Debian 11 repository. But, in this article, we will use a shell script we can download from github.com to install the OpenVPN server. The installation is fairly easy and straightforward. Let’s download the script and proceed with the OpenVPN Server installation.

# wget https://git.io/vpn -O openvpn-install.sh

The installation script has been downloaded and saved as openvpn-install.sh; let’s execute the file and proceed with the installation.

# bash openvpn-install.sh

After the executable is executed, you will be prompted for a few options. Select UDP as the protocol, port 1194, and choose your favorite DNS resolver and the VPN client name.

Welcome to this OpenVPN road warrior installer!

Which protocol should OpenVPN use?
1) UDP (recommended)
2) TCP
Protocol [1]: 1

What port should OpenVPN listen to?
Port [1194]:

Select a DNS server for the clients:
1) Current system resolvers
2) Google
3) 1.1.1.1
4) OpenDNS
5) Quad9
6) AdGuard
DNS server [1]: 3

Enter a name for the first client:
Name [client]: vpnclient

OpenVPN installation is ready to begin.
Press any key to continue…

At this point, we can press any keyboard key to start the installation. It will finish in a few seconds, depending on your network speed.

Once installed, the OpenVPN service will be automatically up and running. You will see a message about where the .ovpn file you can download.

Step 3. Connecto to OpenVPN Server

A VPN client is required to connect to our OpenVPN server. If you are using a Windows machine, you can use OpenVPN Client or Tunnelblick if you are using a MacOS device. For Linux desktops users, you can use the openvpn client file to import the network configuration file and then connect to your VPN server.

In this tutorial, we created ‘vpnclient’ as a VPN user, and the installation script generated the configuration file at /root/vpnclient.ovpn. We can download this file to connect to our OpenVPN server.

The client configuration is available in: /root/vpnclient.ovpn
New clients can be added by running this script again.

Download the file or print the file using the cat command, then create a .ovpn using the file’s content. Then, simply double-click on it to start using the VPN client.

Step 4. Create Additional OpenVPN Users

To create new VPN users, simply execute the installation script, and the script will ask you one of the options.

OpenVPN is already installed.

Select an option:
1) Add a new client
2) Revoke an existing client
3) Remove OpenVPN
4) Exit
Option:

Choose number 1, then ENTER. You will be asked for a client name. And it will show you an output like this.

* Using Easy-RSA configuration:
  /etc/openvpn/server/easy-rsa/pki/vars

* Using SSL: openssl OpenSSL 1.1.1n  15 Mar 2022

Generating a RSA private key
............................+++++
............+++++
writing new private key to '/etc/openvpn/server/easy-rsa/pki/5e4b9ee0/temp.1.1'
-----

Notice
------
Keypair and certificate request completed. Your files are:
* req: /etc/openvpn/server/easy-rsa/pki/reqs/rosehosting.req
* key: /etc/openvpn/server/easy-rsa/pki/private/rosehosting.key 

Using configuration from /etc/openvpn/server/easy-rsa/pki/5e4b9ee0/temp.4.1
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'rosehosting'
Certificate is to be certified until Jun 16 07:27:20 2033 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated

Notice
------
Certificate created at:
* /etc/openvpn/server/easy-rsa/pki/issued/rosehosting.crt

Notice
------
Inline file created:
* /etc/openvpn/server/easy-rsa/pki/inline/rosehosting.inline


rosehosting added. Configuration available in: /root/rosehosting.ovpn

That’s it! You have successfully installed the OpenVPN server the easy way. You can now add more users and use the VPN network for your activity.

Check out a more complicated installation without a script.

Of course, you don’t have to install OpenVPN server on Debian 11 if you use one of our Debian Hosting services, in which case you can simply ask our admins, sit back, and relax. Our admins will install and set up OpenVPN on Debian 11 immediately without any additional fee, along with many useful optimizations we can do for you. Managing an OpenVPN server is not just about the installation; we can help you optimize your OpenVPN installation if you have a VPS with us.

PS. If you liked this post on how to set up an OpenVPN Server on Debian 11, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Set Up an OpenVPN Server on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-set-up-an-openvpn-server-on-debian-11/feed/ 0
How to Install Anaconda on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/#respond Tue, 15 Aug 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1854 Anaconda is an open-source environment and package manager, also a distribution of the Python programming language specifically designed for data science and machine learning tasks. One of the main advantages of Anaconda is its extensive library support. It includes popular libraries such as NumPy, Pandas, SciPy, Matplotlib, scikit-learn, and many others. These libraries are widely […]

The post How to Install Anaconda on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Anaconda is an open-source environment and package manager, also a distribution of the Python programming language specifically designed for data science and machine learning tasks.

One of the main advantages of Anaconda is its extensive library support. It includes popular libraries such as NumPy, Pandas, SciPy, Matplotlib, scikit-learn, and many others.

These libraries are widely used for numerical computing, data manipulation, visualization, machine learning, and other data-related tasks. Another key feature of Anaconda is its support for creating isolated environments. Environments allow you to create separate Python environments with specific versions of Python and libraries, ensuring project reproducibility and avoiding conflicts between different packages and versions. This feature is particularly useful when working on multiple projects with different requirements.

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Download the Anaconda installer

To download Anaconda from the anaconda repo, you can use the following command:

$ wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh

Please note, at the time of writing this article, the 2023.03-1 was the latest anaconda version available; you can check for the latest version at the anaconda repo.

Now you can rename the installation script to a shorter name, for example, anaconda.sh:

$ mv Anaconda3-2023.03-1-Linux-x86_64.sh anaconda.sh

To check the integrity of this installer file, you can use the following command for hash verification with SHA-256 checksum:

$ sha256sum anaconda.sh

95102d7c732411f1458a20bdf47e4c1b0b6c8a21a2edfe4052ca370aaae57bab anaconda.sh

The installer file is verified; now, you are ready to run the installer.

Step 2. Install Anaconda

To start the anaconda installation, run the command below in the directory where you downloaded the installer:

$ bash anaconda.sh

You will receive this output with several questions, which you should confirm and choose the location where you want to install Anaconda.

Welcome to Anaconda3 20223.03

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue

You can press ENTER to continue the installation, next you will have go through the license and approve the license terms with yes:

The next step is to specify the location for the anaconda3 installation, you enter a new location or use the default one.

Anaconda3 will now be installed into this location:
/home/user/anaconda3

Press ENTER to confirm the location

Press CTRL-C to abort the installation

Or specify a different location below

[/home/user/anaconda3] >>>

Once the installation is completed, you can use the following command to activate the installation:

$ source ~/.bashrc

Step 3. Using Anaconda

Anaconda has its own package manager called “conda,” which allows users to install, update, and manage packages and dependencies easily. Conda helps to ensure that all the required libraries and dependencies for a particular project are installed correctly and compatible, thus simplifying the setup process.
To list installed packages, you can type:

$ conda list

To install new Python packages, use conda install and the name of the package:

(base) user@server:$ conda install numpy

You should receive the following output:


Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: /home/ec2-user/anaconda3

added / updated specs:
- numpy

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
intel-openmp-2023.1.0      |   hdb19cb5_46305        17.1 MB
mkl-2023.1.0               |   h6d00ec8_46342       171.5 MB
mkl-service-2.4.0          |  py310h5eee18b_1          54 KB
mkl_fft-1.3.6              |  py310h1128e8f_1         207 KB
mkl_random-1.2.2           |  py310h1128e8f_1         284 KB
numpy-1.24.3               |  py310h5f9d8c6_1          11 KB
numpy-base-1.24.3          |  py310hb5e798b_1         6.2 MB
tbb-2021.8.0               |       hdb19cb5_0         1.6 MB
------------------------------------------------------------
                                       Total:       197.1 MB

The following NEW packages will be INSTALLED:

blas pkgs/main/linux-64::blas-1.0-mkl
intel-openmp pkgs/main/linux-64::intel-openmp-2023.1.0-hdb19cb5_46305
mkl pkgs/main/linux-64::mkl-2023.1.0-h6d00ec8_46342
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py310h5eee18b_1
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.6-py310h1128e8f_1
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py310h1128e8f_1
numpy pkgs/main/linux-64::numpy-1.24.3-py310h5f9d8c6_1
numpy-base pkgs/main/linux-64::numpy-base-1.24.3-py310hb5e798b_1
tbb pkgs/main/linux-64::tbb-2021.8.0-hdb19cb5_0

Proceed ([y]/n)? y

This will install the new conda package. You can also use the pip command to install some python packages or check the already installed python packages with pip list.

You can easily create Anaconda Environments using the following command:

$ conda create --name new-env

To specify which version you want python to be in this conda environment, you can use the command:

$ conda create -n env38 python=3.8

Once the environment has been created, you can activate it with the command:

$ conda activate env38

If you now check the Python version, you will notice that it is the Python 3.8 version, the one you specified previously.

$ python3 --version
Python 3.8.16

You can exit this environment with the command:

$ conda deactivate

Congratulations! You successfully installed Anaconda on Ubuntu 22.04. If you have any difficulties with the installation process, you can contact our technical support, and they will install and configure Anaconda for you. We are available 24/7. All you need to do is sign up for one of our NVMe VPS plans and submit a support ticket.

The post How to Install Anaconda on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/feed/ 0
How to Install Icinga 2 on Ubuntu https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/ https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/#comments Fri, 30 Jun 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1799 In this tutorial, we are going to explain in step-by-step detail how to install Icinga 2 on Ubuntu 22.04 Icinga is a free and open-source monitoring tool used for sending alerts when failures occur on the servers. Icinga is written in C++ and PHP and stores the information in the MySQL database. It offers many […]

The post How to Install Icinga 2 on Ubuntu appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install Icinga 2 on Ubuntu 22.04

Icinga is a free and open-source monitoring tool used for sending alerts when failures occur on the servers. Icinga is written in C++ and PHP and stores the information in the MySQL database. It offers many features, such as modern user interface database connectors for MySQL, PostgreSQL, Oracle, REST API, etc. In this blog post, we will install Icinga 2 with the LAMP stack.

Installing Icinga 2 with LAMP stack is a process that may take up to 30 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start to install the software, we need to update the system packages to the latest versions available.

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install LAMP stack

First of the LAMP stack is the Apache Web server. To install it execute the following command:

sudo apt install apache2 -y

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-04-22 18:00:43 CDT; 17min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 792 (apache2)
      Tasks: 7 (limit: 4571)
     Memory: 22.5M
        CPU: 246ms
     CGroup: /system.slice/apache2.service

Next is PHP, along with its extensions. To install the PHP8.1 along with extensions, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl libapache2-mod-php

The last of the LAMP stack is the MariaDB database server. To install it execute the command below.

sudo apt install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-04-22 18:19:53 CDT; 9s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 5829 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 16 (limit: 4571)
     Memory: 61.4M
        CPU: 514ms
     CGroup: /system.slice/mariadb.service
             └─5829 /usr/sbin/mariadbd

Step 3. Install Icinga 2

First, we will add the GPG key, and will create a repository:

wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg

. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list

Update the system and install Icinga2

sudo apt update -y

sudo apt install icinga2 -y

After installation, start and enable the icinga2 service.

sudo systemctl start icinga2 && sudo systemctl enable icinga2

Check the status of Icinga 2:

sudo systemctl status icinga2

You should get the following output:

root@host:~# sudo systemctl status icinga2
● icinga2.service - Icinga host/service/network monitoring system
     Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/icinga2.service.d
             └─limits.conf
     Active: active (running) since Sat 2023-04-22 19:06:11 CDT; 4min 35s ago
   Main PID: 11632 (icinga2)
     Status: "Startup finished."
      Tasks: 16
     Memory: 14.3M
        CPU: 435ms
     CGroup: /system.slice/icinga2.service

Step 4. Install the Icinga2 IDO Module

To install the Icinga2 IDO module, execute the following command:

sudo apt install icinga2-ido-mysql -y

While installing, choose Yes on both windows. It is about Icinga2 using MySQL.

After this, we need to create an icinga2-ido-mysql database with the following commands:

CREATE DATABASE icinga_ido_db;
GRANT ALL ON icinga_ido_db.* TO 'icinga_ido_db'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
FLUSH PRIVILEGES;
EXIT;

Once the database is created, import the Icinga2 IDO schema with the following command:

sudo mysql -u root -p icinga_ido_db < /usr/share/icinga2-ido-mysql/schema/mysql.sql

Once the schema is imported, the next is to enable the Icinga2 IDO module:

nano /etc/icinga2/features-available/ido-mysql.conf

Paste the following lines of code:

/**
 * The db_ido_mysql library implements IDO functionality
 * for MySQL.
 */

library "db_ido_mysql"

object IdoMysqlConnection "ido-mysql" {
  user = "icinga_ido_db",
  password = "YourStrongPasswordHere",
  host = "localhost",
  database = "icinga_ido_db"
}

Save the file, close it and enable the Icinga2-ido-mysql with the following command:

sudo icinga2 feature enable ido-mysql

After this restart the Icinga2 service:

systemctl restart icinga2

Step 5. Install and Setup IcingaWeb2

To install Icinga Web execute the following commands:

sudo apt install icingaweb2 icingacli -y

Next is to create a second database for the Icinga web:

CREATE DATABASE icingaweb2;
GRANT ALL ON icingaweb2.* TO 'icingaweb2'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
FLUSH PRIVILEGES;
EXIT;

Next, we need to create an Icinga token:

root@host:~# sudo icingacli setup token create
The newly generated setup token is: dd3a1a8b218be0db

That was all with installing Icinga via the command line. The last step is about finishing the Icinga installation.

Step 6. Finish Icinga Installation

To finish the Icinga installation, you need to access it at http://YourServerIPaddress/icingaweb2/setup.

Enter the token, and follow the pictures if you want to finish the installation:

Set Administrative user and password:

The last is to set up Icinga2 IDO credentials you set before in Step 4.

Congratulations! You successfully installed and configured Icinga2 on Ubuntu 22.04. If you find any difficulties with installing Icinga 2, you can always contact our technical support. All you have to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7.

If you liked this post about installing Icinga2 on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below.

The post How to Install Icinga 2 on Ubuntu appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/feed/ 3
How to Install Jenkins on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-jenkins-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-jenkins-on-almalinux-9/#respond Tue, 30 May 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1788 In this blog post, we will explain how to install Jenkins on AlmaLinux 9 OS. Jenkins is an open-sourced automation software used to automate the process of the developers. It is used for building, testing, and deploying the apps with the process of continuous integration and continuous delivery. Jenkins is written in Java programming language, […]

The post How to Install Jenkins on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
In this blog post, we will explain how to install Jenkins on AlmaLinux 9 OS.

Jenkins is an open-sourced automation software used to automate the process of the developers. It is used for building, testing, and deploying the apps with the process of continuous integration and continuous delivery. Jenkins is written in Java programming language, running in Java servlet containers such as Apache Tomcat. In this blog post, we will install Jenkins with Apache as a reverse proxy so that you can access it via domain.

Installing Jenkins on AlmaLinux 9 is a straightforward process that may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with AlmaLinux 9 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation of Jenkins, we will update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

To install Java execute the following command::

sudo dnf install java-11-openjdk java-11-openjdk-devel -y

To check the installed Java version, execute the following command:

java -version

You should receive the following output:

[root@host ~]# java -version
openjdk version "11.0.18" 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS, mixed mode, sharing)

Step 3. Install Jenkins

We need to add the Jenkins repo and the GPG key because they are not added by default in the AlmaLinux 9. To do that execute the following commands:

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

Once the repo and key are added, update the system.

sudo dnf update -y

After the update, we can install Jenkins with the following command:

sudo dnf install jenkins -y

To start and enable the Jenkins service to execute the following commands:

sudo systemctl start jenkins && sudo systemctl enable jenkins

To check the status of the Jenkins service, execute the following command:

sudo systemctl status jenkins

You should get the following output:

[root@host ~]# sudo systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
     Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2023-03-14 02:53:37 CDT; 14s ago
   Main PID: 38472 (java)
      Tasks: 53 (limit: 24796)
     Memory: 1.2G
        CPU: 1min 41.195s
     CGroup: /system.slice/jenkins.service
             └─38472 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080

Jenkins is running on port 8080, and you can access it at http://YourIPAddress:8080 to finish the installation.

Step 4. Finish Jenkins Installation

After accessing http://YourIPAddress:8080, you will see this screen without entering a password:

As described in the picture, the initial password can be found by executing the following command on your server:

cat /var/lib/jenkins/secrets/initialAdminPassword

Enter it and hit on the Continue button.

In this window, you can choose to install the suggested plugins or select plugins on your own. We will choose to install the suggested plugins.

The installation will start, and you will need to allow some time to finish.

Once the installation is finished next you need to set up the administrator username, password and email:

The Jenkins URL will be displayed in the next window. Click on Save and Finish.

Now, Jenkins is ready for use. Click on the Start using Jenkins button.

The homepage of Jenkins will be displayed.

Congratulations! You successfully installed Jenkins on AlmaLinux 9. If you find this setup difficult, feel free to contact our technical support via live chat or ticket. We are available 24/7

If you liked this post on how to install Jenkins on AlmaLinux 9, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Jenkins on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-jenkins-on-almalinux-9/feed/ 0
How to Install and Configure Elasticsearch on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-and-configure-elasticsearch-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-and-configure-elasticsearch-on-almalinux/#comments Mon, 15 May 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1790 Elasticsearch is an open-source search engine built on the Apache Lucene library. Elasticsearch was initially released in 2010 and has become the most popular search engine application ever since. People use Elasticsearch for log analytics, full-text search, operational use cases, etc. Magento, as a well-known e-commerce application also uses Elasticsearch as its search engine. In […]

The post How to Install and Configure Elasticsearch on AlmaLinux appeared first on LinuxHostSupport.

]]>
Elasticsearch is an open-source search engine built on the Apache Lucene library. Elasticsearch was initially released in 2010 and has become the most popular search engine application ever since. People use Elasticsearch for log analytics, full-text search, operational use cases, etc.

Magento, as a well-known e-commerce application also uses Elasticsearch as its search engine. In this tutorial, we will show you how to install and configure Elasticsearch on AlmaLinux.

Prerequisites

  • An AlmaLinux VPS with at least 8GB of RAM
  • root SSH access or a regular user with sudo privileges

Step 1: Log in to your server via SSH

First, you will need to log in to your AlmaLinux 8 VPS via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.

You can check whether you have the proper AlmaLinux version installed on your server with the following command:

# cat /etc/almalinux-release

It will return an output like this.

AlmaLinux release 9.1 (Lime Lynx)

In this article, we are using ‘root’ to execute the shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

Step 2: Update the system

Before starting, you have to make sure that all AlmaLinux OS packages installed on the server are up to date. You can do this by running the following commands:

# yum update
# yum upgrade

Step 3. Install Java

Elasticsearch is based on Java, so we need to install it first. We can simply run this command below to install it from the default repository.

# yum install java-11-openjdk java-11-openjdk-devel

Let’s check java version

# java --version

It will show you an output similar to this:

openjdk 11.0.18 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS, mixed mode, sharing)

Step 4. Add repository

In this step, we are going to add the Elasticsearch repository and then install it from the repository. But, there is an issue with importing the Elastic key on AlmaLinux 9, and it is expected for a workaround, you can invoke this command:

# update-crypto-policies --set LEGACY

then reboot the server

Next, create a file called elasticsearch.repo in the /etc/yum.repos.d/ directory

# nano /etc/yum.repos.d/elasticsearch.repo

Paste the following content into that file

[elasticsearch]
name=Elasticsearch repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Save the file, then exit from the editor. Next, let’s update the packages to the latest available version.

# yum update
# yum makecache

Step 5. Install Elasticsearch

Elasticsearch is a memory-intensive application. It requires at least 8GB of RAM to run properly. And in this step, we are going to install it using the repository we added earlier in the previous step. Let’s proceed with the installation.

# yum install elasticsearch

Once installed, the elasticsearch service is not automatically running; let’s execute this command below to run Elasticsearch and enable the service.

# systemctl enable --now elasticsearch

That’s it; Elasticsearch should be up and running now we can verify it by running this command.

# systemctl status elasticsearch

The command will show you an output like this:

[root@almalinux ~]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-03-10 17:30:37 WIB; 54s ago
Docs: https://www.elastic.co
Main PID: 1813 (java)
Tasks: 90 (limit: 10907)
Memory: 1.2G
CPU: 57.850s
CGroup: /system.slice/elasticsearch.service
├─1813 /usr/share/elasticsearch/jdk/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=/usr/share/elasticsearch/bin/elasticsearch -Dcli.libs=lib/too>
├─1872 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -Djava.security.manager=allow -XX:+AlwaysPreTouch>
└─1893 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

Mar 10 17:30:08 almalinux.rosehosting.com systemd[1]: Starting Elasticsearch...
Mar 10 17:30:37 almalinux.rosehosting.com systemd[1]: Started Elasticsearch.

Step 6. Configure Elasticsearch

Elasticsearch has three main configuration files, and you can find them in /etc/elasticsearch directory.

  • elasticsearch.yml for configuring Elasticsearch itself
  • jvm.options for configuring Elasticsearch JVM settings
  • log4j2.properties for configuring Elasticsearch logging

In this step, we are going to modify the elasticsearch.yml file, and the configuration file uses YAML format.

For example, we can edit the listening IP address. By default, Elasticsearch is only accessible on localhost. We can set a different address to expose our Elasticsearch node on the network:

# nano /etc/elasticsearch/elasticsearch.yml

Find this line

#network.host: 192.168.0.1

Uncomment it and modify the IP address. Let’s change it to 0.0.0.0.

network.host: 0.0.0.0

We can also modify the port, it is port 9200 by default, and we can change it to any port we like.

#http.port: 9200

Uncomment and modify the port like this:

http.port: 9222

Save the file, then exit from the editor. Next, restart elasticsearch service.

# systemctl restart elasticsearch

Please note that Elasticsearch uses two ports to listen to external TCP traffic. Port 9200 is used for all API calls over HTTP. This includes search and aggregations and anything else that uses an HTTP request. Port 9300 is a custom binary protocol used for communications between nodes in a cluster.

Congratulations! You have successfully installed Elasticsearch on AlmaLinux 9.

If you are one of our web hosting customers and use our managed Linux Hosting, you don’t have to follow this tutorial and install Elasticsearch on AlmaLinux 9 yourself, our Linux admins will set up and configure an Elasticsearch VPS for you. They are available 24×7 and will take care of your request immediately, and all you need to do is to submit a ticket. We can also help you configure the more complex setup, like configuring Elasticsearch on your Magento website.

PS. If you liked this post, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install and Configure Elasticsearch on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-elasticsearch-on-almalinux/feed/ 2
How To Install Apache Spark on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-apache-spark-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-apache-spark-on-almalinux-9/#respond Sat, 15 Apr 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1777 In this tutorial, we are going to explain in step-by-step detail how to install Apache Spark on AlmaLinux 9 OS. Apache Spark is an open-source unified analytics engine used for data processing large amounts of data. This software stores data in memory and performs the operations very fast using SQL query languages. Apache Spark is […]

The post How To Install Apache Spark on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install Apache Spark on AlmaLinux 9 OS.

Apache Spark is an open-source unified analytics engine used for data processing large amounts of data. This software stores data in memory and performs the operations very fast using SQL query languages. Apache Spark is written in Scala language and is compatible with multiple operating systems such as macOS, Windows, and Linux of course.

Installing Apache Spark and running it as a service is a straightforward process and may take up to 10 minutes. Let’s get things done.

Prerequisites

  • Fresh installation of AlmaLinux 9 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we install Apache Spark we need to update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

The application programming interface is written in Java so we need to install Java with the following command:

sudo dnf install java-11-openjdk -y

After the installation you can check the installed Java version with the following command:

java -version

You should get the following output:

[root@vps ~]# java -version
openjdk version "11.0.18" 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS, mixed mode, sharing)

Step 3. Install Apache Spark

We can not install Apache Spark with the command since it is not included in the default repository of AlmaLinux 9. We need to download it manually and extract it in a directory on the server. To do that execute the following commands:

cd /home

curl -O https://www.apache.org/dyn/closer.lua/spark/spark-3.3.2/spark-3.3.2-bin-hadoop3.tgz

gunzip -c spark-3.2.3-bin-hadoop3.2.tgz | tar xvf -

rm spark-3.2.3-bin-hadoop3.2.tgz

mv spark-3.2.3-bin-hadoop3.2/ spark/ 

Step 4. Create System User

We need to create a system user for Apache Spark. To do that execute the following command:

 useradd useradd sparkuser

Once, created you need to set the right permissions of the Apache Spark document root:

chown -R sparkuser:sparkuser /home/spark

Step 5. Create Service files

Now, we need to create two separate services for Apache Spark. Those services are master and slave services required for Apache Spark to work efficiently. We will start with the master service:

Create the master service file first:

touch /etc/systemd/system/spark-master.service

Open the file with your favorite editor and paste the following lines of codes:

[Unit]
Description=Apache Spark Master
After=network.target

[Service]
Type=forking
User=sparkuser
Group=sparkuser
ExecStart=/home/spark/sbin/start-master.sh
ExecStop=/home/spark/sbin/stop-master.sh

[Install]
WantedBy=multi-user.target

Now, create the slave service file.

touch /etc/systemd/system/spark-slave.service

Open the file with your favorite editor and paste the following lines of codes:

[Unit]
Description=Apache Spark Slave
After=network.target

[Service]
Type=forking
User=sparkuser
Group=sparkuser
ExecStart=/home/spark/sbin/start-slave.sh spark://127.0.0.1:7077
ExecStop=/home/spark/sbin/stop-slave.sh

[Install]
WantedBy=multi-user.target

Once, the files are created reload the daemon and start the services:

sudo systemctl daemon-reload

sudo systemctl start spark-master

sudo systemctl start spark-slave

To check the status of the master service execute the following command:

sudo systemctl status spark-master

You should receive the following output:

[root@host spark]# sudo systemctl status spark-master
● spark-master.service - Apache Spark Master
     Loaded: loaded (/etc/systemd/system/spark-master.service; disabled; vendor preset: disabled)
     Active: active (running) since Sat 2023-02-25 05:45:47 CST; 48s ago
    Process: 1274 ExecStart=/home/spark/sbin/start-master.sh (code=exited, status=0/SUCCESS)
   Main PID: 1286 (java)
      Tasks: 34 (limit: 24796)
     Memory: 242.9M
        CPU: 11.958s
     CGroup: /system.slice/spark-master.service
             └─1286 /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el9_1.x86_64/bin/java -cp "/home/spark/conf/:/home/spark/jars/*" -Xmx1g org.apache.spark.deploy.master.

To check the status of the slave service execute the following command:

sudo systemctl status spark-slave

You should receive the following output:

[root@host spark]# sudo systemctl status spark-slave
● spark-slave.service - Apache Spark Slave
     Loaded: loaded (/etc/systemd/system/spark-slave.service; disabled; vendor preset: disabled)
     Active: active (running) since Sat 2023-02-25 05:45:54 CST; 2min 31s ago
    Process: 1350 ExecStart=/home/spark/sbin/start-slave.sh spark://127.0.0.1:7077 (code=exited, status=0/SUCCESS)
   Main PID: 1363 (java)
      Tasks: 33 (limit: 24796)
     Memory: 178.2M
        CPU: 11.086s
     CGroup: /system.slice/spark-slave.service
             └─1363 /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el9_1.x86_64/bin/java -cp "/home/spark/conf/:/home/spark/jars/*" -Xmx1g org.apache.spark.deploy.worker.

That’s it. Now you can access the Apache Spark service on the following URL: http://YourServerIPAddress:8080.

Congratulations! You successfully installed and configured the Apache Spark service on AlmaLinux 9. If you find any difficulties installing this software and service, you can contact our support. All you need to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7.

The post How To Install Apache Spark on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-apache-spark-on-almalinux-9/feed/ 0