Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee
Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, November 2, 2020

How Ubuntu used in government sector?

November 02, 2020
How Ubuntu used in government sector?

Is 700mb DVD sufficient to burn ubuntu in it?

November 02, 2020
Is 700mb DVD sufficient to burn ubuntu in it?

Wednesday, September 2, 2020

How to Setup Monitoring for Docker Containers using Prometheus on Ubuntu 18.04

September 02, 2020
How to Setup Monitoring for Docker Containers using Prometheus on Ubuntu 18.04

 Requirment 

1. docker should be installed

2. docker-compose also be installed


Installation of docker

1.  sudo apt-get install docker.io or sudo apt  install docker.io

2. docker --version

3. sudo apt-get install docker-compose

 

Creating a Configuration files of prometheus

1. create a new file prometheus.yml and copy paste below

sudo nano ~/ prometheus.yml  or sudo nano /etc/prometheus/prometheus.yml

# prometheus.yml
global:
 scrape_interval: 5s
 external_labels:
   monitor: 'my-monitor'
rule_files:
 - 'alert.rules'
scrape_configs:
 - job_name: 'prometheus'
   static_configs:
     - targets: ['your_server_ip:9090']

2. create a new file docker-compose.yml and copy paste below

sudo nano ~/docker-compose.yml or sudo nano /etc/prometheus/docker-compose.yml

# docker-compose.yml
version: '2'
services:
  prometheus:
     image: prom/prometheus:latest
     volumes:
       - ./prometheus.yml:/etc/prometheus/prometheus.yml            
     command:
       - '--config.file=/etc/prometheus/prometheus.yml'
     ports:
       - '9090:9090'

 3. Run the docker compose file

cd /etc/prometheus/ or sudo ~/docker-compose up

sudo docker-compose up

 4. Open browser

http://your_server_ip:9090

 5. Install Node exporter

sudo nano ~/docker-compose.yml or sudo nano /etc/prometheus/docker-compose.yml
 
copy paste at last line
node-exporter:
     image: prom/node-exporter
     ports:
       - '9100:9100'
 sudo nano ~/ prometheus.yml  or sudo nano /etc/prometheus/prometheus.yml
 
copy paste at last line 
- job_name: 'node-exporter'
   static_configs:
     - targets: ['node-exporter:9100'] 

 6. Restart docker-composer

cd /etc/prometheus/ or sudo ~/docker-compose restart

sudo docker-compose restart

7. Install Grafana

sudo nano ~/docker-compose.yml or sudo nano /etc/prometheus/docker-compose.yml

copy paste at last line  

grafana:
     image: grafana/grafana
     user: "0" #[ Execute  id -u in terminal to find the user id from where you are invoking docker compose]
     volumes:
       - ./grafana_db:/var/lib/grafana
     environment:
       - GF_SECURITY_ADMIN_PASSWORD=yourpass
     depends_on:
       - prometheus
     ports:
       - '3000:3000'

 4. Open browser

http://your_server_ip:3000

 

 

Wednesday, June 10, 2020

How to solve command could not be located because '/bin' is not included in the path environment variable

June 10, 2020
How to solve command could not be located because '/bin' is not included in the path environment variable
ERROR
command could not be located because '/bin' is not included in the path environment variable


SOLUTION 1
cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

ls -l /etc/environment
-rw-r--r-- 1 root root 79 2010-03-16 14:44 /etc/environment

JUST TYPE
export PATH=/usr/bin:/bin

=========================================
SOLUTION 2
sudo nano ~/.bashrc
CP & PST AT LAST LINE OR BOTTOM
export PATH=/usr/bin:$PATH

source ~/.bashrc
==========================================




Monday, March 30, 2020

How to Install IntelliJ IDEA on Ubuntu 18.04 LTS, Debian and Linux Mint

March 30, 2020
How to Install IntelliJ IDEA on Ubuntu 18.04 LTS, Debian and Linux Mint
How to Install IntelliJ IDEA on Ubuntu 18.04 LTS, Debian and Linux Mint

Requirment
    login: user with root privileges
    OS: Ubuntu 18.04 64-bit
    RAM: Minimum 2 GB RAM, 8 GB RAM recommended
    Harddisk Space: 1.5 GB hard disk space, 5 GB + at least 1 GB for caches
    CPU: 2
    screen resolution: 1024x768 minimum
    Download Size : 774MB

Offically Website of IntelliJ IDEA
https://www.jetbrains.com/idea/download/#section=linux

Offically Website of jetbrains
https://www.jetbrains.com/toolbox-app/

    IntelliJ IDEA Community Edition (Free)
    IntelliJ IDEA Ultimate Edition (Paid version with extra features)
    IntelliJ IDEA Educational (Ultimate Edition but free for students and faculty members)

