如何在linux平台上编译linux zlib安装目录zlib软件

A Massively Spiffy Yet Delicately Unobtrusive Compression Library
(Also Free, Not to Mention Unencumbered by Patents)
(Not Related to the Linux zlibc Compressing File-I/O Library)
Welcome to the zlib home page, web pages originally created by
Greg Roelofs
and maintained by .
If this page seems suspiciously similar to the
, rest assured
that the similarity is completely coincidental.
No, really.
zlib was written by
(compression) and
(decompression).
Current release:
zlib 1.2.11
January 15, 2017
Version 1.2.11 has these key improvements over 1.2.10:
Fix deflate stored bug when pulling last block from window
Permit immediate deflateParams changes before any deflate input
Due to the bug fixes, any installations of 1.2.9 or 1.2.10 should be immediately replaced with 1.2.11.
Version 1.2.10 has these key improvements over 1.2.9:
Fix bug in deflate_stored() for zero-length input
Fix bug in gzwrite.c that produced corrupt gzip files
Version 1.2.9 has these key improvements over 1.2.8:
Improve compress() and uncompress() to support large lengths
Allow building zlib outside of the source directory
Fix bug when level 0 used with Z_HUFFMAN or Z_RLE
Fix bugs in creating a very large gzip header
Add uncompress2() function, which returns the input size used
Dramatically speed up deflation for level 0 (storing)
Add gzfread() and gzfwrite(),
duplicating the interfaces of fread() and fwrite()
Add crc32_z() and adler32_z() functions with size_t lengths
Many portability improvements
You can also look at the complete .
Canonical URL:
zlib is designed to be a ,
general-purpose, legally unencumbered -- that is, not covered by any patents
-- lossless data-compression library for use on virtually any computer hardware
and operating system.
The zlib data format is itself portable across
platforms.
Unlike the LZW compression method used in Unix compress(1)
and in the GIF image format, the compression method currently used in zlib
essentially never expands the data.
(LZW can double or triple the file size in
extreme cases.)
zlib's memory footprint is also independent of the input data
and can be reduced, if necessary, at some cost in compression.
A more precise,
technical discussion of both points is available on .
zlib was written by
(compression) and
(decompression).
Jean-loup is also the primary author of
(1), the author of the
the former maintainer of '
Mark is also the author of gzip's and
decompression routines and was the original author of Zip.
Not surprisingly,
the compression algorithm used in zlib is essentially the same as that in
gzip and Zip, namely, the `deflate' method that originated in
's PKZIP 2.x.
Mark and Jean-loup can be reached by e-mail at
Please read the
before asking
us for help. We are getting too many questions which already have an
answer in the zlib documentation.
The deflate and zlib specifications both achieved official Internet RFC status in May 1996,
and zlib itself was adopted in version 1.1 of the Java Development Kit (JDK), both as a
and as a component of the .
The lovely zlib-vise image above was provided courtesy of Bruce Gardner, art
director of .
appears in Mark Nelson's article in the January 1997 issue (see below).
The current release is publicly available here:
zlib source code, version 1.2.11, tar.gz format (593K,
SHA-256 hash c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca):
zlib source code, version 1.2.11, tar.xz format (457K,
SHA-256 hash 4fface0d4d203e3483be9dbc9daea0a6):
zlib source code, version 1.2.11, zipfile format (730K,
SHA-256 hash d18b7d0cad197a089c0a2cd4d6df05feee738b178d):
Note that zlib is an integral part of
has been tested extensively as part of many
zlib Information
New versions of zlib are announced on this list.
Please do not send questions or comments about zlib to
this mailing list. Send those directly to the authors at
after checking the FAQ and
the manual, of course.
The zlib-devel list is for the development of
zlib&members are contributors to and testers of new versions of zlib.
zlib-related specifications:
infgen.c produces a readable description of a gzip, zlib, or
raw deflate stream.
CRC (Cyclic Redundancy Check) Bonus Information
Code to generate any CRC, with a list of CRC
descriptions. crcany.c can take a description of a CRC and
compute that CRC efficiently.
It includes bit-wise, table-driven
byte-wise, and table-driven word-wise CRC algorithms.
Code to modify a message so that it generates the
desired CRC. spoof.c takes an abbreviated description of
the CRC, the exclusive-or of the current CRC of the message and the
desired CRC, the length of the message, and a list of bit locations in
a message, and tells you which of those bits should be inverted in the
message to get the desired CRC.
Note that it does not need the message
itself, due to the linearity property of CRCs.
ZIP File Processing Bonus Software
Code to read a zip file as a stream and extract
its contents.
sunzip.c will read a zip file from stdin
and extract the files therein that use compression methods 0, 8, 9, or
12 (stored, deflate, deflate64, or bzip2).
It accepts Zip64 input.
Code to merge multiple zip files into a single
zip file. zipknit.c accepts Zip64 input files, and will
create Zip64 output if the combined size of the merged zip file
warrants it. All compression formats are permitted, since no
decompression or recompression is performed.
Encrypted entries are
permitted, and pass through unscathed.
Related External Links
zlib for Linux, both
(RPM format, many
architectures)
(alternate)
zlib for macOS (Mac OS X): zlib is already included as part of macOS
(DLL version, plus related utilities)
(DLL and static version)
zip file manipulation for .NET, and more (including replacements for the
buggy Microsoft GZipStream and DeflateStream classes)
(January 1997)
for the gz* functions.
in an iostream framework.
(C++ source and binaries for use with Visual Basic&4.x or
Delphi&2.0)
(unsupported
also available)
(includes compiled object files and corresponding C++ Builder 5
project files)
( look for Compress-Zlib*.tar.gz)
( part of the standard library as of
Python&1.5)
(see also )
(not tested by us, but looks like a good alternative to
java.util.zip)
(with source code) (December 1997)
's zlib-based
(see also Info-ZIP's ,
which optionally can be compiled with zlib)
's zlib-based
(second edition includes a section on zlib)
Markus Oberhumer's
(not tested by us, but looks like a good alternative if you need
more speed and less compression)
(not tested by us, but looks like an even better alternative if you need
more speed and less compression)
(not tested by us, but appears to be a better alternative to zlib
in both dimensions of compression and speed, as well as
decompression speed)
(not tested by us, but looks like a good alternative if you need
more compression and less speed)
(RFC 1979)
Send comments or questions about zlib to the authors at
after checking
Please report broken links to
This page last updated January 15th, 2017.
Web page copyright ©
Greg Roelofs,
zlib software copyright ©
zlib.org domain name donated by Andrew Green.新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
白手起家, 积分 4, 距离下一级还需 196 积分
论坛徽章:0
Linux下,如何安装zlib,gd,png,jpeg等库?
我从这些库的官方网站下载了,也安里面的README文档做,可总是出错,谁有正确的安装方法啊?
&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp
论坛徽章:1
出错?出什么错?
把你的电脑快递给我,我好看是什么错误啊。
白手起家, 积分 4, 距离下一级还需 196 积分
论坛徽章:0
安装jpeg库时,提示man1目录没有创建,之后手工创建一下,再编译,才成功
安装png,gd的时候,都有错误出现,忘记什么错误了.........
编译PHP的时候,./configure --prefix=/web_server/php ... --with-jpeg-dir=/.... --with-gd....
这样的时候,执行到一半的时候,又停了,出错!意思好像是说这些库没装好
论坛徽章:1
出错?出什么错?
还是不知道你的具体错误是什么。
不如,把你的电脑快递给我,我好看是什么错误啊。
丰衣足食, 积分 647, 距离下一级还需 353 积分
论坛徽章:0
2:mkdir /usr/local/modules
mkdir /usr/local/modurles/jpeg6
mkdir /usr/local/modurles/jpeg6/bin(lib include man man/man1)(为后面做准备)
3:安装zlib
tar -zxvf zlib-1.2.3.tar.gz
cd zlib.1.2.3
./configure (不要用--prefix,这样你在安装gd的时候会省掉很多麻烦)
make install
5:安装libpng
tar -zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config(不要用--prefix和上面一样的理由)
cp scripts/makefile.std makefile
make install
6:安装jpeg
tar -zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/modules/jpeg6 --enable-share --enable-static
make install
tar -zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/modules/gd --with-jpeg=/usr/local/modules/jpeg6/lib --with-png --with-zlib --with-freetype=/usr/local/modules/freetype/lib
make install
腰缠万贯, 积分 9912, 距离下一级还需 88 积分
论坛徽章:0
用RPm包的,没必要用源码安装.
白手起家, 积分 18, 距离下一级还需 182 积分
论坛徽章:0
你安装jpeg时,这样做看看
make install-lib
北京皓辰网域网络信息技术有限公司. 版权所有 京ICP证:060528号 北京市公安局海淀分局网监中心备案编号:
广播电视节目制作经营许可证(京) 字第1234号
中国互联网协会会员&&联系我们:
感谢所有关心和支持过ChinaUnix的朋友们
转载本站内容请注明原作者名及出处你的位置: >
> 教你使用rpm、yum、编译等方式安装软件
一、什么是包管理器?
&&&&很多人都不知道包管理器的概念,首先我们要了解软件是如何运行的,我们这里介绍C程序如何实现从代码到执行程序的过程。
&&&&&&&&程序源代码–& 预处理–& 编译–& 汇编–& 链接 –&执行&
&&&&&&&&程序源码预处理后进行编译,编译成目标代码,然后汇编成二进制代码,最后将源程序所用的库代码与目标代码合并,最终形成可执行的二进制代码
&&&&但是一般情况下一个程序不止一个二进制程序,可能存在配置文件,帮助文档等相应文件,这时候我们就需要一个打包软件将程序包各组件打包,打个比方,打包软件可以根据别人通过源码包预先定义好的配置将解压后执行文件自动放到/bin,配置文件自动放到/etc/,帮助文档自动放到/usr/share/man…在Linux各发行版本中有很多打包软件可以供我们使用。
&&&&例如:
&&&&&&&&debian系:包名deb,管理工具dpkg
&&&&&&&&redhat系:包名rpm,管理工具rpm
&&&&&&&&…
&&&&本文主要介绍rpm
二、RPM原理及使用
& &众所周知,组合小程序完成复杂任务是Linux哲学思想之一,再加上Linux上大部分软件就是自由软件,可以避免“重复制造轮子”这种事情发生。但是这也会引发很多问题、比如,A软件需要B和C才能运行,如果我们不看文档可能不知道A软件需要B和C软件才能运行,所以在安装A软件的时候就非常的麻烦,早期Linux用户就深受这个问题的困扰,安装一个软件需要很多时间。后来,就有很多公司或社区开发了相应包管理工具,可以通过包管理工具得知安装软件所需的软件包。
&&&&RPM(Redhat Package Manager/ RPM is Package Manager)可以将编译好的应用程序各组成文件(二进制程序、帮助文档、配置文件),从而方便快捷实现程序包的安装、卸载、查询、升级和校验等操作。
&&&&1、程序包组成清单(每个包独有)
&&&&&&&&文件清单
&&&&&&&&安装或卸载文件时运行的脚本
&&&&2、数据库(公共)
&&&&&&&&程序包名称及版本
&&&&&&&&依赖关系
&&&&&&&&功能说明
&&&&&&&&安装生产的各文件的文件路径及校验码信息
&查看rpm数据库文件
三、如何获取软件包?
&&&&对于一个运维人员来说,服务器的安全是重中之重,不可靠的软件包可能成为我们的安全隐患,那么我们应该到哪里去下可靠的软件包呢?
&&&&&&&&1、软件官网
&&&&&&&&&&&&软件的官方站点提供的软件肯定是最可靠的,可以下载源代码自行编译安装
&&&&&&&&2、发行版本官方镜像站点
&&&&&&&&&&&&发行版本的官方镜像站点中提供的软件包绝对是可靠的
&&&&&&&&3、如果是RHEL系,则去EPEL
&&&&&&&&&&&&EPEL(Extras Packages Enterprise Linux)项目是由Fedora发起的,EPEL中包含众多优秀可靠的软件,
&&&&&&&&4、搜索,pkgs.org,rpmfind.net
&&&&&&&&&&&&&这个网站可以搜索各大发行版中的软件,非常好用,软件包也很全&
&&&&&&&&5、国内镜像站点
&&&&&&&&&&&&
&&&&&&&&&&&&&
&&&&&&&&&&&&国内有许多公司都做了镜像站,稍后我们会教大家通过yum来实现将它们作为我们的软件仓库。&
四、rpm安装软件包
rpm命令用法
rpm&{-i|--install}&[install-options]&PACKAGE_FILE&...
&&&&-v:&verbose
&&&&-vv:&更多信息
&&&&-h:&以#显示程序包管理执行进度;每个#表示2%的进度
&&&&rpm&-ivh&PACKAGE_FILE&...
[install-options]
&&&&--test:&测试安装,但不真正执行安装过程;dry&run模式;
&&&&--nodeps:忽略依赖关系;
&&&&--replacepkgs:&重新安装;
&&&&--nosignature:&不检查来源合法性;
&&&&--nodigest:不检查包完整性;
&&&&--noscipts:不执行程序包脚本片断;
&&&&%pre:&安装前脚本;&--nopre
&&&&%post:&安装后脚本;&--nopost
&&&&%preun:&卸载前脚本;&--nopreun
&&&&%postun:&卸载后脚本;&&--nopostun
rpm&{-U|--upgrade}&[install-options]&PACKAGE_FILE&...
rpm&{-F|--freshen}&[install-options]&PACKAGE_FILE&...
&&&&upgrage:安装有旧版程序包,则“升级”;如果不存在旧版程序包,则“安装”;
&&&&freeshen:安装有旧版程序包,则“升级”;如果不存在旧版程序包,则不执行升级操作;
&&&&rpm&-Uvh&PACKAGE_FILE&...
&&&&rpm&-Fvh&PACKAGE_FILE&...
&&&&--oldpackage:降级;
&&&&--force:&强行升级;
注意:(1)&不要对内核做升级操作;Linux支持多内核版本并存,因此,对直接安装新版本内核;
&&&&(2)&如果原程序包的配置文件安装后曾被修改,长级时,新版本的提供的同一个配置文件并不会直接覆盖老版本的配置文件,而把新版本的文件重命名(FILENAME.rpmnew)后保留;
rpm&{-q|--query}&[select-options]&[query-options]
&&&&[select-options]
&&&&-a:&所有包
&&&&-f:&查看指定的文件由哪个程序包安装生成
&&&&-p&/PATH/TO/PACKAGE_FILE:针对尚未安装的程序包文件做查询操作;
&&&&--whatprovides&CAPABILITY:查询指定的CAPABILITY由哪个包所提供;
&&&&--whatrequires&CAPABILITY:查询指定的CAPABILITY被哪个包所依赖;
[query-options]
&&&&--changelog:查询rpm包的changlog
&&&&-c:&查询程序的配置文件
&&&&-d:&查询程序的文档
&&&&-i:&information
&&&&-l:&查看指定的程序包安装后生成的所有文件;
&&&&--scripts:程序包自带的脚本片断
&&&&-R:&查询指定的程序包所依赖的CAPABILITY;
&&&&--provides:&列出指定程序包所提供的CAPABILITY;
&&&&-qi&PACKAGE,&-qf&FILE,&-qc&PACKAGE,&-ql&PACKAGE,&-qd&PACKAGE
&&&&-qpi&PACKAGE_FILE,&-qpl&PACKAGE_FILE,&...
rpm&{-e|--erase}&[--allmatches]&[--nodeps]&[--noscripts]
&&&&&&&&&&&[--notriggers]&[--test]&PACKAGE_NAME&...
rpm&{-V|--verify}&[select-options]&[verify-options]
&&&&S&file&Size&differs
&&&&M&Mode&differs&(includes&permissions&and&file&type)
&&&&5&digest&(formerly&MD5&sum)&differs
&&&&D&Device&major/minor&number&mismatch
&&&&L&readLink(2)&path&mismatch
&&&&U&User&ownership&differs
&&&&G&Group&ownership&differs
&&&&T&mTime&differs
&&&&P&caPabilities&differ
包来源合法性验正及完整性验正:
完整性验正:SHA256
来源合法性验正:RSA
公钥加密:
对称加密:加密、解密使用同一密钥;
非对称加密:密钥是成对儿的,
public&key:&公钥,公开所有人
secret&key:&私钥,&不能公开
导入所需要公钥:
rpm&--import&/PATH/FROM/GPG-PUBKEY-FILE
CentOS&7发行版光盘提供的密钥文件:RPM-GPG-KEY-CentOS-7
数据库重建
rpm&{--initdb|--rebuilddb}
initdb:&初始化
如果事先不存在数据库,则新建之;否则,不执行任何操作;
rebuilddb:重建
无论当前存在与否,直接重新创建数据库;
& &五、使用yum解决依赖关系安装软件
&&&&很多人使用rpm安装软件包时、需要解决很多依赖关系,rpm包管理器既然可以获取软件之间的依赖关系为什么不能自动解决呢?我们这里就需要使用YUM让软件安装时自动解决依赖关系。
&&&&什么是YUM?
&&&&&&&&YUM(Yellowdog Update Modiflier),yum客户端通过文件服务器获取软件仓库的元数据来分析软件仓库有哪些软件、相互的依赖关系。
yum定义仓库
yum的配置文件:
&&&&/etc/yum.conf
#为所有仓库提供公共配置
&&&&/etc/yum.repos.d/*.repo
#为仓库的指向提供配置信息
vim&/etc/yum.repos.d/repoistory.repo
[repositoryID]
name=Some&name&for&this&repository
baseurl=url://path/to/repository
mirrorlist:
enable={1|0}
gpgcheck={1|0}
repo_gpgcheck={1|0}
gpgkey=URL
enablegroups={1|0}
failovermethod={roundrobin&|&priority}
cost=#&&&&默认为1000
yum相关命令用法
yum&[options]&[command]&[package...]
显示仓库列表
&yum&repolist&[all|enabled|disabled]&&&&#显示repository,&第一次使用会从服务器上下载元数据
显示程序包
yum&list&[all&|&glob_exp1]&[glob_exp2]&[...]
yum&list&[available&|&installed&|&updates]&[glob_exp1]&[...]
安装程序包
install&package1&[...]
reinstall&package1&[...]
升级程序包
update&[package1]&[...]
downgrade&[package1]&[...]&&&&&#降级安装
检查可用升级:
check-update
卸载程序包
remove&|&erase&package1&[...]
查看程序的information
info&[...]
查看指定的特性是由哪个程序包提供
provides|&whatprovieds&feature&[...]
清理本地缓存:
clean&[&packages&|&metadata&|&expire-cache&|&rpmdb&|&plugins&|&all]
构建缓存:
以指定关键字搜索程序包名及summary信息
search&string&[...]
查看指定包依赖关系
deplist&package1&[...]
查看yum事务历史
history&[info&|&list&|&packages-list&|&packages-info&|&summary&|&addon-info&|&redo&|&undo&|&stat...]
安装及升级本地程序包:
localinstall&rpmfile1
localupdate&rpmfile1
包组管理的相关命令:
*&groupinstall&group1&[group2]&[...]
*&groupupdate&group1&[group2]&[...]
*&grouplist&[hidden]&[groupwildcard]&[...]
*&groupremove&group1&[group2]&[...]
*&groupinfo&group1&[...]
yum的命令行选项:
--nogpgcheck:禁止进行gpg&check
-y:自动回答为&yes&
-q:静默模式
--disablerepo=repoid&临时禁用此处指定的repo
--enablerepo=repoid&临时启动此处启用的repo
--noplugins:禁用所有插件
简单的构建一个本地仓库
尝试安装软件
repo文件中可用的变量
yum的repo配置文件中可用的变量:
&&&&$releasever:当前OS发行版本的主板编号
&&&&$arch:平台
&&&&$basearch:基础平台
&&&&#YUM0-$YUM9
使用createrepo针对指定软件生成repodata
& &六、编译安装程序包
C源代码编译安装三步骤:
&&&&1、./configure
&&&&& &&&&(1) 通过选项传递参数,指定启用特性、安装路径等,执行时会参考用户的指定以及Makefile.in文件生成makefile文件
&&&&& &&&&(2) 检查依赖到的外部环境
&&&&2、make
&&&&& 根据makefile文件,构建应用程序
&&&&3、make install
&&&&& 执行对应脚本,将对应文件复制到相应路径中
&&&&&&&&编译安装前的建议先看INSTALL和REDME文件,各软件编译安装方式可能不同
获取源码包:
&&&&1、官方站点
&&&&&&&&apache.org
&&&&&&&&mariadb.org
&&&&&&&&…
&&&&2、代码托管
&&&&&&&&sourceForge
&&&&&&&&…
编译C源代码程序:
&&&&前提:提供开发工具及开发环境
&&&&&&&&开发工具:make、gcc等
&&&&&&&&开发环境:标准库、头文件等
&&&&在RHEL系的系统中可以通过包组的形式直接安装开发环境和开发工具
&&&&&&&&CentOS 6:yum groupinstall -y &Development Tools& &Server Paltform Development &
我们现在编译安装httpd-2.2,可以通过&下载源码包
[root@server2&~]#&tar&xf&httpd-2.2.25.tar.bz2&
[root@server2&~]#&yum&groupinstall&&Development&Tools&&&Server&Paltform&Development&&-y
Loaded&plugins:&fastestmirror,&refresh-packagekit,&security
Setting&up&Group&Process
Loading&mirror&speeds&from&cached&hostfile
Package&1:make-3.81-20.el6.x86_64&already&installed&and&latest&version
Package&patch-2.6-6.el6.x86_64&already&installed&and&latest&version
Package&1:pkgconfig-0.23-9.1.el6.x86_64&already&installed&and&latest&version
Package&gettext-0.17-18.el6.x86_64&already&installed&and&latest&version
Package&binutils-2.20.51.0.2-5.43.el6.x86_64&already&installed&and&latest&version
Package&elfutils-0.161-3.el6.x86_64&already&installed&and&latest&version
Package&cvs-1.11.23-16.el6.x86_64&already&installed&and&latest&version
Warning:&Group&Server&Paltform&Development&does&not&exist.
Resolving&Dependencies
--&&Running&transaction&check
---&&Package&autoconf.noarch&0:2.63-5.1.el6&will&be&installed
---&&Package&automake.noarch&0:1.11.1-4.el6&will&be&installed
---&&Package&bison.x86_64&0:2.4.1-5.el6&will&be&installed
---&&Package&byacc.x86_64&0:1.9..el6&will&be&installed
---&&Package&cscope.x86_64&0:15.6-6.el6&will&be&installed
---&&Package&ctags.x86_64&0:5.8-2.el6&will&be&installed
---&&Package&diffstat.x86_64&0:1.51-2.el6&will&be&installed
---&&Package&doxygen.x86_64&1:1.6.1-6.el6&will&be&installed
---&&Package&flex.x86_64&0:2.5.35-9.el6&will&be&installed
---&&Package&gcc.x86_64&0:4.4.7-16.el6&will&be&installed
--&&Processing&Dependency:&cpp&=&4.4.7-16.el6&for&package:&gcc-4.4.7-16.el6.x86_64
--&&Processing&Dependency:&cloog-ppl&&=&0.15&for&package:&gcc-4.4.7-16.el6.x86_64
---&&Package&gcc-c++.x86_64&0:4.4.7-16.el6&will&be&installed
--&&Processing&Dependency:&libstdc++-devel&=&4.4.7-16.el6&for&package:&gcc-c++-4.4.7-16.el6.x86_64
--&&Processing&Dependency:&libmpfr.so.1()(64bit)&for&package:&gcc-c++-4.4.7-16.el6.x86_64
---&&Package&gcc-gfortran.x86_64&0:4.4.7-16.el6&will&be&installed
--&&Processing&Dependency:&libgfortran&=&4.4.7-16.el6&for&package:&gcc-gfortran-4.4.7-16.el6.x86_64
--&&Processing&Dependency:&libgfortran.so.3()(64bit)&for&package:&gcc-gfortran-4.4.7-16.el6.x86_64
---&&Package&git.x86_64&0:1.7.1-3.el6_4.1&will&be&installed
--&&Processing&Dependency:&perl-Git&=&1.7.1-3.el6_4.1&for&package:&git-1.7.1-3.el6_4.1.x86_64
&&&&&&&&&&&&&&&&&&&&&&&&中间省略
Installed:
&&autoconf.noarch&0:2.63-5.1.el6&&&&&&&&&&&&&&&&&&&&&&&&&&automake.noarch&0:1.11.1-4.el6&&&&&&&&&&&&&bison.x86_64&0:2.4.1-5.el6&&&&&&&&&&&&&&&&&
&&byacc.x86_64&0:1.9..el6&&&&&&&&&&&&&&&&&&&&&&&cscope.x86_64&0:15.6-6.el6&&&&&&&&&&&&&&&&&ctags.x86_64&0:5.8-2.el6&&&&&&&&&&&&&&&&&&&
&&diffstat.x86_64&0:1.51-2.el6&&&&&&&&&&&&&&&&&&&&&&&&&&&&doxygen.x86_64&1:1.6.1-6.el6&&&&&&&&&&&&&&&flex.x86_64&0:2.5.35-9.el6&&&&&&&&&&&&&&&&&
&&gcc.x86_64&0:4.4.7-16.el6&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&gcc-c++.x86_64&0:4.4.7-16.el6&&&&&&&&&&&&&&gcc-gfortran.x86_64&0:4.4.7-16.el6&&&&&&&&&
&&git.x86_64&0:1.7.1-3.el6_4.1&&&&&&&&&&&&&&&&&&&&&&&&&&&&indent.x86_64&0:2.2.10-7.el6&&&&&&&&&&&&&&&intltool.noarch&0:0.41.0-1.1.el6&&&&&&&&&&&
&&libtool.x86_64&0:2.2.6-15.5.el6&&&&&&&&&&&&&&&&&&&&&&&&&patchutils.x86_64&0:0.3.1-3.1.el6&&&&&&&&&&rcs.x86_64&0:5.7-37.el6&&&&&&&&&&&&&&&&&&&&
&&redhat-rpm-config.noarch&0:9.0.3-44.el6.centos&&&&&&&&&&rpm-build.x86_64&0:4.8.0-47.el6&&&&&&&&&&&&subversion.x86_64&0:1.6.11-14.el6&&&&&&&&&&
&&swig.x86_64&0:1.3.40-6.el6&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&systemtap.x86_64&0:2.7-2.el6&&&&&&&&&&&&&&
Dependency&Installed:
&&cloog-ppl.x86_64&0:0.15.7-1.2.el6&&&&&&&&&&&&&&&&&&cpp.x86_64&0:4.4.7-16.el6&&&&&&&&&&&&&&&&&&&&&&&&&gettext-devel.x86_64&0:0.17-18.el6&&&&&&&
&&gettext-libs.x86_64&0:0.17-18.el6&&&&&&&&&&&&&&&&&&kernel-devel.x86_64&0:2.6.32-573.el6&&&&&&&&&&&&&&libgcj.x86_64&0:4.4.7-16.el6&&&&&&&&&&&&&
&&libgfortran.x86_64&0:4.4.7-16.el6&&&&&&&&&&&&&&&&&&libstdc++-devel.x86_64&0:4.4.7-16.el6&&&&&&&&&&&&&mpfr.x86_64&0:2.4.1-6.el6&&&&&&&&&&&&&&&&
&&perl-Compress-Raw-Zlib.x86_64&1:2.021-141.el6&&&&&&perl-Compress-Zlib.x86_64&0:2.021-141.el6&&&&&&&&&perl-Error.noarch&1:0.17015-4.el6&&&&&&&&
&&perl-Git.noarch&0:1.7.1-3.el6_4.1&&&&&&&&&&&&&&&&&&perl-HTML-Parser.x86_64&0:3.64-2.el6&&&&&&&&&&&&&&perl-HTML-Tagset.noarch&0:3.20-4.el6&&&&&
&&perl-IO-Compress-Base.x86_64&0:2.021-141.el6&&&&&&&perl-IO-Compress-Zlib.x86_64&0:2.021-141.el6&&&&&&perl-URI.noarch&0:1.40-2.el6&&&&&&&&&&&&&
&&perl-XML-Parser.x86_64&0:2.36-7.el6&&&&&&&&&&&&&&&&perl-libwww-perl.noarch&0:5.833-2.el6&&&&&&&&&&&&&ppl.x86_64&0:0.10.2-11.el6&&&&&&&&&&&&&&&
&&systemtap-client.x86_64&0:2.7-2.el6&&&&&&&&&&&&&&&&systemtap-devel.x86_64&0:2.7-2.el6&&&&&&&&&&&&&&&
[root@server2&httpd-2.2.25]#&./configure&--prefix=/usr/src/apache2&--sysconfdir=/etc/apache2&&&&#设置软件主目录为/usr/src/apache2,配置文件路径为/etc/apache2
checking&for&library&containing&socket...&none&required
checking&for&library&containing&crypt...&-lcrypt
checking&for&main&in&-ltruerand...&no
checking&for&library&containing&modf...&none&required
Checking&for&Threads...
checking&pthread.h&usability...&yes
checking&pthread.h&presence...&yes
checking&for&pthread.h...&yes
checking&for&CFLAGS&needed&for&pthreads...&-pthread
&&adding&&-pthread&&to&CFLAGS
checking&for&LIBS&needed&for&pthreads...&-lpthread
&&adding&&-lpthread&&to&LIBS
checking&for&pthread.h...&(cached)&yes
checking&whether&pthread_getspecific&takes&two&arguments...&no
checking&whether&pthread_attr_getdetachstate&takes&one&argument...&no
checking&for&recursive&mutex&support...&yes
checking&for&pthread_key_delete...&yes
checking&for&pthread_rwlock_init...&yes
checking&for&pthread_attr_setguardsize...&yes
checking&for&pthread_yield...&yes
checking&for&pthread_rwlock_t...&yes
APR&will&use&threads
checking&for&readdir&in&-lc_r...&no
checking&for&gethostbyname&in&-lc_r...&no
checking&for&gethostbyaddr&in&-lc_r...&no
checking&for&getservbyname&in&-lc_r...&no
checking&for&gethostbyname_r...&yes
checking&for&getpwuid_r...&yes
checking&for&getgrnam_r...&yes
checking&for&getgrgid_r...&yes
Checking&for&Shared&Memory&Support...
checking&for&library&containing&shm_open...&-lrt
checking&for&sys/types.h...&(cached)&yes
checking&sys/mman.h&usability...&yes
checking&sys/mman.h&presence...&yes
checking&for&sys/mman.h...&yes
checking&sys/ipc.h&usability...&yes
checking&sys/ipc.h&presence...&yes
checking&for&sys/ipc.h...&yes
checking&sys/mutex.h&usability...&no
checking&sys/mutex.h&presence...&no
checking&for&sys/mutex.h...&no
checking&sys/shm.h&usability...&yes
checking&sys/shm.h&presence...&yes
checking&for&sys/shm.h...&yes
checking&sys/file.h&usability...&yes
checking&sys/file.h&presence...&yes
checking&for&sys/file.h...&yes
checking&kernel/OS.h&usability...&no
checking&kernel/OS.h&presence...&no
checking&for&kernel/OS.h...&no
checking&os2.h&usability...&no
checking&os2.h&presence...&no
checking&for&os2.h...&nog&docs/conf/extra/httpd-dav.conf
config.status:&creating&docs/conf/extra/httpd-default.conf
config.status:&creating&docs/conf/extra/httpd-info.conf
config.status:&creating&docs/conf/extra/httpd-languages.conf
config.status:&creating&docs/conf/extra/httpd-manual.conf
config.status:&creating&docs/conf/extra/httpd-mpm.conf
config.status:&creating&docs/conf/extra/httpd-multilang-errordoc.conf
config.status:&creating&docs/conf/extra/httpd-ssl.conf
config.status:&creating&docs/conf/extra/httpd-userdir.conf
config.status:&creating&docs/conf/extra/httpd-vhosts.conf
config.status:&creating&include/ap_config_layout.h
config.status:&creating&support/apxs
config.status:&creating&support/apachectl
config.status:&creating&support/dbmmanage
config.status:&creating&support/envvars-std
config.status:&creating&support/log_server_status
config.status:&creating&support/logresolve.pl
config.status:&creating&support/phf_abuse_log.cgi
config.status:&creating&support/split-logfile
[root@server2&httpd-2.2.25]#&make&&&&make&install&&&&#开始编译
Making&install&in&srclib
make[1]:&Entering&directory&`/root/httpd-2.2.25/srclib'
Making&install&in&apr
make[2]:&Entering&directory&`/root/httpd-2.2.25/srclib/apr'
/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&passwd/apr_getpass.lo&-c&passwd/apr_getpass.c&&&&touch&passwd/apr_getpass.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&strings/apr_cpystrn.lo&-c&strings/apr_cpystrn.c&&&&touch&strings/apr_cpystrn.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&strings/apr_fnmatch.lo&-c&strings/apr_fnmatch.c&&&&touch&strings/apr_fnmatch.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&strings/apr_snprintf.lo&-c&strings/apr_snprintf.c&&&&touch&strings/apr_snprintf.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&strings/apr_strings.lo&-c&strings/apr_strings.c&&&&touch&strings/apr_strings.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&strings/apr_strnatcmp.lo&-c&strings/apr_strnatcmp.c&&&&touch&strings/apr_strnatcmp.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&strings/apr_strtok.lo&-c&strings/apr_strtok.c&&&&touch&strings/apr_strtok.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&tables/apr_hash.lo&-c&tables/apr_hash.c&&&&touch&tables/apr_hash.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&tables/apr_tables.lo&-c&tables/apr_tables.c&&&&touch&tables/apr_tables.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&atomic/unix/builtins.lo&-c&atomic/unix/builtins.c&&&&touch&atomic/unix/builtins.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&atomic/unix/ia32.lo&-c&atomic/unix/ia32.c&&&&touch&atomic/unix/ia32.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&atomic/unix/mutex.lo&-c&atomic/unix/mutex.c&&&&touch&atomic/unix/mutex.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_SOURCE&&&
-I./include&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I./include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include/arch/unix&-I/root/httpd-2.2.25/srclib/apr/include&&-o&atomic/unix/ppc.lo&-c&atomic/unix/ppc.c&&&&touch&atomic/unix/ppc.lo/bin/sh&/root/httpd-2.2.25/srclib/apr/libtool&--silent&--mode=compile&gcc&-g&-O2&-pthread&&&-DHAVE_CONFIG_H&-DLINUX&-D_REENTRANT&-D_GNU_S
编译完成后尝试启动httpd
[root@server2&httpd-2.2.25]#&/usr/src/apache2/bin/apachectl&start
httpd:&Could&not&reliably&determine&the&server's&fully&qualified&domain&name,&using&&for&ServerName&&&&#虽然报错,但是已经启动
[root@server2&httpd-2.2.25]#&netstat&-tan
Active&Internet&connections&(servers&and&established)
Proto&Recv-Q&Send-Q&Local&Address&&&&&&&&&&&&&&&Foreign&Address&&&&&&&&&&&&&State&&&&&&
tcp&&&&&&&&0&&&&&&0&0.0.0.0:40417&&&&&&&&&&&&&&&0.0.0.0:*&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&0.0.0.0:111&&&&&&&&&&&&&&&&&0.0.0.0:*&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&0.0.0.0:22&&&&&&&&&&&&&&&&&&0.0.0.0:*&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&127.0.0.1:631&&&&&&&&&&&&&&&0.0.0.0:*&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&127.0.0.1:25&&&&&&&&&&&&&&&&0.0.0.0:*&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&127.0.0.1:6010&&&&&&&&&&&&&&0.0.0.0:*&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&192.168.192.129:22&&&&&&&&&&192.168.192.1:5040&&&&&&&&&&ESTABLISHED&
tcp&&&&&&&&0&&&&&&0&:::111&&&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&:::80&&&&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&&&&&#80端口已监听
tcp&&&&&&&&0&&&&&&0&:::34229&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&:::22&&&&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&::1:631&&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&::1:25&&&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
tcp&&&&&&&&0&&&&&&0&::1:6010&&&&&&&&&&&&&&&&&&&&:::*&&&&&&&&&&&&&&&&&&&&&&&&LISTEN&&&&&&
[root@server2&httpd-2.2.25]#
验证httpd服务
&&&&这篇文章思考的地方不多,大部分只是叙述过程,让大家知道如何使用各种姿势安装软件
转载请注明: &
与本文相关的文章}

我要回帖

更多关于 linux下安装zlib 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信