Friday, July 26, 2019

how to docker install or setup on dabian based operating system

Run this if you want to install the docker-ce on Ubuntu 18.04:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
sudo apt update
sudo apt install docker-ce
docker -v

Executing Docker command without Sudo:
sudo usermod -aG docker $USER
sudo systemctl status docker

Thursday, July 25, 2019

what difference between apt and apt-get commands of Linux

  1. apt simply a package manager to merge multiple commands into one single command
  2. apt commands that replace the older apt-get commands.
  3. apt = advanced packaging tool
apt & apt-get  command with details

apt remove => apt-get remove => Removes a package
apt purge => apt-get purge => Removes package with configuration
apt update => apt-get update => Refreshes repository index
apt upgrade => apt-get upgrade => Upgrades all up-gradable packages
apt autoremove => apt-get autoremove => Removes unwanted packages
apt full-upgrade => apt-get dist-upgrade => Upgrades packages with auto handling of dependencies
apt search => apt-cache search => Searches for the program
apt show => apt-cache show => Shows package details

Friday, December 21, 2018

How to install docker on arch linux and also enable your machine

How to install docker on your Machine


$ sudo pacman -S docker 

$ sudo usermod -a -G docker $USER

$ sudo systemctl enable docker

Then Reboot command use

How to create mysql Container

Command Below:
$ docker run --name db_flask_1 -e MYSQL_ROOT_PASSWORD=flask_db_pw -p 6789:3306 -v $PWD/db_files:/var/lib/mysql -d mariadb:latest

docker container mysql database login:

docker exec -it db_flask_2 bin/bash

mysql -u root -p

show databases;

select * from users;

delete from users where id = 3;



Wednesday, December 19, 2018

how to install nginx server with config on arch linux

Install Arch Linux:

1st command to install nginx server in your machine. following the command below:
$ sudo pacman -S nginx

2nd Command to enable nginx server on your Machine OS System. Following The command below:
$ sudo systemctl enable nginx

3rd command to start the nginx server on your local machine. Following the Command Below:
$ sudo systemctl start nginx

4th command to check the status on nginx server on your machine. Following the command Below:
$ sudo systemctl status nginx


5th command if you want to ensure nginx server do run on your machine: Go to web browser and try to this link: 127.0.0.1:80 or localhost:80 
6th command if you want to check nginx version on your Machine. Try this command below:
$ nginx -v

7th Command if you anto to test nginx service on your machine: Try this command Below:
$ sudo nginx -t

8th command if you want to edit configuration on nginx server. check this command below:
$ sudo vim /etc/nginx/nginx.conf

Save and exit command on vim
:wq!

if you have use nano command line editor:
$ sudo nano /etc/nginx/nginx.conf
save and exit(ctrl+x, y, enter)

9th command if you want to reload nginx server.  Try this command below: 
$ sudo systemctl reload nginx

10th Command if you want to stop nginx server. Try this command below:
$ sudo systemctl stop nginx

All Post Title

Core utilities on a GNU/Linux system

Basic commands