迁移LDAP,系统是CentOS,拷贝/var/lib/ldap/的数据到目标机器之后启动openldap,发现错误:
[root@localhost lib]# /etc/init.d/slapd start
正在检查 slapd 的配置文件: [失败]
/etc/openldap/slapd.conf: line 110: invalid path: Permission denied
slaptest: bad configuration file!
权限设置各种设置,最后发现是selinux的问题。郁闷
不重启关闭selinux:setenforce 0
永久关闭:
vim /etc/openldap/slapd.conf
设置
SELINUX=disabled
然后启动ldap就没有报错了。
走的弯路:
删除openldap导致yum出现问题
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libldap-2.4.so.2: cannot open shared object file: No such file or directory
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.5 (r265:79063, Jun 25 2011, 08:36:25)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)]
If you cannot solve this problem yourself, please go to
原因是删除了
rpm -ef openldap-2.4.23-34.el6_5.1.x86_64 --nodeps
所以最后找到openldap-2.4.23-34.el6_5.1.x86_64.rpm 这个rpm包安装解决yum出现的问题