centos7

Install postgresql on centos 7

Installing postgresql

Fedora, RHEL, CentOS, or similar OS

# yum install postgresql
# yum install postgresql-server

Initialize postgresql Files

# postgresql-setup initdb

Setup postgresql

  1. Set address 127.0.0.1 and ::1 to trust at the pg_hba.conf file. The directory might not be visible to non-sudoers. Run sudo su first.

Varnish and nginx on Centos 7

yum install varnish
yum install nginx

Config nginx listen on port 8081

server {
        listen 8081;
        server_name www.example.com;
        rewrite ^(.*) http://example.com$1 permanent;
        }
server {
        listen 8081 default_server;
        server_name example.com;
        ....................

}

Varnish

  • Config varnish: vi /etc/varnish/default.vcl (for wordpress)
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the

Configure rsyslogd on centos 7 as remote syslog server

Start

echo "\$ModLoad imudp" > /etc/rsyslog.d/server.conf
echo "\$UDPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$ModLoad imtcp" >> /etc/rsyslog.d/server.conf
echo "\$InputTCPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$PreserveFQDN on" >> /etc/rsyslog.d/server.conf

yum -y install rsyslog-gnutls rsyslog-mysql rsyslog-crypto

MySQL/MariaDB database configuration

Assuming MariaDB is already installed and running.

Tags 
rsyslog centos7

Maxscale and pacemaker on centos 7

Install packages on both nodes

sudo yum install corosync pcs pacemaker maxscale

Set the password for the hacluster user [both nodes]

sudo passwd hacluster

Start the pcs daemon service [both nodes]

sudo systemctl start pcsd

Authenticate the cluster

sudo pcs cluster auth node01.domain.local node02.domain.local

Create cluster

Install RabbitMQ on centos 7

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm

Add repository

sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

Install erlang and dependencies

sudo yum -y install erlang socat logrotate

Install RabbitMQ

Download RabbitMQ package

Tags 
rabbitmq centos7

Kerberos setup on centos 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here): * Kerberos KDC Server: kdc.cw.com * Kerberos Client: kclient.cw.com

Tags 
kerberos centos7

Adagios and naemon install on centos 7

Adagios and Naemon on CentOS 7 or Red Hat Enterprise Linux 7 x86_64.

If you don't know how to configure SElinux, put it in permissive mode:

sed -i "s/SELINUX=enforcing/SELINUX=permissive/" /etc/selinux/config
setenforce 0

First install the opensource.is and consol labs repositories

rpm -ihv http://opensource.is/repo/ok-release.rpm
rpm -Uvh https://labs.consol.de/repo/stable/rhel7/x86_64/labs-consol-stable.rhel7.noarch.rpm
yum update -y ok-release


QR Code for https://setupexample.com/tags/centos7