LDAP Account Manager的部署教程


这篇文章主要讲解了“LDAP Account Manager的部署教程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“LDAP Account Manager的部署教程”吧!第一部分:装好并配置LAMP一、配置CentOS71、开SSHsystemctl enable sshd2、安装rzyum -y install lrzsz之后上传文件一定要用-be参数(其中-b是–binary用二进制的方式上传,-e是–escape强制escape所有控制字符),否则上传的文件不完整rz开发云主机域名 –be3、安装wgetyum -y install wget4、关闭SELINUXvi /etc/sysconfig/selinux修改下边红字部分# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing – SELinux security policy is enforced.# permissive – SELinux prints warnings instead of enforcing.# disabled – No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of three two values:# targeted – Targeted processes are protected,# minimum – Modification of targeted policy. Only selected processes are protected.# mls – Multi Level Security protection.SELINUXTYPE=targeted5、关闭防火墙systemctl disable firewalldRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.二、Apache1、安装Apa开发云主机域名cheyum -y install httpd httpd-devel安装路径:/etc/httpd配置文件:/etc/httpd/conf/httpd.conf模块路径:/usr/lib64/httpd/modules/web目录:/var/www/html2、配置httpd,将服务器名称替换为您自己的环境vi /etc/httpd/conf/httpd.conf#改用户和组User wwwGroup www#添加只能使用目录名称访问的文件名DirectoryIndex index.html index.php# server’s response header(安全性)ServerTokens Prod# keepalive is ONKeepAlive On3、创建对应权限账户groupadd wwwuseradd www -g www -s /sbin/nologin -M4、启动和激活服务systemctl start httpdsystemctl enable httpd三、PHP1、安装不要用yum install php-fpm安装,否则安装上的是源里的旧版本PHP,最好用编译安装(1)首先安装必须的组件yum -y install gcc gcc-c++ libxml2 libxml2-devel bzip2 bzip2-devel libmcrypt libmcrypt-devel openssl openssl-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel readline readline-devel libxslt libxslt-devel perl perl-devel psmisc.x86_64 recode recode-devel libtidy libtidy-devel其中libxml2的版本必须大于2.7.0注意libmcrypt和libmcrypt-devel已不被任何源支持,所以要单独安装下载libmcrypt-2.5.7.tar.gzmkdir /home/softwarecd /home/softwarewget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz解压tar zxf libmcrypt-2.5.7.tar.gzcd libmcrypt-2.5.7用./configure和make && make install安装为LDAP功能单独安装组件yum install -y openldap openldap-devel(2)之后下载phpcd /home/softwarewget http://cn.php.net/distributions/php-7.2.5.tar.gztar -xvf php-7.2.5.tar.gzcd php-7.2.5./configure –prefix=/usr/local/php –with-config-file-path=/etc –with-apxs2=/usr/bin/apxs –enable-fpm –with-fpm-user=www –with-fpm-group=www –enable-inline-optimization –disable-debug –disable-rpath –enable-shared –enable-soap –with-libxml-dir –with-xmlrpc –with-openssl –with-mhash –with-pcre-regex –with-sqlite3 –with-zlib –enable-bcmath –with-iconv –with-bz2 –enable-calendar –with-curl –with-cdb –enable-dom –enable-exif –enable-fileinfo –enable-filter –with-pcre-dir –enable-ftp –with-gd –with-openssl-dir –with-jpeg-dir –with-png-dir –with-zlib-dir –with-freetype-dir –with-gettext –with-gmp –with-mhash –enable-json –enable-mbstring –enable-mbregex –enable-mbregex-backtrack –with-libmbfl –with-onig –enable-pdo –with-mysqli=mysqlnd –with-pdo-mysql=mysqlnd –with-pdo-sqlite –with-readline –enable-session –enable-shmop –enable-simplexml –enable-sockets –enable-sysvmsg –enable-sysvsem –enable-sysvshm –enable-wddx –with-xsl –enable-zip –enable-mysqlnd-compression-support –with-pear –enable-opcache –with-libdir=lib64 –with-ldap之后可能会错误1:configure: error: Don’t know how to define struct flock on this system, set –enable-opcache=no解决:第一步、yum groupinstall “Development Tools”第二步、32位系统ln -s /usr/local/MySQL/lib/libmysqlclient.so /usr/lib/ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.1864位系统ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib64/ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18第三步、在/etc/ld.so.conf.d/local.conf加一行/usr/local/libvi /etc/ld.so.conf.d/local.confldconfig -v错误2:cURL version 7.10.5 or later is required to compile php with cURL support解决:yum -y install curl-devel(3)最后编译PHP:make && make install 时间非常长,在至强E7的虚拟机上大概需要10-15分钟结束后修改/etc/profilevi /etc/profile文档末尾加下边2行PATH=$PATH:/usr/local/php/binexport PATH使上述改动立即生效./etc/profile或source /etc/profile(4)配置PHP-fpm①拷贝配置和启动文件到相应目录cp /home/software/php-7.2.5/php.ini-production /etc/php.inicp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.confcp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.confcp /home/software/php-7.2.5/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmchmod +x /etc/init.d/php-fpm②修改PHP账号vi /usr/local/php/etc/php-fpm.d/www.confuser = www #改成非ROOT但对PHP有权限账号group = www #同上www账号必须有Apache权限、web目录权限和PHP权限,否则会出403、404错误。或者这里写权限更高的账号。前边Apache的/etc/httpd/conf/httpd.conf文件中的User www Group www必须和PHP使用的账户一样③打开PHP的错误回显display_errors = On⑤配置Apache使PHP生效vi /etc/httpd/conf/httpd.conf在AddType application*后面加如下一行AddType application/x-httpd-php .php .phtml在DirectoryIndex index.html加上index.phpDirectoryIndex index.php index.html index.htm确保httd.conf文件中包含以下字段LoadModule php7_module /usr/lib64/httpd/modules/libphp7.so重启httpdsystemctl restart httpd2、启动:/etc/init.d/php-fpm start重启/etc/init.d/php-fpm restart若重启时出现错误:ERROR: unable to bind listening socket for address ‘127.0.0.1:9000’: Address already in use (98)则:[root@webserver ~]# netstat -lntup | grep 9000[root@webserver ~]# killall php-fpm3、设置开机启动:在/etc/rc.d/rc.local中添加一行/usr/local/php/sbin/php-fpm来启动PHP7vi /etc/rc.d/rc.local注意CentOS7默认不执行/etc/rc.d/rc.local,需要chmod +x /etc/rc.d/rc.local命令修改权限才可以第二部分:装好并配置LDAP Account Managercd /home/softwaretar xvfj ldap-account-manager-6.3.tar.bz2cd ldap-account-manager-6.3./configure –with-httpd-user=www –with-httpd-group=www –with-web-root=/var/www/html/lammake installchown www:www /var/www/html/lam/ -Rcd /usr/local/lam/etc开发云主机域名cp config.cfg.sample config.cfgchown www:www config.cfg如果不用上边这行命令会出现下边错误输入http://IP/lam访问LAM首页会提示没有配置文件,此时点击首页右上角:LAM configuration首先配置全局设置,点击:Edit general settings输入Master password默认密码:lam在通用设置里只改:会话超时 240下边的日志根据自己的需求修改确定后会让继续修改服务器配置文件点击首页右上角:LAM configuration,然后点击:Edit server profiles点击:Manage server profiles创建服务器配置文件:在”Profile management”-“Add profile”填写配置文件名:****配置文件密码:********模板:windows_samba4点击”Add”输入Master password默认密码:lam进入Manage server profiles页面通用设置选项卡服务器设置服务器地址:ldap://192.168.1.160 #服务器IP或域名激活TLS:no树状结构后缀:dc= #完整DCLDAP搜索限制:-显示名:Nt-DC1 #显示在登录页面追随引荐的服务器:不勾选分页结果:勾选参照完整性叠加:勾选语言设定缺省语言:简体中文 (中国)时区:Asia/Shanghai工具设置-隐藏的工具服务器信息:不勾选 #登录后右上角显示其他都勾选安全设定登录方法:固定列表 #固定列表意思是只有下边这个用户才可以登录本系统合法用户列表:CN=LAM,CN=Users,DC=*****,DC=**账号类型选项卡激活帐号类型-用户 #删掉Groups和Hosts,只留UsersLDAP后缀:ou=组织架构,dc=*****,dc=** #要从哪个OU里提取用户属性列表:#cn;#sAMAccountName;#mobile;#mail;#userAccountControl;#pwdLastSet;#lastLogon #登录后显示在用户选项卡里的列表自定义标签: #留空,这里修改用户选项卡名字附加的LDAP过滤表达式: #留空,因为有LDAP后缀了,这里就不写了隐藏:不勾选模块选项卡默认不变模块设置Windows域:********* 其他的按照下图设置保存后,输入http://IP/lam访问LAM首页。问题:登录显示No default profile set. Please set it in the server profile configuration.解决:config.cfg配置写错了,将default:的值改成****即可vi /usr/local/lam/etc/config.cfg之后重新输入http://IP/lam访问LAM首页输入DN账户LAM的密码这是登录后的页面,只有用户选项卡点击右上表的扳手图标,可以修改最大列表条目:1000将GID号改为组名:不勾选显示帐号状态:勾选随便修改一个用户信息,提示修改成功,OK感谢各位的阅读,以上就是“LDAP Account Manager的部署教程”的内容了,经过本文的学习后,相信大家对LDAP Account Manager的部署教程这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是开发云,小编将为大家推送更多相关知识点的文章,欢迎关注!

相关推荐: 优质域名是什么样的

优质开发云主机域名域名是什么样的?相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。选择优质域名除了简短好记、含义好、富有商业价值外,也要注意避免几个方面。避免一、尽量不用“扁担域名”“扁担域名”就是域…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 03/24 12:13
下一篇 03/24 12:13

相关推荐