1.下载
https://www.postgresql.org/ftp/source/v10.1/
下载
postgresql-10.1.tar.gz
然后上传到linux系统上/opt/software
目录下,并且建立目录/opt/moudles
。
解压
[root@jqfx software]# tar -zxvf postgresql-10.1.tar.gz -C /opt/moudles/
建立用户和用户组
postgresql不能以root身份运行,要以其他用户身份运行。
[root@hzjs225 software]# rpm -qa | grep postgres
[root@hzjs225 software]# groupadd postgres
[root@hzjs225 software]# useradd -g postgres postgres
[root@hzjs225 software]# passwd postgres
Changing password for user postgres.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@hzjs225 software]#