Bo's Oracle Station

查看: 1054|回复: 0

课程第12次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-8-4 20:15:08 | 显示全部楼层 |阅读模式
关于套节字:
To listen for con nections, a daemon uses a socket. This is the primary commun ication channel with loca l or remote cl ients. Sockets may be created by daemons or may be separated from the daemon and be created by another p rocess, such as systemd. The socket is passed to the daemon when a connection is esta bli shed by the client.

以下是对RH124 p212结尾列表的解释:
RHEL7没有init,改成:
  1. [root@server3 init.d]# pwd
  2. /etc/rc.d/init.d
  3. [root@server3 init.d]# ls
  4. functions  netconsole  network  README  rhnsd
  5. [root@server3 init.d]#
复制代码
没有xinetd了:
  1. [root@desktop3 init.d]# ps aux |grep xinetd
  2. root      66761  0.0  0.0 112708   976 pts/0    S+   20:26   0:00 grep --color=auto xinetd
复制代码
在以前版本(RHEL6以前)靠数字来解决依赖关系,比如10  90(10代表比较早启动,90代表比较晚关闭):
  1. #! /bin/bash
  2. #
  3. # network       Bring up/down networking
  4. #
  5. # chkconfig: 2345 10 90
  6. # description: Activates/Deactivates all network interfaces configured to \
  7. #              start at boot time.
  8. #
  9. ### BEGIN INIT INFO
  10. # Provides: $network
  11. # Should-Start: iptables ip6tables
  12. # Short-Description: Bring up/down networking
  13. # Description: Bring up/down networking
  14. ### END INIT INFO

  15. # Source function library.
  16. . /etc/init.d/functions

  17. if [ ! -f /etc/sysconfig/network ]; then
  18.     exit 6
  19. fi
复制代码

[root@server3 init.d]# systemctl  list-dependencies    sshd
sshd.service
● ├─sshd-keygen.service
● ├─system.slice
● └─basic.target
●   ├─microcode.service
●   ├─rhel-dmesg.service
●   ├─selinux-policy-migrate-local-changes@targeted.service
●   ├─paths.target
●   ├─slices.target
●   │ ├─-.slice
●   │ └─system.slice
●   ├─sockets.target
●   │ ├─avahi-daemon.socket
●   │ ├─cups.socket
●   │ ├─dbus.socket
●   │ ├─dm-event.socket
●   │ ├─iscsid.socket
●   │ ├─iscsiuio.socket
●   │ ├─rpcbind.socket
●   │ ├─spice-vdagentd.socket
●   │ ├─systemd-initctl.socket
●   │ ├─systemd-journald.socket
●   │ ├─systemd-shutdownd.socket
●   │ ├─systemd-udevd-control.socket
●   │ ├─systemd-udevd-kernel.socket
●   │ ├─virtlockd.socket
●   │ └─virtlogd.socket
●   ├─sysinit.target
●   │ ├─dev-hugepages.mount
●   │ ├─dev-mqueue.mount
●   │ ├─dmraid-activation.service
●   │ ├─iscsi.service
●   │ ├─kmod-static-nodes.service
●   │ ├─lvm2-lvmetad.socket
●   │ ├─lvm2-lvmpolld.socket
●   │ ├─lvm2-monitor.service
●   │ ├─multipathd.service
●   │ ├─plymouth-read-write.service
●   │ ├─plymouth-start.service
●   │ ├─proc-sys-fs-binfmt_misc.automount
●   │ ├─rhel-autorelabel-mark.service
●   │ ├─rhel-autorelabel.service
●   │ ├─rhel-domainname.service
●   │ ├─rhel-import-state.service
●   │ ├─rhel-loadmodules.service
●   │ ├─sys-fs-fuse-connections.mount
●   │ ├─sys-kernel-config.mount
●   │ ├─sys-kernel-debug.mount
●   │ ├─systemd-ask-password-console.path
●   │ ├─systemd-binfmt.service
●   │ ├─systemd-firstboot.service
●   │ ├─systemd-hwdb-update.service
●   │ ├─systemd-journal-catalog-update.service
●   │ ├─systemd-journal-flush.service
●   │ ├─systemd-journald.service
●   │ ├─systemd-machine-id-commit.service
●   │ ├─systemd-modules-load.service
●   │ ├─systemd-random-seed.service
●   │ ├─systemd-sysctl.service
●   │ ├─systemd-tmpfiles-setup-dev.service
●   │ ├─systemd-tmpfiles-setup.service
●   │ ├─systemd-udev-trigger.service
●   │ ├─systemd-udevd.service
●   │ ├─systemd-update-done.service
●   │ ├─systemd-update-utmp.service
●   │ ├─systemd-vconsole-setup.service
●   │ ├─cryptsetup.target
●   │ ├─local-fs.target
●   │ │ ├─-.mount
●   │ │ ├─boot.mount
●   │ │ ├─rhel-readonly.service
●   │ │ └─systemd-remount-fs.service
●   │ └─swap.target
●   │   └─dev-disk-by\x2duuid-bfb6e1a8\x2d150d\x2d4746\x2dae07\x2d503194a70240.swap
●   └─timers.target
●     ├─systemd-tmpfiles-clean.timer
●     └─unbound-anchor.timer
[root@server3 init.d]#
------------------------------------------------------------------------------------[root@server3 init.d]# systemctl  list-dependencies    sshd   --reverse
sshd.service
● └─multi-user.target
●   └─graphical.target

-------------------------------------------------------------------------------[root@server3 system]# systemctl list-dependencies graphical.target  | grep target
graphical.target
● └─multi-user.target
●   ├─basic.target
●   │ ├─selinux-policy-migrate-local-changes@targeted.service
●   │ ├─paths.target
●   │ ├─slices.target
●   │ ├─sockets.target
●   │ ├─sysinit.target
●   │ │ ├─cryptsetup.target
●   │ │ ├─local-fs.target
●   │ │ └─swap.target
●   │ └─timers.target
●   ├─getty.target
●   ├─nfs-client.target
●   │ └─remote-fs-pre.target
●   └─remote-fs.target
●     └─nfs-client.target
●       └─remote-fs-pre.target
[root@server3 system]#
----------------------------------------------------------------------------
[root@server3 system]# systemctl list-dependencies  multi-user.target --reverse
multi-user.target
● └─graphical.target




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 03:02 , Processed in 0.036582 second(s), 24 queries .

快速回复 返回顶部 返回列表