mac 安装 nginx 环境
1、brew search nginx
2、brew install nginx
启动nginx ,sudo nginx ;访问localhost:8080 发现已出现nginx的欢迎页面了。
备注: ln -s /usr/local/sbin/nginx /usr/bin/nginx 做个软连接。[——根据具体目录而定]
常用的指令有:
nginx -V 查看版本,以及配置文件地址
nginx -v 查看版本
nginx -c filename 指定配置文件
nginx -h 帮助
#重新加载配置|重启|停止|退出 nginx
nginx -s reload|reopen|stop|quit
#打开 nginx
sudo nginx
#测试配置是否有语法错误
nginx -t
另外附上Mac安装brew命令:
安装命令如下:
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
当brew安装成功后,就可以随意安装自己想要的软件了,例如wget,命令如下:
sudo brew install wget
卸载的话,命令如下:
sudo brew uninstall wget
查看安装软件的话,命令如下:
sudo brew search /apache*/
注意/apache*/是使用的正则表达式,用/分割。
mac 安装 nginx 环境的更多相关文章
- Mac安装LNMP环境,升级php7
Mac安装nginx+mysql+php 安装nginx比较麻烦,要安装pcre ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre ...
- mac 安装nginx,并配置nginx的运行环境
1. 安装nginx // 查询有没有nginx brew search nginx //开始安装nignx brew install nginx 2. 检查nignx是否安装成功 nginx -V ...
- mac 安装 nginx
我是用root用户装的 1.先安装PCRE库 可以在这里下载最新版,我这里使用的是8.33的版本然后在终端执行下面的命令. cd ~/Download tar xvzf pcre-8.33.tar.g ...
- mac 安装nginx
首先准备工作,打开mac终端 1.安装brew 输入命令 curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar x ...
- Mac下Nginx环境配置
环境信息: Mac OS X 10.11.1 Homebrew 0.9.5 正文 一.安装 Nginx 终端执行: brew search nginx brew install nginx 当前版本 ...
- Mac安装nginx配置过程
mac电脑系统重装了,记录一下安装nginx的过程: 1.打开终端 2.安装Command Line tools xcode-select --install 3.安装brew命令 ruby -e & ...
- 安装nginx环境(含lua)时遇到报错ngx_http_lua_common.h:20:20: error: luajit.h: No such file or directory的解决
下面是安装nginx+lua环境时使用的相关模块及版本,ngx_devel_kit和lua-nginx-module模块用的都是github上最新的模块.并进行了LuaJIT的安装. #Install ...
- 2019.1.10 Mac安装Nginx服务器
1.安装Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/in ...
- Mac 下nginx 环境的配置
这个是在度娘那里学来的. 因为是使用brew所以先安装: 安装命令如下:curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo ...
随机推荐
- A trip through the Graphics Pipeline 2011_07_Z/Stencil processing, 3 different ways
In this installment, I’ll be talking about the (early) Z pipeline and how it interacts with rasteriz ...
- EntityFramework 实体拆分与表拆分
摘录自https://msdn.microsoft.com/zh-cn/data/jj591617 * 将实体类型的 CLR 属性映射到数据库中的多个表(实体拆分) 实体拆分允许一个实体类型的属性分散 ...
- ListView简单使用
先上效果: 主要实现了Listview的绑定和点击事件.项目资源结构如下: 先创建一个动物类,用来装载数据: Animal类如下: package com.example.simplelistview ...
- 《Linux内核设计与实现》CHAPTER1,2阅读梳理
<Linux内核设计与实现>CHAPTER1,2阅读梳理 [学习时间:2.5hours] [学习内容:Linux内核简介——历史与现今版本:Linux内核源代码以及编译] CHAPTER1 ...
- MongoDB安装并设置为windows服务以使其开机自启
在MongoDB的官方下载windows平台的压缩zip文件,地址:https://www.mongodb.org/dr/fastdl.mongodb.org/win32/mongodb-win32- ...
- request.getHeader所想到的
request.getHeader(""),简单的说就是获取请求的头部信息,根据http协议,它能获取到用户访问链接的信息. /** * Returns the value of ...
- vim - Simple commands to remove unwanted whitespace
http://vim.wikia.com/wiki/Remove_unwanted_spaces 1. manual commandremove trailing whitespace::%s/\s\ ...
- java netty之ServerBootstrap的启动
通过前面的几篇文章,对整个netty部分的架构已经运行原理都有了一定的了解,那么这篇文章来分析一个经常用到的类:ServerBootstrap,一般对于服务器端的编程它用到的都还算是比较的多..看一看 ...
- Python基础、 内置函数
一.概述 Python中内置了很多函数: 可以通过help().dir()方式查看函数的功能,使用内置函数通常效率更高 abs() abs函数接收一个数字对象,返回它的绝对值,如果接受的对象不是数字抛 ...
- IntelliJ IDEA Community Edition 14.1.4下使用 Apache-Subversion搭建代码管理环境
当前我的idea 版本是14.1.4. 1,)SVN Server下载与安装(https://www.visualsvn.com/server/): 因为我开发机是x64的,所以我优先下载 x64的 ...