Apache Airflow is an open-source workflow management platform. It started at Airbnb in October 2014 as a solution to manage the company's increasingly complex workflows. Creating Airflow allowed Airbnb to programmatically author and schedule their workflows and monitor them via the built-in Airflow user interface.
This document assumes you have a centos 7 VM with internet connectivity and a Sudo user.
- Login as sudo
sudo --login
- Update Packages
yum update -y
- Install Epel release and yum-utils packages
yum -y install epel-release yum-utils
- Install Development tools
yum groupinstall "Development tools" -y
- Install required npm packages
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel python-devel wget cyrus-sasl-devel.x86_64
- Install python and python developer tools Packages
yum install -y python3 python3-devel
Disable SeLinux
setenforce 0
Make the change permanent by editing
vi /etc/selinux/config
change value
SELINUX=enforcing to SELINUX=disabled
Install Postgres Database
- Add Postgres repository to centos
yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- View info your Postgres repo by running
rpm -qi pgdg-redhat-repo
- Enable and Install Postgresql
yum-config-manager --enable pgdg12
yum install -y postgresql12-server postgresql12 postgresql-devel
- Initialize Database
/usr/pgsql-12/bin/postgresql-12-setup initdb
- Enable and Start Postgresql Service
systemctl enable --now postgresql-12
Confirm Database is started by Running
systemctl status postgresql-12
Configure a String Administrator Password for Postgres
- Login to Postgresql
su - postgres
- Open psql shell
psql
- Run the alter user query
alter user postgres with password 'StrongPassword';
- Edit the Postgres Service to enable MD5 authentication
vi /var/lib/pgsql/12/data/pg_hba.conf
# Accept from anywhere
host all all 0.0.0.0/0 md5
# Accept from trusted subnet
host all all 192.168.18.0/24 md5
Choose according to your requirement.
Optional Step
- Enable remote Postgres access ( Not recommended for Production systems
vi /var/lib/pgsql/12/data/postgresql.conf
Edit the above file Find the entry named listen_address
uncomment the entry and modify it as below.
listen_addresses = '192.168.10.10'
or ( Not recommended in Production )
listen_addresses = '*'
*Restart Postgres Service after you are done.
systemctl restart postgresql-12
Top comments (0)