linux软件管理之源码包管理
源码包管理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软件管理之源码包管理的更多相关文章
- (转载)Linux如何编译安装源码包软件
一.什么是源码包软件: 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件最常见:在国内源可见的软件几乎绝迹:大多开源软件都是国外出品:在国内较为出名的开源软件有fcitx;l ...
- 软件包管理_rpm命令管理_yum工具管理_文件归档压缩_源码包管理
rpm命令管理软件 对于挂载的像U盘那种都会在midea目录下,但是会显示在桌面上 安装软件(i:install,v:verbose冗长的,h:human):rpm -ivh xxxx.rpm 安 ...
- Linux 系统下用源码包安装软件
Linux系统下用源码包安装软件 by:授客 QQ:1033553122 下载源码安装包,解压或者直接双击打开(如果有安装zip或rar等压缩/解压缩软件的话),查找相关的安装说明文件,一般是READ ...
- Linux系列教程(十三)——Linux软件包管理之源码包、脚本安装包
上篇博客我们讲解了网络yum源和光盘yum源的搭建步骤,然后详细介绍了相关的yum命令,yum 最重要是解决了软件包依赖性问题.在安装软件时,我们使用yum命令将会简单方便很多.我们知道yum命令只能 ...
- Linux软件包管理之源码包、脚本安装包
目录 1.源码包和RPM包的区别 RPM包和源码包默认安装位置: 由于安装位置不同带来的影响 2.源码包安装 ①.安装准备 ②.安装注意事项 ③.安装源码包 3.源码包卸载 4.脚本安装包 5.总结 ...
- linux笔记:RPM软件包管理-源码包管理
源码包和rpm包的区别: 源码包安装过程: 编译安装前准备(执行./configure --prefix=路径 来配置软件的安装位置,以及做其他的配置和检查): 编译和安装(直接在目录下执行make和 ...
- 软件包管理:源码包管理-源码包与RPM包的区别
RPM会安装在默认位置,源码包会安装在指定位置. 绝大多数ROM包遵循此规范.写软件包是就固定好了. 主要影响体现在对服务的管理方法,服务的管理分三种:启动,重启动,停止. 启动时使用绝对路径来启动. ...
- Linux下编译安装源码包软件 configure ,make, make install, make test/check, make clean
http://www.360doc7.net/wxarticlenew/541275971.html 一.什么是源码包软件? 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件 ...
- Linux下编译安装源码包软件 configure ,make, make install, make test/check, make clean 假目标
http://www.360doc7.net/wxarticlenew/541275971.html 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 ...
随机推荐
- Python cffi学习
cffi是连接Python与c的桥梁,可实现在Python中调用c文件.cffi为c语言的外部接口,在Python中使用该接口可以实现在Python中使用外部c文件的数据结构及函数. 由于资料较少,所 ...
- python类型错误:'NoneType' object is not subscriptable
TypeError: 'NoneType' object is not subscriptable --> 原因:变量使用了系统内置的关键字list 解决:重新定义下这个变量
- python框架之Django(15)-contenttype模块
假如有一个书城系统,需要给作者和书籍加上评论功能.如果给每个表单独建一个评论表,那么我们以后要扩展其它模块评论功能的时候,还需要随之新建一张评论表,会显得很冗余.对于这种情况,Django 给我们提供 ...
- Cocos Creator cc.Event点击触摸事件详解
cc.Event事件请不要直接创建 cc.Event 对象,因为它是一个抽象类,请创建 cc.Event.EventCustom 对象来进行派发. cc.Class({extends: cc.Comp ...
- React 添加对 Less 的支持, 使用 create-react-app 脚手架
---恢复内容开始--- 参考博客与我自己的当前版本有一点出入, 所以就将 参考博客写到文章后面去了. 我的电脑: 系统: Ubuntu16.04, 1, 安装脚手架: create-react-a ...
- Spark实时案例
1.概述 最近有同学问道,除了使用 Storm 充当实时计算的模型外,还有木有其他的方式来实现实时计算的业务.了解到,在使用 Storm 时,需要编写基于编程语言的代码.比如,要实现一个流水指标的统计 ...
- js前端使用jOrgChart插件实现组织架构图的展示
项目要做组织架构图,要把它做成自上而下的树形结构. 需要购买阿里云产品的,可以点击此链接购买,有红包优惠哦: https://promotion.aliyun.com/ntms/yunparter/i ...
- windows程序设计 获取系统文件路径
获取系统文件路径,打印到txt文件中. #include <windows.h> int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hP ...
- python实现比对两个json串的方法
记录瞬间 前段时间为了解决一些实际问题,引出了要对json字符串进行比对的需求. 觉得有意义,作以简单记录. # 比对数据 def compare_data(set_key, src_data, ds ...
- MySQL Workbench在archlinux中出现 Could not store password: The name org.freedesktop.secrets was not provided by any .service files的错误
MySQL Workbench在archlinux中出现 Could not store password: The name org.freedesktop.secrets was not prov ...