Skip to content

Instantly share code, notes, and snippets.

View krishnamurthydasari's full-sized avatar

Krishna Murthy Dasari krishnamurthydasari

View GitHub Profile
@krishnamurthydasari
krishnamurthydasari / Python Notes
Last active December 29, 2021 02:46
Python Notes
Variables:
==========
1. It can be only one word.
2. It can use only letters, numbers, and the underscore (_) character.
3. It can’t begin with a number.
4. Variables are case-sensitive
Expression - Expressions consist of values (such as 2) and operators (such as +), and they can always evaluate (that is, reduce) down to a single value.
@krishnamurthydasari
krishnamurthydasari / Gitlab Notes
Created February 19, 2018 11:30
Gitlab Notes
Gitlab Setup:
=============
Requirements:
------------
Ruby
PostgreSQL
Redis
Prometheus
jmap needs openjdk-debuginfo package. Install and try below command for heap usage
yum list *openjdk-debuginfo* --enablerepo=*
yum install java-1.8.0-openjdk-debuginfo.x86_64 --enablerepo=amzn-updates-debuginfo
-----
From below output counting all used entries will get actual heap usage. Note that New Generation includes Eden and 1 survivor space. So in provided scripts below i have removed first entry for new generation and considered rest all.
[root@ip-50-1-0-167 jvm]# jmap -heap 13621
If server is used only for forward requests:
options {
.
.
allow-query { localhost; any; };
recursion yes;
forward only;
.
For this setup:
DNS Master Server 172.31.88.75
DNS Slave Server 172.31.93.71
Host1 172.31.83.52
Host2 172.31.88.91
** Configured only fws zone. Reverse zone setup not tested.
** Reference : https://www.tecmint.com/setup-master-slave-dns-server-in-centos/
x11 server setup:
server side:
yum install xorg-x11-xauth xterm -y
Client side:
install mobaxterm (OR any x server gui tool) and connect from that tool
1. Update security group to allow 5666, ICMP request and SSH protocols from nagios server 34.193.101.102/32
2. Run below commands to install Nagios client
mkdir /opt/Nagios
cd /opt/nagios/
wget https://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz
tar xvf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent
./fullinstall
@krishnamurthydasari
krishnamurthydasari / Extend root disk size in EC2
Last active December 7, 2017 12:53
Extend root disk size in EC2
Expending root disk size when root device has partition inside it, directly running resize2fs command will not work,
Follow below steps to resolve issue.
Check "lsblk" command output for root device name and filesystem type, these steps works for ext3 and ext4
If root device name is /dev/xvda1, then
growpart /dev/xvda 1 ### Note the space between /dev/xvda and 1
resize2fs /dev/xvda1
partprobe
@krishnamurthydasari
krishnamurthydasari / Install GNOME and VNC Server on a Red Hat Linux
Last active July 13, 2017 12:26
Install GNOME and VNC Server on a Red Hat Linux
1. Install GNOME and VNC server packages
yum --exclude=nautilus-sendto groupinstall "GNOME Desktop Environment"
yum install vnc-server
2. Create your VNC users. You can use existing users if already have.
#useradd Krishna
#passwd Krishna
@krishnamurthydasari
krishnamurthydasari / github_to_s3_sync.sh
Last active July 13, 2017 12:34
Github repository to s3 bucket sync and send email with new updates
#!/bin/bash
#Date : 13-07-2017
#Owner : Krishnamurthy Dasari
#Description: Pull the changes from upstreem to local git repository, upload all changes to s3 bucket and send email alert with changed files.
GitLocalRepoDir="/path/to/local/directory"
s3bucket="s3://BucketName"
email_subject="Subject"
email_From="[email protected]"