Friday, April 29, 2022

Setting Up Web Server Load Balancing Using ‘POUND’ On Rocky Linux

 in This Tutorial you will Learn " How To Set Up Web Servers Load Balancing Using ‘POUND’ On Rocky Linux 8.5                           
Pound is a reverse-proxy load balancing server. It accepts requests from HTTP/HTTPS clients and distributes them to one or more Web servers.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
Backend server's IP address -  192.168.1.80
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install epel-release -y
dnf -y install Pound
mv /etc/pound.cfg /etc/pound.cfg.org
nano /etc/pound.cfg
User "pound"
Group "pound"
# log level (max: 5)
LogLevel 3
# specify LogFacility
LogFacility local1
# interval of heartbeat - seconds
Alive 30

# define frontend
ListenHTTP
    Address 0.0.0.0
    Port 80
End

# Define Backend
Service
    BackEnd
        # backend server's IP address
        Address  192.168.1.80
        # backend server's port
        Port     80
        # set priority
        # available value is 1-9, max priority is 9
        Priority 5
    End
End
systemctl enable --now pound
nano /etc/rsyslog.conf
*.info;mail.none;authpriv.none;cron.none;local1.none    /var/log/messages
local1.*                                                /var/log/pound.log
firewall-cmd --add-service=http ; firewall-cmd --runtime-to-permanent
systemctl daemon-reload ; systemctl restart rsyslog
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cat /etc/system-release ; sestatus ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install httpd -y
nano /etc/httpd/conf/httpd.conf
LogFormat "\"%{X-Forwarded-For}i\" %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
echo "<h1>This is a Test Page</h1>" > /var/www/html/index.html
systemctl daemon-reload ; systemctl restart rsyslog httpd
_________________________________________________________________________________________

Wednesday, April 27, 2022

How To Harden Apache Web Server on Rocky Linux 8.5

 in This Tutorial you will Learn " How To Secure and Harden Your Apache Web Server On Rocky Linux 8.5 "  

Apache is one of the most widely-used and popular web servers. It is also one of the most secure web servers available.
Apache is a popular web server used by millions of websites all over the world. As a result, they are often prey to security vulnerabilities and attacks. It is important to secure your Apache server against malicious attacks.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; httpd -v
_________________________________________________________________________________________
1. Hide Apache Server Name
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
ServerSignature Off
ServerTokens Prod
apachectl configtest
_________________________________________________________________________________________
2. Turn Off Directory Listing
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
<Directory /var/www/html/>
    Options -Indexes
    AllowOverride None
    Require all granted
</Directory>
apachectl configtest
________________________________________________________________________________________
3. Disable Unnecessary Modules-
grep LoadModule /etc/httpd/conf.modules.d/00-base.conf
gedit /etc/httpd/conf.modules.d/00-base.conf &>/dev/null
#LoadModule info_module modules/mod_info.so
#LoadModule userdir_module modules/mod_userdir.so
_________________________________________________________________________________________
4.Disable Symlinks-
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
Options -Indexes -FollowSymLinks
apachectl configtest
_________________________________________________________________________________________
5. Disable SSI & CGI Execution
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
Options -Indexes -FollowSymLinks -ExecCGI -Includes
apachectl configtest
_________________________________________________________________________________________
6. Protect from Clickjacking
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
Header append X-FRAME-OPTIONS "SAMEORIGIN"
apachectl configtest
_________________________________________________________________________________________
7. Disable ETags
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
FileETag None
apachectl configtest
_________________________________________________________________________________________
8. Protect from XSS attacks.
gedit  /etc/httpd/conf/httpd.conf &>/dev/null
<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
</IfModule>
apachectl configtest
_________________________________________________________________________________________
systemctl daemon-reload ; systemctl restart httpd ; systemctl status httpd
_________________________________________________________________________________________





Saturday, April 23, 2022

How To Install Odoo 14 ERP on Rocky Linux 8

 in This Tutorial you will Learn " How To Install Odoo 14 ERP on Rocky Linux 8"

Odoo is a group of business management software tools that include features for billing, accounting, eCommerce, CRM, warehouse, project management, and inventory management. It is designed for small and medium businesses and is available in the cloud or on-premise. It is user-friendly, scalable, customizable, flexible, and helps you manage businesses and organizations with a CMS.
_________________________________________________________________________________________
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 -y
dnf install python3 python3-devel git gcc git redhat-rpm-config libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel -y

dnf install https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm
dnf install @postgresql:12
postgresql-setup initdb
systemctl enable --now postgresql
su - postgres -c "createuser -s odoo14"
useradd -m -U -r -d /opt/odoo14 -s /bin/bash odoo14

su - odoo14
git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo14/odoo
cd /opt/odoo14
python3 -m venv odooenv
source odooenv/bin/activate
pip3 install -r odoo/requirements.txt
deactivate

