강좌
클라우드/리눅스에 관한 강좌입니다.
네트워크 분류

리눅스마스터1급 : Squid 시작과 종료

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

리눅스마스터1: Squid 시작과 종료

 

 

다음과 같이 Squid를 시작해 보자.

 

[root@RockyLinux01 squid]# systemctl start squid

[root@RockyLinux01 squid]#

[root@RockyLinux01 squid]# ps -ef | grep squid

root 6261 1 1 15:25 ? 00:00:00 /usr/sbin/squid --foreground -f /etc/squid/squid.conf

squid 6263 6261 1 15:25 ? 00:00:00 (squid-1) --kid squid-1 --foreground -f /etc/squid/squid.conf

squid 6264 6263 0 15:25 ? 00:00:00 (logfile-daemon) /var/log/squid/access.log

root 6266 3386 0 15:26 pts/0 00:00:00 grep --color=auto squid

[root@RockyLinux01 squid]#

 

 

 

 

위와 같이 간단하게 Squid를 시작할 수 있다.

 

 

 

 

Squid 동작 상태 확인

 

 

[root@RockyLinux01 squid]# systemctl status squid

squid.service - Squid caching proxy

Loaded: loaded (/usr/lib/systemd/system/squid.service; disabled; vendor preset: disabled)

Active: active (running) since Mon 2023-06-19 15:25:59 KST; 15s ago

Docs: man:squid(8)

Process: 6259 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS)

Main PID: 6261 (squid)

Tasks: 3 (limit: 12195)

Memory: 15.1M

CPU: 174ms

CGroup: /system.slice/squid.service

├─6261 /usr/sbin/squid --foreground -f /etc/squid/squid.conf

├─6263 "(squid-1)" --kid squid-1 --foreground -f /etc/squid/squid.conf

└─6264 "(logfile-daemon)" /var/log/squid/access.log

 

619 15:25:59 RockyLinux01 systemd[1]: Starting Squid caching proxy...

619 15:25:59 RockyLinux01 squid[6261]: Squid Parent: will start 1 kids

619 15:25:59 RockyLinux01 squid[6261]: Squid Parent: (squid-1) process 6263 started

619 15:25:59 RockyLinux01 systemd[1]: Started Squid caching proxy.

[root@RockyLinux01 squid]#

 

 

 

동작상태를 확인 한 결과 실행중으로 표시된다.

 

 

 

 

 

Squid 재시작

 

 

[root@RockyLinux01 squid]# systemctl restart squid

[root@RockyLinux01 squid]#

[root@RockyLinux01 squid]#

[root@RockyLinux01 squid]# ps -ef | grep squid

root 6273 1 0 15:27 ? 00:00:00 /usr/sbin/squid --foreground -f /etc/squid/squid.conf

squid 6275 6273 0 15:27 ? 00:00:00 (squid-1) --kid squid-1 --foreground -f /etc/squid/squid.conf

squid 6276 6275 0 15:27 ? 00:00:00 (logfile-daemon) /var/log/squid/access.log

root 6279 3386 0 15:27 pts/0 00:00:00 grep --color=auto squid

[root@RockyLinux01 squid]#

 

 

위와 같은 방법으로 Squid를 재시작 할 수 있다.

 

 

 

위 방법은 Squid를 종료하고 시작하는 것과 같다.

 

 

 

 

다음과 같이 Squid를 종료 할 수 있다.

 

 

[root@RockyLinux01 squid]# systemctl stop squid

[root@RockyLinux01 squid]#

[root@RockyLinux01 squid]#

[root@RockyLinux01 squid]# ps -ef | grep squid

root 6283 3386 0 15:27 pts/0 00:00:00 grep --color=auto squid

[root@RockyLinux01 squid]#

 

 

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,035 명
  • 현재 강좌수 :  35,791 개
  • 현재 접속자 :  179 명