Wednesday, July 29, 2020

How To install TIG stack On Ubuntu 20.04 LTS

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

TIG stack is a group of powerful open-source monitoring tools, Telegraf, InfluxDB and Grafana where;

Telegraf is an open-source server agent for collecting and sending metrics and events from databases, systems, and IoT sensors.

https://www.influxdata.com/time-series-platform/telegraf/


InfluxDB is an open-source time series database and provides datastore for metrics, events, and real-time analytics.

https://www.influxdata.com/


Grafana is a data visualization and monitoring tool and supports time series datastores such as Graphite, InfluxDB, Prometheus, Elasticsearch.

https://grafana.com/docs/

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

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


InfluxData Downloads page. - https://portal.influxdata.com/downloads/

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.14.3-1_amd64.deb

dpkg -i telegraf_1.14.3-1_amd64.deb

systemctl enable --now telegraf


InfluxData Downloads page -https://portal.influxdata.com/downloads/

wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.0_amd64.deb

dpkg -i influxdb_1.8.0_amd64.deb

systemctl enable --now influxdb ; systemctl status influxdb


apt install -y adduser libfontconfig1

Grafana downloads page- https://grafana.com/grafana/download

wget https://dl.grafana.com/oss/release/grafana_7.0.1_amd64.deb

dpkg -i grafana_7.0.1_amd64.deb

systemctl daemon-reload ; systemctl enable --now grafana-server ; systemctl status grafana-server


influx

create database telegraf

create user telegraf with password 'Strongpassword'

grant all on telegraf to telegraf


mv /etc/telegraf/telegraf.conf{,.old}

telegraf config -input-filter cpu:mem:swap:system:processes:disk -output-filter influxdb > /etc/telegraf/telegraf.conf

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


# Configuration for sending metrics to InfluxDB

[[outputs.influxdb]]

urls = ["http://127.0.0.1:8086"]

database = "telegraf"

username = "telegraf"

password = "Strongpassword"

systemctl restart telegraf ; systemctl status telegraf


http://www.yourdomain.com:3000

User - admin Password - admin


Name - influxdb | URL: http://localhost:8086/ | Database: telegraf | User: telegraf | Password: 'Strongpassword'

https://grafana.com/dashboards/5955

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

Friday, July 24, 2020

Setting up Redmine with Docker Compose in Ubutnu 20.04

VIDEO TUTORIAL -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Redmine Offcial DockerHub Link - https://hub.docker.com/_/redmine
Link 2 - https://hub.docker.com/r/sameersbn/redmine

Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.
Offcial Website -https://www.redmine.org/

Docker Compose is a tool for defining and running multi-container Docker applications. It allows users to launch, execute, communicate, and close containers with a single coordinated command. - https://docs.docker.com/compose/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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


docker pull sameersbn/redmine:latest

docker pull sameersbn/redmine:4.1.1-2

docker build -t sameersbn/redmine github.com/sameersbn/docker-redmine


wget https://raw.githubusercontent.com/sameersbn/docker-redmine/master/docker-compose.yml
docker-compose up

docker run --name=postgresql-redmine -d \
  --env='DB_NAME=redmine_production' \
  --env='DB_USER=redmine' --env='DB_PASS=password' \
  --volume=/srv/docker/redmine/postgresql:/var/lib/postgresql \
  sameersbn/postgresql:9.6-4

docker run --name=redmine -d \
  --link=postgresql-redmine:postgresql --publish=10083:80 \
  --env='REDMINE_PORT=10083' \
  --volume=/srv/docker/redmine/redmine:/home/redmine/data \
  sameersbn/redmine:4.1.1-2

http://www.yourdomain.com:10083/
username: admin   | password: admin
docker ps -aq
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To Install OpenNebula Front-end on Ubuntu 18.04 LTS

VIDEO TUTORIAL -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OpenNebula is an opensource, feature-rich and flexible Virtualization solution that helps you build and manage Virtualized Data Centers and enterprise clouds.
Offcial Website -https://opennebula.io/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing Environment:Ubuntu 18.04 LTS         Hostname - www.example.com  - ip Address - 192.168.1.50 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
apt update ; apt install mariadb-server mariadb-client build-essential net-tools curl git software-properties-common -y

systemctl start mariadb ; systemctl enable mariadb
mysql_secure_installation

