Linux/Ubuntu2018. 12. 18. 19:12

lp lpr lpadmin lpstat 등등

line printer 관련 명령어들인데 lpstat은 queue 관련을 볼 수 있는 듯?

[링크 : https://en.wikipedia.org/wiki/Line_printer]

[링크 : https://askubuntu.com/questions/37247/is-there-an-easy-way-to-view-the-print-queue]

[링크 : https://www.cups.org/doc/man-lpstat.html]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu test page 위치  (0) 2018.12.19
epson 프린터 유틸리티 관련  (0) 2018.12.18
lp lpr  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
do-release-upgrade와 apt-get dist-upgrade  (0) 2018.09.28
Posted by 구차니
Linux/Ubuntu2018. 12. 18. 19:10

'Linux > Ubuntu' 카테고리의 다른 글

epson 프린터 유틸리티 관련  (0) 2018.12.18
lpstat  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
do-release-upgrade와 apt-get dist-upgrade  (0) 2018.09.28
tmux  (0) 2018.08.13
Posted by 구차니
Linux/Ubuntu2018. 12. 6. 15:17

좀 귀찮게 먼가 콘솔로 치던가 다른 유틸로 만들던가..

탐색기에서 만드는 법은 없나...?


[링크 : https://linuxconfig.org/how-to-create-desktop-shortcut-launcher-on-ubuntu-18-04-bionic-beaver-linux]

'Linux > Ubuntu' 카테고리의 다른 글

lpstat  (0) 2018.12.18
lp lpr  (0) 2018.12.18
do-release-upgrade와 apt-get dist-upgrade  (0) 2018.09.28
tmux  (0) 2018.08.13
우분투 자동 업데이트  (0) 2018.05.21
Posted by 구차니
Linux/centos2018. 12. 3. 17:13

_

2019.03.21

centos7 기준 아래 경로가 잘못되어 수정

# vi /usr/lib/systemd/system/servicename




# vi /usr/lib/systemd/service/servicename

[Unit]

Description = making network connection up

After = network.target


[Service]

ExecStart = /root/scripts/conup.sh


[Install]

WantedBy = multi-user.target


실제 서비스 등록

# chmod +x /root/scripts/conup.sh

# systemctl enable servicename  


[링크 : https://www.tecmint.com/create-new-service-units-in-systemd/]



+

node.js 경로줘서 실행하기


npm start --prefix path/to/your/app 


[링크 : https://stackoverflow.com/questions/36172442/how-to-npm-start-at-a-different-directory]


+

귀찮으니.. whereis로 찾아서

/bin/http-server 와(얘는 걍 스크립트)

/bin/node 를 만들어 주면 해결!(얘는 바이너리)

[링크 : http://leechwin.tistory.com/...usrbinenv-node-No-such-file-or-directory-에러가-발생하는-경우]



+

reload를 적용하려면 아래의 줄을 [service] 항목에 추가하면 되는 듯?

[Unit]

Description=The NGINX HTTP and reverse proxy server

After=syslog.target network.target remote-fs.target nss-lookup.target


[Service]

Type=forking

PIDFile=/run/nginx.pid

ExecStartPre=/usr/sbin/nginx -t

ExecStart=/usr/sbin/nginx

ExecReload=/bin/kill -s HUP $MAINPID

ExecStop=/bin/kill -s QUIT $MAINPID

PrivateTmp=true


[Install]

WantedBy=multi-user.target 


[링크 : https://www.shellhacks.com/systemd-service-file-example/]

Posted by 구차니
Linux/centos2018. 11. 16. 17:49

아래와 같이 하니 등록은 되는 듯?


# systemctl enable mariadb

Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.


# systemctl enable httpd

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. 


[링크 : https://www.liquidweb.com/kb/how-to-install-mysql-mariadb-on-centos-7/]

[링크 : http://blog.andrewc.com/2016/06/autostart-apache-on-centos-7-boot/]

Posted by 구차니
Linux2018. 11. 12. 15:55

optarg의 경우 루프를 돌고 나면 리셋 되기 때문에

해당 옵션 판별시 다른 변수로 반드시 저장을 해주어야 한다.

그렇지 않으면 '(null)' 이라는 문자열이 돌아온다.


[링크 : https://soooprmx.com/archives/4993]

[링크 : https://linux.die.net/man/3/getopt]

[링크 : https://www.gnu.org/software/libc/manual/html_node/Example-of-Getopt.html]

'Linux' 카테고리의 다른 글

bash builtin 명령어 .  (0) 2019.01.28
네트워크 인터페이스 명칭이 이상하다? enp0s0? em0?  (0) 2019.01.23
mount -o codepage=cp949  (0) 2018.01.04
taint kernel?  (0) 2017.12.03
limits.conf와 ulimit  (0) 2017.08.24
Posted by 구차니
Linux/Ubuntu2018. 9. 28. 06:59

'Linux > Ubuntu' 카테고리의 다른 글

lp lpr  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
tmux  (0) 2018.08.13
우분투 자동 업데이트  (0) 2018.05.21
E: /var/lib/dpkg/lock 잠금 파일을 얻을 수 없습니다  (0) 2018.05.17
Posted by 구차니
Linux/centos2018. 9. 12. 12:53

mobaxterm으로 centos 새로 설치한거에  접속해서 gvim을 테스트 삼아 실행하는데 에러!

디스플레이가 없습니다 라고 배를 짼다.


yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-font-utils xorg-x11-fonts-Type1 

[링크 : https://itekblog.com/ssh-x11-forwarding-display-using-mobaxterm/]

[링크 : https://stackoverflow.com/questions/40746146/how-does-mobaxterm-know-whether-x11-forwarding-is-working-on-remote-server]


그래서 찾아보니 /etc/ssh/sshd 설정도 문제가 아닌데 하고 갸우뚱 하면서 패키지 설치하고

mobaxterm 세션을 끊었다가 다시 시작하니 아래와 같이 나오면서 잘 된다!


     ┌────────────────────────────────────────────────────────────────────┐


     │                        • MobaXterm 10.9 •                          │


     │            (SSH client, X-server and networking tools)             │


     │                                                                    │


     │ ➤ SSH session to root@0.0.0.0                                      │


     │   • SSH compression : ✔                                            │


     │   • SSH-browser     : ✔                                            │


     │   • X11-forwarding  : ✔  (remote display is forwarded through SSH) │


     │   • DISPLAY         : ✔  (automatically set on remote server)      │


     │                                                                    │


     │ ➤ For more info, ctrl+click on help or visit our website           │


     └────────────────────────────────────────────────────────────────────┘




mobaxterm의 xorg-x11-xauth 특성 때문인가?

'Linux > centos' 카테고리의 다른 글

KVM spice 원격 접속시 No route to host  (0) 2019.01.28
yum checkupdate  (0) 2019.01.25
centos 서비스 등록하기  (0) 2018.12.03
centos 서비스 자동시작  (0) 2018.11.16
node.js centos에 설치하기  (0) 2018.09.11
Posted by 구차니
Linux/centos2018. 9. 11. 15:48

췟.. 귀찮네 -_ㅠ


curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

sudo yum -y install nodejs

yum install gcc-c++ make 

[링크 : https://nodejs.org/ko/download/package-manager/]

'Linux > centos' 카테고리의 다른 글

KVM spice 원격 접속시 No route to host  (0) 2019.01.28
yum checkupdate  (0) 2019.01.25
centos 서비스 등록하기  (0) 2018.12.03
centos 서비스 자동시작  (0) 2018.11.16
mobaxterm - centos 에서 X11 포워딩 안되는 경우 해결책  (0) 2018.09.12
Posted by 구차니
Linux/Ubuntu2018. 8. 13. 14:45
Posted by 구차니