컴퓨터에 Windows 10 이 설치되어 있었다.
그리고 자료를 공유하기 편하게 IIS 를 사용해서 http 를 열었다.
그런데 파일을 클릭해서 다운로드 하려고 하니까,
HTTP 오류 404.3 - Not Found 어쩌구 하면서 에러가 발생한다.
뭐지? 하면서 구글링을 했다.
다행히 나와 같은 문제를 겪고, 해결한 사람이 있다.
web.config 파일에 아래 내용을 추가하면 된다.
<system.webServer>
<staticContent>
<mimeMap fileExtension=".확장자명" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
아마도 <system.webServer> 는 있을 것이다.
그러므로 그 안에 <staticContent> 구문을 넣어주면 된다.
web.config 가 어딨는지 모른다고요?
특별한 뻘짓을 하지 않았다면,
기본 폴더 위치가 C:\inetpub\wwwroot 이므로 그곳에 있을 것이다.
만약 바꿨다면 그 해당 폴더로 가면된다.
출처
http://blog.daum.net/joata/6682509
2017년 9월 22일 금요일
2017년 9월 21일 목요일
PostgreSQL gdb 디버그
이제 설치도 다 하고, 실행도 다 해봤으니, 휴~ 하고 안심하고 있었다.
그런데 옆에 분이 디버그로 해봤냐고 물어보셨다.
아! 디버그 접속을 안 해봤구나!
나의 임무를 망각하고 있었다.
내 임무는 PostgreSQL 을 디버그 해서 분석하는건데.....
디버그로 PostgreSQL 을 실행해 보도록 한다.
먼저 $PG 디렉토리를 삭제해야 한다.
왜냐하면 그거는 release 로 빌드 되어 있기 때문이다.
혹시라도 release 된 파일로 디버그를 하려고 하면 아래와 같이,
심볼테이블이 없다는 에러가 나올 것이다.
No symbol table is loaded. Use the "file" command.
암튼 처음부터 다시 진행하자.
기존 파일들을 삭제한다.
% rm -rf $PG
postgresql-9.6.5.tar.gz 압축을 해제한 디렉토리로 이동한다.
특별한 뻘짓을 하지 않았다면,
그 디렉토리에 기존에 빌드되어 있는 파일들이 있다. (오브젝트 파일들)
그러므로 그 파일들을 지워줘야 한다.
% make clean
configure 설정에 추가적인 옵션을 지정한다.
그 다음은 동일하다.
% make
% make install
그리고 DB 도 새롭게 생성해 준다.
% initdb -D $PG/data
자, 이제 디버깅을 해보자.
% gdb postgres
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ck0911.kim/postgresql/bin/postgres...done.
매번 디버그 할때마다 -D 옵션을 파라미터로 주는건 번거로운 일이다.
위에 에러 메세지를 보면,
환경설정에 추가해주면, 파라미터를 매번 주지 않아도 된다는 말인거 같다.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
환경변수를 추가해 준다.
% export PGDATA=$PG/data
※ 이 환경변수도 $HOME/.bashrc 에 추가해 놓으면 편하다.
다시 gdb 를 실행해본다.
% gdb postgres
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ck0911.kim/postgresql/bin/postgres...done.
잘 로딩되었다.
실행해 보자.
(gdb) run
Starting program: /home/ck0911.kim/postgresql/bin/postgres
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 1504.
LOG: database system was interrupted; last known up at 2017-09-21 17:46:42 KST
LOG: database system was not properly shut down; automatic recovery in progress
LOG: invalid record length at 0/155C140: wanted 24, got 0
LOG: redo is not required
LOG: MultiXact member wraparound protections are now enabled
Detaching after fork from child process 1505.
Detaching after fork from child process 1506.
Detaching after fork from child process 1507.
Detaching after fork from child process 1508.
LOG: autovacuum launcher started
Detaching after fork from child process 1509.
LOG: database system is ready to accept connections
여기까지 나오면 잘 실행된 것이다.
정말 잘 실행되었는지 psql 으로 접속해 보자.
다른 터미널 세션을 띄운다. (왜냐하면 위 세션은 gdb 가 먹고 있으니 사용할 수 없다.)
% psql postgres
잘 작동하는지 테이블을 만들어 보도록 한다.
postgres=# create table t1 ( i1 char(10) );
만들었으면, 테이블을 조회해 보도록 한다.
\d 명령어를 사용하면 확인해 볼 수 있다.
postgres-# \d
여기까지 잘 된다면, 성공적으로 gdb 에 연결한 것이다.
이제 뭐 알아서 잘 디버깅 하면 된다.
gdb 사용 방법은 구글이 더 잘 알기 때문에 그곳을 참고하면 된다.
출처
나의 삽질
그런데 옆에 분이 디버그로 해봤냐고 물어보셨다.
아! 디버그 접속을 안 해봤구나!
나의 임무를 망각하고 있었다.
내 임무는 PostgreSQL 을 디버그 해서 분석하는건데.....
디버그로 PostgreSQL 을 실행해 보도록 한다.
먼저 $PG 디렉토리를 삭제해야 한다.
왜냐하면 그거는 release 로 빌드 되어 있기 때문이다.
혹시라도 release 된 파일로 디버그를 하려고 하면 아래와 같이,
심볼테이블이 없다는 에러가 나올 것이다.
No symbol table is loaded. Use the "file" command.
암튼 처음부터 다시 진행하자.
기존 파일들을 삭제한다.
% rm -rf $PG
postgresql-9.6.5.tar.gz 압축을 해제한 디렉토리로 이동한다.
특별한 뻘짓을 하지 않았다면,
그 디렉토리에 기존에 빌드되어 있는 파일들이 있다. (오브젝트 파일들)
그러므로 그 파일들을 지워줘야 한다.
% make clean
configure 설정에 추가적인 옵션을 지정한다.
% ./configure --prefix=$PG --enable-debug
그 다음은 동일하다.
% make
% make install
$PG 디렉토리가 새롭게 생긴것을 볼 수 있다.
그리고 DB 도 새롭게 생성해 준다.
% initdb -D $PG/data
% gdb postgres
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ck0911.kim/postgresql/bin/postgres...done.
여기까지 나오면 postgres 바이너리를 잘 불러온것이다.
이제 실행을 해보자.
(gdb) run
Starting program: /home/ck0911.kim/postgresql/bin/postgres
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
[Inferior 1 (process 1233) exited with code 02]
Missing separate debuginfos, use: debuginfo-install glibc-2.17-196.el7.x86_64
어....? 아???
아 맞다.
PostgreSQL 은 실행을 할 때, 데이터 위치를 지정해 줘야 한다.
포스팅을 했는데도 불구하고, 금세 또 잊어버렸다.
역시 사람은 치매의 동물이다.
원래는 이런식으로 해줘야 한다.
% postgres -D $PG/data
위에 에러 메세지를 보면,
환경설정에 추가해주면, 파라미터를 매번 주지 않아도 된다는 말인거 같다.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
환경변수를 추가해 준다.
% export PGDATA=$PG/data
※ 이 환경변수도 $HOME/.bashrc 에 추가해 놓으면 편하다.
다시 gdb 를 실행해본다.
% gdb postgres
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ck0911.kim/postgresql/bin/postgres...done.
잘 로딩되었다.
실행해 보자.
(gdb) run
Starting program: /home/ck0911.kim/postgresql/bin/postgres
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 1504.
LOG: database system was interrupted; last known up at 2017-09-21 17:46:42 KST
LOG: database system was not properly shut down; automatic recovery in progress
LOG: invalid record length at 0/155C140: wanted 24, got 0
LOG: redo is not required
LOG: MultiXact member wraparound protections are now enabled
Detaching after fork from child process 1505.
Detaching after fork from child process 1506.
Detaching after fork from child process 1507.
Detaching after fork from child process 1508.
LOG: autovacuum launcher started
Detaching after fork from child process 1509.
LOG: database system is ready to accept connections
여기까지 나오면 잘 실행된 것이다.
정말 잘 실행되었는지 psql 으로 접속해 보자.
다른 터미널 세션을 띄운다. (왜냐하면 위 세션은 gdb 가 먹고 있으니 사용할 수 없다.)
% psql postgres
잘 작동하는지 테이블을 만들어 보도록 한다.
postgres=# create table t1 ( i1 char(10) );
만들었으면, 테이블을 조회해 보도록 한다.
\d 명령어를 사용하면 확인해 볼 수 있다.
postgres-# \d
여기까지 잘 된다면, 성공적으로 gdb 에 연결한 것이다.
이제 뭐 알아서 잘 디버깅 하면 된다.
gdb 사용 방법은 구글이 더 잘 알기 때문에 그곳을 참고하면 된다.
출처
나의 삽질
PostgreSQL 접속
설치, 실행까지 잘 했으니 이제 PostSQL 에 접속을 해보자.
그런데 막상 접속을 하려고 하면 아래와 같은 에러가 발생한다.
PostgreSQL 에는 SQL 구문이 아닌 \ 를 이용한 명령어들이 존재한다.
그런데 막상 접속을 하려고 하면 아래와 같은 에러가 발생한다.
% psql
psql: FATAL: database "ck0911.kim" does not exist
psql 을 사용해서 접속을 할때에는, 사용할 DB 를 명시해 줘야 한다.
만약 명시해 주지 않으면 기본적으로 사용자ID 와 동일한 DB 에 접속을 시도한다.
사용자ID 와 동일한 이름의 DB 를 생성한 적이 없으니 에러가 발생한 것이다.
DB 를 생성해 줘도 되지만, 그건 다음에 하기로 하고,
일단 initdb 를 할때 기본적으로 생성된 DB 에 접속하기로 한다.
% psql postgres
잘 작동하는지 테이블을 만들어 보도록 한다.
postgres=# create table t1 ( i1 char(10) );
만들었으면, 테이블을 조회해 보도록 한다.
\d 명령어를 사용하면 확인해 볼 수 있다.
postgres-# \d
그럼 아래와 같이 테이블이 만들어진걸 확인할 수 있다.
Schema
| |||
public
| |||
(1 row)
| |||
PostgreSQL 에는 SQL 구문이 아닌 \ 를 이용한 명령어들이 존재한다.
아래 대표적인 명령 몇개는 익혀두는 것이 좋을 듯 하다.
\d - 현재 접속한 database의 모든 테이블과 sequence를 보여준다.
\d 테이블명 - 지정한 테이블의 속성과 이에 속한 index를 보여준다.
\di - 현재 접속한 database의 모든 index를 보여준다.
\di 인덱스명 - 지정한 인덱스의 속성을 보여준다.
\i 파일명 - 지정한 파일로부터 SQL 명령을 읽어 이를 수행한다.
\q - 콘솔을 종료한다.
출처
PostgreSQL 중지
PostgreSQL 을 정지할 때는 pg_ctl 을 사용하면 되지만,
엄밀히 말하면 그 내부에서는 kill 을 사용하는거 같다.
좀 더 자세히 내용을 보고, 포스팅을 하도록 한다.
출처
https://www.postgresql.org/docs/current/static/server-shutdown.html
엄밀히 말하면 그 내부에서는 kill 을 사용하는거 같다.
좀 더 자세히 내용을 보고, 포스팅을 하도록 한다.
출처
https://www.postgresql.org/docs/current/static/server-shutdown.html
2017년 9월 20일 수요일
PostgreSQL 실행
DB 를 실행시키는 방법에는 2가지가 있다.
forground, background
명령어는 아래와 같다.
Start foreground running
% postgres -D $PG/data
Start background running
% pg_ctl -D $PG/data -l logfile start
DB 를 start 하고 나면 ps 명령어를 통해,
postgres 프로세스가 실행되어 있는걸 확인할 수 있다.
DB 를 중지시키는 명령어는 아래와 같다.
Stop
% pg_ctl -D $PG/data stop
그런데 여기서 잠깐.
DB 를 foreground 로 실행시키는 경우가 있나? 라고 의문이 들 수 있다.
foreground 를 실행시킨 session 이 끊기면 DB 도 정지할텐데.
사실 DB 의 역할은 background 에서 안 보이는 곳에서 활동하면서
client 의 요청을 처리해주는게 주된 임무라고 생각하기 때문이다.
맞는 말이다.
평소에는 사용할 일이 없을 것......이다.
(아마도? 다른 뭐 필요한 경우가 있을 수도 있겠지.....)
그럼 어떨 때 사용하냐?
바로 debugging 할 때, 사용한다. (지극히 내 개인적인 경우)
출처
https://www.postgresql.org/docs/current/static/server-start.html
https://tedwon.atlassian.net/wiki/spaces/SE/pages/1212988/PostgreSQL
forground, background
명령어는 아래와 같다.
Start foreground running
% postgres -D $PG/data
Start background running
% pg_ctl -D $PG/data -l logfile start
DB 를 start 하고 나면 ps 명령어를 통해,
postgres 프로세스가 실행되어 있는걸 확인할 수 있다.
DB 를 중지시키는 명령어는 아래와 같다.
Stop
% pg_ctl -D $PG/data stop
그런데 여기서 잠깐.
DB 를 foreground 로 실행시키는 경우가 있나? 라고 의문이 들 수 있다.
foreground 를 실행시킨 session 이 끊기면 DB 도 정지할텐데.
사실 DB 의 역할은 background 에서 안 보이는 곳에서 활동하면서
client 의 요청을 처리해주는게 주된 임무라고 생각하기 때문이다.
맞는 말이다.
평소에는 사용할 일이 없을 것......이다.
(아마도? 다른 뭐 필요한 경우가 있을 수도 있겠지.....)
그럼 어떨 때 사용하냐?
바로 debugging 할 때, 사용한다. (지극히 내 개인적인 경우)
물론 이미 실행되어 있는 프로세스에 gdb 를 attach 해서 사용할 수는 있겠지만.
실행 단계에서부터 디버깅이 필요하거나,
그냥 습관적으로 gdb 로 시작을 하거나.
이럴 때 사용하면 된다.
※ postgres 를 사용해서 foreground 로 실행시키면, 화면에 로그가 출력되는데,
pg_ctl 의 -l 옵션이 그 내용을 파일로 저장해 주는 역할을 한다.
화면에 출력되는 내용이 logfile 내용과 같은걸 확인할 수 있다.
https://www.postgresql.org/docs/current/static/server-start.html
https://tedwon.atlassian.net/wiki/spaces/SE/pages/1212988/PostgreSQL
PostgreSQL DB 생성
어느 DB 를 사용하건, 처음 DB 생성(초기화) 작업을 해줘야 한다.
PostgreSQL 도 마찬가지로 그 작업을 해줘야 하는데, 그 명령어가 initdb 이다.
위치는 $PG/bin/initdb 에 있다.
% initdb -D $PG/data
실행을 하면, db 가 생성되는 과정 메세지가 출력되는데, 너무 빨라서 휘리릭 출력된다.
※ initdb 실행할 때, 아래와 같이 인코딩 관련 옵션들을 설정할 수 있다.
initdb -E UTF-8 --locale=ko_KR.UTF-8 --lc-collate=C -D data
나중에 좀 더 알아보도록 한다.
출처
https://www.postgresql.org/docs/current/static/creating-cluster.html
https://tedwon.atlassian.net/wiki/spaces/SE/pages/1212988/PostgreSQL
PostgreSQL 도 마찬가지로 그 작업을 해줘야 하는데, 그 명령어가 initdb 이다.
위치는 $PG/bin/initdb 에 있다.
% initdb -D $PG/data
실행을 하면, db 가 생성되는 과정 메세지가 출력되는데, 너무 빨라서 휘리릭 출력된다.
| The files belonging to this database system will be owned by user "ck0911.kim". This user must also own the server process. The database cluster will be initialized with locale "ko_KR.UTF-8". The default database encoding has accordingly been set to "UTF8". initdb: could not find suitable text search configuration for locale "ko_KR.UTF-8" The default text search configuration will be set to "simple". Data page checksums are disabled. creating directory /home/ck0911.kim/postgresql/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting dynamic shared memory implementation ... posix creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /home/ck0911.kim/postgresql/data -l logfile start |
※ initdb 실행할 때, 아래와 같이 인코딩 관련 옵션들을 설정할 수 있다.
initdb -E UTF-8 --locale=ko_KR.UTF-8 --lc-collate=C -D data
나중에 좀 더 알아보도록 한다.
출처
https://www.postgresql.org/docs/current/static/creating-cluster.html
https://tedwon.atlassian.net/wiki/spaces/SE/pages/1212988/PostgreSQL
PostgreSQL 소스 설치 (CentOS 7)
CentOS 에 PostgreSQL 설치하면서, 수행한 내용들을 기록해 보기로 한다.
나중에 혹시라도 참고할 때가 있을거 같다.
암튼 치매 예방을 위해 기록한다.
- 소스 다운로드
에서 원하는 버전을 다운로드 한다.
글을 쓰고 있는 현재 기준으로, 9.6.5 가 최신이므로, 이 버전을 설치하도록 한다.
v9.6.5 링크를 클릭한다.
여러 파일들이 있는데, postgresql-9.6.5.tar.gz 다운로드 받는다.
v9.6.5 링크를 클릭한다.
여러 파일들이 있는데, postgresql-9.6.5.tar.gz 다운로드 받는다.
- 압축해제
% tar vxzf postgresql-9.6.5.tar.gz
압축을 해제하면, postgresql-9.6.5 디렉토리가 생성된다.
- 설정
설정은 일반적으로 configure 를 사용해서 한다.
% ./configure
쭉루루룩 하면서 잘되는가 싶더니 에러를 내뿜는다.
checking for main in -lm... yes
checking for library containing setproctitle... no
checking for library containing dlopen... -ldl
checking for library containing socket... none required
checking for library containing shl_load... no
checking for library containing getopt_long... none required
checking for library containing crypt... -lcrypt
checking for library containing shm_open... -lrt
checking for library containing shm_unlink... none required
checking for library containing fdatasync... none required
checking for library containing sched_yield... none required
checking for library containing gethostbyname_r... none required
checking for library containing shmget... none required
checking for library containing readline... no
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.
자세한건 config.log 를 참고하라고 되어 있는데, 그냥 귀찮으니까 구글에서
"postgresql 컴파일" 라고 검색해서 방법을 찾도록 한다.
검색을 해보니, 추가적으로 필요한 요소가 있다고 한다.
추가적으로 필요한 요소를 설치하도록 한다.
% yum -y install gcc gcc-c++ boost boost-devel pkgconfig uuidd libtool autoconf make coreutils uuid-dev uuid-devel libuuid-devel e2fsprogs-devel readline readline-devel zlib zlib-devel openssl openssl-devel gettext libxml2-devel
그리고 다시 configure 를 하니, 에러 발생 없이 잘 된다.
이 상태에서 계속 진행을 하면 PostgreSQL 은 기본 설치 디렉토리가 /usr/local/pgsql 가 된다.
취향에 맞게 --prefix 옵션을 통해서 다른 디렉토리에 설치할 수 있다.
나는 물론 귀찮으니, 그냥 설치를 한다.
※ 그 외에도 많은 옵션들이 있으니, 궁금하면 구글에서 찾아봐서 사용하면 된다.
- 빌드
% make
컴파일을 진행하는 작업이다. 컴퓨터 사양에 따라 시간이 좀 걸릴 수 있으므로, 느긋하게 커피 한잔 하면서 기다리면 된다.
- 설치
% make install
컴파일 된 결과물들을 /usr/local/pgsql 에 설치하는 작업이다.
그런데 실제로 해보면 에러가 발생한다.make -C src install
make[1]: Entering directory `/home/ck0911.kim/postgresql-9.6.5/src'
make -C common install
make[2]: Entering directory `/home/ck0911.kim/postgresql-9.6.5/src/common'
make -C ../backend submake-errcodes
make[3]: Entering directory `/home/ck0911.kim/postgresql-9.6.5/src/backend'
make[3]: `submake-errcodes'를 위해 할 일이 없습니다
make[3]: Leaving directory `/home/ck0911.kim/postgresql-9.6.5/src/backend'
/usr/bin/mkdir -p '/usr/local/pgsql/lib'
/usr/bin/mkdir: `/usr/local/pgsql' 디렉토리를 만들 수 없습니다: 허가 거부
make[2]: *** [installdirs] 오류 1
make[2]: Leaving directory `/home/ck0911.kim/postgresql-9.6.5/src/common'
make[1]: *** [install-common-recurse] 오류 2
make[1]: Leaving directory `/home/ck0911.kim/postgresql-9.6.5/src'
make: *** [install-src-recurse] 오류 2
아하.... 이런.... root 계정으로 해야 되는구나.....
왜냐하면 /usr/local 디렉토리는 root 계정으로만 write 할 수 있기 때문이다.
이런씨..... configure 단계부터 다시 해야겠다.
왜냐하면 나는 일반 계정으로 작업을 하고 싶기 때문이다.
prefix 에 자신이 설치하고 싶은 디렉토리를 넣어주면 된다.
% make clean
% ./configure --prefix=/home/ck0911.kim/postgres
% make
% make install
PostgreSQL installation complete.
메세지가 나타나면 잘 설치된 것이다.
실제 postgresql 디렉토리가 생성되어 있는걸 볼 수 있다.
그 디렉토리 안에 들어가면 bin 디렉토리가 보인다.
그 디렉토리 안에 들어가면 실행 가능한 바이너리 파일들이 보인다.
그 바이너리 파일들을 아무대서나 실행할 수 있도록 PATH 에 추가해 준다.
$HOME/.bashrc 맨 마지막에
"export PATH=$PATH:$HOME/postgresql/bin" 구문을 추가해 주면 된다.
※ postgresql 디렉토리로 한번에 이동하거나, 환경설정관련 내용을 사용할 때, 환경변수를 지정해 놓으면 편리하다. 개인적으로 변수를 추가했다. 취향 차이이므로 안해도 상관없다.
% export PG=$HOME/postgresql
피드 구독하기:
글 (Atom)
화곡 어쩌라고, 굴사냥
석화찜(굴찜)을 먹으러 여의도로 갔다 그런데 재료가 모두 소진되었다고 마감이라고 한다 응? 다들 굴에 미쳤나? 굴을 찾아 헤매다 보니, 화곡까지 가게 되었다. 화곡은 처음 가본다. 첫인상은 "술집 겁네 많네" 피똥쌀때까지 마실 수 있...
-
Thunderbird(썬더버드) 백업 하는 방법은 간단하다. Thunderbird(썬더버드)는 특정 폴더에 메일 계정 정보와 메일 내용 모두 저장된다. 그러므로, 그 특정 폴더만 잘 백업하면 된다. 탐색기 실행 후, 아래 내용...
-
PostgreSQL 은 DBMS 이다. 당연히 socket 을 통한 접속 기능을 제공하고 있다. 처음 설치를 하면, 보안을 위해서 socket 외부 접속이 막혀있다. 이것을 열어주기 위해서는 postgresql.conf 파일을 수정해야 한다. ...
-
종종 youtube에서 영상이나 노래를 다운로드 하고 싶을 때가 있다. 그래서 구글에서 검색해보면 수 많은 유투브(youtube) 다운로드(download) 사이트, 프로그램 정보를 찾을 수 있다. 그 중에서 몇가지를 기록해 두고자 한다. ...
