linux下如何启动nginx?
命令:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
、、、、、、、、、、、
[root@localhost sbin]# ps -ef|grep nginx
root 23957 1 0 15:30 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx 23958 23957 0 15:30 ? 00:00:00 nginx: worker process
root 23961 23878 0 15:30 pts/5 00:00:00 grep nginx
[root@localhost sbin]# pwd
/usr/local/nginx/sbin
[root@localhost sbin]#
关闭:
ps -ef|grep nginx
到nginx的执行程序的目录(sbin-path=/usr/sbin/nginx)即 /usr/sbin
执行一下命令
./nginx -s stop
即可。
、、、、、、、、、
[root@gsidc-4q-saas23 ~]# nginx -V
nginx version: nginx/1.11.6
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-55)
built with OpenSSL 1.0.1u 22 Sep 2016
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_stub_status_module --with-http_sub_module --with-http_random_index_module --with-http_gzip_static_module --with-http_perl_module --with-stream --with-pcre=pcre-8.38 --with-zlib=zlib-1.2.8 --with-file-aio --http-client-body-temp-path=/var/tmp/nginx/client_body --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --with-ld-opt=-Wl,-E --with-openssl=/root/openssl-1.0.1u
[root@gsidc-4q-saas23 ~]# ps -ef|grep nginx
root 9674 8924 0 14:46 pts/4 00:00:00 grep nginx
root 23522 1 0 2017 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
root 23523 23522 0 2017 ? 00:00:03 nginx: worker process
root 23524 23522 0 2017 ? 00:00:05 nginx: worker process
root 23525 23522 0 2017 ? 00:00:06 nginx: worker process
root 23526 23522 0 2017 ? 00:00:18 nginx: worker process
[root@gsidc-4q-saas23 ~]#
[root@gsidc-4q-saas23 sbin]# nginx -s stop
linux下如何启动nginx?的更多相关文章
- Linux下安装启动nginx的过程
1.首先将nginx的安装包传到虚拟机里的/home目录下 2.为了方便nginx运行而不影响linux安全需创建组合用户 groupadd -r nginxuseradd -r -g nginx ...
- linux下docker启动nginx无法访问80端口
问题: Linux安装了docker,docker启动了一个nginx容器,通过 80 端口无法正常访问 故障排查: 1.检查 nginx 容器启动的命令或者yaml文件,查看是否有跟本机端口进行绑定 ...
- linux 下 apache启动、停止、重启命令
原文:linux 下 apache启动.停止.重启命令 基本的操作方法: 本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况 apahce启动命令: 推荐/u ...
- linux下后台启动springboot项目
linux下后台启动springboot项目 我们知道启动springboot的项目有三种方式: 运行主方法启动 使用命令 mvn spring-boot:run”在命令行启动该应用 运行“mvn p ...
- Linux下的启动oracle的EM的命令
Linux下的启动oracle的EM的命令 1.启动数据库 su - oracle $sqlplus / as sysdba sql>startup 2.启动监听 $lsnrctl LSNRCT ...
- 转:Linux下同时启动两个Tomcat进行设置
转: Linux下同时启动两个Tomcat进行设置 解压tar.gz:tar -zxvf apache-tomcat-6.0.41.tar.gz 至相应的路径下,可解压至两个不同的路径或者相同的路径下 ...
- linux下如何查找nginx配置文件的位置
nginx的配置放在nginx.conf文件中,一般我们可以使用以下命令查看服务器中存在的nginx.conf文件. locate nginx.conf /usr/local/etc/nginx/ng ...
- Linux 下随机启动自己的应用 -请使用while(true) 不要Console.ReadKey()
Linux 下随机启动 自己的应用 -请使用while(true) 不要Console.ReadKey() 开机启动脚本启动,某些程序无法启动 原因 例如写了一个服务,不能停止程序运行,所以主线程成不 ...
- linux下无法启动webdriver问题
linux下无法启动webdriver问题: 查看是否有足够多的webdriver进程: ps -ef | grep chromedriver kill -9 `ps -ef |grepchromed ...
随机推荐
- AutoFac文档3(转载)
目录 开始 Registering components 控制范围和生命周期 用模块结构化Autofac xml配置 与.net集成 深入理解Autofac 指导 关于 词汇表 服务类型,名称和键 同 ...
- unity, do nothing的state
要想在animator的stateMachine中建一个"doNothing",要注意:为了保证"doNothing"state能正常运转,不被无故跳过, Mo ...
- Atitit.注册跟个登录功能的实现attilax总结obo
Atitit.注册跟个登录功能的实现attilax总结obo 1. 注册模块 2 1.1. 基本注册功能(用户名方式) 2 1.2. 动态ajax监测用户名重复 2 1.3. 注册手机验证 2 1.4 ...
- Spring学习10-SpringMV核心组件2及SpringMVC项目示例
一.SpringMVC核心接口 5.ViewResolver接口--视图解析接口 继承体系: 5.View接口--视图接口 二.SpringMVC项目示例 (1)建立动态we ...
- doc转docx以及type对应的类型
https://blog.csdn.net/flagang/article/details/51454665 // 作为type格式保存到临时文件 // *Variant(0):doc // *Var ...
- 读取大csv文件数据插入到MySql或者Oracle数据库通用处理
import java.io.BufferedInputStream; import java.io.BufferedReader;import java.io.BufferedWriter;impo ...
- 一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。
// test14.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include<iostream> #include< ...
- Android基础总结(六)Activity
创建第二个Activity(掌握) 需要在清单文件中为其配置一个activity标签 标签中如果带有这个子节点,则会在系统中多创建一个快捷图标 <intent-filter> <ac ...
- mysql_windows解压包安装
WIN下安装64位的解压版mysql-5.6.24-winx64 参考如下安装步骤: 1.将解压缩后的文件放到自己想要的地方 并配置环境变量. 示例中存放的目录为:D:\Program Files\m ...
- C++ 运算符重载二(一元运算符重载)
//一元运算符重载 #include<iostream> using namespace std; class Point { public: Point(int x,int y){ th ...