安裝apr-util時,make & make install遇到此錯誤linux
運行 yum install expat-devel -y,解決apache
再次運行make & make install,又碰到這個錯誤,刪除libaprutil-1.so 再試。bash
成功dom
安裝httpd,ssh
--enable-so支持動態擴展tcp
--enable-mods-shared=most 加載支持哪些模塊most表明不少模塊ui
[root@glinux-01 httpd-2.4.33]# ./configure --prefix=/usr/local/apache2.4.33 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most
報錯:this
checking for gcc option to accept ISO C99... -std=gnu99 checking for pcre-config... false configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
搜索yum list |grep pcrespa
通常是庫文件是l結尾,或者deve,因此選擇pcre-devel.x86_64安裝code
再次運行,成功。
[root@glinux-01 httpd-2.4.33]# ./configure --prefix=/usr/local/apache2.4.33 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most
make & make install 成功
查看加載的模塊
[root@glinux-01 apache2.4.33]# /usr/local/apache2.4.33/bin/httpd -M AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::bc09:b3c6:6045:c76. Set the 'ServerName' directive globally to suppress this message Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_event_module (static) authn_file_module (shared) authn_core_module (shared) authz_host_module (shared) authz_groupfile_module (shared) authz_user_module (shared) authz_core_module (shared) access_compat_module (shared)
啓動apache(錯誤 先不用管,不影響啓動)
[root@glinux-01 apache2.4.33]# /usr/local/apache2.4.33//bin/apachect start -bash: /usr/local/apache2.4.33//bin/apachect: 沒有那個文件或目錄 [root@glinux-01 apache2.4.33]# /usr/local/apache2.4.33//bin/apachectl start AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::bc09:b3c6:6045:c76. Set the 'ServerName' directive globally to suppress this message
查看是否啓動
[root@glinux-01 apache2.4.33]# ps aux |grep httpd root 39075 0.0 0.3 95536 2504 ? Ss 22:52 0:00 /usr/local/apache2.4.33/bin/httpd -k start daemon 39076 0.1 0.5 382364 4424 ? Sl 22:52 0:00 /usr/local/apache2.4.33/bin/httpd -k start daemon 39077 0.1 0.5 382364 4424 ? Sl 22:52 0:00 /usr/local/apache2.4.33/bin/httpd -k start daemon 39078 0.1 0.5 382364 4424 ? Sl 22:52 0:00 /usr/local/apache2.4.33/bin/httpd -k start root 39163 0.0 0.1 112676 984 pts/1 S+ 22:53 0:00 grep --color=auto httpd [root@glinux-01 apache2.4.33]# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 902/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1003/master tcp6 0 0 :::80 :::* LISTEN 39075/httpd tcp6 0 0 :::22 :::* LISTEN 902/sshd tcp6 0 0 ::1:25 :::* LISTEN