Method 1
Install using the Snap
Installing IntelliJ IDEA community Edition
Step1 :- sudo snap install intellij-idea-community --classic

Installing IntelliJ IDEA Educational Edition
Step1 :- sudo snap install intellij-idea-educational --classic

Installing IntelliJ IDEA Ultimate Edition 30Day
Step1 :- sudo snap install intellij-idea-Ultimate --classic

After Successful Installation
Step2 :- intellij-idea-community

Method 2
Install using the Toolbox App
Step1 :- sudo apt update
Step2 :- sudo wget https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.16.6319.tar.gz
Step3 :- cd /tmp  OR  cd /opt
Step4 :- sudo tar -xzf jetbrains-toolbox-1.16.6319.tar.gz -C /opt

Need to Register in IntelliJ IDEA
  

Method 3
Using Official Package or Standalone installation of community or Ultimate Edition
Step1 :- sudo apt update
Step2 :- sudo wget https://download.jetbrains.com/idea/ideaIU-2019.3.4.tar.gz
Step3 :- cd /tmp  OR  cd /opt
Step4 :- sudo tar -xzf ideaIU.tar.gz -C /opt

How To Install Git and Git-Gui on Ubuntu 18.04 LTS, Debian and Linux Mint

March 30, 2020
How To Install Git and Git-Gui on Ubuntu 18.04 LTS, Debian and Linux Mint
How To Install Git and Git-Gui on Ubuntu 18.04 LTS, Debian and Linux Mint

Offically Website of GitHub
https://github.com/git/git

Offically Website of Git
https://git-scm.com/downloads

Method 1
Installing Git
Step1 :- sudo apt update
Step2 :- sudo apt install git  OR  sudo apt-get install git-gui

Verify
Step3 :- git --version

Method 2
Installing Git from Source
Step1 :- sudo apt update
Step2 :- sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
Step3 :- cd /tmp  OR  cd /usr/src/
Step4 :- sudo wget https://github.com/git/git/archive/v2.26.0.zip -O git.zip  
      OR sudo wget https://github.com/git/git/archive/v2.26.0.tar.gz -O git.tar.gz    
Step5 :- sudo unzip git.zip
      OR sudo tar -xf git.tar.gz
Step6 :- cd git-*
Step7 :- sudo make prefix=/usr/local all
Step8 :- sudo make prefix=/usr/local install
 
ERROR
cache.h:21:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
Makefile:2387: recipe for target 'fuzz-commit-graph.o' failed
make: *** [fuzz-commit-graph.o] Error 1

SOLUTIONS   
Step1 :- sudo apt-get install libz-dev
Step2 :- sudo apt install zlib1g-dev

Step9 :- git --version

Clone the Git
Step10 :- cd ~
Step11 :- git clone https://github.com/git/git.git  OR  git clone https://github.com/git/git
Step12 :- cd git
Step13 :- sudo make prefix=/usr/local all
Step14 :- sudo make prefix=/usr/local install

Configuring Git
Step15 :- git config --global user.name "Cloud Network"
Step16 :- git config --global user.email "itcloudnet@gmail.com"

Verify
Step17 :- git config --list

configuration file of Git
Step18 :- nano ~/.gitconfig

Sunday, March 29, 2020

How To Install Node.js and npm Ubuntu 18.04, Debian and Linux Mint

March 29, 2020
How To Install Node.js and npm Ubuntu 18.04, Debian and Linux Mint
How To Install Node.js and npm Ubuntu 18.04, Debian and Linux Mint

Officially Website
https://nodejs.org/en/download/

Stable release: 12.15.0

Offically Github
https://github.com/nvm-sh/nvm

METHOD 1
Step1 :- sudo apt-get update

Step2 :- sudo apt install nodejs

Step3 :- node -v OR node --version OR nodejs -v

Step4 :- npm -v OR npm --version

METHOD 2
Installing Using PPA
sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python-software-properties

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
OR
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh

sudo apt install nodejs

node --version
nvm --version

sudo apt install build-essential

METHOD 3
Installing Using NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
nvm ls  OR nvm ls-remote
nvm install (Latest LTS)  OR nvm install --lts
nvm use (Latest LTS)
node --version
nvm ls
nvm alias default (Latest LTS)
nvm use default
nvm install node
npm install express
npm install -g express
npm link express
nvm help
nvm --version

Removing Node.js
sudo apt remove nodejs
sudo apt purge nodejs
sudo apt autoremove
sudo apt remove nodejs npm

nvm current
nvm uninstall node_version
nvm deactivate