Friday, May 13, 2022

How To install GFortran ( Fortran Programming Language ) & Write a Hello World Program On Ubuntu 20.04

 ________________________________________________________________________________________
How To install GFortran ( Fortran Programming Language ) & Write a Hello World Program On Ubuntu 20.04
________________________________________________________________________________________

FORTRAN is a powerful programming language that is often over-shadowed by the more popular mainstream programming languages.

apt update ; apt-get install gfortran -y
gfortran --version
whereis gfortran ; which gfortran

Fortran Hello World Example: How To Write and Execute Fortran Program on Linux OS
nano helloworld.f
program hello
print *,"Hello World!"
end program hello


shorter Version  -
nano helloworld.f
PRINT *,"Hello World!"
END

Compile the Fortran program - gfortran -ffree-form helloworld.f
Execute the Fortran program (a.out) - ./a.out
mv a.out helloworld
./helloworld
_______________________________________________________________________________________

Saturday, May 7, 2022

How To install Crystal Programming Language On Ubuntu 20.04

 Crystal is a statically type-checked programming language. It was created with the beauty of Ruby and the performance of C in mind

Method : 1  
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
crystal --version

Method: 2
apt update ; apt install snapd -y
snap install crystal --classic
crystal --version

Friday, May 6, 2022

Setting Up Web Server Load Balancing Using ‘POUND’ With SSL/TLS On Rocky Linux

 in This Tutorial you will Learn " How To Set Up Web Servers Load Balancing Using ‘POUND’ with     
SSL/TLS Connection 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.
SSL and TLS are both cryptographic protocols used to increase security by encrypting communication over computer networks.
_________________________________________________________________________________________
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

cd /etc/pki/tls/certs ; openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/pki/tls/certs/pound.pem -out /etc/pki/tls/certs/pound.pem
chmod 600 pound.pem

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
ListenHTTPS
    Address 0.0.0.0
    Port 443
    Cert "/etc/pki/tls/certs/pound.pem"
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
https://localhost/
http://localhost/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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>Web Server Load Balancing Using ‘POUND’ With SSLTLS</h1>" > /var/www/html/index.html
systemctl daemon-reload ; systemctl restart rsyslog httpd
_________________________________________________________________________________________