标签: init

如何开始詹金斯?

jenkins通过sudo apt-get install jenkins. 但是,它不会启动。尝试使用sudo /etc/init.d/jenkins start. 但是当我尝试以这种方式启动它时,它会显示此消息:

start: Rejected send message, 1 matched rules; type="method_call", sender=":1.67" (uid=1000 pid=7970 comm="start jenkins ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")"
Run Code Online (Sandbox Code Playgroud)

init.d方法只是说starting,但从未开始......

我该如何解决这个问题并让 jenkins 启动?

upstart init services jenkins

10
推荐指数
1
解决办法
5万
查看次数

新贵不会在 logrotation 上重新打开日志文件

我们使用 upstart 在我们的 Ubuntu 服务器上管理我们的服务。他们产生的日志被登出到 /var/log/upstart/SERVICE_NAME.log

然后每天使用 12.04 LTS 附带的 logrotation 脚本轮换日志文件:

/var/log/upstart/*.log {
        daily
        missingok
        rotate 7
        compress
        notifempty
        nocreate
}
Run Code Online (Sandbox Code Playgroud)

问题是,虽然 logrotate 移动文件,但它似乎没有向 upstart 发出关闭和重新打开文件的信号,让 upstart 进程写入删除 PID。

init          1       root    8w      REG              202,1        64       2431 /var/log/upstart/dbus.log.1 (deleted)
init          1       root   13w      REG              202,1        95       2507 /var/log/upstart/acpid.log.1 (deleted)
init          1       root   14w      REG              202,1       127      17377 /var/log/upstart/whoopsie.log.1 (deleted)
init          1       root   36w      REG              202,1       122       6747 /var/log/upstart/SERVICE_NAME.log.1 (deleted)
init          1       root   37w      REG              202,1        30       6762 
Run Code Online (Sandbox Code Playgroud)

显然,我可以将自己服务的输出重定向到其他日志文件,但问题仍然存在于系统进程中。此外,我宁愿不必建造比我需要的更多的基础设施。

upstart init logrotate

10
推荐指数
2
解决办法
1648
查看次数

尝试读取 pcr 值时发生 TPM 错误 (7)

我用Ubuntu的终端尝试了一个命令(我不记得了),并且计算机关闭了。现在,当我启动它时,它说:-

[4.562057] ACPI PCC 探测失败。[ 4.615205 tpm_tis 00:05:尝试读取 pcr 值时发生 TPM 错误 (7) 目标文件系统未请求 /sbin/init。没有找到初始化。尝试传递 init= bootargw

Busybox v1.21.1 (ubuntu 1:1.21.0-1ubuntu1) 内置 shell (ash) 输入“help”以获取内置命令列表。

(Initramfs)

boot init

9
推荐指数
2
解决办法
6万
查看次数

什么负责挂载 fstab 中列出的磁盘?

在引导过程中,什么脚本/init 进程/什么负责读取 fstab 和调用 mount?

fstab scripts mount init

8
推荐指数
2
解决办法
2577
查看次数

列出所有服务

有两种方法可以做到这一点service --status-all。另一种方法是做initctl list。我想知道区别。某些服务(如 mysql)initctl list不会出现在service --status-all. 如何一次性获得完整列表。

init.d upstart init services

8
推荐指数
1
解决办法
2万
查看次数

在操作系统启动时运行 Python 脚本

这可能是一个重复的问题,但我找不到正确的方法来做到这一点。

我的情况是什么?->我想运行一个 Python 脚本。

python 脚本的作用是什么?->python 脚本运行以设置虚拟专用网络。

我目前如何手动启动它?->我使用 ./file.py start (这有效)

什么不工作?->当我尝试在开始(引导)中开始时,它什么也不做。我正在使用根本不起作用的 cron 作业,我不想使用它,我想使用 /etc/init.d/ 。

这是我在 /etc/init/xxx.conf 中的 file.conf

description "file start script"
author "sijan <sijanshrestha2@gmail.com>"



exec python file.py start
exec sleep 10
exec ifconfig ip0 11.0.2.251

exec ip=`ifconfig ip0 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`

exec echo $ip >>/tmp/ip.log
Run Code Online (Sandbox Code Playgroud)

我在 /etc/init.d/file.py 中添加了 python 文件

我可能没有遵循正确的程序来执行此操作,因为我对系统级别非常陌生,但是非常感谢有关如何进行的任何想法。我非常渴望解决这个问题并学习

startup python init.d scripts init

8
推荐指数
1
解决办法
3万
查看次数

在 ubuntu 18.04 上启动后运行命令的正确方法是什么?

我需要在计算机启动后运行一批简单的命令,例如

sudo thing
sudo thing1 -p
Run Code Online (Sandbox Code Playgroud)

但对于我的生活,我无法弄清楚如何。我用谷歌搜索又搜索,我一直发现同样的事情:将命令放入 /etc/rc.local 或 /etc/init.d/rc.local 文件中。问题是我的系统上不存在这些文件!此外,我已经读到 /etc/rc.local 无论如何都已弃用,那么正确且简单的方法是什么?

我想知道如何处理这两件事:

  • 计算机启动后运行命令

  • 指定用户登录后运行命令,以指定用户身份运行

    (并且仅通过在终端中编辑内容来实现所有这些,无需 GUI 工具)

谢谢你。

command-line boot init 18.04

8
推荐指数
0
解决办法
3万
查看次数

启动期间的 Initramfs 错误

Boot from (hd0,0) ext3   238ac8ca-9576-443d-8e23-8dd836cd2683
Starting up ...
mount: mounting /dev/disk/by-uuid/238ac8ca-9576-443d-8e23-8dd836cd2683 on /root
failed: Invalid argument
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found.  Try passing init= bootarg.


BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu5) built in shell (ash)

Enter 'help' for a list of built-in commands.
Run Code Online (Sandbox Code Playgroud)

root init initramfs

7
推荐指数
2
解决办法
4万
查看次数

以 100% CPU 使用率初始化进程

我在 1GB/2GB(突发)的 QuadCore 处理器上的 OpenVZ VPS 帐户上有一台 Ubuntu x64 机器。几天前,我已成功将其更新到 11.10 Oneiric Ocelot。只有一个问题:我的“init”进程(PID = 1)处于 100% 的 CPU 使用率,在 99.5% 的时间内保持一个核心全速运行。

是否有任何解决方案可以阻止奇怪的 init 行为?我是否可以跟踪该 init 进程背后发生的事情,以找出是什么让它变得如此之高?

server 64-bit cpu-load init 11.10

7
推荐指数
3
解决办法
1万
查看次数

Ubuntu 启动过程是如何进行的?

我读过很多关于Linux启动过程的文章。据我了解,Linux 启动过程是这样的:

\n\n
BIOS (UEFI) \xe2\x86\x92 MBR \xe2\x86\x92 grub \xe2\x86\x92 Kernel \xe2\x86\x92 init  \n
Run Code Online (Sandbox Code Playgroud)\n\n

我真的不明白Ubuntu upstart守护进程和运行级别etc/sbin/init之间的启动是什么以及什么关系....../etc/init.d

\n

init.d boot upstart init

7
推荐指数
1
解决办法
4047
查看次数