我可以将Ubuntu Desktop 14.04转换为服务器吗?
我找到了几种将Ubuntu 12.04 Desktop转换为Server的解决方案,其命令如下:
sudo apt-get install tasksel sudo tasksel remove ubuntu-desktop sudo tasksel install server apt-get install linux-server linux-image-server apt-get –purge remove lightdm
我只是想知道它是否与Ubuntu 14.04相同。 我需要这样做的原因是因为我需要安装moodle(有些人可能有其他理由这样做,所以我希望这也有助于他们)并且它需要运行Ubuntu Server而不是Desktop。 谢谢
注意:以下命令仅适用于低于/低于12.04的Ubuntu版本,请参阅服务器常见问题解答 ,注意:您最终可能会遇到无用的系统。
感谢您的回答,但我发现您需要添加更新行
sudo apt-get update
还纠正了以下行
sudo apt-get -purge remove lightdm
至
sudo apt-get purge lightdm
已更正脚本的完整版本如下
# update sudo apt-get update # install the 'tasksel' package so we can remove the desktop image sudo apt-get install tasksel # remove the desktop image sudo tasksel remove ubuntu-desktop # tell tasksel to start the server image setup sudo tasksel install server # install the server images sudo apt-get install linux-server linux-image-server # remove lightdm sudo apt-get purge lightdm # remove all packages no longer required (~400 MB) sudo apt-get autoremove
简单的答案是肯定的,但运行命令可以安装Ubuntu服务器。 确保对位于/etc/default/grub
的grub配置文件进行以下更改:
GRUB_TIMEOUT=10 ( Comment out 'GRUB_HIDDEN_TIMEOUT' ) GRUB_CMDLINE_LINUX_DEFAULT=”" GRUB_TERMINAL=console ( only for PC )
然后你就可以跑了
sudo update-grub
您需要卸载Ubuntu桌面并安装Ubuntu服务器的假设是错误的。
但是对于真正的安装,最好只安装一个只包含你需要的安装。
Ubuntu服务器只是一个最小的Ubuntu安装,具有针对许多客户端提供优化的特定内核。 在桌面的情况下,而不是单个用户。 您可以在Ubuntu服务器上运行的任何应用程序/服务,您可以在Ubuntu桌面上运行
检查moodle的安装要求
我们可以看到所需要的是:
- 一个网络服务器
- php支持webserver
- 一个数据库