LDAPAccountManager的部署教程

這篇文章主要講解了“LDAP Account Manager的部署教程”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“LDAP Account Manager的部署教程”吧!

我們一直強(qiáng)調(diào)成都網(wǎng)站制作、網(wǎng)站設(shè)計(jì)對(duì)于企業(yè)的重要性,如果您也覺(jué)得重要,那么就需要我們慎重對(duì)待,選擇一個(gè)安全靠譜的網(wǎng)站建設(shè)公司,企業(yè)網(wǎng)站我們建議是要么不做,要么就做好,讓網(wǎng)站能真正成為企業(yè)發(fā)展過(guò)程中的有力推手。專(zhuān)業(yè)網(wǎng)站設(shè)計(jì)公司不一定是大公司,創(chuàng)新互聯(lián)作為專(zhuān)業(yè)的網(wǎng)絡(luò)公司選擇我們就是放心。

第一部分:裝好并配置LAMP

一、配置CentOS7

1、開(kāi)SSH

systemctl enable sshd

2、安裝rz

yum -y install lrzsz

之后上傳文件一定要用-be參數(shù)(其中-b是--binary用二進(jìn)制的方式上傳,-e是--escape強(qiáng)制escape所有控制字符),否則上傳的文件不完整

rz –be

3、安裝wget

yum -y install wget

4、關(guān)閉SELINUX

vi /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=targeted

5、關(guān)閉防火墻

systemctl disable firewalld

Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

二、Apache

1、安裝Apache

yum -y install httpd httpd-devel

安裝路徑:/etc/httpd

配置文件:/etc/httpd/conf/httpd.conf

模塊路徑:/usr/lib64/httpd/modules/

web目錄:/var/www/html

2、配置httpd,將服務(wù)器名稱(chēng)替換為您自己的環(huán)境

vi /etc/httpd/conf/httpd.conf

#改用戶(hù)和組

User www

Group www

LDAP Account Manager的部署教程

#添加只能使用目錄名稱(chēng)訪問(wèn)的文件名

DirectoryIndex index.html index.php

LDAP Account Manager的部署教程

# server's response header(安全性)

ServerTokens Prod

# keepalive is ON

KeepAlive On

3、創(chuàng)建對(duì)應(yīng)權(quán)限賬戶(hù)

groupadd www

useradd www -g www -s /sbin/nologin -M

4、啟動(dòng)和激活服務(wù)

systemctl start httpd

systemctl enable httpd

三、PHP

1、安裝

不要用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

其中l(wèi)ibxml2的版本必須大于2.7.0

LDAP Account Manager的部署教程

注意libmcrypt和libmcrypt-devel已不被任何源支持,所以要單獨(dú)安裝

下載libmcrypt-2.5.7.tar.gz

mkdir /home/software

cd /home/software

wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz

解壓

tar zxf libmcrypt-2.5.7.tar.gz

cd libmcrypt-2.5.7

用./configure和make && make install安裝

為L(zhǎng)DAP功能單獨(dú)安裝組件

yum install -y openldap openldap-devel

(2)之后下載php

cd /home/software

wget http://cn.php.net/distributions/php-7.2.5.tar.gz

tar -xvf php-7.2.5.tar.gz

cd 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

之后可能會(huì)錯(cuò)誤1:configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

解決:第一步、yum groupinstall "Development Tools"

第二步、32位系統(tǒng)

ln -s /usr/local/MySQL/lib/libmysqlclient.so /usr/lib/

ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18

64位系統(tǒng)

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/lib

vi /etc/ld.so.conf.d/local.conf

ldconfig -v

錯(cuò)誤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  時(shí)間非常長(zhǎng),在至強(qiáng)E7的虛擬機(jī)上大概需要10-15分鐘

LDAP Account Manager的部署教程

結(jié)束后修改/etc/profile

vi /etc/profile

文檔末尾加下邊2行

PATH=$PATH:/usr/local/php/bin

export PATH

使上述改動(dòng)立即生效

./etc/profile或source /etc/profile

