Gosa 使用 openldap 在启动时给出 php 错误

Gosa 使用 openldap 在启动时给出 php 错误

我正在尝试在 Centos 7 机器上设置 GOsa 和 OpenLDAP,但遇到了一些问题。

主要是当我访问 /gosa 网页时出现以下错误:

Fatal error: Class 'session' not found in /usr/share/gosa/include/php_setup.inc on line 91

安装步骤:

  • 外加的http://oss.gonicus.de/pub/gosa/redhatyum 仓库
  • 安装 yum 模块(最新版本):
    • 开放LDAP
    • openldap 客户端
    • openldap 服务器
    • gosa-schema.noarch
    • gosa-插件系统.noarch
    • gosa-插件-sudo.noarch
    • gosa-插件-squid.noarch
    • gosa-插件-samba.noarch
    • gosa-插件-角色管理.noarch
    • gosa-插件-pureftpd.noarch
    • gosa-插件-mail.noarch
    • gosa-plugin-log.noarch
    • gosa-插件-ldapmanager.noarch
    • gosa-插件-dns.noarch
    • gosa-插件-dhcp.noarch
    • gosa-插件-连接性.noarch
    • gosa-plugin-addressbook.noarch
    • 戈萨·诺阿奇
  • 在 php 文件中关闭 reveal_php 并打开 magic_quotes_gpc
  • 如下设置 /etc/openldap/ldap.conf(稍后)
  • 将 /usr/share/gosa/plugins/pureftpd/contrib/pureftpd.schema 复制到 /etc/openldap/schema/gosa/pureftpd.schema
  • 将 /usr/share/gosa/plugins/dns/contrib/dnszone.schema 复制到 /etc/openldap/schema/gosa/dnszone.schema
  • 将 gosa_custom.schema 添加到 /etc/openldap/schema/gosa_custom.schema (稍后介绍)
  • 通过设置目录 / 中需要全部授予来开放 apache 访问权限
  • 将 /usr/share/openldap-servers/DB_CONFIG.example 复制到 /var/lib/ldap/DB_CONFIG
  • 运行 /usr/sbin/update-gosa
  • 启动 ldap 和 apache

ldap.conf(样本数据)

include         /etc/openldap/schema/corba.schema
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/dyngroup.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/java.schema
include         /etc/openldap/schema/misc.schema
include         /etc/openldap/schema/nis.schema
include         /etc/openldap/schema/openldap.schema
include         /etc/openldap/schema/ppolicy.schema

include /etc/openldap/schema/gosa/samba3.schema
include /etc/openldap/schema/gosa/pureftpd.schema
include /etc/openldap/schema/gosa/gofon.schema
include /etc/openldap/schema/gosa/gosystem.schema
include /etc/openldap/schema/gosa/goto.schema
include /etc/openldap/schema/gosa/gosa-samba3.schema
include /etc/openldap/schema/gosa/gofax.schema
include /etc/openldap/schema/gosa/goserver.schema
include /etc/openldap/schema/gosa/goto-mime.schema
include /etc/openldap/schema/gosa/trust.schema
include /etc/openldap/schema/gosa/dnszone.schema
include /etc/openldap/schema/gosa/gosa_custom.schema

pidfile     /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args

database    bdb
suffix      "dc=FogoNaCaixadAgua"
rootdn      "cn=Manager,dc=FogoNaCaixadAgua"

# Senha gerada pelo comando slappasswd -h {SSHA}
rootpw      {SSHA}Nag4FWwXLoGO/WpdpFJUlMVCBYwB94wt

directory   /var/lib/ldap

index entryCSN,entryUUID eq
index uid,mail eq
index gosaMailAlternateAddress,gosaMailForwardingAddress eq
index cn,sn,givenName,ou pres,eq,sub
index objectClass pres,eq
index uidNumber,gidNumber,memberuid eq
index gosaSubtreeACL,gosaObject,gosaUser pres,eq
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq

cachesize 100000

gosa_自定义模式

#$Id: authldap.schema,v 1.8 2005/03/20 19:10:30 mrsam Exp $
#
# OID prefix: 1.3.6.1.4.1.25981
#
# Attributes: 1.3.6.1.4.1.25981.1.1
#
# Depends on: gosa.schema and cosine.schema

attributetype ( 1.3.6.1.4.1.25981.1.1.1 NAME 'gosaMailHome'
    DESC 'The absolute path to the mail message stor directory in a virtual mail setup.'
        EQUALITY caseExactIA5Match
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )

#
# Objects: 1.3.6.1.4.1.25981.1.2
#

objectclass ( 1.3.6.1.4.1.25981.1.2.1 NAME 'gosaVirtualMailAccount' SUP top AUXILIARY
    DESC 'Objectclass to mark Virtual MailAccounts for GOsa (v2.4)'
        MAY ( gosaMailHome ) )

相关内容