Linux Boot camp Series – 15/Mar/2020

Lab Environment

  • Create one ubuntu 18.04 instance
  • Create one centos 7 based instance

Package based installation


  • Packages: These are the softwares that can be installed using package managemet softwares

  • Package Definitions: These package definitions define the servers from which Package Management Softwares will fetch the package and install.

  • Experiment:

sudo -i
cat /etc/apt/sources.list | less
  • Package Manager in the case of Ubuntu is apt
  • Use apt over apt-get
  • Searching packages using package manager
apt-cache search <packagename>
  • Experiment: Try to find nginx package
apt-cache search nginx

# output
libnginx-mod-http-geoip - GeoIP HTTP module for Nginx
libnginx-mod-http-image-filter - HTTP image filter module for Nginx
libnginx-mod-http-xslt-filter - XSLT Transformation module for Nginx
libnginx-mod-mail - Mail module for Nginx
libnginx-mod-stream - Stream module for Nginx
nginx - small, powerful, scalable web/proxy server
nginx-common - small, powerful, scalable web/proxy server - common files
nginx-core - nginx web/proxy server (standard version)
nginx-doc - small, powerful, scalable web/proxy server - documentation
resource-agents - Cluster Resource Agents
collectd-core - statistics collection and monitoring daemon (core system)
coquelicot - "one-click" file sharing web application with a focus on users' privacy
diaspora-installer - distributed social networking service - installer
diaspora-installer-mysql - distributed social networking service - installer (with MySQL)
fcgiwrap - simple server to run CGI applications over FastCGI
gitlab-workhorse - unloads Git HTTP traffic from the GitLab Rails app (Unicorn)
gitweb - fast, scalable, distributed revision control system (web interface)
golang-github-gorilla-handlers-dev - collection of useful handlers for Go's net/http package
golang-github-hashicorp-hcl-dev - Go implementation of HashiCorp Configuration Language
gunicorn - Event-based HTTP/WSGI server (Python 2 version)
gunicorn-examples - Event-based HTTP/WSGI server (examples)
gunicorn3 - Event-based HTTP/WSGI server (Python 3 version)
kopano-webapp-nginx - WebApp for the Kopano Collaboration Platform - Nginx
lemonldap-ng-fastcgi-server - Lemonldap::NG FastCGI server
lemonldap-ng-handler - Lemonldap::NG handler part
libluasandbox-bin - Generic Lua sandbox library for dynamic data analysis – utilities
libluasandbox-dev - Generic Lua sandbox library for dynamic data analysis – development files
libluasandbox0 - Generic Lua sandbox library for dynamic data analysis — dynamic library
libnginx-mod-http-auth-pam - PAM authentication module for Nginx
libnginx-mod-http-cache-purge - Purge content from Nginx caches
libnginx-mod-http-dav-ext - WebDAV missing commands support for Nginx
libnginx-mod-http-echo - Bring echo and more shell style goodies to Nginx
libnginx-mod-http-fancyindex - Fancy indexes module for the Nginx
libnginx-mod-http-headers-more-filter - Set and clear input and output headers for Nginx
libnginx-mod-http-lua - Lua module for Nginx
libnginx-mod-http-ndk - Nginx Development Kit module
libnginx-mod-http-perl - Perl module for Nginx
libnginx-mod-http-subs-filter - Substitution filter module for Nginx
libnginx-mod-http-uploadprogress - Upload progress system for Nginx
libnginx-mod-http-upstream-fair - Nginx Upstream Fair Proxy Load Balancer
libnginx-mod-nchan - Fast, flexible pub/sub server for Nginx
libnginx-mod-rtmp - RTMP support for Nginx
libplack-middleware-file-sass-perl - Sass and SCSS support for all Plack-based PSGI frameworks
lua-nginx-cookie - Pure Lua cookie parser for the nginx embedded Lua language
lua-nginx-dns - DNS resolver for the nginx embedded Lua language
lua-nginx-kafka - Pure Lua Kafka producer for the nginx embedded Lua language
lua-nginx-memcached - Pure Lua memcached client driver for the nginx embedded Lua language
lua-nginx-redis - Pure Lua redis client driver for the nginx embedded Lua language
lua-nginx-redis-connector - Connection utilities for lua-nginx-redis
lua-nginx-string - String utilities for the nginx embedded Lua language
lua-nginx-websocket - Lua websocket client driver for the nginx embedded Lua language
mighttpd2 - classical web server on WAI/warp
nginx-extras - nginx web/proxy server (extended version)
nginx-full - nginx web/proxy server (standard version)
nginx-light - nginx web/proxy server (basic version)
php-symfony-web-server-bundle - provide commands for applications using the PHP built-in web server
python-certbot-nginx - transitional dummy package
python-certbot-nginx-doc - Nginx plugin documentation for Certbot
python-django-downloadview - efficient static file serving with Django
python-django-websocket-redis - Websockets for Django applications using Redis (Python2 version)
python-gunicorn - Event-based HTTP/WSGI server (Python 2 libraries)
python-reconfigure - simple config file management library (Python 2)
python-whitenoise - static file serving for WSGI applications (Python 2)
python3-certbot-nginx - Nginx plugin for Certbot
python3-django-downloadview - efficient static file serving with Django (Python3 version)
python3-django-websocket-redis - Websockets for Django applications using Redis (Python3 version)
python3-gunicorn - Event-based HTTP/WSGI server (Python 3 libraries)
python3-reconfigure - simple config file management library (Python 3)
python3-whitenoise - static file serving for WSGI applications (Python 3)
rt4-fcgi - External FastCGI support for request-tracker4
viewvc - web interface for CVS and/or Subversion repositories

  • From here try to pick the package which makes sense In this example i prefer nginx
  • Which version of nginx will be installed? for that we have command
apt-cache madison nginx

 nginx | 1.14.0-0ubuntu1.7 | bionic-updates/main amd64 Packages
     nginx | 1.14.0-0ubuntu1.7 | bionic-security/main amd64 Packages
     nginx | 1.14.0-0ubuntu1 | bionic/main amd64 Packages

  • Once we are ok with version, we can continue installation using
apt install <package> --version <version name>
  • Removing the package from system is very simple
apt remove <package>
apt remove --purge <package>
  • Exercise: Install apache2, find the version of apache2 which you are installing and then purge apache2
  • Repeat the same for tomcat 8 and 9

Personal Package Archives (PPA)

  • A form of apt Repository
  • PPA’s are generally hosted by individual vendors for some product
  • Example: Ansible install or oracle jdk installation. Ansible installation refer here
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install ansible

Adding repositories to sources.list in Ubuntu

  • First lets understand the syntax in /etc/apt/sources.list
<deb or deb-src> <url of the repository> <code name of the release> <Component>
deb bionic multiverse
  • Every line in sources.list has the following information to the apt

    • deb or deb-src: deb refers to binary package and deb-src will refer the source
    • url of the repository: Location where repository is located
    • code name: bionic/xenial/trusty
    • Component:
      • main => officially supported softwares
      • restricted => questions on licenses
      • universe => Packages supported by community
      • multiverse => software are neither free nor supported
  • In some case, softwares which you are trying to install might not be defined in sources.list, then we might need to add the stuff

  • To do this lets look at one software installation which is file beats from elastic stack refer here

Try installing softwares on redhat

  • Some interesting commands are
sudo yum search <package>
sudo yum install <package>
sudo yum remove <package>
  • Exercise: Install tomcat, apache and remove the softwares from centos distributions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner