rpm、yum、编译安装轻松管理centos7程序包(23)
- UID
- 1066743
|
rpm、yum、编译安装轻松管理centos7程序包(23)
三、实例
此处我以httpd为例
# tar xf httpd-2.4.12.tar.bz2
# ll
total 4944
drwxr-xr-x 11 501 games 4096 Jan 23 2015 httpd-2.4.12
-rw-r--r-- 1 root root 5054838 Mar 19 22:11 httpd-2.4.12.tar.bz2
# ls httpd-2.4.12
ABOUT_APACHE BuildAll.dsp configure.in InstallBin.dsp NOTICE server
acinclude.m4 BuildBin.dsp docs LAYOUT NWGNUmakefile srclib
Apache-apr2.dsw buildconf emacs-style libhttpd.dsp os support
Apache.dsw CHANGES httpd.dsp LICENSE README test
apache_probes.d CMakeLists.txt httpd.spec Makefile.in README.cmake VERSIONING
ap.d config.layout include Makefile.win README.platforms
build configure INSTALL modules ROADMAP
# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/aprutil/ --enable-so --enable-rewritd --enable-ssl --enable-cgi --enable-cgid --enable-deflate --enable-modules=most --enable-mods-shared=most --enable-mpms-shared=all
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... yes
setting CC to "gcc"
setting CPP to "gcc -E"
setting CFLAGS to " -g -O2 -pthread"
setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
setting LDFLAGS to " "
configure:
configure: Configuring Apache Portable Runtime Utility lib
....................
config.status: creating docs/conf/extra/proxy-html.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
config.status: creating build/rules.mk
config.status: creating build/pkg/pkginfo
config.status: creating build/config_vars.sh
config.status: creating include/ap_config_auto.h
config.status: executing default commands
# 编译
# make
make[4]: Leaving directory `/opt/httpd-2.4.12/modules/mappers'
make[3]: Leaving directory `/opt/httpd-2.4.12/modules/mappers'
make[2]: Leaving directory `/opt/httpd-2.4.12/modules'
make[2]: Entering directory `/opt/httpd-2.4.12/support'
make[2]: Leaving directory `/opt/httpd-2.4.12/support'
make[1]: Leaving directory `/opt/httpd-2.4.12'
# 复制文件
# make install
mkdir /usr/local/apache2/icons
mkdir /usr/local/apache2/logs
Installing CGIs
mkdir /usr/local/apache2/cgi-bin
Installing header files
mkdir /usr/local/apache2/include
Installing build system files
mkdir /usr/local/apache2/build
Installing man pages and online manual
mkdir /usr/local/apache2/man
mkdir /usr/local/apache2/man/man1
mkdir /usr/local/apache2/man/man8
mkdir /usr/local/apache2/manual
make[1]: Leaving directory `/opt/httpd-2.4.12'
# 配置服务并测试
# pwd
/usr/local/apache2/bin
[root@centos6 bin]# ls
ab apxs dbmmanage envvars-std htcacheclean htdigest httpd logresolve
apachectl checkgid envvars fcgistarter htdbm htpasswd httxt2dbm rotatelogs
# ./apachectl start
AH00557: httpd: apr_sockaddr_info_get() failed for centos6.7
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
# ss -tnl
State Recv-Q Send-Q Local Addressort Peer Addressort
LISTEN 0 128 :::44030 :::*
LISTEN 0 128 *:48136 *:*
LISTEN 0 128 :::111 :::*
LISTEN 0 128 *:111 *:*
LISTEN 0 128 :::80 :::*
LISTEN 0 128 :::22 :::*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 127.0.0.1:631 *:*
LISTEN 0 128 ::1:631 :::* |
|
|
|
|
|