Information Technology/Operation System

BackTrack5 R2(R3) + postgresql

hakawati 2012. 9. 2. 22:41

postgresql 설치

기본적으로 repository의 postgresql은 8.4버전으로 설치가 된다.

apt-get install postgresql

postgresql GUI 프로그램 설치

apt-get install pgadmin3

설치가 거부 된 경우 apt-get update로 저장소들을 활성화 시켜준다.

pgadmin3로 DB로 접근

Name은 Default로 postgres이며, Host는 localhost로 설정한다.

Password는 설정한 기억이 없으므로 비워둔다.

그러면 다음과 같은 오류가 나온다.

패스워드를 설정하지 않아서 나오는 문제이다.

command로 password를 설정한다.

su postgres -c psql
could not change directory to "/root"
psql (8.4.13)
Type "help" for help.

postgres=# \password
Enter new password:
Enter it again:
postgres=# \q
could not save history to file "/home/postgres/.psql_history": No such file or directory

password 설정이 끝났으면 pgadmin3로 다시 접근하면 접근이 된다.

위에 나타나는 오류는 히스토리파일이 설정이 되어 있지 않아 생기는 오류이다.

반응형