今天执行ss命令查看端口时候忽然发现一个不熟悉的端口
631端口
#查看端口
[root@centos8 ~]#ss -ntlp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 5 127.0.0.1:631 0.0.0.0:* users:(("cupsd",pid=1093,fd=9))
#查看对应的进程
[root@centos8 ~]#ps -aux | grep cupsd
root 1093 0.0 0.1 138736 10048 ? Ss 09:32 0:00 /usr/sbin/cupsd -l
root 10304 0.0 0.0 12136 1100 pts/3 R+ 20:47 0:00 grep --color=auto cupsd
#查看是哪个包提供的
[root@centos8 ~]#yum provides /usr/sbin/cupsd
Last metadata expiration check: 1:01:23 ago on Wed 26 Jan 2022 07:46:20 PM CST.
cups-1:2.2.6-38.el8.x86_64 : CUPS printing system
Repo : @System
Matched from:
Filename : /usr/sbin/cupsd
cups-1:2.2.6-40.el8.x86_64 : CUPS printing system
Repo : AppStream
Matched from:
Filename : /usr/sbin/cupsd
#查看包的详细信息
[root@centos8 ~]#rpm -qi cups
Name : cups
Epoch : 1
Version : 2.2.6
Release : 38.el8
Architecture: x86_64
Install Date: Sun 13 Jun 2021 12:40:22 PM CST
Group : Unspecified
Size : 6999984
License : GPLv2+ and LGPLv2 with exceptions and AML
Signature : RSA/SHA256, Tue 16 Jun 2020 07:24:37 AM CST, Key ID 05b555b38483c65d
Source RPM : cups-2.2.6-38.el8.src.rpm
Build Date : Tue 16 Jun 2020 07:02:04 AM CST
Build Host : x86-02.mbox.centos.org
Relocations : (not relocatable)
Packager : CentOS Buildsys <bugs@centos.org>
Vendor : CentOS
URL : http://www.cups.org/
Summary : CUPS printing system
Description :
CUPS printing system provides a portable printing layer for
UNIX® operating systems. It has been developed by Apple Inc.
to promote a standard printing solution for all UNIX vendors and users.
CUPS provides the System V and Berkeley command-line interfaces.
#描述
CUPS打印系统提供了一种便携式打印层UNIX®操作系统。它由苹果公司(Apple Inc.)开发。
为所有UNIX供应商和用户推广标准打印解决方案。
CUPS提供System V和Berkeley命令行接口。
是一个提供打印服务的命令,对服务没什么用。
#查看服务
[root@centos8 ~]#systemctl status cups
● cups.service - CUPS Scheduler
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-01-26 08:45:50 CST; 11h ago
Docs: man:cupsd(8)
Main PID: 987 (cupsd)
Status: "Scheduler is running..."
Tasks: 1 (limit: 12128)
Memory: 3.1M
CGroup: /system.slice/cups.service
└─987 /usr/sbin/cupsd -l
Jan 26 08:45:50 centos8.magedu.org systemd[1]: Starting CUPS Scheduler...
Jan 26 08:45:50 centos8.magedu.org systemd[1]: Started CUPS Scheduler.
#停止服务
[root@centos8 ~]#systemctl stop cups
[root@centos8 ~]#systemctl status cups
● cups.service - CUPS Scheduler
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2022-01-26 20:39:37 CST; 3s ago
Docs: man:cupsd(8)
Process: 987 ExecStart=/usr/sbin/cupsd -l (code=exited, status=0/SUCCESS)
Main PID: 987 (code=exited, status=0/SUCCESS)
Status: "Scheduler is running..."
Jan 26 08:45:50 centos8.magedu.org systemd[1]: Starting CUPS Scheduler...
Jan 26 08:45:50 centos8.magedu.org systemd[1]: Started CUPS Scheduler.
Jan 26 20:39:37 centos8.magedu.org systemd[1]: Stopping CUPS Scheduler...
Jan 26 20:39:37 centos8.magedu.org systemd[1]: cups.service: Succeeded.
Jan 26 20:39:37 centos8.magedu.org systemd[1]: Stopped CUPS Scheduler.
#关闭开机自启
[root@centos8 ~]#systemctl disable cups
Removed /etc/systemd/system/multi-user.target.wants/cups.path.
Removed /etc/systemd/system/multi-user.target.wants/cups.service.
Removed /etc/systemd/system/sockets.target.wants/cups.socket.
Removed /etc/systemd/system/printer.target.wants/cups.service.
#卸载服务 之前可以查看一下该服务的所有依赖包
[root@centos8 ~]#yum remove cups -y