Different types of software Installation process in Ubuntu 18.04

Jahangir Alam
9 min readNov 17, 2019
  • extract tar.gz file
  • install deb file
  • MySql
  • phpmyadmin
  • MySql-workbench (MySql GUI tools)
  • sqlitebrowser
  • postman
  • postgreSQL
  • NoSQL → MongoDB
  • react app
  • nodejs
  • npm
  • font
  • Git kraken (git GUI interface)
  • crispy forms
  • Vue js
  • zsh
  • xclip
  • xmpp
  • docke
  • java
  • scala
  • aws
  • jenkins
  • conky-manager
  • bengali support in TOR browser
  • git
  • avro Openbangla
  • heroku
  • redis

extract tar.gz file

tar -xvf filename.tar.gz

Install deb file

sudo apt install /path/to/package/name.debsudo dpkg -i package_name.deb

Install .sh file

প্রথমে sh file কে executable পারমিশন দিতে হবে । file এর উপরে রাইট ক্লিক করে permission ট্যাবে যেয়ে executable permission এ চেক মার্ক দিতে হবে । এরপর টার্মিনালে যেয়ে sudo লিখে ওই sh file টা drag and drop করে দিয়ে enter দিলে ইন্সটল হবে ।

Uninstall .sh file

সাধারণত এভাবে .sh ফাইল ইন্সটল করলে সেটা /opt ডিরেক্টরিতে সেভ হয় । তাই ওই ডিরেক্টরিতে গেলে দেখব যে uninstall নামে একটি ফাইল আছে । এখন ওই ফাইলটাকে আমাদের executable permission দিতে হবে ।

sudo chmod +x uninstall

এখন ওই ডিরেক্টরিতে Terminal ওপেন করে নিচের কমান্ডটি দিতে হবে ।

sudo ./uninstall

তাহলেই uninstall হয়ে যাবে ।

MySql

Update and upgrade system

sudo apt-get update && sudo apt-get upgrade

install MySql

sudo apt install mysql-server

Verify your MySQL installation

sudo systemctl status mysql.service

see details of installed mysql server

apt-cache policy mysql-server

reconfigure or update mysql

dpkg-reconfigure mysql-server-5.7

open MySql shell

sudo mysql -u root

login to database or forget password for mysql / enter mysql shell

mysql -u root -p

see database condition

mysql> USE mysql;
mysql> SELECT User, Host, plugin FROM mysql.user;

mysql in ubuntu use UNIX auth_socket plugin by default now it change to ‘mysql_native_password’

sudo mysql -u root # I had to use “sudo” since is new installation
mysql> USE mysql;
mysql> CREATE USER ‘jahangir’@’localhost’ IDENTIFIED BY ‘jahangirdevs’;
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘jahangir’@’localhost’;
mysql> UPDATE user SET plugin=’auth_socket’ WHERE User=’jahangir’;

mysql> FLUSH PRIVILEGES;

mysql> exit;

then restart mysql

service mysql restert

Enter mysql with user

mysql -u jahangir

start and stop mysql service

sudo service mysql stop
sudo service mysql start

restart mysql

service mysql restert

uninstall mysql

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

phpmyadmin

firstly we have to install LAMP that means..
L — Linux
A — Apache
M — MySql
P — PhP
then we have to install phpmyadmin

Steps to install LAMP

step — 1: install apache2

sudo apt-get install apache2

If you want to uninstall then run this command

sudo service apache2 stop

step — 2: php installation

sudo apt install php

if we see this page then apache running.

step — 3: change the permission to create file

Now we change the permission of creating file . then create a new php file to see that php and apache is running. Now we go to this location
location : /var/www
then open terminal and pest this command.

sudo chmod 777 -R html

now create a new php file. in /var/www/html/ location
touch index.php

now open index.php file and write some php code.

<?php echo “hello world”; ?>

then save and exit. Now open browser localhost/index.php. If we see php output then we sure that `php and apache` server running.

step — 4: install phpmyadmin

sudo apt install phpmyadmin

when running command pop-up window appear. then say reconfigure automatically: press `space` button to select apache2 then press tab and hit enter to conferm. then next pop-up window to set password .

step — 5: set phpmyadmin user and password

now we have to set phpmyadmin user and password to login phpmyadmin.

CREATE USER ‘jahangir’@’localhost’ IDENTIFIED BY ‘d — -a’;
GRANT ALL PRIVILEGES ON *.* TO ‘jahangir’@’localhost’;

another user is `root` and password is same.

this step will be optional

check the status of ufw

sudo ufw status

if ufw is inactive now we should have to active ufw. run this command
sudo ufw enable

now check which application can run through `ufw`.

sudo ufw app list

now open localhost to see something like this below if we see this type of page in the browser then we haven’t do nothing otherwise we have to run this command below

sudo ufw allow “Apache Full”

This page appears because Apache is installed.

MySql-workbench (MySql GUI tools)

run this command

sudo apt-get install mysql-workbench

Sqlitebrowser

sudo apt-get update sudo apt-get install sqlitebrowser

Postman

