CentOS 7下httpd-2.4.6的mod_auth_mysql安装及配置
2017-02-15 14:37
441 查看
因为环境的迁移,我们将SVN由CentOS 6.8迁移至CentOS 7.3,原先的httpd-2.2.15已经升级为httpd-2.4.6,通过yum安装httpd mod_auth_mysql在CentOS 7.3已经不支持了。
1.环境准备
mod_auth_mysql项目地址
https://sourceforge.net/projects/modauthmysql
apache22.diff补丁地址
https://sourceforge.net/p/modauthmysql/patches/7/
1.环境准备
[root@Web245 ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@Web245 ~]# uname -an Linux Web245 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux [root@Web245 ~]# yum -y install httpd httpd-devel mariadb mariadb-libs mariadb-devel subversion mod_dav_svn mod_ssl patch2.文件下载及准备
mod_auth_mysql项目地址
https://sourceforge.net/projects/modauthmysql
apache22.diff补丁地址
https://sourceforge.net/p/modauthmysql/patches/7/
wget https://nchc.dl.sourceforge.net/project/modauthmysql/modauthmysql/3.0.0/mod_auth_mysql-3.0.0.tar.gz wget https://sourceforge.net/p/modauthmysql/patches/_discuss/thread/efda3a06/c5a7/attachment/apache22.diff[/code]
3.mod_auth_mysql编译及安装tar zxf mod_auth_mysql-3.0.0.tar.gz cd mod_auth_mysql-3.0.0 #对模块打补丁 patch -p0 < ../apache22.diff修改源码
908行:由[return r->connection->remote_ip;]变为[return r->connection->client_ip;]
1273行: 由[const apr_array_header_t *reqs_arr = ap_requires(r);]变为[const apr_array_header_t *reqs_arr = apr_table_elts(r->headers_in);]sed -i 's#return r->connection->remote_ip;#return r->connection->client_ip;#g' mod_auth_mysql.c sed -i 's#ap_requires(r)#apr_table_elts(r->headers_in)#g' mod_auth_mysql.c
编译apxs -c -L/usr/lib64/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c若出现以下错误
/usr/bin/ld: cannot find -lmysqlclientcollect2: error: ld returned 1 exit statusapxs:Error: Command failed with rc=65536则可能是路径指错了apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c修改以上红色部分为/usr/lib64/mysql即可
安装apxs -i mod_auth_mysql.la
################################################################以上补丁部分也可以直接使用apache2.4的补丁https://sourceforge.net/p/modauthmysql/patches/13/
相关文章推荐
- 关于httpd 2.x,mod_auth_mysql模块的安装配置以及对aes加密的支持
- centos7下yum安装mysql5.6.30及单机配置多实例
- Centos7下完美安装并配置mysql5.6
- Centos7下完美安装并配置mysql5.6
- 170419、Centos7下完美安装并配置mysql5.6
- CentOS LAMP 安装 配置 httpd 2.4 Mysql 5.5
- 详解CentOS7下安装Mysql和配置mysql
- Centos 7下mysql的安装与配置
- Centos 7下mysql的安装与配置
- Linux-CentOS XAMPP Apache 防盗链模块mod_auth_token的安装配置
- Centos7下编译安装配置Nginx+PHP+MySql环境
- Centos7下完美安装并配置mysql5.6
- CentOS 7下LAMP源码安装(3)安装 httpd 及配置
- CentOS7下使用yum在线安装Mysql和配置mysql
- Linux-CentOS XAMPP Apache 防盗链模块mod_auth_token的安装配置
- CentOS 7下MySQL安装配置
- CentOS7下 mysql-5.7.15的安装与配置
- Centos7下完美安装并配置mysql5.6
- 在Centos下安装httpd、php、Mysql并配置(转载)
- linux(ubuntu/centos) apache2 mod_auth_mysql配置