• 15、源码编译软件包


    1.下载nginx的源码包

    [root@www ~]# wget http://nginx.org/download/nginx-1.16.0.tar.gz 

    2.解压源码包

    [root@www ~]# tar xf nginx-1.16.0.tar.gz 

    3.对软件进行各种自定义操作

    [root@www ~]# cd nginx-1.16.0/
    root@www nginx-1.16.0]# ./configure --prefix=/soft/nginx-1.16.0 --with-http_ssl_module 

    4.生成makfile后,根据makefile的文件进行编译 使用make命令

    [root@www nginx-1.16.0]# make 

    5.将编译好的二进制文件和配置文件,拷贝到./configure指定的目录

    [root@www nginx-1.16.0]# make install 

    6.将程序设定一个软连接,便于后续的升级

    [root@www soft]# ln -s /soft/nginx-1.16.0/ /soft/nginx 

    7.执行二进制文件,然后在浏览器中输入当前服务器的IP地址,测试是否有welcome to nginx

    [root@www ~]# /soft/nginx/sbin/nginx 

    现在: 百分之90,能用上的软件,都提供了rpm包. --->使用户可以使用yum直接安装使用.

    报错:

    [root@www nginx-1.16.0]# ./configure --prefix=/soft/nginx-1.16.0 --with-http_ssl_module checking for OS 
    + Linux 3.10.0-957.el7.x86_64 x86_64 
    checking for C compiler ... not found
    
    ./configure: error: C compiler cc is not found 
    [root@www yum.repos.d]# yum install gcc 
    
    ./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= option. 
    [root@www nginx-1.16.0]# yum install pcre-devel pcre -y 
    
    ./configure: error: SSL modules require the OpenSSL library. 
    You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl= option. 
    [root@www nginx-1.16.0]# yum install openssl-devel -y




  • 相关阅读:
    artdialog4.1.7 中父页面给子页面传值
    Sql Server按树形结构排序查询表记录
    js控制滚动条平滑滚动到制定位置
    sql实现对多个条件分组排序方法和区别
    css渐变颜色在线制作
    c#中文转全拼或首拼
    Aspose Cells 添加数据验证(动态下拉列表验证)
    jQuery 插件autocomplete
    导出excel时,以form方式提交json数据
    asp.Net2.0中TextBox设置只读后后台获取不到值的解决方法
  • 原文地址:https://www.cnblogs.com/Forever-x/p/f142823ef6582cfa1d05b9d99b483a34.html
Copyright © 2020-2023  润新知