2017年05月22日

CentOS6.9 PostgreSQL9.5.7 ソースからコンパイルしてインストールする(失敗)

CentOS6.9 PostgreSQL9.5.7 ソースからコンパイルしてインストールする

を参考に


Firewall 5432 port をopen

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
/etc/init.d/iptables restart

yum -y install gcc
yum -y install readline

yum -y install readline-devel

yum -y install zlib

yum -y install zlib-devel


cd /usr/local

cd postgresql-9.5.7
001.png
./configure


002.png

make 
13.png


-------------------------------------------------------------------------------
yum install gccが抜けていると
You need to run the 'configure' program first. See the file
'INSTALL' for installation instructions.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
を参考に

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 ~]$
---------------------------------------------------------------------------------------
-bash: initdb: コマンドが見つかりません

posted by a23 at 13:40| Comment(0) | PostgreSQL
この記事へのコメント
コメントを書く
お名前: [必須入力]

メールアドレス: [必須入力]

ホームページアドレス: [必須入力]

コメント: [必須入力]

認証コード: [必須入力]


※画像の中の文字を半角で入力してください。