uos20 systemd systemctl service

uos20 systemd systemctl service

/lib/systemd/system/fprintd.service
/usr/lib/systemd/system/fprintd.service
/lib/systemd/system/deepin-authenticate.service
/usr/lib/systemd/system/deepin-authenticate.service

fprintd.service

[Unit]
Description=Fingerprint Authentication Daemon
Documentation=man:fprintd(1)

[Service]
Type=dbus
BusName=net.reactivated.Fprint
ExecStart=/usr/lib/fprintd/fprintd

# Filesystem lockdown
ProtectSystem=strict
ProtectKernelTunables=true
ProtectControlGroups=true
ReadWritePaths=/var/lib/fprint
ProtectHome=true
PrivateTmp=true

# Network
PrivateNetwork=true
RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_NETLINK

# Execute Mappings
MemoryDenyWriteExecute=true

# Modules
ProtectKernelModules=true

# Real-time
RestrictRealtime=true

# Privilege escalation
NoNewPrivileges=true

deepin-authenticate.service

[Unit]
Description=Deepin Authentication

[Service]
Type=dbus
BusName=com.deepin.daemon.Authenticate
ExecStart=/usr/lib/deepin-authenticate/deepin-authentication

sudo systemctl status fprintd
sudo systemctl enable fprintd.service
sudo systemctl disable fprintd.service

验证一下是否为开机启动

systemctl is-enabled fprintd
static

systemctl简单应用,开启自启动、停止、重启

systemctl简单应用,开启自启动、停止、重启
https://blog.youkuaiyun.com/qq_43666528/article/details/119762137

查看服务是否开机启动: systemctl is-enabled postfix.service

查看已启动的服务列表: systemctl list-unit-files | grep enabled

查看启动失败的服务列表: systemctl --failed
PS:使用命令 systemctl is-enabled postfix.service 得到的值可以是enable、disable或static,这里的 static 它是指对应的 Unit 文件中没有定义[Install]区域,因此无法配置为开机启动服务。

1 查看指定的服务是否开机自动启动
2 systemctl list-unit-files | grep nginx.service
3 systemctl list-unit-files nginx.service
4 systemctl is-enabled nginx.service
5 查看一个unit的依赖关系:systemctl list-dependencies nginx.service
6 优先用reload,如果无法让修改生效,才执行restart:systemctl reload-or-restart nginx.service

systemctl list-dependencies fprintd.service

fprintd.service
● ├─-.mount
● ├─dbus.socket
● ├─system.slice
● ├─var.mount
● └─sysinit.target
● ├─blk-availability.service
● ├─deepin-defender-monitornetflow.service
● ├─deepin-elf-verify.service
● ├─dev-hugepages.mount
● ├─dev-mqueue.mount
● ├─kmod-static-nodes.service
● ├─lvm2-lvmpolld.socket
● ├─lvm2-monitor.service
● ├─plymouth-read-write.service
● ├─plymouth-start.service
● ├─proc-sys-fs-binfmt_misc.automount
● ├─sys-fs-fuse-connections.mount
● ├─sys-kernel-config.mount
● ├─sys-kernel-debug.mount
● ├─systemd-ask-password-console.path
● ├─systemd-binfmt.service
● ├─systemd-hwdb-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-sysusers.service
● ├─systemd-timesyncd.service
● ├─systemd-tmpfiles-setup-dev.service
● ├─systemd-tmpfiles-setup.service
● ├─systemd-udev-trigger.service
● ├─systemd-udevd.service
● ├─systemd-update-utmp.service
● ├─uos-resource-manager.service
● ├─cryptsetup.target
● ├─local-fs.target
● │ ├─-.mount
● │ ├─boot.mount
● │ ├─data.mount
● │ ├─home.mount
● │ ├─opt.mount
● │ ├─recovery.mount
● │ ├─root.mount
● │ ├─systemd-fsck-root.service
● │ ├─systemd-remount-fs.service
● │ └─var.mount
● └─swap.target
● └─dev-disk-by\x2duuid-b3c73226\x2dab0a\x2d48ee\x2d86ac\x2dc8464140f41d.swap
lines 21-51/51 (END)

### 如何在 UOS 操作系统中安装和配置 HTTPD 服务 #### 更新系统包管理器缓存 为了确保获取最新的软件版本,在开始之前应先更新系统的包列表。对于基于DNF的统信UOS服务器版,命令如下: ```bash dnf update -y ``` 这会下载并应用所有可用的安全性和常规更新[^1]。 #### 安装HTTPD及相关工具 接着可以继续通过DNF来安装Apache HTTP Server及其开发库和其他必要的模块: ```bash dnf install httpd httpd-devel mod_ssl openssl ``` 上述指令不仅安装了HTTPD本身,还包括用于创建自定义模块的支持(`httpd-devel`) 和SSL/TLS支持 (`mod_ssl`)[^1]。 #### 启动与启用HTTPD服务 一旦完成安装过程,则可以通过Systemd控制系统中的HTTPD服务状态。要立即启动该服务可运行下面这条命令;而为了让它能在每次重启之后自动激活则需另外执行一次不同的命令: ```bash systemctl start httpd.service systemctl enable httpd.service ``` 此时Web服务器应该已经处于活动状态并且监听着默认端口(通常是TCP上的80),等待来自客户端浏览器或其他应用程序发出请求。 #### 配置防火墙允许外部访问 如果启用了firewalld作为本地防护机制的话,那么还需要调整其策略以便让外界能够触及到新设立的服务实例。具体做法是在公共区域开放HTTP协议对应的入口规则: ```bash firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload ``` 以上操作使得即使重新引导机器后也依然保持对外开放的状态。 #### 编写简单的测试页面验证功能正常与否 最后一步就是确认一切按预期运作良好——即能够在浏览器里看到由我们自己架设起来的那个站点所呈现出来的内容。为此可以在/var/www/html/目录下放置一个名为index.html的小型HTML文档: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Welcome to My Website</title> </head> <body> <h1>Hello, World!</h1> <p>This is a test page served by Apache on UOS.</p> </body> </html> ``` 保存更改后再尝试加载位于同一局域网内的任意一台计算机上的URL地址(例如:http://<your_server_ip>/),应当能看到上面这段话被渲染出来。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值