리눅스

도커를 활용한 프린터 서버 및 구글 클라우드프린터 사용하기

귀신이보인다 2020. 2. 12. 10:49
728x90
반응형

먼저 자신의 서버에 도커가 지원이 되어야 합니다.

 

전 항상 SSH 모드로 설명드립니다.

 

이유는 너~무 편해서입니다.

 

SSH 모드 접속은 따로 설명 드리지 않겠습니다.

 

접속하시게 되면 DOCKER 명령어가 일반적으로 먹지 않을겁니다 ㅎㅎㅎ

 

sudo -i 입력하시고 비밀번호를 입력하신뒤에는 명령어가 잘 먹습니다 ㅎㅎㅎ

 

권한 때문에 그렇습니다.

 

자 최고 관리자로 접속 되셧을테니 이제 명령어 한줄 입력합시다.

 

1. docker run -d -p 631:631 -v /volume1/docker/cups:/config -v /var/run/dbus:/var/run/dbus --name cupsd --net=host k45734/nicegay:cupsd

 

빨간색 글씨는 서버의 폴더 입니다.  (구글 클라우드의 설정파일이 저장될곳- 한번 설정하면 계속 사용할수 있습니다.)

파란색 글씨는 컨테이너 이름입니다.

 

위 이미지는 직접 재 빌드하였고 저또한 사용하려고 만든 이미지 입니다.

이제 설치가 완료가 되셧을겁니다.

그렇다면 

 

2. docker exec -it cupsd /bin/sh

 

파란색 글씨는 위와 비교해보시면 같습니다.

 

3. gcp-connector-util init

 

입력하여 주세요.

아래 처럼 나오실겁니다.

똑같이 입력해주세요.

yes yes no

 

 

"Local printing" means that clients print directly to the connector via local subnet, and that an Internet connection is neither necessary nor used.

Enable local printing?
yes

"Cloud printing" means that clients can print from anywhere on the Internet, and that printers must be explicitly shared with users.
Enable cloud printing?
yes

Retain the user OAuth token to enable automatic sharing?
no

Visit https://www.google.com/device, and enter this code. I'll wait for you.
GGVY-****

 

위의 내용이 비슷하게 나오시면 되십니다.

이제 위 링크 https:www.google.com/device 클릭하시고 바로 아래 코드 입력해주시면 되십니다.

 

설정파일이 만들어졌습니다.

 

4. cp /app/gcp-cups-connector.config.json /config/gcp-cups-connector.config.json1

 

위 명령어처럼 설정파일을 복사해줍니다.

 

5. exit 를 입력해서 컨테이너에서 나옵니다.

 

5.docker restart cupsd

 

 

프린터 설정은


http://IP주소:631

 

Administration
위에 똑같은 메뉴 클릭 

아이디 비밀번호는 print

Add Printer 클릭

 

이후는 사용자의 프린터마다 다르기때문에 해당 문서를 찾아보시는게 좋을듯 싶습니다.

 

 

728x90
반응형