% cd imap-2002e % vi Makefile diff -c Makefile Makefile.org *** Makefile Wed Nov 26 19:26:34 2003 --- Makefile.org Tue Jul 15 10:17:18 2003 *************** *** 149,156 **** # std system standard (typically passwd file), determined by port # two try alternative (defined by CHECKPWALT), then std ! #PASSWDTYPE=std ! PASSWDTYPE=pam # SSL type. Defines whether or not SSL support is on this system --- 149,155 ---- # std system standard (typically passwd file), determined by port # two try alternative (defined by CHECKPWALT), then std ! PASSWDTYPE=std # SSL type. Defines whether or not SSL support is on this system
% make gso # cp c-client/c-client.a /usr/local/lib/libc-client.a # cp c-client/rfc822.h /usr/local/include/ # cp c-client/mail.h /usr/local/include/ # cp c-client/linkage.h /usr/local/include/
% cd gettext-0.14.5 % ./configure % make # make install
% cd libmcrypt-2.5.7 % ./configure % make
エラー?
% make clean;make (なんで 2回目は通る?) # make install
http://jp.php.net/get/php-4.4.2.tar.gz/from/this/mirror
% ./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --enable-mbstring --enable-mbregex \ --with-openssl=/usr/local/ssl \ --with-imap=/usr/local --with-imap-ssl=/usr/local \ --with-zlib=/usr/local \ --with-gettext=/usr/local \ --with-xml \ --with-mcrypt=/usr/local \ --with-mysql=/usr/local/mysql % make # make install
ここで,PEAR 関係のエラーが出る.
http://bugs.php.net/bug.php?id=36002 の情報を参考に,
cd php-src/pear/packages wget http://pear.php.net/get/Archive_Tar-1.3.1.tar wget http://pear.php.net/get/Console_Getopt-1.2.tar wget http://pear.php.net/get/HTML_Template_IT-1.1.tar
をして,make をやり直す.
# cp php.ini-recommended /usr/local/lib/php.ini
編集
[PHP] output_buffering = Off [mbstring] mbstring.language = Japanese mbstring.internal_encoding = EUC-JP mbstring.http_input = auto mbstring.http_output = EUC-JP mbstring.encoding_translation = On mbstring.detect_order = auto mbstring.substitute_character = none;
/opt/apache/conf/httpd に
AddType application/x-httpd-php .php .phtml
という行を付け加える.
また DirectoryIndex 行に index.php を加える.
ex.)
DirectoryIndex index.html index.html.var index.php
# pear config-show
で
HTTP Proxy Server Addrss http_proxy <not_set>
を確認する.
# pear config-set http_pxory XXX.XXX.XXX.XXX:YYYY
として,設定.
# pear install --alldeps Log
# pear install Mail_Mime
# pear install Net_Socket Package 'Net_Socket' already installed, skipping
/* snip Horde のモジュール? kronolith のときにいる *Date_Calc *HTML_Common *HTML_Select */
# cd /usr/local/apache2/htdocs # gzcat horde-2.2.1-jp-0.2.tgz | tar xvf - # mv horde-2.2.1-jp-0.2 horde # chown -R root:sys horde
# vi +23 horde/scripts/db/mysql_create.sql
で 23行目のパスワードを変更(********)
# mysql --user=root -p < horde/scripts/db/mysql_create.sql
# cd horde/config/ # for foo in *.dist; do cp $foo `basename $foo .dist`; done # vi horde.php $conf['log']['type'] = 'syslog'; // 116行目 $conf['log']['name'] = LOG_LOCAL1; // 123行目 $conf['prefs']['driver'] = 'sql'; //148行目 $conf['prefs']['params']['phptype'] = 'mysql'; //157-162行目 $conf['prefs']['params']['hostspec'] = 'localhost'; $conf['prefs']['params']['username'] = 'horde'; $conf['prefs']['params']['password'] = 'r*******n'; //<--パスワード $conf['prefs']['params']['database'] = 'horde'; $conf['prefs']['params']['table'] = 'horde_prefs'; $conf['mailer']['type'] = 'sendmail'; //204 行目 //$conf['mailer']['params'] = array(); //$conf['mailer']['params'] = array('sendmail_path' => '/usr/lib/sendmail'); $conf['mailer']['params'] = array('host' => 'mailhost.******.jp'); // 211-213 行目
# chown apache:apache horde.php # chmod 400 horde.php
http://localhost/horde/test.php にアクセスしてテスト.
テスト後は
# chmod 400 をしておく
# cd /opt/apache/htdocs/horde # gzcat imp-3.2.1-jp-0.1.tgz | tar xvf - # mv imp-3.2.1-jp-0.1 imp # chown -R root:sys imp
# vi +23 horde/config/registry.php $this->registry['auth']['login'] = 'imp'; //コメントを外す $this->registry['auth']['logout'] = 'imp';
# vi +109 horde/config/registry.php 'status' => 'active'
# cd horde/imp/config/ # for foo in *.dist; do cp $foo `basename $foo .dist`; done
conf.php はマージする必要があり.prefs.php は微妙.
# vi conf.php $conf['menu']['apps'] = array('turba'); $conf['msg']['append_trailer'] = false;
# vi server.php $servers['imap'] = array( 'name' => 'IMAP Server', 'server' => 'mailhost.*******.jp', 'protocol' => 'imap/notls', 'port' => 143, 'folders' => 'mail/', 'namespace' => '', 'maildomain' => 'up.*****.jp', 'smtphost' => 'mailhost.******.jp', 'realm' => 'up.*****.jp', 'preferred' => '' );
# vi prefs.php // should we move messages to a trash folder instead of just marking // them as deleted? // a value of 0 = no, 1 = yes $_prefs['use_trash'] = array( 'value' => 1, //<--- 0 を 1に変える 'locked' => false, 'shared' => false, 'type' => 'checkbox', 'desc' => _("When deleting messages, move them to your Trash folder insteadof marking them as deleted?") );
$_prefs['add_source'] = array( // 'value' => '', 'value' => 'localsql', 'locked' => false, 'shared' => false, 'type' => 'implicit' );
http://localhost/horde/imp/test.php にアクセスしてテスト.
テスト後は
chmod 400
をしておく
# cd horde # gzcat turba-1.2-jp-0.2.tgz | tar xvf - # mv turba-1.2-jp-0.2/ turba # chown -R root:sys turba
# /usr/local/mysql/bin/mysql --user=root -p horde \ < turba/scripts/drivers/turba.sql
# cd turba/config/ # for foo in *.dist; do cp $foo `basename $foo .dist`; done
sources.php はマージする必要があり.prefs.php は微妙.
# vi conf.php $conf['menu']['apps'] = array('imp'); // 31行目
# vi +140 sources.php $cfgSources['localsql'] = array( 'title' => 'My Addressbook', 'type' => 'sql', 'params' => array( 'phptype' => 'mysql', 'hostspec' => 'localhost', 'username' => 'horde', 'password' => 'r******n', 'database' => 'horde', 'table' => 'turba_objects' ),
また,$cfgSources['localsql'] と $cfgSources['prefs'] 以外の ブロックはコメントアウトしておく.
# chown apache sources.php # chmod 400 sources.php
# vi +118 horde/config/registry.php 'name' => _("Address Book"), 'allow_guests' => false, 'status' => 'active' //<-- この行
/usr/local/apache2/bin/logrotation.sh
#!/bin/sh HTTP_PID=/usr/local/apache2/logs/httpd.pid GZIP="/usr/bin/gzip -9" DAY=`date +%d` MON=`date +%m` MON=`expr $MON - 1` YEAR=`date +%Y` #YEAR=`date +%y` # %y -- 98,99,00,(;_;). %Y -- 1997,1998,1999,2000,(^.^) #if [ "$DAY" != "01" ]; then # exit 0; #fi if [ "$MON" = "0" ]; then MON=12 YEAR=`expr $YEAR - 1` fi MONFLAG=`expr ${MON} \< 10` if [ "$MONFLAG" = "1" ]; then MON=0${MON} fi cd /usr/local/apache2/logs mv access_log access_log.$YEAR$MON mv error_log error_log.$YEAR$MON #mv agent_log agent_log.$YEAR$MON mv ssl_request_log ssl_request_log.$YEAR$MON mv horde.log horde.log.$YEAR$MON touch horde.log kill -HUP `cat $HTTP_PID` kill -HUP `cat /etc/syslog.pid` ${GZIP} access_log.${YEAR}${MON} ${GZIP} error_log.${YEAR}${MON} #${GZIP} agent_log.${YEAR}${MON} ${GZIP} ssl_request_log.${YEAR}${MON} ${GZIP} horde.log.${YEAR}${MON} #
/etc/syslog.confの最後に
local1.info /usr/local/apache2/logs/horde.log
% /usr/local/mysql/bin/mysql -u horde -p******* -e "CREATE TABLE horde_fromaddr \ (user char(255) NOT NULL, fromaddr char(255) NOT NULL, \ fullname char(255) DEFAULT '')" horde
bash-2.03$ diff preference2-tnk.pl preference2.pl 1c1 < #!/usr/bin/perl -w --- > #!/usr/local/bin/perl -w 21c21 < my $mysql = "/usr/local/mysql/bin/mysql"; --- > my $mysql = "/usr/local/bin/mysql"; 23c23 < my $password = "********"; --- > my $password = "XXXXXXXX"; 28d27 < my $domain = "******.jp"; 59c58 < system("$mysql -u $user -p$password -e \"delete from $pref_table where pref_uid='$username\@$domain'\" $db"); --- > system("$mysql -u $user -p$password -e \"delete from $pref_table where pref_uid='$username\@localhost'\" $db"); 61c60 < system("$mysql -u $user -p$password -e \"delete from $addr_table where owner_id='$username\@$domain'\" $db"); --- > system("$mysql -u $user -p$password -e \"delete from $addr_table where owner_id='$username\@localhost'\" $db");
ZendOptimizer-2.6.2-sunos5.8-sparc.tar.gz を展開して,
./install