第一步:首先下载依赖包

下载地址 pcre(www.pcre.org),zlib(www.zlib.org),openssl(www.openssl.org)

第二步:上传那个nginx的安装包

下载nginx安装包,解压

[bdctool@localhost setup]$ tar  -zxvf nginx-1.12.2.tar.gz

[bdctool@localhost setup]$ ./configure  --with-http_stub_status_module --prefix=/opt/aspire/product/bdctool/nginx

报错

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

3、还是安装一下pcre吧

[bdctool@localhost setup]$ unzip  pcre-8.10.zip

[bdctool@localhost setup]$ cd  pcre-8.10

[bdctool@localhost pcre-8.10]$ ./configure    --prefix=/opt/aspire/product/bdctool/nginx/zzw_other/pcre-8.10 (自定义目录)

[bdctool@localhost pcre-8.10]$ make

[bdctool@localhost pcre-8.10]$ make install

4、再来安装nginx,首先./configure(这里是个坑,可以不操作,继续往下看--转载注)

[bdctool@localhost nginx-1.12.2]$./configure  --with-http_stub_status_module  --prefix=/opt/aspire/product/bdctool/nginx  --with-pcre=/opt/aspire/product/bdctool/nginx/zzw_other/pcre-8.10

注意:上面命令--prefix=路径为nginx想要安装到的目录, --with-pcre=路径为pcre安装到的目录。

5、修改 --with-pcre=后的路径为pcre的解压后的源路径,重新./configure

[bdctool@localhost nginx-1.12.2]$./configure  --with-http_stub_status_module  --prefix=/opt/aspire/product/bdctool/nginx  --with-pcre=/opt/aspire/product/bdctool/setup/pcre-8.10(注意这个是pcre的源码路径)

原文路径:https://blog.csdn.net/lzs_xiaoze/article/details/85632144

6,执行make 命令

7,执行make install 命令来着

linux 非root用户安装nginx的更多相关文章

  1. linux非root用户安装nginx

    先到官网http://nginx.org/en/download.html下载最新稳定版源码包,目前是1.16.1: 下完后通过rz上传至wlf用户soft目录下,退回上一级目录解压: $ cd so ...

  2. linux非root用户安装jdk1.8

    如题,先到 Oracle 官方网站 下载1.8版本的 JDK 压缩包(jdk-8u221-linux-x64.tar.gz)到本地(如D盘的soft目录),然后开始进入linux的非root用户(如w ...

  3. 【tf.keras】Linux 非 root 用户安装 CUDA 和 cuDNN

    TensorFlow 2.0 for Linux 使用时报错:(cuDNN 版本低了) E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loade ...

  4. linux非root用户安装ncurses-devel依赖

    很明显,如果我们通过yum或rpm下载安装,始终无法绕开root用户,除非我们不用yum或rpm.嗯,我们直接用源码安装.下载源码包,到http://ftp.gnu.org/gnu/ncurses/我 ...

  5. linux非root用户安装rabbitmq

    因为rabbitmq是用erlang语言写的,所以装rabbitmq前第一步得先装erlang. 我们到erlang官网https://www.erlang.org/downloads下载安装包,最新 ...

  6. linux非root用户安装4.0.14版本redis

    先到官网https://redis.io/download下安装包,现在最新是5.0.5版本,可惜点击下载后被windows禁了,那就下4版本的,往下看Other versions的Old(4.0), ...

  7. linux非root用户安装5.7.27版本mysql

    先下安装包,到mysql官网https://dev.mysql.com/downloads/mysql/选好安装包版本.操作系统类型(默认是最新版本,点击右边链接Looking for previou ...

  8. Linux非root用户安装jdk和tomcat

    转载自:http://blog.csdn.net/wuyigong111/article/details/17410661,进行部分修改 创建一个用户 sgmm,并在其用户目录里面安装 jdk和tom ...

  9. Linux 以非root用户安装zsh&配置on my zsh

    此文章参考以下三篇文章,如有侵权请联系 Linux非root用户安装zsh, 并用oh-my-zsh进行配置 在没有sudo权限的Linux服务器下安装oh-my-zsh 不使用root权限安装zsh ...

随机推荐

  1. C++运行出现"what(): std::bad_alloc"的解决办法

    注:这里只是我的代码出现这种情况及对应的解决办法,你的代码不一定出现和我一样的情况.左移这篇随笔仅供参考. 运行程序出现如下结果: terminate called after throwing an ...

  2. [LeetCode] 350. Intersection of Two Arrays II 两个数组相交II

    Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1 ...

  3. JAVA代码:生成一个集合,自定义大小,100以内的随机整数

    JAVA代码:生成一个集合,自定义大小,100以内的随机整数 方法一:(Random类) package com.dawa.test; import java.util.ArrayList; impo ...

  4. php imagick生成gif动画的方法

    >php imagick生成gif动画的方法<pre><?php$image=new Imagick();$animation = new Imagick(); //建立一个对 ...

  5. mybatisGenerator

    mybatisGenerator,可以自定义生成的xml,dao接口文件名称,可以自动在生成的实体类上添加数据库字段的注释 项目结构: 在generatorConfig.xml配置好数据库和对应的表, ...

  6. 09 Servlet相关知识点---学习笔记

    1.概念:运行在服务器端的小程序 Servlet就是一个接口,定义了Java类被浏览器访问到(tomcat识别)的规则.将来我们自定义一个类,实现Servlet接口,复写方法. 2.快速入门:(1)创 ...

  7. java email发送(附件中文的处理)

    这里使用的是commons-email-1.3.2.jar进行的开发,自认为这是简单的邮件发送. package com.yt.base.common; import java.io.Unsuppor ...

  8. Java开发笔记(一百一十四)利用Socket传输文本消息

    前面介绍了HTTP协议的网络通信,包括接口调用.文件下载和文件上传,这些功能固然已经覆盖了常见的联网操作,可是HTTP协议拥有专门的通信规则,这些规则一方面有利于维持正常的数据交互,另一方面不可避免地 ...

  9. C#使用Selenium

    介绍: Selenium 是一个用于Web应用程序测试的工具.Selenium测试直接运行在浏览器中,就像真正的用户在操作一样.支持的浏览器包括IE(7, 8, 9, 10, 11),Mozilla ...

  10. JSP 9大隐式对象和四个作用域的范围

    Java中 九大隐式对象说明 输入/输出对象:  request   response   out 作用域通信对象: session  application  pageContext Servlet ...