(4)配置PHP-fpm

①拷貝配置和啟動(dòng)文件到相應(yīng)目錄

cp /home/software/php-7.2.5/php.ini-production /etc/php.ini

cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf

cp /home/software/php-7.2.5/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

chmod +x /etc/init.d/php-fpm

②修改PHP賬號(hào)

vi /usr/local/php/etc/php-fpm.d/www.conf

user = www   #改成非ROOT但對(duì)PHP有權(quán)限賬號(hào)

group = www   #同上

www賬號(hào)必須有Apache權(quán)限、web目錄權(quán)限和PHP權(quán)限,否則會(huì)出403、404錯(cuò)誤?;蛘哌@里寫(xiě)權(quán)限更高的賬號(hào)。

前邊Apache的/etc/httpd/conf/httpd.conf文件中的User www Group www必須和PHP使用的賬戶(hù)一樣

③打開(kāi)PHP的錯(cuò)誤回顯

display_errors = On

⑤配置Apache使PHP生效

vi /etc/httpd/conf/httpd.conf

在AddType application*后面加如下一行

AddType application/x-httpd-php .php .phtml

LDAP Account Manager的部署教程

在DirectoryIndex index.html加上index.php

DirectoryIndex index.php index.html index.htm

LDAP Account Manager的部署教程

確保httd.conf文件中包含以下字段

LoadModule php7_module        /usr/lib64/httpd/modules/libphp7.so

重啟httpd

systemctl restart httpd

2、啟動(dòng):

/etc/init.d/php-fpm start

重啟

/etc/init.d/php-fpm restart

LDAP Account Manager的部署教程

若重啟時(shí)出現(xiàn)錯(cuò)誤:ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)

LDAP Account Manager的部署教程

則:

[root@webserver ~]# netstat -lntup | grep 9000

LDAP Account Manager的部署教程

[root@webserver ~]# killall php-fpm

3、設(shè)置開(kāi)機(jī)啟動(dòng):

在/etc/rc.d/rc.local中添加一行/usr/local/php/sbin/php-fpm來(lái)啟動(dòng)PHP7

vi /etc/rc.d/rc.local

注意CentOS7默認(rèn)不執(zhí)行/etc/rc.d/rc.local,需要chmod +x /etc/rc.d/rc.local命令修改權(quán)限才可以

第二部分:裝好并配置LDAP Account Manager

cd /home/software

tar xvfj ldap-account-manager-6.3.tar.bz2

cd ldap-account-manager-6.3

./configure --with-httpd-user=www --with-httpd-group=www --with-web-root=/var/www/html/lam

LDAP Account Manager的部署教程

make install

LDAP Account Manager的部署教程

chown www:www /var/www/html/lam/ -R

cd /usr/local/lam/etc

cp config.cfg.sample config.cfg

chown www:www config.cfg

如果不用上邊這行命令會(huì)出現(xiàn)下邊錯(cuò)誤

LDAP Account Manager的部署教程

輸入http://IP/lam訪問(wèn)LAM首頁(yè)

會(huì)提示沒(méi)有配置文件,此時(shí)點(diǎn)擊首頁(yè)右上角:LAM configuration

LDAP Account Manager的部署教程

首先配置全局設(shè)置,點(diǎn)擊:Edit general settings

LDAP Account Manager的部署教程

輸入Master password默認(rèn)密碼:lam

LDAP Account Manager的部署教程

在通用設(shè)置里只改:會(huì)話(huà)超時(shí) 240

LDAP Account Manager的部署教程

下邊的日志根據(jù)自己的需求修改

LDAP Account Manager的部署教程

確定后會(huì)讓繼續(xù)修改服務(wù)器配置文件

LDAP Account Manager的部署教程

點(diǎn)擊首頁(yè)右上角:LAM configuration,然后點(diǎn)擊:Edit server profiles點(diǎn)擊:Manage server profiles

LDAP Account Manager的部署教程

創(chuàng)建服務(wù)器配置文件:

