odoo做网站,建网页网站,技术社区网站开发,php网站的安全优势一、 Upstart是兼容System V的配置方式的#xff0c;但主要的服务配置放在 /etc/init 下#xff0c;这也就是为什么修改 /etc/rc${runlevel}.d/ (Ubuntu默认启动runlevel2#xff0c;也就是/etc/rc2.d/)下的MySQL启动配置并不能真正起到禁止MySQL自启动的原因(比如使用命令 …一、 Upstart是兼容System V的配置方式的但主要的服务配置放在 /etc/init 下这也就是为什么修改 /etc/rc${runlevel}.d/ (Ubuntu默认启动runlevel2也就是/etc/rc2.d/)下的MySQL启动配置并不能真正起到禁止MySQL自启动的原因(比如使用命令 sudo update-rc.d -f mysql remove、或者使用其他管理工具如bum等)——如果是通过apt安装MySQL它的启动配置文件是写入到/etc/init中的。在 /etc/rc2.d/ 下有mySQL的启动项由于Ubuntu兼容System V因此也需要取消其自动启动1 sudo update-rc.d -f mysql remove或者使用bum等工具或者直接将 /etc/rc${runlevel}.d/ 下的 mysql 配置文件名的S改成K。二、此外我们需要编辑 /etc/init/ 下的 mysql.conf 文件找到下面几行1 start on runlevel [2345]2 stop on starting rc RUNLEVEL[016]把runlevel[2345]改成 runlevel[345](假如你使用Ubuntu默认启动runlevel2的情形下)、或者直接改成 runlevel[!0123456]就可以避免MySQL的开机自动启动了。三、重新设置某个服务的优先级:1 /etc/rc2.d/S20redis-server2 /etc/rc2.d/S21rtds23 2是Ubuntu默认的runlevelS表示Start的意思。4 20的优先级比21高也就是说S20服务先启动然后才轮到S21服务启动。56 删除原来运行级的启动软链接7 sudo update-rc.d -f redis-server remove8 sudo update-rc.d -f rtds2 remove910 设置新的服务启动优先级11 sudo update-rc.d redis-server defaults 2012 sudo update-rc.d rtds2 defaults 21四、开机进入命令行界面1 echo “false” | sudo tee /etc/X11/default-display-manager