끄아아아아앙 어렵다!!!!


역사에 대해서 잘 설명되어 있음

(cgroup이 control group 이었구나, jail 이라던가 chroot 라던가 등등)

[링크 : http://blog.drakejin.me/Docker-araboza-1/]


이미지는 컨테이너 실행에 필요한 파일과 설정값등을 포함하고 있는 것으로 상태값을 가지지 않고 변하지 않습니다(Immutable). 


컨테이너는 이미지를 실행한 상태라고 볼 수 있고 추가되거나 변하는 값은 컨테이너에 저장됩니다. 

[링크 : https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html]

[링크 : https://subicura.com/2017/01/19/docker-guide-for-beginners-2.html]

도커 컨테이너는 이미지가 실행된 형태

[링크 : http://swartist.blogspot.com/2018/02/docker.html]



volume

/var/lib/docker/volumes 에 저장되는 듯?

[링크 : http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter06/04]


docker를 계속 사용하다 보면 container의 데이터 휘발성 때문에 volume을 사용하게 됩니다. 

[링크 : https://darkrasid.github.io/docker/container/volume/2017/05/10/docker-volumes.html]

'프로그램 사용 > docker' 카테고리의 다른 글

docker inspect  (0) 2019.02.28
docker 복원하기  (2) 2019.02.27
docker 설명..  (0) 2019.02.01
docker run = create + start  (0) 2019.02.01
docker howto  (4) 2018.11.23
Posted by 구차니

전에 미흡한 부분을 추가로 찾는중..


 도커 이미지 생성

$ docker build -t django-sample .


앱 컨테이너를 실행

$ docker run -it --rm \

    -p 8000:8000 \

    django-sample \

    ./manage.py runserver 0:8000


데이터베이스 컨테이너 실행

$ docker run -it --rm \

    postgres:9.6.1


앱 컨테이너를 실행한 후 PostgreSQL 컨테이너를 실행했습니다. 그런데 컨테이너는 실행 직후부터 컨테이너 외부의 상황과 격리됩니다. 따라서 PostgreSQL 컨테이너가 실행되었는지 알지 못하죠.


db 컨테이너를 지우면, 데이터베이스 데이터가 사라짐

[링크 : http://raccoonyy.github.io/docker-usages-for-dev-environment-setup/]


docker와 docker-compose의 차이

docker 단일 컨테이너를 관리합니다.


docker-compose 은 여러 컨테이너 애플리케이션을 관리합니다.


docker-compose의 사용 에는 3 단계가 필요합니다.


Dockerfile을 사용 하여 앱 환경 정의

docker-compose.yml 에 앱 서비스 정의

docker-compose up 실행하여 앱을 시작하고 실행합니다. 

[링크 : https://code.i-harness.com/ko-kr/q/24352d8]

'프로그램 사용 > docker' 카테고리의 다른 글

docker 복원하기  (2) 2019.02.27
docker 개념 다시 조사..  (0) 2019.02.01
docker run = create + start  (0) 2019.02.01
docker howto  (4) 2018.11.23
docker static ip  (0) 2018.11.23
Posted by 구차니

postgresql은 메타페키지가 없는건가?

아무튼 클라이언트는 postgresql로 깔면되고 서버는 postgresql-server로 깔면된다.

(서버가 docker로 돌고 있어서 접속하려고 고민하다가 찾음..)


# yum search postgresql

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: mirror.kakao.com

 * extras: mirror.kakao.com

 * updates: mirror.kakao.com

======================================================== N/S matched: postgresql =========================================================

freeradius-postgresql.x86_64 : Postgresql support for freeradius

libreoffice-postgresql.x86_64 : PostgreSQL connector for LibreOffice

pcp-pmda-postgresql.x86_64 : Performance Co-Pilot (PCP) metrics for PostgreSQL

postgresql.i686 : PostgreSQL client programs

postgresql.x86_64 : PostgreSQL client programs

postgresql-contrib.x86_64 : Extension modules distributed with PostgreSQL

postgresql-devel.i686 : PostgreSQL development header files and libraries

postgresql-devel.x86_64 : PostgreSQL development header files and libraries

postgresql-docs.x86_64 : Extra documentation for PostgreSQL

postgresql-jdbc.noarch : JDBC driver for PostgreSQL

postgresql-jdbc-javadoc.noarch : API docs for postgresql-jdbc

postgresql-libs.i686 : The shared libraries required for any PostgreSQL clients

postgresql-libs.x86_64 : The shared libraries required for any PostgreSQL clients

postgresql-odbc.x86_64 : PostgreSQL ODBC driver

postgresql-plperl.x86_64 : The Perl procedural language for PostgreSQL

postgresql-plpython.x86_64 : The Python2 procedural language for PostgreSQL

postgresql-pltcl.x86_64 : The Tcl procedural language for PostgreSQL

postgresql-server.x86_64 : The programs needed to create and run a PostgreSQL server

postgresql-static.i686 : Statically linked PostgreSQL libraries

postgresql-static.x86_64 : Statically linked PostgreSQL libraries

postgresql-test.x86_64 : The test suite distributed with PostgreSQL

postgresql-upgrade.x86_64 : Support for upgrading from the previous major release of PostgreSQL

qt-postgresql.i686 : PostgreSQL driver for Qt's SQL classes

qt-postgresql.x86_64 : PostgreSQL driver for Qt's SQL classes

qt3-PostgreSQL.i686 : PostgreSQL drivers for Qt 3's SQL classes

qt3-PostgreSQL.x86_64 : PostgreSQL drivers for Qt 3's SQL classes

qt5-qtbase-postgresql.i686 : PostgreSQL driver for Qt5's SQL classes

qt5-qtbase-postgresql.x86_64 : PostgreSQL driver for Qt5's SQL classes

PyGreSQL.x86_64 : A Python client library for PostgreSQL

apr-util-pgsql.x86_64 : APR utility library PostgreSQL DBD driver

libdbi-dbd-pgsql.x86_64 : PostgreSQL plugin for libdbi

perl-DBD-Pg.x86_64 : A PostgreSQL interface for perl

php-pgsql.x86_64 : A PostgreSQL database module for PHP

python-psycopg2.x86_64 : A PostgreSQL database adapter for Python

python-psycopg2-debug.x86_64 : A PostgreSQL database adapter for Python 2 (debug build)

python-psycopg2-doc.x86_64 : Documentation for psycopg python PostgreSQL database adapter

redland-pgsql.x86_64 : PostgreSQL storage support for Redland

rhdb-utils.x86_64 : Miscellaneous utilities for PostgreSQL - Red Hat Edition

tcl-pgtcl.x86_64 : A Tcl client library for PostgreSQL


  Name and summary matches only, use "search all" for everything. 



[링크 : https://unix.stackexchange.com/questions/249494/install-postgresql-client-psql-only-on-centos]



+ 2020.01.16


[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=31850584]

[링크 : https://www.postgresql.org/download/linux/redhat/] 패키지

[링크 : https://www.manualfactory.net/10153]  방화벽

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

psql로 접속해서 보는중


mysql의 show databases;

\l

[링크 : http://www.postgresqltutorial.com/postgresql-show-databases/]


mysql의 show tables;

\dt


얘랑 같다는데 실제로 해보니 \dt는 자신의 테이블만 보여주도록 WHERE 가 추가된 느낌?

SELECT * FROM pg_catalog.pg_tables; 


굳이 좀더 쓰자면 아래에 가까운?

SELECT * FROM pg_catalog.pg_tables WHERE tableowner='username;' 


[링크 : https://stackoverflow.com/questions/769683/show-tables-in-postgresql]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

설치는 yum install postgresql

psql 이라는 명령어로 실행


[링크 : https://zetawiki.com/wiki/CentOS_PostgreSQL_클라이언트_설치]

[링크 : https://zetawiki.com/wiki/리눅스_PostgreSQL_클라이언트_psql]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

쓸일이.. 생겨부렀네? ㅠㅠ


[링크 : https://www.pgadmin.org/]


온갖 OS를 다 지원은 하는데.. QT라니!!!

pgAdmin 4 is a complete rewrite of pgAdmin, built using Python and Javascript/jQuery. A desktop runtime written in C++ with Qt allows it to run standalone for individual users, or the web application code may be deployed directly on a webserver for use by one or more users through their web browser. The software has the look and feel of a desktop application whatever the runtime environment is, and vastly improves on pgAdmin III with updated user interface elements, multi-user/web deployment options, dashboards and a more modern design. 

[링크 : https://www.pgadmin.org/download/]


+

2019.06.04

python / django 기반

 sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

sudo apt install wget ca-certificates

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add

sudo apt update

sudo apt install pgadmin4


[링크  : https://o7planning.org/en/11353/installing-pgadmin-on-ubuntu]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
Posted by 구차니

docker run 이라고 기본 예제(?)로 도움말이 나와서

그걸로 했었는데 그렇게 하면 자꾸 증식하는 이유를 이제야 알았네..


 docker run 명령이 "create" 와 "start" 명령을 한번에 실행시키는 명령


[링크 : https://www.popit.kr/개발자가-처음-docker-접할때-오는-멘붕-몇가지/]

'프로그램 사용 > docker' 카테고리의 다른 글

docker 개념 다시 조사..  (0) 2019.02.01
docker 설명..  (0) 2019.02.01
docker howto  (4) 2018.11.23
docker static ip  (0) 2018.11.23
freebsd jail / docker  (0) 2015.07.27
Posted by 구차니
파일방2019. 2. 1. 08:51

심심해서(?) linux route 프로젝트 쪽에 REST API로 확장된게 있나 찾다가 나온거

아무튼 요거면.. 리눅스 라우터 하나 만들고 원격으로 방화벽 설정이나 귀찮은(!)

포트 포워딩 설정을 웹에서 간편하게(?) 할 수 있겠다 싶은데..

[링크 : https://github.com/Oxalide/iptables-api]

[링크 : https://github.com/securitykiss-com/rfw]


iptables로 단순하게 방화벽만 하는줄 알았는데 port forwarding도 가능한 거였구나..

[링크 : https://printf.kr/archives/161]

'파일방' 카테고리의 다른 글

extplorer  (0) 2019.02.28
pydio 대체할 녀석들..  (0) 2019.02.25
git sourcetree  (0) 2019.01.30
vworld  (0) 2019.01.13
cairo  (0) 2018.12.20
Posted by 구차니
Linux2019. 2. 1. 08:37

freeNAS에서 내세우는 XFS의 의한 성능 향상과 SSD 캐싱 볼륨 설정중에

SSD write cache로 쓰는건 리눅스 커널 4.1 이후 부터 block cache로 적용이 된 듯

(freeNAS 써야 하는 이유중에 큰 하나가 사라지는 느낌인데?)


[링크 : https://www.kernel.org/doc/Documentation/bcache.txt]

[링크 : https://bcache.evilpiepirate.org/]

Posted by 구차니
Linux2019. 2. 1. 08:32

bcache를 SSD에 하면 4K 성능은 올라가겠지만..

수명을 너무 갉아 먹을것 같아서 램에다 올리면 성능도 향상되고 수명도 안 줄이고 좋겠지!?

라는 생각에 검색을 해보는데

[링크 : https://unix.stackexchange.com/questions/138571/bcache-on-md-or-md-on-bcache]

[링크 : https://www.phoronix.com/scan.php?page=article&item=linux414-bcache-raid&num=1]


벤치결과만 보면 SSD가 짱이에요! 이긴 한데

어짜피 GbE 써도 100MB/s 정도가 한계라

그 이상의 퍼포먼스가 크게 필요 없다면 BCache Writeback으로 설정해서 쓰면 무난한

성능을 RAID에서 뽑아낼수 있지 않을까 기대가 되긴 한다.

(빌드 서버라던가, 개발 서버라던가 이런 용도로)

[링크 : https://www.phoronix.com/scan.php?page=article&item=linux414-bcache-raid&num=4]


램디스크 만들어서 리니지 2 돌려본 결과 체감할 성능 향상은 없는 죽여주는 벤치마크 결과가 나왔다고.

SSD 성능이라는 측면과 리니지 2는 write가 아닌 read니까 체감할수 있을려나?

[링크 : http://playwares.com/freeboard/31338395]

'Linux' 카테고리의 다른 글

ls에서 전체년도 보기  (0) 2019.02.03
bcache - SSD write cache  (0) 2019.02.01
bash builtin 명령어 .  (0) 2019.01.28
네트워크 인터페이스 명칭이 이상하다? enp0s0? em0?  (0) 2019.01.23
getopt()  (0) 2018.11.12
Posted by 구차니