Linux源码包的安装
实验03:源码包安装
实验目标
掌握gcc的安装
熟练源码包的安装
实验步骤
安装gcc
[[email protected]]# yum -y install gcc*
Loadedplugins: product-id, security, subscription-manager
Thissystem is not registered to Red Hat Subscription Management. You can usesubscription-manager to register.
Settingup Install Process
ResolvingDependencies
-->Running transaction check
--->Package gcc.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--->Package gcc-c++.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: libstdc++-devel = 4.1.2-54.el5 for package: gcc-c++
--->Package gcc-gfortran.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: libgfortran = 4.1.2-54.el5 for package: gcc-gfortran
-->Processing Dependency: libgfortran.so.1()(64bit) for package: gcc-gfortran
-->Processing Dependency: libgmp.so.3()(64bit) for package: gcc-gfortran
--->Package gcc-gnat.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: libgnat = 4.1.2-54.el5 for package: gcc-gnat
-->Processing Dependency: libgnarl-4.1.so()(64bit) for package: gcc-gnat
-->Processing Dependency: libgnat-4.1.so()(64bit) for package: gcc-gnat
--->Package gcc-java.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: libgcj-devel = 4.1.2-54.el5 for package: gcc-java
--->Package gcc-objc.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: libobjc = 4.1.2-54.el5 for package: gcc-objc
-->Processing Dependency: libobjc.so.1()(64bit) for package: gcc-objc
--->Package gcc-objc++.x86_64 0:4.1.2-54.el5 set to be updated
--->Package gcc44.x86_64 0:4.4.7-1.el5 set to be updated
-->Processing Dependency: binutils220 for package: gcc44
--->Package gcc44-c++.x86_64 0:4.4.7-1.el5 set to be updated
-->Processing Dependency: libstdc++44-devel = 4.4.7-1.el5 for package: gcc44-c++
--->Package gcc44-gfortran.x86_64 0:4.4.7-1.el5 set to be updated
-->Processing Dependency: libgfortran44 = 4.4.7-1.el5 for package: gcc44-gfortran
-->Processing Dependency: libgfortran.so.3()(64bit) for package: gcc44-gfortran
-->Running transaction check
--->Package binutils220.x86_64 0:2.20.51.0.2-5.29.el5 set to be updated
--->Package glibc-devel.x86_64 0:2.5-107 set to be updated
-->Processing Dependency: glibc-headers = 2.5-107 for package: glibc-devel
-->Processing Dependency: glibc-headers for package: glibc-devel
--->Package gmp.x86_64 0:4.1.4-10.el5 set to be updated
--->Package libgcj-devel.x86_64 0:4.1.2-54.el5 set to be updated
-->Processing Dependency: zlib-devel for package: libgcj-devel
-->Processing Dependency: /usr/lib64/libz.so for package: libgcj-devel
--->Package libgfortran.x86_64 0:4.1.2-54.el5 set to be updated
--->Package libgfortran44.x86_64 0:4.4.7-1.el5 set to be updated
--->Package libgnat.x86_64 0:4.1.2-54.el5 set to be updated
--->Package libobjc.x86_64 0:4.1.2-54.el5 set to be updated
--->Package libstdc++-devel.x86_64 0:4.1.2-54.el5 set to be updated
--->Package libstdc++44-devel.x86_64 0:4.4.7-1.el5 set to be updated
-->Running transaction check
--->Package glibc-headers.x86_64 0:2.5-107 set to be updated
-->Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
-->Processing Dependency: kernel-headers for package: glibc-headers
--->Package zlib-devel.x86_64 0:1.2.3-7.el5 set to be updated
-->Running transaction check
--->Package kernel-headers.x86_64 0:2.6.18-348.el5 set to be updated
-->Finished Dependency Resolution
DependenciesResolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
gcc x86_64 4.1.2-54.el5 server 5.3 M
gcc-c++ x86_64 4.1.2-54.el5 server 3.8 M
gcc-gfortran x86_64 4.1.2-54.el5 server 3.5 M
gcc-gnat x86_64 4.1.2-54.el5 server 12M
gcc-java x86_64 4.1.2-54.el5 server 3.2 M
gcc-objc x86_64 4.1.2-54.el5 server 2.9 M
gcc-objc++ x86_64 4.1.2-54.el5 server 3.0 M
gcc44 x86_64 4.4.7-1.el5 server 12 M
gcc44-c++ x86_64 4.4.7-1.el5 server 5.2 M
gcc44-gfortran x86_64 4.4.7-1.el5 server 5.4 M
Installingfor dependencies:
binutils220 x86_64 2.20.51.0.2-5.29.el5 server 986 k
glibc-devel x86_64 2.5-107 server 2.4 M
glibc-headers x86_64 2.5-107 server 600 k
gmp x86_64 4.1.4-10.el5 server 201 k
kernel-headers x86_64 2.6.18-348.el5 server 1.5 M
libgcj-devel x86_64 4.1.2-54.el5 server 1.4M
libgfortran x86_64 4.1.2-54.el5 server 245 k
libgfortran44 x86_64 4.4.7-1.el5 server 287 k
libgnat x86_64 4.1.2-54.el5 server 953 k
libobjc x86_64 4.1.2-54.el5 server 107 k
libstdc++-devel x86_64 4.1.2-54.el5 server 2.8 M
libstdc++44-devel x86_64 4.4.7-1.el5 server 4.1 M
zlib-devel x86_64 1.2.3-7.el5 server 103 k
TransactionSummary
===================================================================================
Install 23 Package(s)
Upgrade 0 Package(s)
Totaldownload size: 71 M
DownloadingPackages:
-----------------------------------------------------------------------------------
Total 3.4 GB/s | 71 MB 00:00
Runningrpm_check_debug
RunningTransaction Test
FinishedTransaction Test
TransactionTest Succeeded
RunningTransaction
Installing : gmp 1/23
error:failed to stat /media/RHEL_5.9 x86_64 DVD: No such file or directory
Installing : binutils220 2/23
Installing : libgnat 3/23
Installing : libgfortran44 4/23
Installing : libobjc 5/23
Installing : libgfortran 6/23
Installing : libstdc++44-devel 7/23
Installing : kernel-headers 8/23
Installing : glibc-headers 9/23
Installing : glibc-devel 10/23
Installing : gcc44 11/23
Installing : libstdc++-devel 12/23
Installing : zlib-devel 13/23
Installing : gcc 14/23
Installing : gcc-c++ 15/23
Installing : gcc-objc 16/23
Installing : gcc-objc++ 17/23
Installing : gcc-gfortran 18/23
Installing : gcc-gnat 19/23
Installing : gcc44-c++ 20/23
Installing : gcc44-gfortran 21/23
Installing : libgcj-devel 22/23
Installing : gcc-java 23/23
Installed:
gcc.x86_64 0:4.1.2-54.el5 gcc-c++.x86_640:4.1.2-54.el5
gcc-gfortran.x86_64 0:4.1.2-54.el5 gcc-gnat.x86_64 0:4.1.2-54.el5
gcc-java.x86_64 0:4.1.2-54.el5 gcc-objc.x86_64 0:4.1.2-54.el5
gcc-objc++.x86_64 0:4.1.2-54.el5 gcc44.x86_64 0:4.4.7-1.el5
gcc44-c++.x86_64 0:4.4.7-1.el5 gcc44-gfortran.x86_640:4.4.7-1.el5
DependencyInstalled:
binutils220.x86_64 0:2.20.51.0.2-5.29.el5glibc-devel.x86_64 0:2.5-107
glibc-headers.x86_64 0:2.5-107 gmp.x86_64 0:4.1.4-10.el5
kernel-headers.x86_64 0:2.6.18-348.el5 libgcj-devel.x86_64 0:4.1.2-54.el5
libgfortran.x86_64 0:4.1.2-54.el5 libgfortran44.x86_640:4.4.7-1.el5
libgnat.x86_64 0:4.1.2-54.el5 libobjc.x86_64 0:4.1.2-54.el5
libstdc++-devel.x86_64 0:4.1.2-54.el5 libstdc++44-devel.x86_64 0:4.4.7-1.el5
zlib-devel.x86_64 0:1.2.3-7.el5
Complete!
2. 解压源码包httpd
[root@localhost/]# cd ~
[root@localhost~]# ls
anaconda-ks.cfg Desktop httpd-2.2.25.tar.gz install.log install.log.syslog
[root@localhost~]# tar -zxf httpd-2.2.25.tar.gz -C /usr/src
[root@localhost~]# ls /usr/src/
debug httpd-2.2.25 kernels vmware-tools-distrib
3. 配置
[root@localhostDesktop]# cd /usr/src/httpd-2.2.25/
[[email protected]]#./configure--prefix=/usr/local/apache2
[[email protected]]# echo $?
0
4. 编译:Make
[[email protected]]# make
[[email protected]]# echo $?
0
5. 安装:Make install
[[email protected]]# make install
[[email protected]]# echo $?
0
6. 开启服务
[root@localhost httpd-2.2.25]#/usr/local/apache2/bin/apachectl start
结果验证
问题和经验总结
故障现象:httpd的解压地址没有写
解决办法: 在解压的同时标清楚解压后的文件所放的地方
本文出自 “IT” 博客,请务必保留此出处http://9265605.blog.51cto.com/9255605/1545918
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。