安装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