[[ASAPNET構築]]

#contents

* 参考資料 [#v2a9608e]
参考URL:  [[http://www.atmarkit.co.jp/flinux/rensai/apache2_07/apache07a.html]]~
参考URL2: [[http://www.atmarkit.co.jp/flinux/rensai/linuxtips/914user2ldap.html]]~
参考URL3: [[http://www.lunq.net/up/ldap.html]]

* サーバ側の設定 [#e5db6de0]

- インストール

  yum -y install openldap*

- 管理用パスワード設定

--- デフォルトではSSHA

  # slappasswd
      New password:   なんか適当に(とりあえずルーパス)
      Re-enter new password:

-- ここで出てきた文字列をどこかにとっておく


- slapd.confの設定
-- suffix等のDN(Distinguished Name)は,"dc=hoge,dc=huga"のように記述する
-- cn(common name)は管理者の名前(ここではManager)
-- HOGEHOGEHOGEは前節で出てきたパスフレーズ

  vi /etc/openldap/slapd.conf

  suffix "dc=ics"
  rootdn  "cn=Manager,dc=ics"
  rootpw {SSHA}HOGEHOGEHOGE
  
  <<<<<========= snip =========>>>>>
  
  access to attrs=userPassword
    by self write
    by dn="cn=Manager,dc=ics"
    by anonymous auth
    by * none
  
  access to *
    by dn="cn=Manager,dc=ics"
    by self write
    by * read

- /etc/openldap/ldap.confの設定

  BASE dc=ics

- /etc/ldap.confの設定

  base dc=ics

- 起動

  /etc/rc.d/init.d/ldap start

- 再起動時の自動起動設定

  chkconfig ldap on


- 設定ファイル修正

  vi /usr/share/openldap/migration/migrate_common.ph

  $DEFAULT_MAIL_DOMAIN = "ics.keio.ac.jp";
  $DEFAULT_BASE = "dc=ics";

- 初期情報登録

  # vi ~/base.ldif

  dn:dc=asap
  objectClass:dcObject
  objectClass:organization
  o:asap Organization
  dc:asap
  
  dn: cn=Manager,dc=asap
  objectClass: organizationalRole
  cn: Manager
  
  dn: ou=People,dc=asap
  objectClass: organizationalUnit
  ou: People
  
  dn: ou=Group,dc=asap
  objectClass: organizationalUnit
  ou: Group

- 読み込み

  ldapadd -h localhost -x -D "cn=Manager,dc=asap" -W -f ~/base.ldif

  Enter LDAP Password: [パスフレーズを入力]
  adding new entry "dc=asap"
  
  adding new entry "cn=Manager,dc=asap"
  
  adding new entry "ou=People,dc=asap"
  
  adding new entry "ou=Group,dc=asap"

* オレオレ証明書の作成 [#laa2bfa7]

 # vi /etc/pki/tls/openssl.cnf

 Country, Organization等の項目をあらかじめ設定しておくとラク



トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS