LDAP实战应用指南

时间:2022-09-19 19:50:08

第1章 ladp master服务安装

1.1 安装前系统环境准备

1.1.1 查看系统版本信息

[root@ldap-server ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)
[root@ldap-server ~]# uname -r
2.6.32-573.el6.x86_64
[root@ldap-server ~]# uname -m
x86_64

1.1.2 配置yum安装源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup &&\
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

1.1.3 保存yum安装的rpm包

[root@ldap-server ~]# sed -i.bak 's#keepcache=0#keepcache=1#g' /etc/yum.conf
[root@ldap-server ~]# grep keepcache /etc/yum.conf
keepcache=1

  

1.1.4 关闭selinux和防火墙

[root@ldap-server ~]# sed -i.bak 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
[root@ldap-server ~]# grep SELINUX=disabled /etc/selinux/config
SELINUX=disabled
[root@ldap-server ~]# setenforce 0
[root@ldap-server ~]# getenforce 0
Disabled

 关闭防火墙

[root@ldap-server ~]#  /etc/init.d/iptables stop

1.1.5 时间同步

[root@ldap-server ~]# crontab -l
#time sync by junxun at 2017-07-23
*/5 * * * * /usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1