1、https://www.cnblogs.com/whatmiss/p/7091220.html        配置开机启动nginx

2、sudo授权其它用户启动

(1)root用户编辑 visudo

root    ALL=(ALL)       ALL
elk     ALL=(root)       NOPASSWD:/etc/init.d/nginx,/usr/local/nginx/sbin/nginx

(2)切换用户启动nginx

[elk@test root]$ sudo /usr/local/nginx/sbin/nginx
[sudo] password for elk:

nginx配置开机启动及配置sudo授权启动的更多相关文章

  1. nginx的开机自启、server命令启动、nginx.conf配置

    1.将Nginx设置为开机自动启动 a.当上面6步完成之后,说明安装已经完全成功了,但是每次开机我们面临的一个问题,就是每次都要执行命令(1: cd /usr/local/nginx/sbin/   ...

  2. Linux下配置Nginx(在root的/etc/rc.local里配置开机启动功能http://tengine.taobao.org/)

    上面是下载的包下载地址 http://tengine.taobao.org/download_cn.html nginx官网http://nginx.org/ 下一步 下一步 其中remote为重要属 ...

  3. 【Web】Nginx配置开机启动

    在添加nginx服务之后,大家会希望开机伴随启动nginx,避免手动路径输入启动: nginx官方提供了启动脚本:https://www.nginx.com/resources/wiki/start/ ...

  4. Nginx使用(配置开机启动)

    环境: 系统:CentOS 6.5 Final 安装目录:/usr/local/nginx Nginx开机自启: ①编写shell实现控制 vi /etc/init.d/nginx 添加内容: #!/ ...

  5. yum 安装nginx(配置开机启动)

    yum install -y nginx 通过yum安装的时候提示下面的错误 [root@localhost yum.repos.d]# yum install nginx 已加载插件:fastest ...

  6. Nginx在Centos 7中配置开机启动

    1.创建脚本 # vi /etc/init.d/nginx #!/bin/bash # nginx Startup script for the Nginx HTTP Server # it is v ...

  7. OS X下安装Redis及配置开机启动

    1.下载redis源码包redis-3.0.5.tar(此步骤可在图形界面下操作) 2.解压源码包 tar zxvf redis-3.0.5.tar 3.编译源码并安装 #进入源码目录 cd redi ...

  8. Centos 配置开机启动脚本启动 docker 容器

    Centos 配置开机启动脚本启动 docker 容器 Intro 我们的 Centos 服务器上部署了好多个 docker 容器,因故重启的时候就会导致还得手动去手动重启这些 docker 容器,为 ...

  9. 第四百零二节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署,uwsgi安装和启动,nginx的安装与启动,uwsgi与nginx的配置文件+虚拟主机配置

    第四百零二节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署,uwsgi安装和启动,nginx的安装与启动,uwsgi与nginx的配置文件+虚拟主机配置 软件版本  uwsgi- ...

随机推荐

  1. .net4.0、.net4.5、.net4.6 三者对系统的要求

    net4.0 支持的操作系统 Windows 7, Windows 7 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Serv ...

  2. Selenium Python FirefoxWebDriver处理打开保存对话框

    代码如下(网上示例): #profile =  webdriver.FirefoxProfile(r"C:\Users\Skyyj\AppData\Roaming\Mozilla\Firef ...

  3. 解决socket交互的10048和10055错误的总结

    问题:60多路轮训的情况下,5分钟之后,现场报链接不上子进程的错误.绝大部分为海康设备   分析: 子进程的日志中 存在输入海康的解码库的错误,在子进程的对外dll中加日志发现,socket链接的时候 ...

  4. live555峰哥的私房菜(二)-----计划任务(TaskScheduler)探讨

    计划任务(TaskScheduler)探讨 上一篇谈到SingleStep()函数会找到三种任务类型并执行之. 这三种任务是: socket handler, event handler, delay ...

  5. Android开发之点击事件(Button)

    Button点击事件 创建项目: 1.Fiel-------->New ------->Android Application Project 2.将Form Widght 文件中的But ...

  6. 使用jquery.mCustomScrollbar自定义滚动条(2)

    参考博客:http://www.qianxingzhem.com/post-1602.html 接着上篇,另一个使用的例子,使用js来初始化滚动条,并且div中的内容可变化.需要调用相应的方法, 代码 ...

  7. HDOJ 2019 数列有序!

    #include<vector> #include<iostream> #include<algorithm> #include<cstdio> usi ...

  8. 管理MariaDB

    查看当前用户信息 MariaDB [aa]> select user(); 查看所有存储用户信息 MariaDB [aa]> desc mysql.user; MariaDB [aa]&g ...

  9. mysql 8.0 错误The server requested authentication method unknown to the client

    mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示 The server requested authentication method unknown to the ...

  10. Delphi根据方法名调用方法

    type   TForm1 = class(TForm) public published     procedure DoJsCall(str:string);                   ...