Monday, April 18, 2022

How to Install and Configure RabbitMQ Server on Rocky Linux 8

 in This Tutorial you will Learn " How to Install and Configure RabbitMQ Server on Rocky Linux 8"

RabbitMQ is a free and open-source message broker software solution designed for applications that need to support legacy protocols, such as STOMP and MQTT. It is written in Erlang and can be used in implementing AMQP on modern operating systems. RabbitMQ receives messages from publishers and routes them to consumers. It provides your application with a common platform to send and receive messages. Currently, RabbitMQ is used worldwide by both small startups and large organizations.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install epel-release curl -y
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | bash
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | bash
dnf install erlang -y
dnf install rabbitmq-server -y
systemctl start rabbitmq-server ; systemctl enable rabbitmq-server
rabbitmqctl add_user admin
rabbitmqctl set_user_tags admin administrator
rabbitmqctl list_users
rabbitmqctl add_vhost /new_vhost
rabbitmqctl list_vhosts
rabbitmqctl set_permissions -p /new_vhost admin ".*" ".*" ".*"
rabbitmq-plugins enable rabbitmq_management
systemctl restart rabbitmq-server
rabbitmqctl status
ss -antpl | grep 15672
http://192.168.1.20:15672

rabbitmqctl set_user_tags admins administrator
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Wednesday, April 13, 2022

How To Install WordPress on Rocky Linux 8

 in This Tutorial you will Learn " How To Install WordPress on Rocky Linux 8"
WordPress is a free, open-source, and the world's most popular CMS built entirely in PHP. It is used by thousands of people around the globe for running blogs, business websites, and e-commerce stores.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf module reset php ; dnf -y module install php:7.4
dnf install -y httpd mariadb mariadb-server php php-{bz2,mysqli,curl,gd,intl,common,mbstring,xml,json,bcmath,pear,xmlrpc,snmp,cli,ldap,opcache,pdo}

systemctl enable httpd mariadb ; systemctl start httpd mariadb
mysql_secure_installation

mysql -u root -p
CREATE DATABASE wordpressdb;
CREATE USER `wordpressuser`@`localhost` IDENTIFIED BY 'strong@password';
GRANT ALL ON wordpressdb.* TO `wordpressuser`@`localhost`;
FLUSH PRIVILEGES;
EXIT;

mkdir -p /var/www/yourdomain.com
wget https://wordpress.org/latest.tar.gz -O wordpress.tar.gz
tar xf wordpress.tar.gz
cp -R wordpress /var/www/yourdomain.com
chown -R $USER:$USER /var/www/yourdomain.com ; chmod -R 755 /var/www

nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/yourdomain.com/wordpress/
    <Directory /var/www/yourdomain.com/wordpress/>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>
    ErrorLog /var/log/httpd/yourdomain.com-error.log
    CustomLog /var/log/httpd/yourdomain.com-access.log combined
</VirtualHost>

apachectl configtest
echo "192.168.1.20 www.yourdomain.com" >> /etc/hosts
mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf_backup
systemctl restart httpd ; systemctl status httpd
www.yourdomain.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Monday, April 11, 2022

How To Install Magento 2.4 on Rocky Linux 8

 in This Tutorial you will Learn "  How To Install Magento 2.4 on Rocky Linux 8"
                          
Magento is a free, open-source, PHP-based eCommerce platform and cloud solution to grow your online business rapidly. It is built on open-source technology, with a flexible shopping cart system and an admin control panel that helps you start your online store easily. Magento also offers many plugins and themes to enhance a customer’s experience.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install httpd httpd-tools mariadb-server -y
systemctl start httpd mariadb ; systemctl enable httpd mariadb
dnf module reset php ; dnf module enable php:7.4

dnf install php php-cli php-mysqlnd php-opcache php-xml php-gd php-soap php-pdo php-bcmath php-intl php-mbstring php-json php-iconv php-zip unzip git -y

gedit  /etc/php.ini &>/dev/null
memory_limit = 1024M
upload_max_filesize = 256M
zlib.output_compression = on
max_execution_time = 18000
date.timezone = Asia/Kolkata

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install php-cli libsodium php-pear php-devel libsodium-devel make
pecl channel-update pecl.php.net
pecl install libsodium
nano /etc/php.ini
extension=sodium.so
php -i | grep sodium

mysql
CREATE DATABASE magento;
CREATE USER 'magento'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON magento.* TO 'magento'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

wget https://github.com/magento/magento2/archive/refs/tags/2.4.2.zip
unzip 2.4.2.zip ; mv magento2-* /var/www/html/magento2

cd /var/www/html/magento2
composer install
chown -R apache:apache /var/www/html/magento2

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R apache:apache .  && chmod u+x bin/magento


nano /etc/httpd/conf.d/magento.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName magento.example.com
DocumentRoot /var/www/html/magento2/
DirectoryIndex index.php
<Directory /var/www/html/magento2/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/magento_error.log
CustomLog /var/log/httpd/magento_access.log combined
</VirtualHost>

systemctl restart httpd
sudo -u apache bin/magento module:disable {Magento_Elasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}

sudo -u apache bin/magento setup:install --admin-firstname="test" --admin-lastname="tests" --admin-email="admin@example.com" --admin-user="admin" --admin-password="secure@123" --db-name="magento" --db-host="localhost" --db-user="magento" --db-password="password" --language=en_US --currency=USD --timezone=Asia/Kolkata --cleanup-database --base-url=http://"magento.example.com"

nano /etc/hosts/
192.168.1.20    magento.example.com

cd /var/www/html/magento2
sudo -u apache  bin/magento cron:install
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






Thursday, April 7, 2022

How To Install EMQX MQTT Broker on Rocky Linux 8

 in This Tutorial you will Learn " How To Install EMQX MQTT Broker on Rocky Linux 8"

MQTT broker is a lightweight message exchange protocol that makes use of the publish-subscribe pattern. That is to say, the MQTT broker receives the message published by clients, filters them according to topics, and distributes them to the subscribers. EMQX is an open-source, elastic MQTT message broker written in Erlang.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y

Method 1 -
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://repos.emqx.io/emqx-ce/redhat/centos/8/emqx-ce.repo
yum install emqx -y
sudo systemctl start emqx && sudo systemctl enable emqx ; systemctl status emqx

Method 2 - curl https://repos.emqx.io/install_emqx.sh | sudo bash
systemctl start emqx && sudo systemctl enable emqx ; systemctl status emqx


sudo firewall-cmd --add-port=18083/tcp --permanent
sudo firewall-cmd --add-port=8083/tcp --permanent
sudo firewall-cmd --add-port=1883/tcp --permanent
sudo firewall-cmd --add-port=8081/tcp --permanent
sudo firewall-cmd --add-port=8883/tcp --permanent
sudo firewall-cmd --add-port=8084/tcp --permanent
sudo firewall-cmd --reload
admin/public
http://192.168.1.20:18083
_________________________________________________________________________________________

Wednesday, April 6, 2022

How To Install Kamailio SIP Server on Rocky Linux 8

 in This Tutorials you will Learn " How To Install Kamailio SIP Server on Rocky Linux 8"
                         
Kamailio is an open-source SIP server written in C that runs on a Linux/Unix based operating system. It can handle thousands of call setups per second and serve up to 300,000 active subscribers on system with just 4GB RAM. Kamailio is used by a large ISPs to provide public telephone service, and was designed to be used for large real-time communication services. You can use Kamailio as a registrar server, location server, proxy server, redirect server, and SIP application server.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y

yum -y install dnf-plugins-core
yum config-manager --add-repo https://rpm.kamailio.org/centos/kamailio.repo
dnf -y repolist

dnf -y install mariadb-server
systemctl enable --now mariadb
mysql_secure_installation
kamailiorw

