20 articles Linux HowTos

HowTo: Add CentOS7 machine to Windows AD

Microsoft Active Directory(AD) is widely used in Enterprise for Centralized Authentication, Pushing Security related Policies, etc. Administrator may need to add CentOS7 machines to AD to use same user credentials. This blog will provide steps to add CentOS7 Linux machine to AD. There are multiple ways to achieve this and it is one of the way.…

Linux: Troubleshooting Filesystem Full issue due to open files

We face filesystem Full issue in our day to day Linux Administration. This issue is mainly related with /var, /home filesystems. If both are in / filesystem then it will impact / filesystem as well. When we face this type of issue, our first solution is to delete or truncate log files, temp files, hidden…

Steps to Install and Configure VerticaDB on Cloud

  Steps to Install and Configure VerticaDB on CentOS 6.x on Cloud: Vertica require Swap space. So if you dont have Swap on your cloud, you can still create by using below steps: It also require transparent_hugepage to be disabled and tuning of few more system parameters. It is better to add them in /etc/rc.local…

Bare Metal Provisioning of Linux (Proxmox) using FAI

By Neelesh Gurjar What is Remote unattended installation? Remote unattended installation means installation of remote server without any human interference. This process is very useful for bare metal provisioning, automated installation on multiple servers, etc. What is Proxmox? Proxmox is debian based OS, which provides Virtualization Platform like VMware. https://www.proxmox.com/en/ What is FAI? FAI is…

Setting up Self Healing Tomcat

System Administrator has to configure Critical services regularly. He/She also needs to monitor that services and if services stop then needs to start them. We can automate starting of service after failure using Daemontools/supervise. We can also use monit for same. In this note we will configure Daemontools to monitor Tomcat service and if Tomcat crashes, Daemontools…

Configure MySQL Master-Master replication

Server1: 10.0.0.1Server2: 10.0.0.2Both have same version of Mysql server installed Steps to configure MySQL Master-Master replication: On Server1:1. Enable server listens on all Network Interfaces, also enable binary logs and other mysql config:You should have below entries in /etc/my.cnf auto_increment_increment = 2 auto_increment_offset = 1 bind-address=0.0.0.0 log-bin=mysql-bin-log binlog-do-db=<dbName> expire_logs_days=2 max_binlog_size=100M innodb_flush_log_at_trx_commit=1 sync_binlog=1 server-id=12. Restart mysql…

MySQL incremental backup on S3 Storage bucket

Steps to take incremental backup of MySQL database and upload it on S3 bucket: 1. Enable binary loging in mysql for our database. Added below entries in /etc/my.cnf under [mysqld] log-bin=mysql-bin-log binlog-do-db=Database_name expire_logs_days=2 max_binlog_size=100M 2. Restart mysql server systemctl restart mysqld 3. Installed s3cmd & configured it yum install s3cmd s3cmd –configure Enter AWS access_key…

Basic steps to Secure Tomcat 8

1. Change Server Header Response In server.xml <Connector port=”80″ protocol=”HTTP/1.1″ connectionTimeout=”20000″ redirectPort=”8443″ server=”<WhatEverYouWant2Show>”/> 2. Undeployed below applications – / -> Root app which displays Tomcat Welcome page – /docs -> which shows Tomcat documentation on http://ip/docs – /examples -> It shows Tomcat examples page on http://ip/examples 3. Restrict access to manager and host-manager apps. –…

Change name of Network Interface in CentOS7

1. Open /etc/default/grub vi /etc/default/grub 2. Add net.ifnames=0 biosdevname=0 to GRUB_CMDLINE_LINUX. So final line may look like below: GRUB_CMDLINE_LINUX=”vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet net.ifnames=0 biosdevname=0″ 3. grub2-mkconfig -o /boot/grub2/grub.cfg 4. rename /etc/sysconfig/network-scripts/ifcfg-en**** to /etc/syconfig/network-scripts/ifcfg-eth0 5. In ifcfg-eth0 file Change NAME=en*** to NAME=eth0 6. reboot

Pluggable Authentication Module (PAM)

Please note these notes are based on CentOS/RHEL 5 – What is PAM ? The glue between authentication methods [eg one-time pwds, kerberos, smart cards] and applications requiring authentication services [eg. ftpd, sshd, imapd] etc It is another layer on 1st-Level defense in Linux. – The 4 directories we are concerned with: /lib/libpam*      [3 files…