简体   繁体   中英

postgres 10.5 installation issues on RHEL 6

i been trying to install postgres 10.5 on this machine and despite i set the installation path it always ends up selecting that particular directory everytime.. experts pls help me out.

我已经明确设置了前缀和数据目录,但它仅选择数据目录

[root@DBSRV01 postgres10upd]# ./postgresql-10.4-1-linux-x64.run --datadir /opt/postgres/10.5/data --prefix /opt/postgres/10.5/ --debuglevel 4 --serverport 5433 --superpassword postgrespwd --servicename postgres-10
----------------------------------------------------------------------------
Welcome to the PostgreSQL Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue.

PostgreSQL Server [Y/n] :y
pgAdmin 4 [Y/n] :n
Stack Builder [Y/n] :n
Command Line Tools [Y/n] :y

Is the selection above correct? [Y/n]: y
----------------------------------------------------------------------------
Please select a directory under which to store your data.
Data Directory [/opt/postgres/10.5/data]: 
----------------------------------------------------------------------------
Please provide a password for the database superuser (postgres). A locked Unix user account (postgres) will be created if not present.
Password [********] :
Retype password [********] :
----------------------------------------------------------------------------
Please select the port number the server should listen on.
Port [5433]: 
.
.
[222] en_US
.
.
[716] zu_ZA
[717] zu_ZA.iso88591
[718] zu_ZA.utf8
Please choose an option [1] : 222   
----------------------------------------------------------------------------
Pre Installation Summary

The following settings will be used for the installation::

Installation Directory: /root/postgres10upd/y
Server Installation Directory: /root/postgres10upd/y
Data Directory: /opt/postgres/10.5/data
Database Port: 5433
Database Superuser: postgres
Operating System Account: postgres
Database Service: postgresql-10
Command Line Tools Installation Directory: /root/postgres10upd/y

Press [Enter] to continue:^Z
[3]+  Stopped                 ./postgresql-10.4-1-linux-x64.run --datadir /opt/postgres/10.5/data --prefix /opt/postgres/10.5/ --debuglevel 4 --serverport 5433 --superpassword Mam5pg@1 --servicename postgres-10
[root@DBSRV01 postgres10upd]#

where did i go wrong? why is it selecting that directory again and again? is is stored somewhere and being read from there thats why the same directory is always selected?

PS: a SAN is mounted to the opt directory using LVM. And i already have installed successfully on 2 other machines with same h/w & s/w configurations except that there is no SAN mounted to them.

Just now installed on another computer with the same configuration + SAN.. worked just fine [root@DBSRV02 postgres]# service postgresql-10 status pg_ctl: server is running (PID: 53224) /opt/postgres/10.5/bin/postgres "-D" "/opt/postgres/10.5/data".

Is it because the installation has once failed and that location is fixed ever since. can someone pls tell me how to remove the residues of the first failed installation.

Ok guys thank you all for the help! i found the culprit by searching for the directory using the command

grep -rlw "postgres10upd"

then i realized there is this file

/etc/postgres-reg.ini

with an entry

InstallationDirectory=/root/postgres10upd/y

I had edited it to "/opt/postgres/10.5"

then when installed there was no issues and got installed to exactly where i wanted.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM