Posts

Showing posts from October, 2018

Postgres 10 setup and testrun on Redhat Linux 7

This is just a quick guide to get up and running with Postgres 10 on redhat linux 7 As of the writing of this quick guide, yum install postgresql-server does not allow you to install version 10. Instead, we do As root: yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm Install Client Package yum install -y postgresql10 Install Server Package yum install -y postgresql10-server I always seem to have to initialize the database manually, so here it is. /usr/pgsql-10/bin/postgresql-10-setup initdb We need to now switch to os user postgres su - postgres Run psql command line console, aka PostgreSQL interactive terminal -bash-4.2$ psql psql (10.5) Type "help" for help. postgres=

MongoDB: Change replica set name

This is just a quick reference guide for change the replica set name, for anyone who wish to give this a try, simply replace mongo-n to your own hostname, We will first find and kill the mongod processes running on each host then we will start them individually without the --replSet keyword, which simply means we will start each mongod as standalone database. They are started as follows: Note: if /etc/mongod.conf is used, simply remove --replSet in the config file and start mongod Node1: sudo -u mongodb mongod --port 27017 --dbpath /data/db --logpath /data/db/log/mongod.log --bind_ip localhost,mongo-1 --keyFile /etc/mongo.keyfile --fork Node2: sudo -u mongodb mongod --port 27017 --dbpath /data/db --logpath /data/db/log/mongod.log --bind_ip localhost,mongo-2 --keyFile /etc/mongo.keyfile --fork Node3: sudo -u mongodb mongod --port 27017 --dbpath /data/db --logpath /data/db/log/mongod.log --bind_ip localhost,mongo-3 --keyFile /etc/mongo.keyfile --fork Once all mongod...