Enviroment: – Server01.192.168.30.201 – Server02.192.168.30.202 – Directory to be Sync : “/opt/web/htdocs/prompt and /opt/vxml ” 2.Step Key based authentication Configuration -Login to Master server & generate the public and Private keys using the following command: [root@server01 ~]# ssh-keygen -t rsa [root@server01 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.30.202 2.Step Installation Lsyncd [root@server01 ~]# yum install epel-release [root@server01 […]
Red hat linux
Upgrade MySQL to Version 5.6 in CentOS
Backup all the database and stop mysql mysqldump -u (userid) -p (password) –all-databases > all-databases.sql service mysqld stop Download the Repo for MySql 5.6 wget http://dev.mysql.com/get/mysql-community-release-el6-3.noarch.rpm/from/http://repo.mysql.com/ Install the repository from the local file yum localinstall mysql-community-release-el6-3.noarch.rpm Install the latest MySql yum install mysql-community-server service mysqld start Configure MySQL to start automatically on Server Reboot chkconfig […]
How to Set up Nginx High Availability with Pacemaker and Corosync
Prerequisites 2 or more CentOS 7 Serverpre web01 10.0.15.10 web02 10.0.15.11 web03 10.0.15.12 Floating IP Address 10.0.15.15 Root Privileges What we will do: Map the Host File Install Epel Repository and Nginx Install and Configure Pacemaker, Corosync, and Pcsd Create and Configure the Cluster Disable STONITH and Ignore the Quorum Policy Add the Floating-IP and […]
Setting up the Basic High-Availability Cluster on Centos/RHEL 7
Networking: We have two nodes that are reachable by below Networks: 10.1.1.0/24 : Cluster heartbeat vlan. 172.16.1.0/24 : LAN with access to the Internal LAN network and Internet. We have set the following hostnames: [master ~]# hostnamectl set-hostname master.sysadmin.lk [client ~]# hostnamectl set-hostname client.sysadmin.lk We defined the Hostname and IP Address in “/etc/hosts” file(On both […]
Setting Up an NFS Server and Client on CentOS 7
I’m using two CentOS systems here: NFS Server: server.example.com, IP address: 192.168.1.100 NFS Client: client.example.com, IP address: 192.168.1.101 Configure the Firewall firewall-cmd –permanent –zone=public –add-service=nfs firewall-cmd –reload Installing NFS and enable and start the nfs server service.(Client / Server) yum -y install nfs-utils systemctl enable nfs-server.service systemctl start nfs-server.service Exporting Directories on the Server mkdir […]
Important Linux Commands
### Check Inode usage for i in /*; do echo $i; find $i |wc -l; done ### How do you empty a linux directory with a large size/number of files? -bash: /bin/rm: Argument list too long find . -name “*” | xargs -n 10 rm
Adding a New Disk Drive to a CentOS 6 / 7 System
Finding the New Hard Drive in CentOS # ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sdb Creating Linux Partitions # su – # fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xd1082b01. Changes will remain in memory only, until you decide […]
Install and Configure MySQL Cluster on CentOS 7
MySQL Cluster is designed to provide a MySQL compatible database with high availability and low latency. The MySQL Cluster technology is implemented through the NDB (Network DataBase) and NDBCLUSTER storage engines and provides shared-nothing clustering and auto-sharding for MySQL database systems. In the shared-nothing architecture, each of nodes has its own memory and disk, the […]
Mount SSHFS In Redhat / CentoS
Step 1 – Enabling the kernel module This is a simple step – all you need to do is run the following command as the root user: modprobe fuse Step 2 – Installing Fuse/SSHFS yum install fuse-sshfs sshfs Step 3 – Using SSHFS The commands to use SSHFS are fairly simple. To mount a remote […]
PHP 5.6 on CentOS/RHEL 7.4 and 6.9 via Yum
To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum: CentOS/RHEL 7.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm CentOS/RHEL 6.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm Remove old php version yum remove php* Now you can install PHP 5.6’s mod_php SAPI (along with an opcode cache) […]