Tuesday, June 16, 2020

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

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