run this command bellow

sudo snap install postman

PostgreSQL

PostgreSQL এর অফিসিয়াল ডকুমেন্টেশনের গাইডলাইন থেকে ইন্সটল করতে হবে ।

স্টেপ -১

প্রথমে /etc/apt/sources.list.d ডিরেক্টরিতে গিয়ে pgdg.listনামে ফাইল ক্রিয়েট করতে হবে sudo touch pgdg.list কমান্ড দিয়ে

স্টেপ - ২

রিপজিটরির জন্য নিচের লাইনটি pgdg.list ফাইলে রাইট করতে হবে vim/gedit এর মাধ্যমে sudo vim pgdg.list

deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

স্টেপ - ৩

key কালেক্ট করার জন্য নিচের কমান্ডটি দিতে হবে

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

এরপর সিস্টেম আপডেট দিতে হবে

sudo apt-get update

স্টেপ - ৪

এরপর হোম ডিরেক্টরিতে যেতে হবে cd ~ এই কমান্ডটি দিতে হবে ।

এরপর সকল প্যাকেজ ইন্সটল করতে হবে postgresql এর

sudo apt-get install postgresql-11 pgadmin4 postgresql-server-dev-11 libpq-dev postgresql-11 postgresql-client-11

NoSQL → MongoDB

এখানে অফিসিয়াল ডকুমেন্টেশন থেকে MongoDB ইন্সটল করার নিয়ম দেওয়া আছে ।

install হয়ে গেলে প্রথমে mongod রান করতে

হবে এরপর নতুন টার্মিনাল ওপেন করে mongo রান করতে হবে ।

/var/lib/mongodb

এই ডিরেক্টরিতে ডাটা সেভ হবে

/etc/mongod.conf

এখানে কনফিগারেশন ফাইল সেভ হবে । ডাটা সেভের ডিরেক্টরি পরিবর্তন করতে চাইলে এখানে বলে দিতে হয় এরপর রিস্টার্ট করতে হয় MongoDB

start mongoDB

sudo systemctl start mongod

এই কমান্ডে কোন এরর দিলে নিচের কমান্ড চালাতে হয় ।

sudo systemctl daemon-reload
sudo systemctl start mongod

Verify that MongoDB has started successfully

sudo systemctl status mongod

stop mongodb

sudo systemctl stop mongod

restart

sudo systemctl restart mongod

begin mongo

mongo

Recovery Mongod

$ sudo service mongod stop
$ sudo rm /var/lib/mongodb/mongod.lock
$ sudo mongod --repair --dbpath /var/lib/mongodb
$ sudo mongod --fork --logpath /var/lib/mongodb/mongodb.log --dbpath /var/lib/mongodb
$ sudo service mongod start

অনেকসময় ডাটাবেজ থেকে ডাটা আসার সময় প্রমিস বেবহার করা হয় কিন্তু সেটা ঠিকমতো হেন্ডেল করা হয়না অর্থাৎ try-catch ব্লকে রাখা হয় না । আর তাই অনেক সময় mongo db ক্রাশ করে তখন রিপেয়ারের প্রয়োজন পরে ।

Create react app

sudo npm install create-react-app -g

start new project → Official documentation

step-1

npm create-react-app new-app

if fails then run this command

sudo chown -R 𝑈𝑆𝐸𝑅:USER:GROUP ~/.npm
sudo chown -R 𝑈𝑆𝐸𝑅:USER:GROUP ~/.config

step-2

cd new-app

step-3

npm start

node Js

nodejs ইন্সটল করার জন্য উপরের এই লিঙ্কে গেলে যে ভার্সন দরকার সেই ভার্সন ইন্সটল করার কমান্ড দেওয়া আছে ।

Upgrade npm

sudo npm install -g npm@latest

install font

inconsolata

sudo apt-get install fonts-inconsolata -y
sudo fc-cache -fv

monaco

curl -kL https://raw.github.com/cstrap/monaco-font/master/install-font-ubuntu.sh | bash

Git kraken (git gui interface)

installation process

sudo snap install gitkraken

Crispy forms

Crispy forms used to design our form template.

pip install django-crispy-forms

Vue install global

step — 1 : install vue globally

yarn global add @vue/cli-init

step — 2 : initialize vue, create project and install webpack

vue init webpack vuejs-md

step — 3 : change directory to project folder and confirm to install packages

npm install

step — 4 : start development server

npm run dev

step — 5 : install vue material

npm install vue-material — save

step — 6 : import icon and font in our index.html file.

> <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic|Material+Icons">

zsh

step-1 → we need to install zsh. Official guidelines is here

sudo apt install zsh

Make zsh as default shell

chsh -s $(which zsh)

Then restart desktop. After open desktop pop up terminal select term (2) as default settings.

step-2 → Step 2 we need to install oh-my-zsh which official guidelines is here

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

open ~/.zshrc file with nano using

sudo nano .zshrc

then edit this file for agnoster theme.

ZSH_THEME="agnoster"

step-3 → Install powerline font which guidelines here

sudo apt-get install fonts-powerline

