Tuesday, June 30, 2020

How To install Nagios Or EHCP (Easy Hosting Control Panel) On Ubuntu 20.04

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Nagios is one of the most widely used open-source monitoring tools for monitoring the services and applications that run on Windows and Linux operating systems.

Website - https://www.nagios.org/


EHCP (Easy Hosting Control Panel) is an open-source and powerful hosting control panel that lets you to host any websites, create email accounts, create additional (sub) domains and create FTP accounts and many more. Ehcp is the only first hosting control panel was written using PHP programming language and available for free. - https://ehcp.net/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:

Ubuntu 20.04 LTS                     Hostname - www.example.com  - ip Address - 192.168.1.40

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt install -y build-essential apache2 php openssl perl make php-gd libgd-dev libapache2-mod-php libperl-dev libssl-dev daemon wget apache2-utils unzip net-tools curl git software-properties-common

useradd nagios ; groupadd nagcmd ; usermod -a -G nagcmd nagios ; usermod -a -G nagcmd www-data


cd /tmp ; wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.5.tar.gz

tar -zxvf /tmp/nagios-4.4.5.tar.gz ; cd /tmp/nagios-4.4.5/

sudo ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-httpd_conf=/etc/apache2/sites-enabled/


make all && make install && make install-init && make install-config && make install-commandmode && make install-webconf


htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

a2enmod cgi ; systemctl restart apache2

cd /tmp ; wget https://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz

tar -zxvf /tmp/nagios-plugins-2.3.3.tar.gz ; cd /tmp/nagios-plugins-2.3.3/


./configure --with-nagios-user=nagios --with-nagios-group=nagios

make && make install

sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

systemctl enable nagios ; systemctl start nagios ; systemctl status nagios


http://www.example.com/nagios                                       | User - nagiosadmin Pass - Strongpass

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing Easy Hosting Control Panel -

Prerequisites - A freshly installed Ubuntu 20.04 x64 | Root access.


wget -O ehcp.tgz www.ehcp.net/ehcp_1804.tgz --no-check-certificate

tar -zxvf ehcp.tgz ; cd ehcp

./install.sh

http://www.example.com/ehcp/

admin / Strongpass

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To install Cockpit , Ajenti, And Webmin On Ubuntu 20.04 LTS

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Cockpit is an open source application based on a web interface that allows you to control, monitor and manage the operation of a Linux server. - https://cockpit-project.org/


Ajenti is one of the most popular web-based control panels.

https://ajenti.org/


Webmin is a web-based dashboard that allows sysadmins to manage Linux and Unix-like systems (especially servers). Webmin allows system administrators to manage user accounts, updating packages, system log files, configuring firewalls, email, database, postfix, etc. - http://www.webmin.com/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Ubuntu 20.04 LTS         Hostname - www.example.com  - ip Address - 192.168.1.40

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Cockpit -

apt update ; apt install cockpit -y

systemctl start cockpit ; systemctl status cockpit

http://www.example.com:9090

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ajenti -

curl -O https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh

bash ./install.sh

http://www.example.com:8000

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Webmin -

apt -y install python apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl libnet-ssleay-perl

curl -L -O http://www.webmin.com/download/deb/webmin-current.deb

dpkg -i webmin-current.deb

systemctl restart webmin ; systemctl status webmin

https://www.example.com:10000/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Monday, June 29, 2020

How To Install Jitsi Meet from Official Package Repository On Ubuntu 20.04 18.04


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Jitsi Meet is an open-source video conferencing solution, providing virtual meeting rooms for remote team meetings. The sofware provides high video and audio quality and supports fully encrypted connections using TLS/SSL and Let’s Encrypt certificates.

Offcial Website -https://meet.jit.si/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:

Ubuntu 20.04 LTS                     Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I; apt update ; apt install -y build-essential net-tools curl git software-properties-common


Ubuntu 20-

java -version ; echo $JAVA_HOME

echo 'deb https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list

wget -qO -  https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -

apt install apt-transport-https -y

apt update ; apt install jitsi-meet -y

systemctl status jitsi-videobridge2 nginx

https://www.yourdomain.com/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ubuntu 18 - Hostname - www.example.com  - ip Address - 192.168.1.40

java -version ; echo $JAVA_HOME

echo 'deb https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list && wget -qO -  https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -

apt install apt-transport-https -y

