设为首页 收藏本站
查看: 636|回复: 0

[经验分享] 源码编译安装ldap+apache+php+phpldapadmin

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2018-11-25 14:59:36 | 显示全部楼层 |阅读模式
  

For reprint content of this site, Declined reprint
为保障原作者权利,谢绝转载


  


  源码包:
  db-4.7.25.tar.gz
  openldap-stable-20090411.tar.gz
  phpldapadmin-1.2.1.1.tar.gz
  Apache2.4.2.tar.gz
  Php.5.4.5.tar.gz
  apr-1.4.6.tar.gz
  apr-util-1.4.1.tar.gz
  gettext-0.17.tar.gz
  libmcrypt-2.5.7.tar.gz
  libpng-1.5.12.tar.gz
  libxml2-2.7.7.tar.gz
  安装BerkeleyDB
  #tar -zxfdb-4.7.25.tar.gz
  # cd  db-4.7.25/build_unix
  #../dist/configure
  # make
  # make  install
  # vi  /etc/ld.so.conf(加入:/usr/local/BerkeleyDB.4.7/lib)
  #/sbin/ldconfig
  安装openldap
  #tar  zxvf openldap-stable-20090411.tgz
  # cd  openldap-2.4.16
  # env CPPFLAGS=”-I/usr/local/BerkeleyDB.4.7/include” LDFLAGS=”-L/usr/local/BerkeleyDB.4.7/lib”  ./configure --prefix=/usr/local/openldap --enable-ldbm
  # makedepend
  # make
  # makeinstall
  (配置文件目录为:/usr/local/openldap/etc/openldap/
  配置openldap
  复制配置文件
  # cp /usr/locla/openldap/etc/openldap/DB_CONFIG.example/usr/local/openldap/var/openldap-data/DB_CONFIG
  修改slapd.conf配置文件,
  Vim /usr/local/openldap/etc/openldap/slapd.conf
  内容如下
  #
  #See slapd.conf(5) for details on configuration options.
  #This file should NOT be world readable.
  #
  include        /usr/local/openldap/etc/openldap/schema/core.schema
  include        /usr/local/openldap/etc/openldap/schema/corba.schema
  include        /usr/local/openldap/etc/openldap/schema/cosine.schema
  include        /usr/local/openldap/etc/openldap/schema/dyngroup.schema
  include        /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
  include        /usr/local/openldap/etc/openldap/schema/java.schema
  include        /usr/local/openldap/etc/openldap/schema/misc.schema
  include        /usr/local/openldap/etc/openldap/schema/nis.schema
  include        /usr/local/openldap/etc/openldap/schema/openldap.schema
  include        /usr/local/openldap/etc/openldap/schema/ppolicy.schema
  #Define global ACLs to disable default read access.
  #Do not enable referrals until AFTER you have a working directory
  #service AND an understanding of referrals.
  #referral       ldap://root.openldap.org
  pidfile         /usr/local/openldap/var/run/slapd.pid
  argsfile        /usr/local/openldap/var/run/slapd.args
  #Load dynamic backend modules:
  #modulepath   /usr/local/openldap/libexec/openldap
  #moduleload    back_bdb.la
  #moduleload    back_hdb.la
  #moduleload    back_ldap.la
  #Sample security restrictions
  #       Require integrity protection (preventhijacking)
  #       Require 112-bit (3DES or better)encryption for updates
  #       Require 63-bit encryption for simplebind
  #security ssf=1 update_ssf=112 simple_bind=64
  #Sample access control policy:
  #       Root DSE: allow anyone to read it
  #       Subschema (sub)entry DSE: allow anyoneto read it
  #       Other DSEs:
  #               Allow self write access
  #               Allow authenticated users readaccess
  #               Allow anonymous users toauthenticate
  #       Directives needed to implement policy:
  #access to dn.base="" by * read
  #access to dn.base="cn=Subschema" by * read
  #access to *
  #       by self write
  #       by users read
  #       by anonymous auth
  #
  #if no access controls are present, the default policy
  #allows anyone and everyone to read anything but restricts
  #updates to rootdn.  (e.g., "accessto * by * read")
  #
  #rootdn can always read and write EVERYTHING!
  #######################################################################
  #BDB database definitions
  #######################################################################
  database        bdb
suffix         "dc=abc,dc=com"
rootdn         "cn=manager,dc=abc,dc=com"
  #Cleartext passwords, especially for the rootdn, should
  #be avoid.  See slappasswd(8) andslapd.conf(5) for details.
  #Use of strong authentication encouraged.
rootpw          password
  #The database directory MUST exist prior to running slapd AND
  #should only be accessible by the slapd and slap tools.
  #Mode 700 recommended.
  directory       /usr/local/openldap/var/openldap-data
  #Indices to maintain
  index   objectClass     eq
  修改ldap.conf配置文件
  Vim /usr/local/openldap/etc/openldap/ldap.conf
  内容如下
  #
  #LDAP Defaults
  #
  #See ldap.conf(5) for details
  #This file should be world readable but not world writable.
  BASabcc,dc=com
  #URI    ldap://ldap.example.comldap://ldap-master.example.com:666
  #SIZELIMIT      12
  #TIMELIMIT      15
  #DEREF          never
  测试启动
  #/usr/local/openldap/libexec/slapd -d 256
  编译安装apache2.4
  前提:
  1
  #yum install libtool libtool-ltdl -y
  [root@localhostapr-1.4.6]# ./configure
  [root@localhostapr-1.4.6]#make
  [root@localhostapr-1.4.6]#make install
  2
  [root@localhostapr-util-1.4.1]# ./configure --with-apr=/usr/local/apr
  [root@localhostapr-util-1.4.1]#make
  [root@localhostapr-util-1.4.1]#make install
  3
  [root@www pcre-8.30]# ./configure
  [root@wwwpcre-8.30]# make
  [root@wwwpcre-8.30]# make install
  4
  [root@www httpd-2.4.2]#./configure --enable-mods-shared=all --enable-so
  [root@wwwhttpd-2.4.2]#make
  [root@wwwhttpd-2.4.2]#make install
  安装php
  1
  [root@wwwgettext-0.17]#./configure --prefix=/usr/local/gettex
  [root@wwwgettext-0.17]#make
  [root@wwwgettext-0.17]#make install
  2     配置库文件搜索路径
  [root@wwwgettext-0.17]# echo "/usr/local/gettex/lib" >> /etc/ld.so.conf
  [root@wwwgettext-0.17]# ldconfig -v
  3
  [root@www libxml2-2.7.7]#./configure
  [root@wwwlibxml2-2.7.7]#make
  [root@wwwlibxml2-2.7.7]#make install
  4
  [root@www libpng-1.5.12]#./configure
  [root@wwwlibpng-1.5.12]#make
  [root@wwwlibpng-1.5.12]#make install
  5
  [root@www libmcrypt-2.5.7]#./configure
  [root@wwwlibmcrypt-2.5.7]#make
  [root@wwwlibmcrypt-2.5.7]#make install
  6
  #yum install zlib-devel
  7
  [root@wwwphp-5.4.5]# ./configure --prefix=/data/php5 --with-config-file-path=/etc--with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --enable-xml--enable-mbstring --enable-sockets --with-ldap=/usr/local/openldap--with-gettext=/usr/local/gettex --with-zlib-dir
  [root@wwwphp-5.4.5]#make
  [root@wwwphp-5.4.5]#make install
  [root@wwwphp-5.4.5]# cp php.ini-dist /etc/php.ini
  # vi/data/apache/conf/httpd.conf
  #查找AddTypeapplication/x-compress .Z
  AddTypeapplication/x-gzip .gz .tgz
  在其下加入
  ---------------------------------------------------
  AddTypeapplication/x-tar .tgz
  AddTypeapplication/x-httpd-php .php
  AddTypeapplication/x-httpd-php-source .phps
  AddType image/x-icon.ico
  ---------------------------------------------------
  改DirectoryIndex行,添加index.php
  

  

  





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-639501-1-1.html 上篇帖子: ubuntu下有关apache的一点东西 下篇帖子: LAMP(Linux+Apache+Mysql+Php)快速部署(yum)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表