mysql -u root -p
CREATE DATABASE opennebula;
CREATE USER 'oneadmin'@'localhost' IDENTIFIED BY 'oneadmin';
GRANT ALL ON opennebula.* TO 'oneadmin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

wget -q -O- https://downloads.opennebula.org/repo/repo.key | sudo apt-key add -
echo "deb https://downloads.opennebula.org/repo/5.6/Ubuntu/18.04 stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list
apt update ; apt install opennebula opennebula-sunstone opennebula-gate opennebula-flow -y
sudo /usr/share/one/install_gems
systemctl start opennebula opennebula-sunstone ; systemctl enable opennebula opennebula-sunstone
nano /etc/one/oned.conf
systemctl status opennebula

nano /var/lib/one/.one/one_auth
User - oneadmin          | Password - RyibUScheym9
http://192.168.1.50:9869
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tuesday, July 21, 2020

How To Mount Remote Directories over SSH via SSHFS on UbuntU 20.04 LTS

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

SSHFS (Secure Shell FileSystem), is a tool that allows users to securely access remote filesystems over the SSH protocol.

Github - https://github.com/libfuse/sshfs

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

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


apt update ; apt install openssh-client sshfs -y

ssh ubuntu@192.168.1.50                              - SSH Server Detail- Ubuntu 18.04.LTS /192.168.1.50

mkdir $HOME/sshfs

sshfs [user@]host:[remote_directory] mountpoint [options]

sshfs ubuntu@192.168.1.50:/home/ubuntu $HOME/sshfs   - SSH Server Detail- Ubuntu 18.04.LTS /192.168.1.50

df -hT


Unmount -

cd && fusermount -u $HOME/sshfs

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

Friday, July 17, 2020

How To Install JFrog Artifactory on Ubuntu 20.04

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

JFrog Artifactory is one of the most advanced repository management applications which integrate seamlessly with continuous integration and delivery tools. It helps you have a single source of truth for all your packages, container images and Helm charts.

Offcial Website -https://jfrog.com/artifactory/

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

Testing Environment:

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

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

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


JFrog Artifactory deb download

systemctl start artifactory ; systemctl enable artifactory

http://192.168.1.40:8081/artifactory


Default logins:

Username: admin

Password: password

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

Sunday, July 12, 2020

How To Install Mono On Ubuntu 18.04 LTS Desktop


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

Mono is a platform for developing and running cross-platform applications based on the ECMA/ISO Standards. It is a free and open-source implementation of Microsoft’s .NET framework.

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

Our Server Specification:-

Os : Ubuntu 18.04 64Bit  || Hostname: www.yourdomain.com || IP Address of Server:192.168.1.50

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

lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I

apt install -y build-essential net-tools curl git software-properties-common dirmngr gnupg apt-transport-https ca-certificates

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

sudo sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" > /etc/apt/sources.list.d/mono-official-stable.list'

sudo apt update ; sudo apt install mono-complete -y

mono --version

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

Tuesday, July 7, 2020

3 Ways To Install CMake on Ubuntu 20.04 LTS


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

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

Offcial Website -https://cmake.org/

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

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

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


Method:1

apt update ; apt install cmake -y

cmake --version


Method:2 Installing CMake using command-line

snap install cmake --classic

cmake --version


Method:3

Installing CMake using Source Code VI

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

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

Thursday, July 2, 2020

How To Install PHP Mcrypt Extension on Ubuntu 18.04 | 20.04

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

PHP Mcrypt extension is an interface to the mcrypt cryptography library and it supports a wide variety of block algorithms such as DES, TripleDES, Blowfish (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and GOST in CBC, OFB, CFB and ECB cipher modes.

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

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

apt update ; apt install -y build-essential net-tools curl git software-properties-common php php-pear php-dev libmcrypt-dev

which pecl ; php -v


PECL usage: pecl help

pecl channel-update pecl.php.net


mkdir -p /tmp/pear/cache

pecl search mcrypt

pecl install mcrypt


Ubuntu 20.04 LTS

nano /etc/php/*/cli/php.ini     || nano /etc/php/*/apache2/php.ini

extension=mcrypt.so

php -m | grep mcrypt


Ubuntu 18.04: -

nano /etc/php/7.2/cli/php.ini   || nano /etc/php/7.2/apache2/php.ini

extension=mcrypt.so

php -m | grep mcrypt


systemctl daemon-reload

systemctl restart apache2  Or systemctl restart nginx

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