apt update ; apt install jitsi-meet -y

systemctl status jitsi-videobridge2 nginx

https://www.example.com

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Optional -

Set Up User Authentication for Jitsi Meet -

nano /etc/prosody/conf.avail/www.yourdomain.com.cfg.lua

authentication = "anonymous"

authentication = "internal_plain"


VirtualHost "guest.www.yourdomain.com"

    authentication = "anonymous"

    c2s_require_encryption = false


nano /etc/jitsi/meet/www.yourdomain.com-config.js

  // anonymousdomain: 'guest.example.com',

anonymousdomain: 'guest.www.yourdomain.com',


nano /etc/jitsi/jicofo/sip-communicator.properties

org.jitsi.jicofo.auth.URL=XMPP:www.yourdomain.com

systemctl restart prosody jicofo jitsi-videobridge2


prosodyctl register username www.yourdomain.com

https://www.yourdomain.com


User - username       pass - StrongPassword

QuickNotepadTutorial

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Friday, June 26, 2020

How To Start, Stop, And Restart , Reload, Nginx Web Server

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Nginx is a powerful server application that routes network traffic. It’s often used as a reverse proxy server, but can also be configured as a regular web server.

One of the most common operations you will encounter is starting, stopping, and restarting the Nginx web server.

In this tutorial, learn how to start, stop, and restart the Nginx service.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:Ubuntu 20.04 LTS     Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Check Nginx version#   nginx -v


Start Nginx# systemctl start nginx           Or service nginx start        Or sudo /etc/init.d/nginx start

Stop Nginx#  systemctl stop nginx            Or service nginx stop         Or sudo /etc/init.d/nginx stop


Restart Nginx# systemctl restart nginx       Or service nginx restart      Or sudo /etc/init.d/nginx restart

Reload Nginx#  systemctl reload nginx        Or service nginx reload       Or sudo /etc/init.d/nginx reload


View server status# systemctl status nginx   Or service nginx status       Or sudo /etc/init.d/nginx status


Test Nginx Configuration# service nginx configtest Or ngixn -t


Show command help#     systemctl -h nginx    Or service nginx -?

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To Start, Stop, And Restart ,Reload, Apache2 Web Server


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Apache HTTP server is the most popular web server in the world. It is a free, open-source, and cross-platform HTTP server providing powerful features that can be extended by a wide variety of modules.

If you are a developer or system administrator, chances are that you’re dealing with Apache regularly.


In this Tutorial, we will go over the most important and frequently used Apache commands, including starting, stopping, and restarting Apache

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:Ubuntu 20.04 LTS  Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Check Apache version#   apache2 -v


Start Apache# systemctl start apache2        Or service apache2 start      Or sudo /etc/init.d/apache2 start

Stop Apache#  systemctl stop apache2         Or service apache2 stop       Or sudo /etc/init.d/apache2 stop


Restart Apache# systemctl restart apache2   Or service apache2 restart   Or sudo /etc/init.d/apache2 restart

Reload Apache# systemctl reload apache2     Or service apache2 reload    Or sudo /etc/init.d/apache2 reload


View server status# systemctl status apache2 Or service apache2 status   Or sudo /etc/init.d/apache2 status


Enable Apache Service# systemctl enable apache2


Check Apache Configuration Syntax Errors# apachectl -t


Show command help#     systemctl -h apache2   Or service apache2 -?

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tuesday, June 23, 2020

How To install Zabbix Server Or Cacti On Ubuntu 20.04 LTS


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Zabbix is an open source interesting and most popular monitoring package. Zabbix provide the monitoring service on servers, desktops, network based applications and applications etc. It uses Zabbix agent for getting information and collecting data on the devices installed with Zabbix. You can also monitor the SMTP, HTTP, SNMP, TCP, ICMP, SSH and telnet protocols or packets. You’ll be get notified by Zabbix to stay alert for real time with the help of XMPP.

Website - https://www.zabbix.com/ 

Github - https://github.com/zabbix/zabbix


Cacti is a free and open-source network monitoring and graphic tool written in PHP. It is designed as the front-end application for the Round-Robin database tool (RRDtool). It is used to get CPU load and network bandwidth utilization in a graph format.

Website - https://www.cacti.net/   

Github - https://github.com/Cacti/cacti/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Ubuntu 20.04 LTS     Hostname - www.example.com  - ip Address - 192.168.1.40

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing Zabbix -

