March 2018
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Categories

March 2018
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

ansible-playbooks one of the following is required name list

Ansible implementation of one of the following is required: name,list

Perform playbooks [root@controller playbook]# ansible-playbook package.yaml Error message

[root@controller playbook]# ansible-playbook package.yaml [WARNING]: While constructing a mapping from /root/ansible/playbook/package.yaml, line 11, column 5, found a duplicate dict key (name). Using last defined value only.

[WARNING]: Ignoring invalid attribute: state

PLAY [app] ****************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] […]

MYSQL BINARY INSTALL CENTOS7

Environment: Virtual Machine + CentOS 7

1. download binary package, the following mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz link is the official website

cd /usr/local/src

wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz 2. extract, rename

[root@beta src]# tar zxvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz

[root@beta src]# ls index.html?id=471614 mysql-5.7.19-linux-glibc2.12-x86_64 mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz [root@beta src]# mv mysql-5.7.19-linux-glibc2.12-x86_64 /usr/local/mysql 3. Initialize

[root@beta mysql]# useradd -M -s /sbin/nologin mysql

[root@beta mysql]# ls bin COPYING […]

RHEL / CentOS 7 Network Teaming

RHEL / CentOS 7 Network Teaming

Below is an example on how to configure network teaming on RHEL/CentOS 7. It is assumed that you have at least two interface cards.

Show Current Network Interfaces [root@rhce-server ~]$ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno16777736: […]

oracle rman backup

How to sync standby database which is lagging behind from primary database Primary Database cluster: cluster1.rmohan.com Standby Database cluster: cluster2.rmohan.com

Primary Database: prim Standby database: stand

Database version:11.2.0.1.0

Reason:- 1. Might be due to the network outage between the primary and the standby database leading to the archive gaps. Data guard would be able to […]

centos 7 cluster

[root@clusterserver1 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.20 clusterserver1.rmohan.com clusterserver1 192.168.1.21 clusterserver2.rmohan.com clusterserver2 192.168.1.22 clusterserver3.rmohan.com clusterserver3

perl -pi.orig -e ‘s/SELINUX=enforcing/SELINUX=permissive/g’ /etc/selinux/config

setenforce 0

timedatectl status

yum install -y ntp systemctl enable ntpd ; systemctl start ntpd

run ssh-keygen

[root@clusterserver1 ~]# ssh-keygen Generating public/private rsa key pair. Enter file […]

nginx is a high performance

nginx is a high performance web server software. It is a much more flexible and lightweight program than apache.

yum install epel-release

yum install nginx

ifconfig eth0 | grep inet | awk ‘{ print $2 }’

wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz” wget http://mirror.nus.edu.sg/apache/tomcat/tomcat-8/v8.0.30/bin/apache-tomcat-8.0.30.tar.gz tar xzf jdk-8u40-linux-i586.tar.gz mkdir /usr/java/

cd /usr/java/jdk1.8.0_40/ [root@cluster1 java]# […]

RHEL -7 Notes

study notes 2

— command line file

1, create and delete files

Create a file touch xxxx

touch -t 20151225 create a file and specify time properties

rm xxx delete the file

rm -rf forced to delete files

2. Create a directory and delete the directory

mkdir -p xxx/yyy recursively create directories;

rmdir xxx delete […]

504 Gateway apache tomcat issue

The servlet was taking a long time to compress the log files, and Apache‘s timeout was set to 2min.

The error was fixed by increasing the TimeOut Directive on the httpd.conf file:

# # Timeout: The number of seconds before receives and sends time out. # ##Timeout 120 Timeout 600 […]

MARIADB MASTER SLAVE

MARIADB MASTER SLAVE

Install on both master and slave

yum install mariadb-server mariadb -y

systemctl enable mariadb

systemctl start mariadb.service

mysql_secure_installation

Master

Add below lines on the mysql

vi /etc/my.cnf

[server] # add follows in [server] section : get binary logs log-bin=mysql-bin # define uniq server ID server-id=101

Restart the mariadb service

systemctl restart mariadb.service

[…]

Docker Swarm on Centos 7

Install of docker

Lets remove all the unnecessary software on the machine

yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine

now we have to install dependancy software for Docker

yum install -y yum-utils device-mapper-persistent-data lvm2

Let add a docker repo

yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo

Enable the yum docker repo on the centos […]