step-4 → install Powerlevel9k which guidelines here

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

then edit .zshrc for powerlevel9k

ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_DISABLE_RPROMPT=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="▶ "
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""

prompt customization here

you can also change parameter from here

install autosuggestion which guidelines here

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

then open .zshrc file and edit this like below

For further reading you can read this article

xclip

লিনাক্সে কিবোর্ডে কপি কারার জন্য ডিফল্ট কোন সিস্টেম নাই তাই xclip install করতে হয় ।

sudo apt-get install xclip

XMPP

xmpp install করার জন্য প্রথমে এই লিঙ্কে যেতে হবে , xpmm এর অফিসিয়াল ওয়েবসাইট ।

এখান থেকে linux distribution এর জন্য ফাইলটা নামাতে হবে । এরপর ফাইলের পারমিশন চেঞ্জ করতে হবে, executable permission সেট করে দিতে হবে নিচের কমান্ডের মাধ্যমে ।

sudo chmod +x <xmpp_file_name>

কোন ফাইলের পারমিশন চেক করা যায় ls -al এই কমান্ডের মাধ্যমে ।

এরপর ফাইলটি execute করার জন্য নিচের কমান্ডটি দিতে হবে ।

sudo ./<file_name>

এরপর গ্রাফিকাল ইন্টারফেস চলে আসলে শুধু নেক্সট নেক্সট দিয়ে ইন্সটল করে নিতে হবে ।

File install হয়ে গেলে /opt/lampp ডিরেক্টরিতে যেতে হবে । এখান থেকে manager-linux-x64.run এই ফাইলটা রান করতে হবে ।

sudo ./manager-linux-x64.run

xmpp রান হয়ে গেলে সেখান থেকেই সার্ভার স্টার্ট করে নিতে হবে ।

এখন সকল ফাইল xampp সার্ভারের /opt/lampp/htdocs ডিরেক্টরি থেকে রান হবে ।

কিন্তু root ডিরেক্টরিতে কোন ফাইল সাধারণভাবে create/save করা যায় না তাই এই htdocs ডিরেক্টরির পারমিশন চেঞ্জ করে নিতে হয় ।

পারমিশন চেঞ্জ করার জন্য প্রথমে টার্মিনাল ওপেন করে super user এ যেতে হবে নিচের কমান্ড দিয়ে এবং এখানে পাসওয়ার্ড দিতে হবে ।

sudo su

এরপর cd /opt/lampp এই কমান্ড দিয়ে lampp ডিরেক্টরিতে যেতে হবে ।

এরপর এই নিচের এই কমান্ড টি দিলে শুধুমাত্র ঐ htdocs ফাইলের পারমিশন চেঞ্জ হয়ে যাবে । তখন আমরা ঐ ডিরেক্টরিতে নরমাল ইউজারের মতো ফাইল কপি পেস্ট করতে পাড়বো এবং ফাইল মডিফাই করতে পাড়বো ।

chmod 777 ./htdocs

এরপর localhost/file_name.php এইটা url এ দিয়ে ইন্টার দিলে php file রান হবে ।

এই ইন্সটল প্রসেসটি এই ইউটিউব টিউটোরিয়াল থেকে নেওয়া হয়েছে ।

Docker

sudo snap install docker

Java

sudo apt install default-jre
sudo apt install openjdk-11-jre-headless

Scala

sudo apt install scala

AWS

sudo snap install aws-cli --classic

Jenkins

sudo snap install jenkins --classic

conky-manager

ডেক্সটপে ঘড়ি, cpu monitor, network ইত্যাদি ইনফরমেশন লাইভ দেখার জন্য এই ম্যানেজার ব্যাবহার করা হয় ।

এরজন্ন প্রথমে conky install করতে হয় ।

sudo apt install conky

এরপর নিচের দুইটা লিঙ্কে যেয়ে realpath এবং conky-manager এর dev ফাইল ডাউনলোড করতে হবে ।

http://launchpadlibrarian.net/340091846/realpath_8.26-3ubuntu4_all.deb

এরপর সেগুলোকে ইন্সটল করতে হবে নিচের কমান্ড গুলোর মাধ্যমে ।

sudo dpkg -i realpath_8.26-3ubuntu4_all.deb
sudo dpkg -i conky-manager-v2.4-amd64.deb

ইন্সটল dependency

sudo apt install libgee-0.8-2

install হয়ে গেলে নিচের এই কমান্ডটি চালাতে হবে ।

sudo apt -f install

সকল প্যাকেজ ইন্সটল হয়ে গেলে conky-manager open করতে হবে application থেকে ।

Bengali support in TOR browser

follow the steps

  1. Go to the folder in “Tor Browser>Browser>fonts” paste the font there.
  2. Restart the browser.
  3. Select the Vrinda font default for Bangla from the browser settings.

git

sudo apt install git

Avro openbangla

উপরের এই লিঙ্কে open bangla ইন্সটল করার কমান্ডগুলো দেওয়া আছে ।

Heroku

sudo snap install --classic heroku

Redis

sudo apt install redis-server

--

--