apt update ; apt install -y build-essential net-tools curl git software-properties-common

wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb

dpkg -i zabbix-release_5.0-1+focal_all.deb

apt update ; apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-agent zabbix-apache-conf

nano /etc/zabbix/apache.conf

php_value date.timezone Asia/Kolkata

sed -i "s/;date.timezone.*/date.timezone = Asia\/\Kolkata/" /etc/php/*/apache2/php.ini


mysql -u root -p                      | Password - Blank

create database zabbix character set utf8 collate utf8_bin;

grant all privileges on zabbix.* to zabbixuser@localhost identified by 'password';

quit;


DBDetails -  DBName: zabbix  | DBUser: zabbixuser | DBPassword: password


cd /usr/share/doc/zabbix-server-mysql ; zcat create.sql.gz | mysql -u zabbixuser -p zabbix

nano /etc/zabbix/zabbix_server.conf


DBHost=localhost | DBName=zabbix | DBUser=zabbixuser | DBPassword=password

systemctl restart zabbix-server zabbix-agent apache2 ; systemctl enable zabbix-server zabbix-agent apache2


http://www.example.com/zabbix/ | Username: Admin  | Password: zabbix

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing Cacti

apt install -y apache2 php-mysql libapache2-mod-php php-xml php-ldap php-mbstring php-gd php-gmp mariadb-server mariadb-client snmp php-snmp rrdtool librrds-perl build-essential net-tools curl git software-properties-common


nano /etc/mysql/mariadb.conf.d/50-server.cnf

collation-server = utf8mb4_unicode_ci

max_heap_table_size = 128M

tmp_table_size = 128M

join_buffer_size = 256M

innodb_file_format = Barracuda

innodb_large_prefix = 1

innodb_buffer_pool_size = 2048M

innodb_flush_log_at_timeout = 3

innodb_read_io_threads = 32

innodb_write_io_threads = 16

innodb_io_capacity = 5000

innodb_io_capacity_max = 10000

innodb_buffer_pool_instances = 21

systemctl daemon-reload ; systemctl restart mariadb ; systemctl status mariadb


sed -i "s/;date.timezone.*/date.timezone = Asia\/\Kolkata/" /etc/php/*/apache2/php.ini

sed -i "s/;date.timezone.*/date.timezone = Asia\/\Kolkata/" /etc/php/*/cli/php.ini

sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/*/apache2/php.ini

sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/*/cli/php.ini

sed -i "s/max_execution_time =.*/max_execution_time = 60/" /etc/php/*/apache2/php.ini

sed -i "s/max_execution_time =.*/max_execution_time = 60/" /etc/php/*/cli/php.ini


mysql -u root -p                                                            [ Password - Blank Press Enter]

create database cacti;

ALTER DATABASE cacti CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipassword';

flush privileges;

exit

mysql -u root -p mysql < /usr/share/mysql/mysql_test_data_timezone.sql      [ Password - Blank Press Enter] 

mysql -u root -p                                                            [ Password - Blank Press Enter]                          

GRANT SELECT ON mysql.time_zone_name TO cactiuser@localhost;

flush privileges;

exit


wget https://www.cacti.net/downloads/cacti-latest.tar.gz

tar -zxvf cacti-latest.tar.gz ; mv cacti-1* /opt/cacti

mysql -u root -p cacti < /opt/cacti/cacti.sql                               [ Password - Blank Press Enter]

nano /opt/cacti/include/config.php

nano /etc/cron.d/cacti

*/5 * * * * www-data php /opt/cacti/poller.php > /dev/null 2>&1


nano /etc/apache2/sites-available/cacti.conf

Alias /cacti /opt/cacti


  <Directory /opt/cacti>

      Options +FollowSymLinks

      AllowOverride None

      <IfVersion >= 2.3>

      Require all granted

      </IfVersion>

      <IfVersion < 2.3>

      Order Allow,Deny

      Allow from all

      </IfVersion>


   AddType application/x-httpd-php .php


<IfModule mod_php.c>

      php_flag magic_quotes_gpc Off

      php_flag short_open_tag On

      php_flag register_globals Off

      php_flag register_argc_argv On

      php_flag track_vars On

      # this setting is necessary for some locales

      php_value mbstring.func_overload 0

      php_value include_path .

 </IfModule>


  DirectoryIndex index.php