在"Profile management"-"Add profile"填寫(xiě)

配置文件名:****

配置文件密碼:********

模板:windows_samba4

點(diǎn)擊"Add"

LDAP Account Manager的部署教程

輸入Master password默認(rèn)密碼:lam

LDAP Account Manager的部署教程

進(jìn)入Manage server profiles頁(yè)面

LDAP Account Manager的部署教程

通用設(shè)置選項(xiàng)卡

服務(wù)器設(shè)置

服務(wù)器地址:ldap://192.168.1.160   #服務(wù)器IP或域名

激活TLS:no

樹(shù)狀結(jié)構(gòu)后綴:dc=    #完整DC

LDAP搜索限制:-

顯示名:Nt-DC1                 #顯示在登錄頁(yè)面

追隨引薦的服務(wù)器:不勾選

分頁(yè)結(jié)果:勾選

參照完整性疊加:勾選

語(yǔ)言設(shè)定

缺省語(yǔ)言:簡(jiǎn)體中文 (中國(guó))

時(shí)區(qū):Asia/Shanghai

LDAP Account Manager的部署教程

工具設(shè)置-隱藏的工具

服務(wù)器信息:不勾選    #登錄后右上角顯示

其他都勾選

安全設(shè)定

登錄方法:固定列表   #固定列表意思是只有下邊這個(gè)用戶(hù)才可以登錄本系統(tǒng)

合法用戶(hù)列表:CN=LAM,CN=Users,DC=*****,DC=**

LDAP Account Manager的部署教程

賬號(hào)類(lèi)型選項(xiàng)卡

激活帳號(hào)類(lèi)型-用戶(hù)   #刪掉Groups和Hosts,只留Users

LDAP后綴:ou=組織架構(gòu),dc=*****,dc=**   #要從哪個(gè)OU里提取用戶(hù)

屬性列表:#cn;#sAMAccountName;#mobile;#mail;#userAccountControl;#pwdLastSet;#lastLogon     #登錄后顯示在用戶(hù)選項(xiàng)卡里的列表

自定義標(biāo)簽:              #留空,這里修改用戶(hù)選項(xiàng)卡名字

附加的LDAP過(guò)濾表達(dá)式:   #留空,因?yàn)橛蠰DAP后綴了,這里就不寫(xiě)了

隱藏:不勾選

LDAP Account Manager的部署教程

模塊選項(xiàng)卡

默認(rèn)不變

LDAP Account Manager的部署教程

模塊設(shè)置

Windows

域:*********

   其他的按照下圖設(shè)置

LDAP Account Manager的部署教程

保存后,輸入http://IP/lam訪問(wèn)LAM首頁(yè)。

LDAP Account Manager的部署教程

問(wèn)題:登錄顯示No default profile set. Please set it in the server profile configuration.

解決:config.cfg配置寫(xiě)錯(cuò)了,將default:的值改成****即可

vi /usr/local/lam/etc/config.cfg

LDAP Account Manager的部署教程

之后重新輸入http://IP/lam訪問(wèn)LAM首頁(yè)

輸入DN賬戶(hù)LAM的密碼

LDAP Account Manager的部署教程

這是登錄后的頁(yè)面,只有用戶(hù)選項(xiàng)卡

點(diǎn)擊右上表的扳手圖標(biāo),可以修改

最大列表?xiàng)l目:1000

將GID號(hào)改為組名:不勾選

顯示帳號(hào)狀態(tài):勾選

LDAP Account Manager的部署教程

隨便修改一個(gè)用戶(hù)信息,提示修改成功,OK

LDAP Account Manager的部署教程

感謝各位的閱讀,以上就是“LDAP Account Manager的部署教程”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)LDAP Account Manager的部署教程這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

當(dāng)前標(biāo)題:LDAPAccountManager的部署教程
地址分享:http://www.muchs.cn/article6/jdodig.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供ChatGPT、微信公眾號(hào)網(wǎng)站策劃、標(biāo)簽優(yōu)化虛擬主機(jī)、網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作