系统版本:CentOS Linux release 7.7.1908 (AltArch)
安装依赖
yum install glibc-common -y localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
安装数据库
yum install postgresql*
切换数据库用户
su - postgres /usr/bin/postgresql-setup initdb WARNING: using obsoleted argument syntax, try --help WARNING: arguments transformed to: postgresql-setup --initdb --unit postgresql * Initializing database in '/var/lib/pgsql/data' * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log
退出postgres用户
exit
启动数据库
systemctl start postgresql
安装完成!