</Directory>

apache2ctl configtest ; a2ensite cacti


systemctl restart apache2 ; systemctl status apache2


touch /opt/cacti/log/cacti.log ;  chown -R www-data:www-data /opt/cacti/

http://www.example.com/cacti      Username: admin | Password: admin  NewPass -O8K["{7A;08^!)x

5 Min later Refresh Web Browser

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tuesday, June 16, 2020

How to Install R Programming Language In Ubuntu 20.04 LTS

Video Tutorial -


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

R is an open-source programming language that specializes in statistical computing and graphics.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

OS - Ubuntu 20.04 LTS 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'

apt update

apt install r-base -y

sudo -i R

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing Go And write Hello World on Linux Mint 19.3 Tricia

Video Tutorial -

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Go is a compiled, statically typed programming language developed by Google. Many modern applications such as Docker, Kubernetes, and Caddy are written in Go.

Offcial Website -https://golang.org/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment Setup-  : Linux Mint 19.3 Tricia ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------__________________________________________________________________________________________________________________

lsb_release -cd

apt update ; apt install -y build-essential net-tools curl git software-properties-common


wget -c https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local

export PATH=$PATH:/usr/local/go/bin

source ~/.profile

go version


mkdir -p go/src/hello && cd go/src/hello

nano hello.go


package main


import "fmt"


func main() {

    fmt.Printf("hello, world\n")

}

go build

./hello

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To install Development Tools , Openssl , CMake On Ubuntu 20.04


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Development tools are required to install on your system if you have planned to build software. It’ s also useful for building packages on your system. Development tools contain few general useful tools like GCC, g++, make, libc6-dev and dpkg-dev packages.


CMake is a cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. - https://cmake.org/


OpenSSL is a full-featured software library that contains an open-source implementation of the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols, used for securing information transmitted over computer networks. - https://www.openssl.org/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Ubuntu 20.04 LTS  64Bit

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To install C, C++ Compiler -Development Tools  -  apt update ; apt-get install build-essential -y


Test C and C++ with a sample Program -

apt install ccache -y

nano sum.c

#include<stdio.h>

int main()

{

   int a, b, c;

   printf("Enter two numbers to add, separated by a space: ");

   scanf("%d%d",&a,&b);

   c = a + b;

   printf("The sum of equals %d\n",c);

   return 0;

}

gcc sum.c -o sum && ccache gcc sum.c -o sum && ./sum


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing OpenSSL -

apt update ; apt install -y build-essential net-tools curl git software-properties-common libssl-dev checkinstall zlib1g-dev

openssl version -a

cd /usr/local/src/ ; wget https://www.openssl.org/source/openssl-3.0.0-alpha3.tar.gz

tar -xf openssl-3.0.0-alpha3.tar.gz ; cd openssl-3.0.0-alpha3/

./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

make && make test && make install

nano /etc/ld.so.conf.d/openssl-3.0.0.conf

/usr/local/ssl/lib

ldconfig -v

mv /usr/bin/c_rehash /usr/bin/c_rehash.BEKUP ; mv /usr/bin/openssl /usr/bin/openssl.BEKUP

nano /etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/ssl/bin"

source /etc/environment

echo $PATH ; which openssl ; openssl version -a


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing CMake -

apt update ; apt install -y build-essential net-tools curl git software-properties-common libssl-dev checkinstall zlib1g-dev

wget https://github.com/Kitware/CMake/releases/download/v3.18.0-rc1/cmake-3.18.0-rc1.tar.gz

tar -zxvf cmake-3.18.0-rc1.tar.gz

cd cmake-3.18.0-rc1/

./configure --help

./configure --prefix=/opt/cmake

make && make install

/opt/cmake/bin/cmake -version

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To Build Compile Nginx From Source on Ubuntu 20.04 LTS


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Nginx is an open source HTTP Web server and reverse proxy server.

Offcial Website -https://www.nginx.com/  | https://www.nginx.com/resources/wiki/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ubuntu 20.04 LTS 64BIT                   Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt install build-essential libpcre3-dev zlib1g-dev libssl-dev libatomic-ops-dev libxml2-dev libxslt1-dev libgeoip1 libgeoip-dev libgd-dev google-perftools libgoogle-perftools-dev libperl-dev net-tools curl git software-properties-common -y


