Archive for 2006 / 12月 / 4

FreeBSD (Squirrelmail)

2006-12-04 (月曜日) In: Apache|FreeBSD|imap|Squirrelmail(4,367 views)

/usr/ports/mail/squirrelmail

以前は/user/ports/japanese/に日本語版が置いてあったが今はここのみに置いてあるみたい。

日本語版本家では1.4.5で止まっているけど、portsのは1.4.8。とりあえずportsで入れてみる。

[code]
# cd /usr/ports/mail/squirrelmail
# portinstall
[/code]

その後、/usr/local/www/squirrelmailに降りて、

[code]
# cd /usr/local/www/squirrelmail
# ./configure
[/code]

で各種設定を行う。

日本語を使うなら、 メニュー10番目のLanguageの所を

[code]
Language preferences
1. Default Language : ja_JP
2. Default Charset : iso-2022-jp
3. Enable lossy encoding : false
[/code]

でOK。あと、メニュー2番目のServer SettingsでIMAPサーバーを選択すれば使えるようになります。ウチはuw IMAPなのでこんな感じ。

[code]
IMAP Settings
--------------
4. IMAP Server : localhost
5. IMAP Port : 143
6. Authentication type : cram-md5
7. Secure IMAP (TLS) : false
8. Server software : uw
9. Delimiter : detect
[/code]

あとは、適当に好みで。

apacheの設定は、SSLで使いたかったのでIncludesに置いたhttpd-ssl.confに下記を追記。

[code]
Alias /webmail "/usr/local/www/squirrelmail"
AllowOverride All
Options FollowSymLinks ExecCGI Includes
Allow from All
[/code]

これで https://wwwほげほげ/webmail で使えるようになる。
ところが、 返信とかすると下記のようなウォーニングが。

[code]
Warning: preg_split() expects parameter 4 to be long, string given in /usr/local/www/squirrelmail/functions/imap_messages.php on line 808Warning: Invalid argument supplied for foreach() in/usr/local/www/squirrelmail/functions/mime.php on line 52
[/code]

ぐぐってみたらパッチ発見。

http://www.hmailserver.com/forum/viewtopic….

http://sourceforge.net/tracker/index.php?func=detail&aid=1543573…..

[code]
# diff imap_messages.php.org imap_
messages.php
808c808
< $flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NI_EMPTY');
---
> $flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY);
[/code]

これで解決。

FreeBSD (PHP5)

2006-12-04 (月曜日) In: Apache|FreeBSD|PHP(917 views)

/usr/ports/lang/php5

# portinstall lang/php5

# cat /var/db/ports/php5-extensions/options

# This file is auto-generated by ‘make config’.
# No user-servicable parts inside!
# Options for php5-5.2.0
_OPTIONS_READ=php5-5.2.0
WITH_CLI=true
WITH_CGI=true
WITH_APACHE=true
WITHOUT_DEBUG=true
WITH_SUHOSIN=true
WITH_MULTIBYTE=true
WITHOUT_IPV6=true
WITHOUT_REDIRECT=true
WITHOUT_DISCARD=true
WITH_FASTCGI=true
WITH_PATHINFO=true

/usr/ports/lang/php5-extensions

# portinstall lang/php5

# cat /var/db/ports/php5-extensions/options

# This file is auto-generated by ‘make config’.
# No user-servicable parts inside!
# Options for php5-extensions-1.0
_OPTIONS_READ=php5-extensions-1.0
WITHOUT_BCMATH=true
WITH_BZ2=true
WITH_CALENDAR=true
WITH_CTYPE=true
WITHOUT_CURL=true
WITHOUT_DBA=true
WITHOUT_DBASE=true
WITH_DOM=true
WITHOUT_EXIF=true
WITHOUT_FILEINFO=true
WITHOUT_FRIBIDI=true
WITH_FTP=true
WITH_GD=true
WITH_GETTEXT=true
WITHOUT_GMP=true
WITH_HASH=true
WITH_ICONV=true
WITHOUT_IMAP=true
WITHOUT_INTERBASE=true
WITHOUT_LDAP=true
WITH_MBSTRING=true
WITHOUT_MCRYPT=true
WITHOUT_MHASH=true
WITHOUT_MING=true
WITHOUT_MSSQL=true
WITH_MYSQL=true
WITHOUT_MYSQLI=true
WITHOUT_NCURSES=true
WITHOUT_ODBC=true
WITHOUT_OPENSSL=true
WITHOUT_PCNTL=true
WITH_PCRE=true
WITH_PDF=true
WITH_PDO=true
WITHOUT_PGSQL=true
WITH_POSIX=true
WITHOUT_PSPELL=true
WITHOUT_READLINE=true
WITHOUT_RECODE=true
WITH_SESSION=true
WITHOUT_SHMOP=true
WITH_SIMPLEXML=true
WITHOUT_SNMP=true
WITHOUT_SOAP=true
WITHOUT_SOCKETS=true
WITH_SQLITE=true
WITHOUT_SYBASE_CT=true
WITHOUT_SYSVMSG=true
WITHOUT_SYSVSEM=true
WITHOUT_SYSVSHM=true
WITHOUT_TIDY=true
WITH_TOKENIZER=true
WITHOUT_WDDX=true
WITH_XML=true
WITH_XMLREADER=true
WITHOUT_XMLRPC=true
WITH_XMLWRITER=true
WITHOUT_XSL=true
WITHOUT_YAZ=true
WITH_ZIP=true
WITH_ZLIB=true

/usr/local/etc/apache22/httpd.confに下記追記

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

同じく、index.phpをDeirectoryIndexに追記

DirectoryIndex index.php index.html index.htm

FreeBSD (MySQL5.1)

2006-12-04 (月曜日) In: FreeBSD|MySQL(545 views)

/usr/ports/databases/mysql51-server

/usr/local/etc/pkgtools.conf

‘databases/mysql51-*’ => [
‘WITH_XCHARSET=all’,
],

↑ 紆余曲折の末、とりあえずこれで済ませました。

# portinstall database/mysql51-server
# cd /usr/local/bin
# ./mysql_install_db
# cd /var/db
# chown -R mysql:mysql mysql

/etc/rc.conf に mysql_enable=”YES” を追記。

デフォルトのDBディレクトリは /var/db/mysql になるので、別の場所にしたければ、 /etc/rc.conf にmysql_dbdir = “ほげほげ” をさらに追記すればいい。

FreeBSD (Apache2.2 : httpready)

2006-12-04 (月曜日) In: Apache|FreeBSD(1,002 views)

「[warn] (2)No such file or directory: Failed to enable the ‘httpready’ Accept Filter」と言ってApacheに怒られた。

ちょっとググってみたらビンゴなページがあった。感謝。

# kldload accf_http.ko

or

「/boot/loader.conf」に「accf_http_load=”YES”」を追加。


About this blog

日々の四方山話を徒然と・・・
いらっしゃいませ。このブログはオーストラリアの生活に関する話題とFreeBSDに関連する話題を主に色々と書き綴っています。
Sorry, This site consists of Japanese contents only. If you are interested in my blog, feel free to leave your comments in English or Japanese. Thank you.

Categories

Archives

広告

NAKANOHITO