Centos7常见任务及端口:修订间差异

来自牛奶河Wiki
跳到导航 跳到搜索
(创建页面,内容为“=== 111 - rpcbind === * systemctl stop rpcbind.socket * systemctl stop rpcbind ''Warning: Stopping rpcbind.service, but it can still be activated by: rpcbind.socket'' * systemctl disable rpcbind.socket * systemctl disable rpcbind ''Removed symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket. Removed symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service.'' === 25 - postfix === * systemctl stop postfix * systemctl disable postfix…”)
 
无编辑摘要
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
=== 111 - rpcbind ===
systemctl start|enable serviceName
systemctl stop|disable serviceName


* systemctl stop rpcbind.socket
系统初始化进程 systemd
* systemctl stop rpcbind
* systemd 在系统启动时使用了并发的启动机制,而旧版本使用 init, 按顺序依次启动每项服务
* systemd 按需启动服务,服务被请求时会启动,使用完成后会动态将该服务关闭
* systemd 核心的概念:单元(unit)和 目标(target)
** systemd 进程对系统的管理就是通过一个个的单元来实现的。比如服务,每一个服务都有一个对应的单元,而且每个单元都有一个配置文件,配置文件通常以 .service 作为文件名后缀,像 sshd 服务,它的配置文件就是 /usr/lib/systemd/system/sshd.service
** 目标单元(target unit),或者简称目标(target),它们的配置文件名后缀为 .target。在 systemd 中,target 用来模拟实现系统不同的运行级别


''Warning: Stopping rpcbind.service, but it can still be activated by: rpcbind.socket''
常用的运行级别
* 3 多用户字符模式,multi-user.target
/etc/systemd/system/multi-user.target.wants
* 5 多用户图形界面模式,graphical.target
/etc/systemd/system/graphical.target.wants


* systemctl disable rpcbind.socket
# 查看当前系统默认运行
* systemctl disable rpcbind
systemctl get-default
 
# 切换运行级别
''Removed symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket. Removed symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service.''
systemctl isolate graphical.target   # 切换到图形界面


=== 111 - rpcbind ===
systemctl stop rpcbind.socket
systemctl stop rpcbind
# Warning: Stopping rpcbind.service, but it can still be activated by: rpcbind.socket
=== 25 - postfix ===
=== 25 - postfix ===
 
systemctl stop postfix
* systemctl stop postfix
* systemctl disable postfix
 
=== 53 - dnsmasq ===
=== 53 - dnsmasq ===
 
systemctl stop dnsmasq
* systemctl stop dnsmasq
# ubuntu
* systemctl disable dnsmasq
systemctl stop systemd-resolved
* # ubuntu
* systemctl stop systemd-resolved
* systemctl disable systemd-resolved
 
=== xwindows ===
=== xwindows ===
init 3
init 3
 
=== ES ===
=== ES ===
9200
9200


=== oray ===
=== oray ===
<nowiki>#</nowiki> phddns, phdaemon # 16062 /usr/sbin/oraysl -a 127.0.0.1 -p 16062 -s phsle02.oray.net:6061 -l /var/log/phddns -L oraysl -f /etc -S /etc/oray/phddns -t /bin/bash /usr/sbin/phdaemon
# phddns, phdaemon
# 16062
/usr/sbin/oraysl -a 127.0.0.1 -p 16062 -s phsle02.oray.net:6061 -l /var/log/phddns -L oraysl -f /etc -S /etc/oray/phddns -t /bin/bash /usr/sbin/phdaemon
 
=== other ===
# 停止disable dnsmasq
killall dnsmasq
SN=cups
./rrun ip_139 “systemctl disable ${SN};systemctl stop ${SN}”


=== 停止disable dnsmasq ===
killall dnsmasq
----SN=cups ./rrun ip_139 “systemctl disable ${SN};systemctl stop ${SN}”


<nowiki>##</nowiki> Other rpcbind.socket rpcbind 111 cupsd 631 postfix 25 dnsmasq 53
<nowiki>##</nowiki> Other rpcbind.socket rpcbind 111 cupsd 631 postfix 25 dnsmasq 53

2024年5月28日 (二) 11:25的最新版本

systemctl start|enable serviceName
systemctl stop|disable serviceName

系统初始化进程 systemd

  • systemd 在系统启动时使用了并发的启动机制,而旧版本使用 init, 按顺序依次启动每项服务
  • systemd 按需启动服务,服务被请求时会启动,使用完成后会动态将该服务关闭
  • systemd 核心的概念:单元(unit)和 目标(target)
    • systemd 进程对系统的管理就是通过一个个的单元来实现的。比如服务,每一个服务都有一个对应的单元,而且每个单元都有一个配置文件,配置文件通常以 .service 作为文件名后缀,像 sshd 服务,它的配置文件就是 /usr/lib/systemd/system/sshd.service
    • 目标单元(target unit),或者简称目标(target),它们的配置文件名后缀为 .target。在 systemd 中,target 用来模拟实现系统不同的运行级别

常用的运行级别

  • 3 多用户字符模式,multi-user.target
/etc/systemd/system/multi-user.target.wants
  • 5 多用户图形界面模式,graphical.target
/etc/systemd/system/graphical.target.wants
# 查看当前系统默认运行
systemctl get-default
# 切换运行级别
systemctl isolate graphical.target    # 切换到图形界面

111 - rpcbind

systemctl stop rpcbind.socket
systemctl stop rpcbind
# Warning: Stopping rpcbind.service, but it can still be activated by: rpcbind.socket

25 - postfix

systemctl stop postfix

53 - dnsmasq

systemctl stop dnsmasq
# ubuntu
systemctl stop systemd-resolved

xwindows

init 3

ES

9200

oray

# phddns, phdaemon
# 16062
/usr/sbin/oraysl -a 127.0.0.1 -p 16062 -s phsle02.oray.net:6061 -l /var/log/phddns -L oraysl -f /etc -S /etc/oray/phddns -t /bin/bash /usr/sbin/phdaemon

other

# 停止disable dnsmasq
killall dnsmasq
SN=cups
./rrun ip_139 “systemctl disable ${SN};systemctl stop ${SN}”


## Other rpcbind.socket rpcbind 111 cupsd 631 postfix 25 dnsmasq 53

# port:631 - cupsd # systemctl disable cups # systemctl stop cups Warning: Stopping cups.service, but it can still be activated by:

cups.socket
cups.path

# port:25 smtp # service postfix stop

chkconfig -s cups off # 或者直接删除开机服务 chkconfig –del cups

smtp:/etc/init.d/postfix stop rpc:/etc/init.d/portmap stop svrloc:/etc/init.d/slpd stop ipp:/etc/init.d/cupsd stop

chkconfig |grep on cron 0ff 1ff 2n 3n 4ff 5n 6ff cups 0ff 1ff 2n 3:on 4:off 5:on 6:off nfs 0:off 1:off 2:off 3:on 4:off 5:on 6:off nfsboot 0:off 1:off 2:off 3:on 4:off 5:on 6:off novell-zmd 0:off 1:off 2:off 3:on 4:on 5:on 6:off nscd 0:off 1:off 2:off 3:on 4:off 5:on 6:off portmap 0:off 1:off 2:off 3:on 4:off 5:on 6:off postfix 0:off 1:off 2:off 3:on 4:off 5:on 6:off powersaved 0:off 1:off 2:on 3:on 4:off 5:on 6:off random 0:off 1:off 2:on 3:on 4:off 5:on 6:off resmgr 0:off 1:off 2:on 3:on 4:off 5:on 6:off slpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off