我需要从源代码编译apache,但我以前的版本是通过yum下载的。 但是我需要find之前用来编译apache的选项,所以我可以在重新编译的地方使用相同的选项。 另外我想确保我的configuration文件在我重新编译时保持不变。
注意:我尝试了下面的命令,但输出没有太多帮助,
[root@test httpd-2.2.4]# yumdownloader --source httpd Loaded plugins: fastestmirror Repository c5-testing is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.coreix.net * epel: mirrors.coreix.net * extras: centos.hyve.com * fc6-base: ftp-stud.hs-esslingen.de * rpmforge: www.mirrorservice.org * updates: centos.hyve.com drivesrvr | 951 B 00:00 Enabling epel-source repository No source RPM found for httpd-2.2.3-5.x86_64 No source RPM found for httpd-2.2.3-83.el5.centos.x86_64 No source RPM found for httpd-2.2.3-82.el5.centos.x86_64 No source RPM found for httpd-2.2.26-1.el5.x86_64 Nothing to download
有任何想法吗 ?
httpd -V显示编译选项并退出。
httpd -V
例如,在我的情况下:
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6(启用IPv4映射地址)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT = 256
-D HTTPD_ROOT =“/ usr”
-D SUEXEC_BIN =“/ usr / bin / suexec”
-D DEFAULT_PIDLOG =“/ var / run / httpd.pid”
-D DEFAULT_SCOREBOARD =“logs / apache_runtime_status”
-D DEFAULT_ERRORLOG =“logs / error_log”
-D AP_TYPES_CONFIG_FILE =“/ etc / httpd / mime.types”
-D SERVER_CONFIG_FILE =“/ etc / httpd / httpd.conf”
你可以获得源代码rpm并检查它的内容,这将给你相关的选项。 对于CentOS来说,最简单的事情就是浏览vault.centos.org获取您的操作系统版本并下载相关的httpd源代码rpm。 最多C6.2 srmps的位置是os/SRPMS但是6.3以后将它们放在os/Source/SPackages 。
一旦你有了srpm,你可以安装它,然后查看~/rpmbuild/SPECS/httpd.spec这应该有所帮助。