Posts Tagged - linux

Build JDK from source on Ubuntu 20.04

cd /home/iconplus/Download

wget -c

tar -xvf clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz

./configure --with-num-cores=4 --with-memory-size=4096 --with-toolchain-type=clang --with-toolchain-path=/home/iconplus/Downloads/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin --with-libclang=/home/iconplus/Downloads/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04

make images

Read More

Enable DPDK for Libpcap

Install required tools and libraries

sudo apt install git build-essential bison flex libnuma-dev libnl-3-dev libnl-genl-3-dev

Clone latest DPDK source code from Github

git clone

Compile and Install

cd dpdk

Get a native target environment automatically

make defconfig O=mybuild

Or get a specific target environment

make config T=x86_64-native-linux-gcc O=mybuild

Customize the target configuration in the generated .config file. Example for enabling the shared library

sed -ri 's,(CONFIG_RTE_BUILD_SHARED_LIB=).*,\1y,' mybuild/.config

make O=mybuild

sudo make install O=mybuild

*) Any kernel modules to be used, e.g. igb_uio, kni, must be compiled with the same kernel as the one running on the target

Install libpcap with dpdk enabled

cd ../

git clone

cd libpcap

`./configure –with-dpdk=/usr/local


sudo make install

Read More

Compile and Install Linux Kernel on Ubuntu 20.04

sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison


tar xvf linux-5.7.10.tar.xz

cd linux-5.7.10

cp /boot/config-$(uname -r) .config

make menuconfig


sudo make modules_install

sudo make install

sudo update-initramfs -c -k 5.7.10

sudo update-grub

*) used for trying new kernel api from linux (io_uring).

Read More

Install Nginx and Let's Encrypt on Ubuntu 20.04


  • You have domain name pointing to your server public IP.

Installation process

  • sudo apt update

  • sudo apt install nginx

  • sudo systemctl enable nginx

  • sudo apt install certbot

  • sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048

  • sudo mkdir -p /var/lib/letsencrypt/.well-known

  • sudo chgrp www-data /var/lib/letsencrypt

  • sudo chmod g+s /var/lib/letsencrypt

  • sudo vim /etc/nginx/snippets/letsencrypt.conf

location ^~ /.well-known/acme-challenge/ {
  allow all;
  root /var/lib/letsencrypt/;
  default_type "text/plain";
  try_files $uri =404;
  • sudo vim /etc/nginx/snippets/ssl.conf
ssl_dhparam /etc/ssl/certs/dhparam.pem;

ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

ssl_stapling on;
ssl_stapling_verify on;
resolver valid=300s;
resolver_timeout 30s;

add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
  • sudo vim /etc/nginx/sites-available/
server {
  listen 80;
  listen [::]:80;
  root /var/www/html
  include snippets/letsencrypt.conf;
  • sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

  • sudo systemctl restart nginx

  • sudo certbot certonly --agree-tos --email [email protected] --webroot -w /var/lib/letsencrypt/ -d

  • sudo vim /etc/nginx/sites-available/

server {
    listen 80;
    listen [::]:80;
    root /var/www/html
    include snippets/letsencrypt.conf;
    return 301$request_uri; # redirect http to https

server {
    listen 443 ssl http2;

    ssl_certificate /etc/letsencrypt/live/;
    ssl_certificate_key /etc/letsencrypt/live/;
    ssl_trusted_certificate /etc/letsencrypt/live/;
    include snippets/ssl.conf;
    include snippets/letsencrypt.conf;

  • sudo vim /etc/cron.d/certbot
    0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew --renew-hook "systemctl reload nginx"
  • sudo certbot renew --dry-run

Read More

Install Mongo DB CE on Ubuntu 20.04

Import the public key used by the package management system

  • sudo apt-get update && sudo apt-get install gnupg

  • wget -qO - | sudo apt-key add -

Add Mongo DB repository

  • echo "deb [ arch=amd64,arm64 ] bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list

Install Mongo DB

  • sudo apt-get update && sudo apt-get install -y mongodb-org

Start Mondo DB on Boot

  • sudo systemctl enable mongod.service

Read More