yum install vim kamailio kamailio-mysql kamailio-presence kamailio-ldap kamailio-debuginfo kamailio-xmpp kamailio-unixodbc kamailio-utils kamailio-gzcompress kamailio-tls kamailio-outbound
nano /etc/kamailio/kamctlrc
DBENGINE=MYSQL
DBHOST=localhost
kamdbctl create

nano /etc/kamailio/kamailio.cfg
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_NAT
#!define WITH_PRESENCE
#!define WITH_ACCDB
systemctl restart kamailio ; systemctl enable kamailio ; systemctl status kamailio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Tuesday, April 5, 2022

How to Install Crater Invoicing Solution on Rocky Linux 8.5

 in This Tutorial you will Learn " How to Install Crater Invoicing Solution on Rocky Linux 8.5"

Crater is a free and open-source invoicing application based on the Laravel PHP framework. It is designed for individual users or small and medium-sized businesses to help track payments and expenses as well as create professional invoices. It comes with a suite of tools that are used to manage invoices. Crater allows users to create and send professional invoices to their clients.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/os-releases ; getconf LONG_BIT ; hostname ; hostname -I ; sestatus
dnf makecache ; dnf groupinstall "Development Tools" -y
dnf module enable php:7.4 ; dnf install httpd httpd-tools mariadb-server mariadb php php-cli php-mysqlnd php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-curl php-opcache php-bcmath php-fpm php-common php-json php-zlib php-gmp php-apcu php-openssl php-pdo php-intl php-json php-zip -y

systemctl enable httpd mariadb php-fpm ;  systemctl start httpd mariadb php-fpm
mysql_secure_installation

wget https://craterapp.com/downloads/file/6.0.6 -O crater.zip
unzip crater.zip ; mv crater /var/www/html/crater


mysql -u root -p
create database db;
create user `dbuser`@`localhost` IDENTIFIED BY 'dbpassword';
grant all on db.* TO `dbuser`@`localhost`;
flush privileges;
exit

nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/html/crater/public/
    <Directory /var/www/html/crater/public/>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>
    ErrorLog /var/log/httpd/yourdomain.com-error.log
    CustomLog /var/log/httpd/yourdomain.com-access.log combined
</VirtualHost>

chown -R $USER:$USER /var/www/html/* ; chmod -R 777 /var/www/*
apachectl configtest ; echo "192.168.1.20 www.yourdomain.com" >> /etc/hosts
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload  
mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf_backup

systemctl restart httpd ; systemctl status httpd
www.yourdomain.com
_________________________________________________________________________________________

Sunday, April 3, 2022

How To Install Jenkins on Rocky Linux 8

 in This Tutorial you will Learn " How To Install Jenkins on Rocky Linux 8"  
                          
Jenkins is an open-source, widely used automation software tool. It is used in the software development life cycle to build, test, and deploy code automatically. Jenkins is written in Java and allows you to automate a series of tasks in order to complete the continuous integration process. It provides a simple and user-friendly web interface that allows you to manage complicated tasks through a web-based dashboard.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install java-11-openjdk -y
java -version

wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
dnf repolist

dnf install jenkins --nobest
systemctl start jenkins ; systemctl enable jenkins ; systemctl status jenkins
dnf install nginx -y
nano /etc/nginx/conf.d/jenkins.conf
upstream jenkins {
  server 127.0.0.1:8080 fail_timeout=0;
}

server {
  listen 80;
  server_name www.primaryhost.com;

  location / {
    proxy_set_header        Host $host:$server_port;
    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_pass              http://jenkins;
    # Required for new HTTP-based CLI
    proxy_http_version 1.1;
    proxy_request_buffering off;
    proxy_buffering off; # Required for HTTP-based CLI to work over SSL
  }
}
nano /etc/nginx/nginx.conf
server_names_hash_bucket_size 64;
nginx -t
systemctl start nginx ; systemctl enable nginx
cat /var/lib/jenkins/secrets/initialAdminPassword
www.primaryhost.com
__________________________________________________________________________________________