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 ...
随机推荐
- Delphi 全局画点TCanvas.Pixels[X,Y]
procedure TForm1.btnChangePixelClick(Sender: TObject); var baseX : integer ; baseY : integer ; i,j : ...
- eclipse myeclipse 中的server的配置
(1)本身tomcat的环境配置就是一个很麻烦的事,一不小心,标点错了,少了,根本就起不来. (2)当同一个PC上.装有多个tomcat的话,更是混乱不堪,不仅每个server.xml文件的port号 ...
- 动态更新highcharts数据
<!doctype html> <html> <head> <script type="text/javascript" src=&quo ...
- Unix系统编程()文件描述符和打开文件之间的关系
目前学习到的是一个文件描述符对应着一个打开的文件,似乎是对应的关系.但是实际上并不是这样的.多个文件描述符指向同一个打开的文件,是可能的也是必要的.这些文件描述符可以在相同或者不同的进程中打开. 要理 ...
- bash的使用技巧
- Android——Activity和Intent及Activity的生命周期
实验Activity的生命周期 package com.example.chenshuai.test; import android.app.Activity; import android.os.B ...
- springboot集成jdbcTemplate
这里使用springboot自带的jdbcTemplate连接mysql数据库 1. 添加依赖包 <!-- jdbc --> <dependency> <groupId& ...
- 三、thinkphp
'URL_PATHINFO_DEPR'=>'-',//修改URL的分隔符 'TMPL_L_DELIM'=>'<{', //修改左定界符 'TMPL_R_DELIM'=>'}&g ...
- zend Studio10.6.2 下载
http://www.th7.cn/Program/php/201409/286788.shtml
- C++ const关键字修饰引用
//const修饰引用的两种用法 #include<iostream> using namespace std; struct Teacher{ ]; int age; }; void S ...