我试着用
sudo service networking restart
Run Code Online (Sandbox Code Playgroud)
和
sudo /etc/init.d/network restart
Run Code Online (Sandbox Code Playgroud)
但它们都使窗口管理器崩溃,我无法再使用键盘输入 X。
当我使用该/etc/init.d/
方法时,它抱怨说我应该使用服务实用程序
e.g. service networking restart
Run Code Online (Sandbox Code Playgroud)
但它崩溃了。
是否有重启网络的 GUI 方法?
是否可以在启动时禁用 X?我正在设置一个服务器,所以如果每次启动时它都不会加载图形界面,那就太好了。
如何在不卸载的情况下禁用服务的自动启动?例如,我想安装 tomcat,但我不希望每次重新启动时它都打开。
我已经非常习惯于在 Redhat/RHEL 平台上管理服务启动,chkconfig
尽管这似乎不是 Debian/Ubuntu 的方式 - 如何在 Ubuntu 上更新系统服务的运行级别信息?
最终寻找等价物:
chkconfig --add <service>
chkconfig --level 345 <service> on
chkconfig --del <service>
Run Code Online (Sandbox Code Playgroud) 一段时间以来,我一直在管理 Ubuntu 风格上和下的服务器安装 - 我已经非常适应/etc/init.d/
重新启动服务。现在我收到这条消息:
root@tatooine:~# /etc/init.d/mysql status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status mysql
mysql start/running, process 14048
Run Code Online (Sandbox Code Playgroud)
这似乎是在 Ubuntu 的最新 LTS 中带来的 - 为什么?有什么不好?和/etc/init.d/
之间有什么区别?service
/etc/init.d/
可能的重复:
启用/禁用服务的推荐方法是什么?
除了以下命令之外,是否还有其他命令可以在 ubuntu 中启动停止重启服务。
service --status-all
service <service name> stop
sudosysv-rc-conf
我在我的 Ubuntu 上安装了这些应用程序:
nginx
php5-fpm
mysql服务器
Redis
...
这些应用程序在每次打开计算机时运行。
如何防止这些应用程序在启动时运行?
因此,这些应用程序只有在我执行“service nginx start”时才能运行。
我正在尝试使用docker
Ubuntu 14.04,64 位。我设法运行了一个映像,并在我的一个可移动驱动器上为其指定了路径,/media/Drive1
.
现在,每当我重新启动时,我都会看到/media/Drive1
其中只有一个docker
目录,而最终应该Drive1
安装的实际驱动器/media/Drive11
会sudo rm -rfv /media/Drive1
在 .
所以/media/Drive1
在完全安装之前可能会创建一些东西,我猜是一些东西docker
,因为当我启动时,我有:
$ ps axf | grep docker
2085 ? Ssl 0:00 /usr/bin/docker -d
Run Code Online (Sandbox Code Playgroud)
那么,我怎样才能禁用docker
自动启动,这样它就不会在启动时干扰外部 USB 驱动器的安装?
安装 openssh-server 后,每次启动时服务器都会启动。如果我希望它是手动的,我需要做什么?
在 upstart 的 0.6.7+ 版本中,我会在作业文件中添加一个“手动”节。
10.04 有新贵 0.6.5-8。在这种情况下,禁用 ssh 自动启动的首选方法是什么?
我可以停止使用
/etc/init.d/apache2 stop
Run Code Online (Sandbox Code Playgroud)
但是当我想使用以下方法再次启动它时:
/etc/init.d/apache2 start
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Starting web server apache2 /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
[fail]
Run Code Online (Sandbox Code Playgroud)