mkdir /opt/odoo14/odoo-custom-addons
exit
nano /etc/odoo14.conf
[options]
admin_passwd = secure-password
db_host = False
db_port = False
db_user = odoo14
db_password = False
addons_path = /opt/odoo14/odoo/addons, /opt/odoo14/odoo-custom-addons

nano /etc/systemd/system/odoo.service
[Unit]
Description=Odoo14
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=odoo14
PermissionsStartOnly=true
User=odoo14
Group=odoo14
ExecStart=/opt/odoo14/odooenv/bin/python3 /opt/odoo14/odoo/odoo-bin -c /etc/odoo14.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target
systemctl daemon-reload ; systemctl enable --now odoo ; systemctl status odoo
http://192.168.1.20:8069
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Friday, April 22, 2022

How To Install OpenCart on Rocky Linux 8

 in This Tutorial you will Learn " How To Install OpenCart on Rocky Linux 8"

OpenCart is an open-source e-commerce platform written in PHP. It is simple, lightweight, user-friendly, and provides a web interface to manage it from the web browser. It allows you to easily manage product inventory, orders, affiliates, discounts, product reviews, payment gateways, and more.
_________________________________________________________________________________________
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 mariadb-server -y
dnf install epel-release -y
dnf install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module reset php
dnf module enable php:remi-8.0
dnf install php php-gd php-ldap php-zip php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mysqlnd php-snmp php-soap curl curl-devel unzip git -y
systemctl start httpd ; systemctl enable httpd ; systemctl start mariadb ; systemctl enable mariadb
mysql_secure_installation

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

git clone https://github.com/opencart/opencart.git
cd opencart ; mv upload /var/www/html/opencart
cp /var/www/html/opencart/config-dist.php /var/www/html/opencart/config.php
cp /var/www/html/opencart/admin/config-dist.php /var/www/html/opencart/admin/config.php
chown -R apache:apache /var/www/html/opencart ; chmod -R 755 /var/www/html/opencart

nano /etc/httpd/conf.d/opencart.conf
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/opencart/
ServerName www.yourdomain.com
<Directory /var/www/html/opencart/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/yourdomain.com-error_log
CustomLog /var/log/httpd/yourdomain.com-access_log common
</VirtualHost>

systemctl restart httpd
echo "192.168.1.20 www.yourdomain.com" >> /etc/hosts
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload  
www.yourdomain.com

mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf_backup
__________________________________________________________________________________________

Tuesday, April 19, 2022

How To Install Joomla on Rocky Linux 8

 in This Tutorial you will Learn " How to Install Joomla on Rocky Linux 8"

Joomla is a free and open source platform Content Management System (CMS) written in PHP. It enables you to create dynamic web pages and applications with ease. It includes an easy-to-use design that allows you to get the most out of its features and functionality.
_________________________________________________________________________________________
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 testdb;
CREATE USER `testuser`@`localhost` IDENTIFIED BY 'testpassword';
GRANT ALL ON testdb.* TO `testuser`@`localhost`;
FLUSH PRIVILEGES;
exit;

mkdir -p /var/www/yourdomain.com/
chown -R $USER:$USER /var/www/yourdomain.com ; chmod -R 755 /var/www

wget https://downloads.joomla.org/cms/joomla4/4-0-5/Joomla_4-0-5-Stable-Full_Package.zip?format=zip -O joomla.zip
unzip joomla.zip -d /var/www/yourdomain.com/

nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/yourdomain.com/joomla/
    <Directory /var/www/yourdomain.com/joomla/>
        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
_________________________________________________________________________________________

How To Install Drupal 9 on Rocky Linux 8

 in This Tutorial you will Learn " How To Install Drupal 9 on Rocky Linux 8"      
Drupal is content management software. It's used to make many of the websites and applications you use every day.
_________________________________________________________________________________________
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 testdb;
CREATE USER `testuser`@`localhost` IDENTIFIED BY 'testpassword';
GRANT ALL ON testdb.* TO `testuser`@`localhost`;
FLUSH PRIVILEGES;
exit;

DRUPAL_VERSION="9.3.7"
wget https://ftp.drupal.org/files/projects/drupal-$DRUPAL_VERSION.tar.gz
tar xvf drupal-${DRUPAL_VERSION}.tar.gz
mv drupal-${DRUPAL_VERSION} /var/www/html/drupal
mkdir /var/www/html/drupal/sites/default/files
cp /var/www/html/drupal/sites/default/default.settings.php /var/www/html/drupal/sites/default/settings.php

nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/html/drupal/
    <Directory /var/www/html/drupal/>
        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 755 /var/www/html/
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 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
__________________________________________________________________________________________