Skip to content

Instantly share code, notes, and snippets.

View linuxkathirvel's full-sized avatar

Kathirvel Rajendran linuxkathirvel

View GitHub Profile
@linuxkathirvel
linuxkathirvel / send_mail_using_celery_Django.txt
Last active May 11, 2017 07:28
Steps to setup Celery in Django
# Step 1
# Install Redis server
sudo apt-get install redis-server
# Please confirm with 'redis-cli ping' command. If that display 'PONG', it is working fine.
# Step 2
pip install celery redis
@linuxkathirvel
linuxkathirvel / debian.txt
Last active May 26, 2017 09:14
Frequently used commands in Debian
# Enable auto completion in Debian bash
sudo apt-get install bash-completion
# Enable sudo group to existing user
sudo apt-get install sudo
adduser username sudo
Reference: https://wiki.debian.org/sudo

Download Youtube Videos by start date and end date

youtube-dl -i --datebefore=20170901 --dateafter=20170101 https://www.youtube.com/user/periyartv/videos

Install 'nslookup' in CentOS 7

sudo yum install bind-utils
nslookup gnutamil.blogspot.com

Shutdown linux machine

sudo shutdown -h now
import datetime
# strptime() is used for converting a string to a datetime object.
# strftime() is used for converting datetime object to formatted string
date_string = "2017-08-10 17:32:25"
# To convert as Python DateTime object
python_date_time_object = datetime.datetime.strptime(date_string, "%Y-%m-%d %H:%M:%S")
yum install https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-7-x86_64/pgdg-redhat93-9.3-3.noarch.rpm
yum install postgresql93
yum install postgresql93-server

/usr/pgsql-9.3/bin/postgresql93-setup initdb
systemctl enable postgresql-9.3
systemctl start postgresql-9.3
@linuxkathirvel
linuxkathirvel / jira-installation.md
Last active March 11, 2019 12:33
Notes for JIRA installation

PostgreSQL installation for JIRA Server and Data Center

-- Create DB user for JIRA
-bash-4.2$ createuser --interactive -P jirauser
Enter password for new role: 
Enter it again: 
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
-bash-4.2$ 
@linuxkathirvel
linuxkathirvel / nfs-in-centos7.md
Last active April 16, 2019 12:21
NFS installation in CentOS7 for JIRA and Confluence Data Center

NFS installation in CentOS7 for JIRA and Confluence Data Center

This NFS setup was tested in CentOS 7

Server Side

Install NFS

#!/bin/bash

sudo yum install nfs-utils libnfsidmap

LVM Management in GNU/Linux

Create new LVM partition from unallocated space

  1. Create new partition using fdisk
  2. Change partition type using t option and put 8e to LVM type in fdisk
  3. Write the changes in disk using w option in fdisk
  4. Reboot system to commit changes
  5. Create Physical Volume using pvcreate /dev/sdaX
  6. Create Volume Group using vgcreate vgname /dev/sdaX
  7. Create Logical Volume in Volume Group using lvcreate -n datalv0 -L 30G centos-data

Add swap partition in CentOS7

  1. Create new partition using fdisk /dev/sda with needed swap size
  2. Change change partition type as LVM by partition code 8e using t option in fdisk
  3. Save changes using w option
  4. Reboot CentOS7
  5. Create PV using pvcreate /dev/sdaX. 'X' will be newly created partition number.
  6. Get VG name using vgdisplay
  7. Extend VG size using vgextend centos /dev/sdaX
  8. After extending VG size create Logical Volume using lvcreate centos -n swap -L 4G. Here, 'centos' in VG name and 'swap' is LV name