Ubuntu16.04开机启动的脚本一直不支持,错误用在将开机启动脚本放到了home/usr/的目录下,应该放到/root才能正常启动。
#!/bin/sh -e

#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0

将命令写入,注意要放于exit 0之前
sudo sh /xxx/xxx/restart.sh
:wq保存,再次重启服务器时nginx就自动执行restart.sh了,

Ubuntu 16.04 server版本开机启动脚本不支持的更多相关文章

  1. ubuntu 18.04 - server版 开机启动脚本

    ubuntu 18.04 不再使用 inited 管理系统,改用 systemd systemd 默认读取 /etc/systemd/system 下的文件,该目录下的文件会链接/lib/system ...

  2. 服务器安装ubuntu 14.04 server,开机启动屏幕不停滚动错误WRITE SAME failed. Manually zeroing

    昨天给服务器上安装了一个Ubuntu-14.04-server系统,安装完成后系统可以正常启动,但屏幕上一直滚动着一个错误,sda1:WRITE SAME failed. Manually zeroi ...

  3. 记一次Ubuntu 16.04 server安装中的坑

    最近博主搞了一台迷你主机,又刚好有时间去折腾,所以我打算把这台机子打造成一台迷你服务器,用来跑跑爬虫.挂挂网站 介于我我这台机子的配置比较垃圾(intel J1900+4G+64G),跑起Window ...

  4. 在VMware Workstation上安装Ubuntu 16.04 Server操作系统

    Ubuntu 16.04 Server的下载 http://www.ubuntu.org.cn/download/server 按空格键(Space)选中第一个ssh服务 成功!

  5. (译)综合指南:通过Ubuntu 16.04上从Source构建来安装支持GPU的Caffe2

    (译)综合指南:通过Ubuntu 16.04上从Source构建来安装支持GPU的Caffe2 译者注: 原文来自:https://tech.amikelive.com/node-706/compre ...

  6. Ubuntu 16.04 + Win10双系统 启动Ubuntu进入命令行 无界面

    Ubuntu 16.04 + Win10双系统,启动Ubuntu时候报错,并入命令行(无界面). 原因:可能是双系统兼容性问题 解决办法: 重启系统,进入Win10 然后在Win10中重启电脑. 重启 ...

  7. New Ubuntu 16.04 Server Checklist

    新的云服务器需要进行一些配置和安装一些软件,推荐Digitalocean社区的一些教程 服务器配置(包括SSH,安全设置):https://www.digitalocean.com/community ...

  8. Ubuntu 16.04 Server 设置静态IP

    一.前言 最近需要在虚拟机当中装个Ubuntu Server 16.04的系统,但是在虚拟机安装的时候,并不像Ubuntu Server 18.04那样能一步步的进行配置,因此导致装好后的虚拟机是动态 ...

  9. Ubuntu 16.04系统下开机提示“无法应用原保存的显示器配置”

    开机启动Ubuntu时,提示以下错误,部分截图如图: 解决方法: 按住Ctrl+Alt+T开启终端,输入rm .config/monitors.xml,回车,然后重启Ubuntu即可解决:如图

随机推荐

  1. Python操作MySQL数据库9个实用实例

    用python连接mysql的时候,需要用的安装版本,源码版本容易有错误提示.下边是打包了32与64版本. MySQL-python-1.2.3.win32-py2.7.exe MySQL-pytho ...

  2. ubuntu在recovery模式下更改用户密码

    http://www.jb51.net/os/Ubuntu/164636.html 1, restart 2, Hold down shift key / press and hold 3, sele ...

  3. Poll: Most Americans&n…

    Most Americans support tough new measures to counter gun violence, including banning assault weapons ...

  4. There is no resul…

    There is no result type defined for type 'json' mapped with name 'success'. 这个错误是json初学者很容易遇到的错误:现在把 ...

  5. Django 框架

    MVC 框架和MTV框架  (了解即可) MVC,全名是Model View Controller,是软件工程中的一种软件架构模式,把软件系统分为三个基本部分:模型(Model).视图(View)和控 ...

  6. POJ - 3268 Silver Cow Party SPFA+SLF优化 单源起点终点最短路

    Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to ...

  7. 使用Maven构建Spring Security应用

    1.概述 本文将解释如何使用Maven构建Spring Security应用程序.将讨论使用Spring Security依赖项的特定用例.最新的Spring Security版本可以在Maven C ...

  8. [UE4]用C++如何创建Box Collision

    http://www.dawnarc.com/2016/08/ue4%E7%94%A8c--%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BAbox-collision/ 在蓝图 ...

  9. Unite 2017 | 基于Animation Instancing的大规模人群模拟

    在Unite 2017的国内技术专场,Unity技术团队为参会者们带来了Unity引擎功能相关的技术分享.今天这篇文章,将由Unity技术支持工程师金晓宇为大家分享基于Animation Instan ...

  10. node学习(2)-路由读取图片

    通常我们开发项目的时候都要用到图片,那么nodejs是如何读取图片的呢? 我们来看一下,因为一个网页中图片的数量是不确定的,而我们不能每一张图片都去写它的src路径,这时候最好的方法就是写一个专门读取 ...