'프로그램 사용'에 해당되는 글 2258건

  1. 2019.02.01 docker 설명..
  2. 2019.02.01 postgreSQL centos 패키지
  3. 2019.02.01 postgreSQL 명령어 정리
  4. 2019.02.01 psql - postgreSQL CLI client
  5. 2019.02.01 pgadmin - postgreSQL client
  6. 2019.02.01 docker run = create + start
  7. 2019.02.01 smb 서비스 속도향상하기(SSD-bcache, AIO)
  8. 2019.01.29 git branch
  9. 2019.01.29 virbr0 - libvirt NIC
  10. 2019.01.28 ssh remote port forwarding

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


 도커 이미지 생성

$ 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 구차니

개발서버로 쓸때 NFS보단 smb가 무난할테니

smb write cache로 SSD를 쓰는 법이 있나 하고 찾아 보는데 bcache라는 녀석이 툭~ 튀어나왔다.

It turns out, both Linux and Windows now have the ability to use an SSD as a cache for a slower disk. The Linux version is called BCache and has been available since kernel 3.10 (available in Debian Jessie - Testing). 

[링크 : https://www.grepular.com/Disk_Caching_with_SSDs_Linux_and_Windows]


you can use BCache on Linux to enable caching of the file drive by using your SSD as a cache 

[링크 : https://askubuntu.com/questions/360257/how-to-cache-more-data-on-ssd-ram-to-avoid-spin-up]


Well, we got a bcache answer but no flashcache answer 

[링크 : https://askubuntu.com/questions/252140/how-do-i-install-and-use-flashcache-bcache-to-cache-hdd-to-ssd]


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

[링크 : https://ganadist.github.io/2018_04_18_using_bcache.html] 설정

[링크 : https://wiki.archlinux.org/index.php/bcache] 도움말



음.. 그 외에 samba 설정에서 AIO 라는 녀석이 있나보네?

After looking at the samba configuration file I saw that Async IO (AIO) was not enabled by default. What AIO does is that it let’s Samba handle several file operations asynchronously. This can, at the expense of some CPU cycles, increase the performance quite a lot. 

[링크 : https://www.nixpal.com/make-samba-go-faster/]

'프로그램 사용 > SMB(Samba)' 카테고리의 다른 글

nas samba warn  (0) 2019.03.17
smb 와 selinux 설정  (0) 2019.02.14
samba acpi s3 wake up  (0) 2017.08.11
삼바 서버 자동 접속 끊기(timeout) - 검색중  (0) 2017.05.31
cups smb2 미지원?  (0) 2017.05.16
Posted by 구차니

브랜치 다시 도전.. ㅠㅠ

저번에 쓴건 먼가 운영을 잘못한 느낌이네..


[링크 : https://www.zerocho.com/category/Git/post/582342a73fbde700178771f5]

[링크 : https://www.zerocho.com/category/Git/post/582df1c8d349570018107477]

Posted by 구차니

libvirt에서 생성하는 녀석으로 보이는데 찾아봐야겠네..


[링크 : https://askubuntu.com/questions/246343/what-is-the-virbr0-interface-used-for]

[링크 : https://firstboos.tistory.com/entry/virbr0-인테페이스-비활성화-on-CentOS]

[링크 : https://linux.die.net/man/8/brctl]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm qemu qcow2 vs raw with windows guest  (0) 2019.02.01
kvm 디스크 용량 늘리기 + 줄이기  (0) 2019.02.01
virt-viewer for windows  (0) 2019.01.28
virt-manager 백업 및 복구  (0) 2019.01.28
virt-manager  (0) 2019.01.28
Posted by 구차니

netstat에서 다음과 같은 신기한게 있어서 검색

sshd: root@pt 


아무튼.. 원격에서 ssh를 통해서 포트포워딩 해서 쓸 수 있도록 하는거 같은데..

한개의 포트라면 이게 더 깔끔 하려나?

Remote port forwarding

Remote port forwarding is crazy, yet very simple concept. So imagine that you have compromised a machine, and that machine has like MYSQL running but it is only accessible for localhost. And you can't access it because you have a really crappy shell. So what we can do is just forward that port to our attacking machine. The steps are as following:


Here is how you create a remote port forwarding:

ssh <gateway> -R <remote port to bind>:<local host>:<local port>


By the way, plink is a ssh-client for windows that can be run from the terminal. The ip of the attacking machine is 111.111.111.111.


Step 1 So on our compromised machine we do:

plink.exe -l root -pw mysecretpassword 111.111.111.111 -R 3307:127.0.0.1:3306


Step 2 Now we can check netstat on our attacking machine, we should see something like this:

tcp        0      0 127.0.0.1:3307          0.0.0.0:*               LISTEN      19392/sshd: root@pt

That means what we can connect to that port on the attacking machine from the attacking machine.


Step 3 Connect using the following command:

mysql -u root -p -h 127.0.0.1 --port=3307 


[링크 : https://xapax.gitbooks.io/security/content/port_forwarding_and_tunneling.html]

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

ssh blowfish  (0) 2019.09.24
ssh tunnel proxy  (0) 2019.09.20
reverse SSH  (0) 2018.05.14
rpi vpn client  (0) 2018.05.11
scp: ambiguous target 에러  (0) 2016.09.21
Posted by 구차니