Download Link - http://nginx.org/en/download.html


wget https://nginx.org/download/nginx-1.19.0.tar.gz

tar zxf nginx-1.19.0.tar.gz ; cd nginx-1.19.0

useradd -s /sbin/nologin nginx

./configure --help


./configure --user=nginx --group=nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_xslt_module=dynamic --with-http_image_filter_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module --with-http_perl_module=dynamic --with-mail --with-mail=dynamic --with-mail_ssl_module --with-stream --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module --with-stream_geoip_module=dynamic --with-stream_ssl_preread_module --with-google_perftools_module --with-cpp_test_module --with-compat --with-pcre --with-pcre-jit  --with-zlib-asm=CPU --with-libatomic --with-debug --with-ld-opt="-Wl,-E"


make && sudo make install


nano /lib/systemd/system/nginx.service

[Unit]

Description=The Nginx 1.19.0 service

After=syslog.target network.target remote-fs.target nss-lookup.target


[Service]

Type=forking

PIDFile=/usr/local/nginx/logs/nginx.pid

ExecStartPre=/usr/sbin/nginx -t

ExecStart=/usr/sbin/nginx

ExecReload=/usr/sbin/nginx -s reload

ExecStop=/bin/kill -s QUIT $MAINPID

PrivateTmp=true


[Install]

WantedBy=multi-user.target

systemctl daemon-reload ; systemctl start nginx ; systemctl status nginx

nginx -v && sudo nginx -V


http://192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

nginx configuration prefix: "/etc/nginx"   

nginx configuration file: "/etc/nginx/nginx.conf"

nginx path prefix: "/usr/local/nginx"

WebRoot Dir -  /usr/local/nginx/html/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sunday, June 14, 2020

How To Setup Concourse-CI Server On Ubuntu 18.04 LTS

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Concourse CI is a modern, flexible continuous integration platform that allows developers to merge modified code into a shared repository multiple times. After each merge, automatic builds and tests are performed to detect problems in the code that helps the developers to find and resolve the errors quickly.

https://concourse.ci/  || https://github.com/concourse/concourse

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:

Ubuntu 18.04.LTS                     Hostname - www.example.com     - ip Address - 192.168.1.50

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common postgresql postgresql-contrib

systemctl enable postgresql

cd /tmp

sudo -u postgres createuser concourse

sudo -u postgres createdb --owner=concourse atc

wget https://github.com/concourse/concourse/releases/download/v4.2.2/concourse_linux_amd64

wget https://github.com/concourse/concourse/releases/download/v4.2.2/fly_linux_amd64

chmod +x concourse_linux_amd64 fly_linux_amd64

mv concourse_linux_amd64 /usr/bin/concourse ; mv fly_linux_amd64 /usr/bin/fly


mkdir /etc/concourse

ssh-keygen -t rsa -q -N '' -f /etc/concourse/tsa_host_key

ssh-keygen -t rsa -q -N '' -f /etc/concourse/worker_key

ssh-keygen -t rsa -q -N '' -f /etc/concourse/session_signing_key

cp /etc/concourse/worker_key.pub /etc/concourse/authorized_worker_keys


nano /etc/concourse/web_environment

CONCOURSE_ADD_LOCAL_USER=ruan:pass

CONCOURSE_SESSION_SIGNING_KEY=/etc/concourse/session_signing_key

CONCOURSE_TSA_HOST_KEY=/etc/concourse/tsa_host_key

CONCOURSE_TSA_AUTHORIZED_KEYS=/etc/concourse/authorized_worker_keys

CONCOURSE_POSTGRES_HOST=127.0.0.1

CONCOURSE_POSTGRES_USER=concourse

CONCOURSE_POSTGRES_PASSWORD=concourse

CONCOURSE_POSTGRES_DATABASE=atc

CONCOURSE_MAIN_TEAM_LOCAL_USER=ruan

CONCOURSE_EXTERNAL_URL=http://192.168.1.50:8080


nano /etc/concourse/worker_environment

CONCOURSE_WORK_DIR=/var/lib/concourse

CONCOURSE_TSA_HOST=127.0.0.1:2222

CONCOURSE_TSA_PUBLIC_KEY=/etc/concourse/tsa_host_key.pub

