MacOS 安装配置nginx

运行环境:

uname -aDarwin 192.168.0.108 19.0.0 Darwin Kernel Version 19.0.0: Wed Oct 23 18:29:05 PDT 2019; root:xnu-6153.41.3~44/RELEASE_X86_64 x86_64

make出现的问题:

在编译过程中出现大约5s的暂停,编译完成后出现错误:ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

nginx附加依赖库:pcre-8.43.tar.gz zlib-1.2.11.tar.gz openssl-1.0.2u.tar.gz 分别解压

问题分析:

翻看编译记录发现问题出现在openssl编译 经过大神指导说是默认不能编译为x86_64内核支持(默认似乎是i386,但因为本地是x86_64,两个平台不一致)

解决方法:

第一步:重新配置

./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/nginx --modules-path=/usr/local/nginx/modules --conf-path=/usr/local/nginx/conf/nginx.conf --error-log-path=/usr/local/nginx/logs/errors.log --pid-path=/usr/local/nginx/logs/nginx.pid --lock-path=/usr/local/nginx/logs/nginx.lock --with-select_module --with-poll_module --with-threads --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --http-client-body-temp-path=/usr/local/nginx/temp/client_body_temp --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module  --with-http_secure_link_module --with-http_degradation_module  --with-http_slice_module --with-http_stub_status_module  --with-http_perl_module  --with-http_perl_module=dynamic  --with-perl_modules_path=/usr/local/nginx/modules --with-perl=/usr/bin/perl --http-log-path=/usr/local/nginx/logs/access.log --http-proxy-temp-path=/usr/local/nginx/temp/proxy_temp --http-fastcgi-temp-path=/usr/local/nginx/temp/fastcgi_temp --http-uwsgi-temp-path=/usr/local/nginx/temp/uwsgi_temp --http-scgi-temp-path=/usr/local/nginx/temp/scgi_temp --with-mail --with-mail=dynamic --with-mail_ssl_module --with-stream --with-stream=dynamic  --with-stream_ssl_module  --with-stream_realip_module --with-stream_ssl_preread_module --with-pcre  --with-pcre=/Users/pawn/Downloads/pcre-8.43 --with-pcre-jit --with-zlib=/Users/pawn/Downloads/zlib-1.2.11 --with-openssl=/Users/pawn/Downloads/openssl-1.0.2u  --with-debug

第二步:修改上一步生成的编译文件 objs/Makefile,找到openssl配置

保存然后进行编译即可

原文地址:https://www.cnblogs.com/2019PawN/p/12114909.html

时间: 2024-08-02 04:50:34

MacOS 安装配置nginx的相关文章

macOS 安装配置yaf框架 生成yaf项目

macOS 安装配置yaf框架 Yaf只支持PHP5.2及以上的版本. 并支持最新的PHP5.3.3 Yaf需要SPL的支持. SPL在PHP5中是默认启用的扩展模块 Yaf需要PCRE的支持. PCRE在PHP5中是默认启用的扩展模块 0.下载Yaf包 http://pecl.php.net/package/yaf 或 从 https://github.com/laruence/yaf 克隆源代码 cd Documents/www/ git clone https://github.com/l

CentOS-6.3安装配置Nginx

CentOS-6.3安装配置Nginx zhoulf 2013-02-09除夕夜 原创 安装说明 系统环境:CentOS-6.3 软件:nginx-1.2.6.tar.gz 安装方式:源码编译安装 安装位置:/usr/local/nginx 下载地址:http://nginx.org/en/download.html 安装前提 在安装nginx前,需要确保系统安装了g++.gcc.openssl-devel.pcre-devel和zlib-devel软件.安装必须软件: [[email prot

三、cent OS安装配置nginx

简介Tengine是淘宝发起的web服务器项目,简单的讲就是对nginx进行了二次开发并提供了更丰富的功能,官网地址:http://tengine.taobao.org/ 下载nginx这里使用淘宝二次开发的tengine下载地址:http://tengine.taobao.org/download.html 将文件上传到服务器:scp -P 22 本地文件地址 用户名@IP地址:服务器存放地址 解压并置入到新目录:/laycloud/nginxtar -zxvf tengine-2.2.0.t

VMware Linux 下 Nginx 安装配置 - nginx.conf 配置 [负载两个 Tomcat] (三)

首先启动Nginx 1. 转到 nginx 目录: /usr/local/nginx; 启动 nginx: /usr/local/nginx/nginx ubuntu 前要加 sudo; 关健配置 http 配置块下,一般设置在 zgip on 下: upstream localhost { #绿色对应 #ip_hash; server localhost:8090; server localhost:8080; } server / { location / { proxy_connect_t

deepin 15.3 安装配置nginx

1.安装nginx sudo apt-get install nginx 2.配置nginx sudo gedit /etc/nginx/sites-enabled/default 找到:index index.html index.htm; 改为:index index.php index.html index.htm; 找到:location ~ .php$ { * } 区块做如下调整(改动之处于行末有注释): location ~ .php$ { try_files $uri =404;

Ubuntu 16.04 LTS 安装配置 Nginx 1.10.0 Php7.0-FPM

1. 安装Nginx,Php-7.0 ~$ sudo add-apt-repository ppa:nginx/stable ~$ sudo apt-get update ~$ sudo apt-get install nginx ~$ nginx -v nginx version: nginx/1.10.0 ~$ sudo apt-get install php ~$ php -v PHP 7.0.4-7ubuntu2.1 (cli) ( NTS ) Copyright (c) 1997-20

ubuntu16.04源码方式安装配置nginx

一:官方下载nginx源包 官方下载地址:http://nginx.org/en/download.html 下载最新版本:目前最新版本是 nginx 1.11.4  下载地址是:http://nginx.org/download/nginx-1.11.4.tar.gz 可以先点击CHANGES 查看一下改动,查看一些新版本的新特性,寻找最适合自己的nginx版本 二:编译安装 2.1:解压缩 tar zxvf nginx-1.11.4.tar.gz 2.2:编译安装 2.2.1 编译 编译选项

6、CenOS 6.5系统下安装配置Nginx 1.2.4 + PHP 5.4.8 + MySQL 5.5.2

1. 修改 SSH 连接显示字符集 (可以忽略这一步,偶尔出现乱码影响也不大的) # vi /etc/profile 添加: LANG=zh_CN.GB2312 export LANG 使环境变量生效 保存后 断开 SSH 重新连接 # source /etc/profile 注意: 如果有添加这一步,在设置 mysql 密码时会出现个 sql 编码问题,需要注释掉这里的设置断开ssh后重连就可以了 2. 设置时区 # cp /usr/share/zoneinfo/Asia/Shanghai /

Mac Yosemite安装配置nginx+php+mysql+memcached环境

一个命令全搞定 sudo port install php55 php55-fpm php55-curl php55-exif php55-gd php55-gettext php55-iconv php55-mbstring php55-mcrypt php55-mysql php55-memcache php55-odbc php55-opcache php55-openssl php55-oracle php55-postgresql php55-sockets php55-sqlite