ノート
訪問者数 3267 最終更新 2007-12-15 (土) 13:14:59
### Virtual Host Configuration. Two V-H are configured NameVirtualHost *:80 NameVirtualHost *:443 # Virtual Host #1 Non-SSL host <VirtualHost *:80> ServerName pepper.is.sci.toho-u.ac.jp DocumentRoot "/usr/local/apache2/htdocs" </VirtualHost> <VirtualHost *:443> ServerName pepper.is.sci.toho-u.ac.jp DocumentRoot "/usr/local/apache2/htdocs-ssl" SSLEngine On </VirtualHost>
SSLCertificateFile /path/path/path/server.crt SSLCertificateKeyFile /path/path/path/server.key
$ openssl s_client -connect localhost:443 -state -debug GET / HTTP/1.0でマニュアルアクセスできる。telnetの時と同様に、GET / HTTP/1.0のあとで2回Enterキーを押すこと。
<?php // LDAP の基本シーケンスは、接続、バインド、検索、検索結果の解釈、 // 接続のクローズです。 echo "<h3>LDAP query test</h3>"; echo "Connecting ..."; $ds=ldap_connect("localhost"); // 有効な LDAP サーバーに違いない! echo "connect result is " . $ds . "<br />"; if ($ds) { echo "Binding ..."; $r=ldap_bind($ds); // これは "匿名" バインドで、通常は // 読みこみのみのアクセスとなります。 echo "Bind result is " . $r . "<br />"; echo "Searching for (sn=S*) ..."; // 名前(surname)エントリを検索 $sr=ldap_search($ds, "o=My Company, c=US", "sn=S*"); echo "Search result is " . $sr . "<br />"; echo "Number of entires returned is " . ldap_count_entries($ds, $sr) . "<br />"; echo "Getting entries ...<p>"; $info = ldap_get_entries($ds, $sr); echo "Data for " . $info["count"] . " items returned:<p>"; for ($i=0; $i<$info["count"]; $i++) { echo "dn is: " . $info[$i]["dn"] . "<br />"; echo "first cn entry is: " . $info[$i]["cn"][0] . "<br />"; echo "first email entry is: " . $info[$i]["mail"][0] . "<br /><hr />"; } echo "Closing connection"; ldap_close($ds); } else { echo "<h4>Unable to connect to LDAP server</h4>"; } ?>(localhostはリモートで試す。)
yum list | grep postgresなどとやるとよい。yumの使い方サマリーはhttp://www.searchman.info/tips/1800.html
adduser postgres これはyumでパッケージインストールすれば自動的に作られる mkdir /usr/local/pgsql/data 今は/var/db/pgsqlを作った chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test
pear install --alldeps <library>無事完了