我需要为 IRC 记录器创建一个初始化脚本。我复制了/etc/init.d/skeleton。我填写了配置部分以满足我的需要,并且我还必须将 --background 添加到 start daemon 命令,因为我的 IRC 记录器不会分离。当我使用我的 init 脚本时,记录器可以正常启动,但它不会像它应该的那样创建 .pid 文件。因此,除非我自己找出进程 ID 并杀死它,否则进程无法停止。这是脚本:
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fsh
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
# Author: Cory Walker <cwalker32@gmail.com>
#
# Please remove the "Author" lines above and …
Run Code Online (Sandbox Code Playgroud) 我的 Ubuntu 服务器上安装了 SSH。我可以使用用户名和密码从我的 Ubuntu 桌面登录它。我只能从我的局域网访问 SSH,因为 SSH 端口没有在我的路由器上转发。我是否需要为这样的设置设置 RSA 密钥?据我所知,SSH 是安全的,因为它无法从 Internet 访问。
附带说明一下,我还应该仔细检查哪些其他事项以确保安全?我有 Apache、MySQL 和 ProFTPD 正在运行。