nginx 安装配置和常用命令
基本环境:CentOS
1. 下载 nginx
[root@localhost ~]# cd Downloads/
[root@localhost Downloads]# wget http://nginx.org/download/nginx-1.13.6.tar.gz
2. 安装 nginx 依赖
yum -y install openssl openssl-devel
yum -y install pcre-devel
3. 编译安装
将 nginx 安装在 /opt/nginx 目录下
[root@localhost Downloads]# tar -xvf nginx-1.13..tar.gz
[root@localhost Downloads]# mkdir -p /opt/nginx
[root@localhost Downloads]# cd nginx-1.13./
[root@localhost nginx-1.13.]# ./configure --prefix=/opt/nginx
[root@localhost nginx-1.13.]# make && make install
4. nginx 基本命令
检查 nginx 配置语法是否正确
[root@localhost ~]# /opt/nginx/sbin/nginx -t
nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /opt/nginx/conf/nginx.conf test is successful
启动 nginx
/opt/nginx/sbin/nginx
重新加载 nginx 配置
[root@localhost ~]# /opt/nginx/sbin/nginx -s reload
nginx 帮助
[root@localhost ~]# /opt/nginx/sbin/nginx -h
nginx version: nginx/1.13.
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives] Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /opt/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
nginx 安装配置和常用命令的更多相关文章
- (Linux环境Kafka集群安装配置及常用命令
Linux环境Kafka集群安装配置及常用命令 Kafka 消息队列内部实现原理 Kafka架构 一.下载Kafka安装包 二.Kafka安装包的解压 三.设置环境变量 四.配置kafka文件 4.1 ...
- Java学习系列(一)Java的运行机制、JDK的安装配置及常用命令详解
俗话说:“十五的月亮十六圆”.那学习是不是也是如此呢?如果把月亮看成是我们的愿望,那十五便是我们所处的“高原期”,坚持迈过这个坎,我相信你的愿望终究会现实的.记得马云曾说:今天很残酷,明天更残酷,后天 ...
- saltstack安装配置及常用命令
1.salt安装及配置详解 https://www.cnblogs.com/lgeng/p/6567424.html centos7配置: https://www.jianshu.com/p/4c91 ...
- redis学习笔记01 — 基本介绍、安装配置及常用命令
redis--NoSQL的一种 为了解决高并发.高可用.高扩展.大数据存储等一系列问题而产生的数据库解决方案,就是NoSQL NoSQL,非关系型数据库,全名:Not Only Sql,它不能代替关系 ...
- Scrapy爬虫框架(1)--安装配置与常用命令
安装与配置 Scrapy有几个安装依赖,一般来说可以直接pip install scrapy,这个过程会自动下载安装其他几个依赖. 上述安装方法不成功,则需要手动安装依赖包 步骤 安装 lxmlpip ...
- Nginx安装配置(转)
Nginx 安装配置 Nginx("engine x")是一款是由俄罗斯的程序设计师Igor Sysoev所开发高性能的 Web和 反向代理 服务器,也是一个 IMAP/POP3/ ...
- Nginx 安装配置【必须把文件到放到机器上】
[必须把所有下载的gz文件到放到机器上:编译] 1.安装nginx之前的编译软件 yum -y install make zlib zlib-devel gcc-c++ libtool openss ...
- nginx安装配置_runoob_阅读笔记_20190917
Nginx 安装配置_runoob菜鸟教程 Nginx 安装配置 Nginx("engine x")是一款是由俄罗斯的程序设计师Igor Sysoev所开发高性能的 Web和 反向 ...
- Nginx安装配置PHP(FastCGI)环境的教程
这篇是Nginx安装配置PHP(FastCGI)环境的教程.Nginx不支持对外部程序的直接调用或者解析,所有的外部程序(包括PHP)必须通过FastCGI接口来调用. 一.什么是 FastCGI F ...
随机推荐
- [CentOS] 7 不执行文件 /etc/rc.d/rc.local
chmod 0755 /etc/rc.local systemctl enable rc-local.service --now systemctl restart rc-local.service
- 读取图片信息(exif),使用com.drew.metadata.Metadata
---恢复内容开始--- 最近在开发中用到了metadata-extractor-xxx.jar 和 xmpcore-xxx.jar这个玩意, 索性查阅大量文章了解学习,来分享分享.本身工作也是经常和 ...
- C#-WebForm-Javascript、Jquery获取浏览器和屏幕各种高度宽度
Javascript: IE中:document.body.clientWidth ==> BODY对象宽度document.body.clientHeight ==> BODY对象高度d ...
- linux如何安装和启动mongdb
1.下载安装包 下载地址: https://www.mongodb.com/dr/fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.9.tgz/dow ...
- 并发编程>>概念准备(一)
工于其善,必先利器 1.并发和并行的区别 并行:同一时间点执行多个任务(CPU多核或多个CPU同时执行多个任务) 并发:同一时间段内行多个任务(单核同时执行多个任务) 2.同步和异步的区别 同步:执行 ...
- python 全栈开发:数据类型整体分析
数据类型初始 数据类型: int :用于计算. 例子:1.2.3.4........................... 常用方法操作: bit_length() ps:求一个数字转换成二 ...
- 后台开发面试题(.net与java)
最近面试了几家公司,发现大部分公司面试题有相似的地方.现在此记录下我还记得的一些题: JAVA部分: 1.Java Map 按Key排序和按Value排序: 参考链接:Java Map 按Key排序和 ...
- 蓝桥杯-正则问题(dfs,解决()的计算)
历届试题 正则问题 时间限制:1.0s 内存限制:256.0MB 问题描述 考虑一种简单的正则表达式: 只由 x ( ) | 组成的正则表达式. 小明想求出这个正则表达式能接受的最长 ...
- Visual Studio 跨平台開發實戰(1) - Hello Xamarin! (转帖)
前言 應用程式發展的腳步, 從來沒有停過. 從早期的Windows 應用程式, 到網路時代的web 應用程式, 再到近幾年相當盛行的行動裝置應用程式(Mobile Application), 身為C# ...
- (转)mysql主从切换步骤
原文:http://6226001001.blog.51cto.com/9243584/1723273 1> 正常切换 1)从服务器检查SHOW PROCESSLIST语句的输出,直到你看到Ha ...