を参考に
mkdir /opt/postgresql
./configure --prefix=/opt/postgresql
---------------------------------------------------------------------------------------
[root@localhost postgresql-9.3.9]# ls -l /opt/postgresql
合計 16
drwxr-xr-x. 2 postgres postgres 4096 5月 22 18:06 2017 bin
drwxr-xr-x. 6 postgres postgres 4096 5月 22 18:06 2017 include
drwxr-xr-x. 4 postgres postgres 4096 5月 22 18:06 2017 lib
drwxr-xr-x. 6 postgres postgres 4096 5月 22 18:06 2017 share
[root@localhost postgresql-9.3.9]# sudo gedit /home/postgres/.bash_profile
[root@localhost postgresql-9.3.9]# su - postgres
[postgres@localhost ~]$ env | grep PGDATA
PGDATA==/opt/postgresql/data
[postgres@localhost ~]$ initdb --encoding=UTF8 --no-locale
-bash: initdb: コマンドが見つかりません
[postgres@localhost ~]$
合計 16
drwxr-xr-x. 2 postgres postgres 4096 5月 22 18:06 2017 bin
drwxr-xr-x. 6 postgres postgres 4096 5月 22 18:06 2017 include
drwxr-xr-x. 4 postgres postgres 4096 5月 22 18:06 2017 lib
drwxr-xr-x. 6 postgres postgres 4096 5月 22 18:06 2017 share
[root@localhost postgresql-9.3.9]# sudo gedit /home/postgres/.bash_profile
[root@localhost postgresql-9.3.9]# su - postgres
[postgres@localhost ~]$ env | grep PGDATA
PGDATA==/opt/postgresql/data
[postgres@localhost ~]$ initdb --encoding=UTF8 --no-locale
-bash: initdb: コマンドが見つかりません
[postgres@localhost ~]$
---------------------------------------------------------------------------------------
-bash: initdb: コマンドが見つかりません