Posts

Showing posts with the label Installation

How to install MySQL in docker

Step 1: Pull mysql image MySQL can be of any version, but I chose 5.6 for setup $ sudo docker pull mysql/mysql-server:5.6 To pull the latest version $ sudo docker pull mysql/mysql-server Step 2: Start and config MySQL Copy IMAGE_ID $ sudo docker images To create and run MySQL first time $ sudo docker run --name mysql-5.6 -p 52000:3306 -e MYSQL_ROOT_PASSWORD=yourpassword -d IMAGE_ID Description --name => container name (can be anything) -p  => external port : internal port -e  => Environment variables (MYSQL_ROOT_PASSWORD) -d   => Detached mode Step 3: Check the mysql process status $ sudo docker ps To enter the MySQL server $ sudo docker exec -it CONTAINER_ID bash $ mysql -uroot -pyourpassword  After initial container creation to run MySQL copy the CONTAINER_ID $ sudo docker container ls -a To start $ sudo docker start CONTAINER_ID To connect using external MySQL first grant privileges $ mysql -P52000 -uroot -ppassword

Two step verification for SSH using Google authentication in 3 simple steps

Image
    Google Authenticator (GA) Google authenticator is a tool which generate 6 digits Time-based One Time Password(TOTP) for authentication which supports authenticator service(GA, Authy, ..).     Step 1 : Install Google authenticator  $ sudo apt update $ sudo apt install libpam-google-authenticator   Step 2 : Configure Google authenticator $ google-authenticator     time based authentication - y   Scan code using google authenticator ios or android app or type in the secret key ** Copy the emergency scratch codes Next type ( y )   Type ( y ) to prevent man-in-the-middle attack Type ( n ) Type ( y ) for rate limiting ** If detailed explanation is required please comment. I will make another post with detailed explanation.   Step 3 : Configure ssh $ sudo nano /etc/pam.d/sshd Add the following line to last line of the file auth required pam_google_authenticator.so   $ sudo nano /etc/ssh/sshd_config Find and Replace ChallengeRespo...

Git Intro and Installation on Ubuntu in 2 simple steps

Image
What is a version control system?  VCS or Version Control System is similar to history which records events happened on a particular date (June 29, 2007 - First iPhone launch) where as VCS record events happened on a particular revision/commit (commit id - files updated). VCS Tools: Git Subversion (SVN) Concurrent Versions System (CVS) Distributed VCS When you checkout a repository   instead of getting only the tip of the source it actually clones the entire repository. So basically each copy of repo itself a backup of central repository. In case of failure of central repo you can create a new repo a push your copy to the central repo. (which is considering you are in sync with central repo) What is Git ? Git is Distributed version control system free and open source used by almost all companies (Google, Facebook, Microsoft, ...) a must know tool for developers Steps 1 : Update package manager $ sudo apt update Step 2 : Install git $ sudo apt install git-all  Bonu...

How to take a picture from terminal

Image
 Step 1 : Choose any one of the following software ffmpeg streamer fsm Step 2 : Installation  Install ffmped  $ sudo apt update $ sudo apt install ffmpeg Install streamer $ sudo apt-get install streamer Install fswebcam $ sudo apt-get install fswebcam Step 3 : Sample shot Snapshot using ffmped $ ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/sample.jpg Snapshot using fswebcam $ fswebcam sample.jpg Snapshot using streamer streamer -f jpeg -o sample.jpeg   $ - requires given linux commands to be executed as a regular non-privileged user

Install Skype in Ubuntu using terminal in 3 Simple Steps

Image
STEP 0 Open the Terminal.(Ctrl + Alt + T) Install curl if not available  $ sudo apt-get install curl STEP 1 Download the GPG key $ curl https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - STEP 2 Add skype repository to apt $ echo "deb https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skypeforlinux.list  STEP 3 Update the package list $ sudo apt update Install the Skype   $ sudo apt install skypeforlinux Press Y to install the skype.