源码包管理tarball

====================================================================================
tarball安装
src.rpm安装

tarball安装

1. 获得源码包途径
. 官方网站,可以获得最新的软件包 例如Apache www.apache.org Nginx www.nginx.org
. www.google.com ( pcre cacti )

2. 安装源码包
准备工作
1. 编译环境如gcc编译器、make,可以安装软件包组 开发工具
2. 准备软件
nginx-1.8.1.tar.gz

部署Nginx
pcre: 支持正则表达式,地址重写rewrite
# yum -y install gcc make zlib-devel pcre pcre-devel openssl-devel

nginx
# useradd www
# tar xvf nginx-1.8.1.tar.gz
# cd nginx-1.8.1
# ./configure \
> --user=www \
> --group=www \
> --prefix=/usr/local/nginx \
> --with-http_stub_status_module \
> --with-http_sub_module \
> --with-http_ssl_module \
> --with-pcre
# make
# make install
# /usr/local/nginx/sbin/nginx //启动nginx服务器

3. 详解源码安装三步曲
# ./configure
a. 指定安装路径,例如 --prefix=/usr/local/nginx
b. 启用或禁用某项功能, 例如 --enable-ssl, --disable-filter --with-http_ssl_module
c. 和其它软件关联,例如--with-pcre
d. 检查安装环境,例如是否有编译器gcc,是否满足软件的依赖需求
最终生成:Makefile
# make clean //清理掉以前编译后产生的 *.o目标文件
# make //按Makefile文件编译,可以使用-j 2指定两颗CPU编译,优化编译器参数
# make install //按Makefile定义的文件路径安装

源码包SRPM

# yum -y remove mysql-server
# netstat -tnlp |grep 3306
# yum -y install rpm-build
# rpm -ivh mysql-community-5.7.12-1.el6.src.rpm
# cd ~/rpmbuild/SPECS
# rpmbuild -ba mysql.spec

[root@localhost SPECS]# yum -y install cmake28 libaio-devel ncurses-devel numactl-devel


[root@localhost SPECS]# yum -y install gcc-c++

源码安装错误示例:
error1:
checking for PCRE JIT support ... found
checking for system md library ... not found
checking for system md5 library ... not found
checking for OpenSSL md5 crypto library ... not found
checking for sha1 in system md library ... not found
checking for OpenSSL sha1 crypto library ... not found
checking for zlib library ... not found

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

解决方案:
# yum -y install zlib-devel

error2:
./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=<path> option.

解决方案:
# yum -y install openssl-devel

error3:
# ./configure --prefix=/usr/local/pcre-8.31
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/pcre-8.31':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

解决方案:
# LANG=C yum -y groupinstall "Development tools"
# yum -y install gcc make

安装源码的技巧:
README
INSTALL

linux软件管理之源码包管理的更多相关文章

  1. (转载)Linux如何编译安装源码包软件

    一.什么是源码包软件: 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件最常见:在国内源可见的软件几乎绝迹:大多开源软件都是国外出品:在国内较为出名的开源软件有fcitx;l ...

  2. 软件包管理_rpm命令管理_yum工具管理_文件归档压缩_源码包管理

    rpm命令管理软件 对于挂载的像U盘那种都会在midea目录下,但是会显示在桌面上 安装软件(i:install,v:verbose冗长的,h:human):rpm  -ivh  xxxx.rpm 安 ...

  3. Linux 系统下用源码包安装软件

    Linux系统下用源码包安装软件 by:授客 QQ:1033553122 下载源码安装包,解压或者直接双击打开(如果有安装zip或rar等压缩/解压缩软件的话),查找相关的安装说明文件,一般是READ ...

  4. Linux系列教程(十三)——Linux软件包管理之源码包、脚本安装包

    上篇博客我们讲解了网络yum源和光盘yum源的搭建步骤,然后详细介绍了相关的yum命令,yum 最重要是解决了软件包依赖性问题.在安装软件时,我们使用yum命令将会简单方便很多.我们知道yum命令只能 ...

  5. Linux软件包管理之源码包、脚本安装包

    目录 1.源码包和RPM包的区别 RPM包和源码包默认安装位置: 由于安装位置不同带来的影响 2.源码包安装 ①.安装准备 ②.安装注意事项 ③.安装源码包 3.源码包卸载 4.脚本安装包 5.总结 ...

  6. linux笔记:RPM软件包管理-源码包管理

    源码包和rpm包的区别: 源码包安装过程: 编译安装前准备(执行./configure --prefix=路径 来配置软件的安装位置,以及做其他的配置和检查): 编译和安装(直接在目录下执行make和 ...

  7. 软件包管理:源码包管理-源码包与RPM包的区别

    RPM会安装在默认位置,源码包会安装在指定位置. 绝大多数ROM包遵循此规范.写软件包是就固定好了. 主要影响体现在对服务的管理方法,服务的管理分三种:启动,重启动,停止. 启动时使用绝对路径来启动. ...

  8. Linux下编译安装源码包软件 configure ,make, make install, make test/check, make clean

    http://www.360doc7.net/wxarticlenew/541275971.html 一.什么是源码包软件? 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件 ...

  9. Linux下编译安装源码包软件 configure ,make, make install, make test/check, make clean 假目标

    http://www.360doc7.net/wxarticlenew/541275971.html 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 ...

随机推荐

  1. JDK8新增接口的默认方法与静态方法

    JDK8之前,interface中可以定义常量和抽象方法,访问修饰符是public. public interface A { /** a1和a2写法是等价的 */ public static fin ...

  2. Python linux多版本共存以及虚拟环境管理(转摘)

    Python linux多版本共存以及虚拟环境管理 2017年08月01日 18:42:25 sliderSun 阅读数:197更多 个人分类: python   版权声明:本文为博主原创文章,未经博 ...

  3. make pycaffe时候报错:Makefile:501: recipe for target 'python/caffe/_caffe.so' failed

    安装caffe-ssd编译环境的时候报错: python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file ...

  4. Vue系列之 => Watch监视路由地址改变

    第一种方式实现监听 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> < ...

  5. rsync 守护进程备份报错

    [root@nfs01 backup]# rsync -avz  /backup rsync_backup@172.16.1.41::backupPassword: @ERROR: auth fail ...

  6. 【Spark-core学习之五】 RDD宽窄依赖 & Stage

    环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk1.8 scala-2.10.4(依赖jdk1.8) spark ...

  7. vuejs服务端渲染更好的SEO,SSR完全指南Nuxt.js静态站生成器

    vuejs服务端渲染更好的SEO,SSR完全指南Nuxt.js静态站生成器SSR 完全指南https://cn.vuejs.org/v2/guide/ssr.html在 2.3 发布后我们发布了一份完 ...

  8. GO语言常量和变量

    标识符与关键字 标识符 人为定义有特殊意义的词,Go语言中标识符由字母数字和_(下划线)组成,并且只能以字母和_开头. 关键字 关键字是指编程语言中预先定义好的具有特殊含义的标识符. GO语言中有25 ...

  9. daily start

    2019/4/26 1. to summerize the merge experience, about makefile, about compile error analysis. 2. loo ...

  10. 2019/4/12 wen 常用类3