zoukankan      html  css  js  c++  java
  • 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




  • 相关阅读:
    【容斥】Four-tuples @山东省第九届省赛 F
    【树形dp入门】没有上司的舞会 @洛谷P1352
    【贪心】LIS @The 15th Zhejiang Provincial Collegiate Programming Contest E
    【map离散&容斥】Ghosts @Codeforces Round #478 (Div. 2) D
    PCA & whitening
    Autoencoders and Sparsity(二)
    Autoencoders and Sparsity(一)
    Regularized logistic regression
    Regularization —— linear regression
    Logistic Regression and Newton's Method
  • 原文地址:https://www.cnblogs.com/Forever-x/p/f142823ef6582cfa1d05b9d99b483a34.html
Copyright © 2011-2022 走看看