源码包管理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. Java之事务的基本应用

    基本介绍 事务是数据一致性最基本的保证,也就是说一个事务中的操作要么都成功,要么都失败,不允许部分成功.我们常说的事务就是jdbc事务,当然Java中还有其他事务,并且在使用jdbc事务有很多注意点, ...

  2. java之数据库连接池-dbcp&c3p0&dbutils

    介绍 因为数据库连接对象的创建比较消耗性能,所以可以在应用程序启动时就在内存中开辟一片空间(集合)存放多个数据库连接对象,后面需要连接时直接从该空间中取而不用新创建:使用完毕后归还连接(将连接重新放回 ...

  3. OpenMVG学习笔记

    OpenMVG 是一个不错的SFM开源算法库,可以实现基于多视图像的稀疏重建. OpenMVG SfM pipelines run as a 4 step process:包含四个基本过程 1. Im ...

  4. 使用JavaScript实现在页面上所有内容加载完之前一直显示loading...页面

    Html <body class="is-loading"> <div class="curtain"> <div class=& ...

  5. [js]jquery里的jsonp实现ajax异源请求

    同源请求-jquery <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/ ...

  6. 【JVM】-NO.110.JVM.1 -【JDK11 HashMap详解】

    Style:Mac Series:Java Since:2018-09-10 End:2018-09-10 Total Hours:1 Degree Of Diffculty:5 Degree Of ...

  7. rosetta对称性文件(rosetta symmetry file)的产生及应用

    针对对称性PDB 3UKM,使用make_symmdef_file.pl脚本,可以执行产生对称单元及对称文件: $> $ROSETTA3/src/apps/public/symmetry/mak ...

  8. cocos2d-x JS 本地玩家位置跟服务器玩家位置转换相关

    //各种游戏人数情况下的本地位置配置mb.LOCAL_POS_LIST = { 2 : [0, 2], 3 : [0, 1, 3], 4 : [0, 1, 2, 3]}; /*------------ ...

  9. Go 初体验 - 令人惊叹的语法 - defer.2 - 如何提前执行?

    上一文中讲到 defer 会在宿主函数 return 之前调用,那么我们就是想在宿主函数执行到中间调用,怎么办呢? 1. 改变宿主函数逻辑,分成多个函数,需要的那个函数里 defer . 2. 使用匿 ...

  10. CentOS 7 nginx+tomcat9 session处理方案之session复制

    我们的目标是所有服务器上都要保持用户的Session,那么将每个应用服务器中的Session信息复制到其它服务器节点上是不是就可以呢? 这就是Session的第二中处理办法:会话复制 192.168. ...