CONCOURSE_TSA_WORKER_PRIVATE_KEY=/etc/concourse/worker_key


mkdir /var/lib/concourse ; adduser --system --group concourse

chown -R concourse:concourse /etc/concourse /var/lib/concourse ; chmod 600 /etc/concourse/*_environment


nano /etc/systemd/system/concourse-web.service

[Unit]

Description=Concourse CI web process (ATC and TSA)

After=postgresql.service


[Service]

User=concourse

Restart=on-failure

EnvironmentFile=/etc/concourse/web_environment

ExecStart=/usr/bin/concourse web


[Install]

WantedBy=multi-user.target


nano /etc/systemd/system/concourse-worker.service

[Unit]

Description=Concourse CI worker process

After=concourse-web.service


[Service]

User=root

Restart=on-failure

EnvironmentFile=/etc/concourse/worker_environment

ExecStart=/usr/bin/concourse worker


[Install]

WantedBy=multi-user.target


cd /home/concourse/ ; sudo -u concourse psql atc

ALTER USER concourse WITH PASSWORD 'concourse';

\q


systemctl start concourse-web concourse-worker ; systemctl enable concourse-web concourse-worker postgresql

systemctl status concourse-web concourse-worker ; systemctl is-active concourse-worker concourse-web

netstat -tulpn

concourse -version ; fly -version

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To intsall Cassandra ArangoDB Redis CouchDB RethinkDB On Ubuntu 20.04 LTS


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Apache Cassandra is a free and open source NoSQL database management system that is designed to provide scalability, high availability, and uncompromised performance.

Website - https://cassandra.apache.org/


ArangoDB is a distributed, free, and open-source database with a flexible data model for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. -

Website - https://www.arangodb.com/


Redis is an open-source, in-memory key/value store, used as a database, cache, and message broker. It's a distributed in-memory key-value database with optional durability. It supports common data structures such as string, hashes, lists, sets, bitmaps, sorted sets, HyperlogLogs, stream, and geospatial indexes with radius queries.

Website -https://redis.io/


RethinkDB is an open source, document based NoSQL database that stores the information in JSON format.

Website - https://rethinkdb.com/


CouchDB is a database that completely embraces the web. Store your data with JSON documents.

Website - https://couchdb.apache.org/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Ubuntu 20.04 LTS Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


installing Cassandra -

echo "deb https://downloads.apache.org/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list

curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -

apt-get update ; apt-get install cassandra -y

systemctl daemon-reload  ; systemctl start cassandra

cqlsh

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing ArangoDB -

echo 'deb https://download.arangodb.com/arangodb34/DEBIAN/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list

wget -q https://download.arangodb.com/arangodb34/DEBIAN/Release.key -O- | sudo apt-key add -

apt update ; apt -y install apt-transport-https

apt -y install arangodb3

systemctl start arangodb3 ; systemctl enable arangodb3

arangosh

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt install redis-server php-redis -y

sudo gedit  /etc/redis/redis.conf &>/dev/null

maxmemory 256mb

maxmemory-policy allkeys-lru

systemctl enable redis-server ; systemctl restart redis-server

redis-cli ping  && redis-cli ping "Hello Redis"

redis-cli

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing couchdb -

apt-get install -y apt-transport-https gnupg ca-certificates

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \

  8756C4F765C9AC3CB6B85D62379CE192D401AB61


echo "deb https://apache.bintray.com/couchdb-deb focal main" \

    | sudo tee -a /etc/apt/sources.list.d/couchdb.list

apt update ; apt install -y couchdb

http://127.0.0.1:5984/_utils/

admin / StrongPass

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

installing Rethinkdb -

source /etc/lsb-release && echo "deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list

wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | sudo apt-key add -

apt-get update ; apt-get install rethinkdb -y

cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf

nano /etc/rethinkdb/instances.d/instance1.conf

http-port=8080

systemctl restart rethinkdb ; systemctl enable rethinkdb

http://127.0.0.1:8080/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Friday, June 12, 2020

How To Install OpenShift Origin PaaS Server with Docker on Ubuntu 20.04 LTS

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

OpenShift is a free, open-source, and cloud development Platform as a Service (PaaS) developed by Red Hat that allows the developers to develop and deploy their applications on a cloud infrastructure. It is a community distribution of Kubernetes and enables faster development and release cycles for applications. It comes with a simple and easy to use web interface that allows you to monitor the container resources, container health, the nodes the containers reside on, IP addresses of the nodes, etc.

Offcial Website -https://www.okd.io/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:

Ubuntu 20.04 LTS                     Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common neofetch apt-transport-https ca-certificates curl gnupg-agent docker.io docker-compose

systemctl enable --now docker ; usermod -aG docker $USER ; newgrp docker

docker --version ; docker-compose version


wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz

tar -xvzf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz

cd openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit

cp oc kubectl /usr/local/bin/

oc version

nano /etc/docker/daemon.json

 {

     "insecure-registries" : [ "172.30.0.0/16" ]

 }

systemctl restart docker ; systemctl status docker

oc cluster up 192.168.1.20

oc login -u system:admin

oc project default

oc status

oc login

oc new-project dev --display-name="Project - Dev" --description="My Project"

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Saturday, June 6, 2020

How To install Cockpit , Ajenti, And Webmin On Ubuntu 20.04 LTS


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Cockpit is an open source application based on a web interface that allows you to control, monitor and manage the operation of a Linux server. - https://cockpit-project.org/


Ajenti is one of the most popular web-based control panels.

https://ajenti.org/


Webmin is a web-based dashboard that allows sysadmins to manage Linux and Unix-like systems (especially servers). Webmin allows system administrators to manage user accounts, updating packages, system log files, configuring firewalls, email, database, postfix, etc. - http://www.webmin.com/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Ubuntu 20.04 LTS         Hostname - www.example.com  - ip Address - 192.168.1.40

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install cockpit -y

systemctl start cockpit ; systemctl status cockpit

http://www.example.com:9090

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ajenti -

curl -O https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh

bash ./install.sh

http://www.example.com:8000

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

webmin -

apt -y install python apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl libnet-ssleay-perl

curl -L -O http://www.webmin.com/download/deb/webmin-current.deb

dpkg -i webmin-current.deb

systemctl restart webmin ; systemctl status webmin

https://www.example.com:10000/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thursday, June 4, 2020

How To Install MinGW (GCC C++ ) Compiler Suite On Windwos 10


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

mingw stands for minimalist GNU for Windows and it is a minimalist development environment for native Microsoft Windows applications and it comes with GNU tool chain, which comes to the GCC, the GNU compiler collection which supports languages like 'C' 'C plus plus' 'ada'  'fortran' etc.

Offcial Website -http://www.mingw.org/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Windows 10 64Bit

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Step 1- Download And install - AIO Runtime Libraries

AIO Runtime Libraries Download Link - https://www.softpedia.com/get/Programming/Components-Libraries/Visual-C-Installer-Uninstaller.shtml


Step 2 - Download Mingw

Download Link - http://www.mingw.org/

https://mirrors.xtom.com/osdn//mingw/68260/mingw-get-setup.exe

Link 2 - https://sourceforge.net/projects/mingw-w64/


g++ --version

gcc --version

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Monday, June 1, 2020

How To install Deploy Jitsi Meet UsinG Docker Compose in ubuntu 20.04

Video Tutorial -https://youtu.be/1mDqrf_aRZA

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Jitsi Meet is a free and open-source video-conferencing application that can be used as a standalone application or embed in your web application. It is based on WebRTC and provides multi-person video conference rooms without installing additional software or browser extensions.

Jitsi DockerHub Link - https://hub.docker.com/u/jitsi/

Jitsi Offcial wesbite - https://meet.jit.si

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment: Ubuntu 20.04 LTS        Hostname - www.yourdomain.com         ip Address - 192.168.1.10

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common neofetch apt-transport-https ca-certificates curl gnupg-agent docker.io docker-compose


systemctl enable --now docker ; usermod -aG docker $USER ; newgrp docker

git clone https://github.com/jitsi/docker-jitsi-meet.git /srv/jitsi

cp /srv/jitsi/env.example /srv/jitsi/.env

nano /srv/jitsi/.env

HTTP_PORT=80

HTTPS_PORT=443

TZ=Asia/Kolkata

PUBLIC_URL="https://www.yourdomain.com"

DOCKER_HOST_ADDRESS=192.168.1.10

ENABLE_HTTP_REDIRECT=1

cd /srv/jitsi/

docker-compose up -d

netstat -tlpn ; docker ps

https://www.yourdomain.com

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------