1. Fresh Install a FreeBSD 7.2-RELEASE
install from ftp6.tw.freebsd.org
2. portsnap fetch extract
3. mysql51-server (for a long time)
mkdir /usr/local/mysql
chown /usr/local/mysql user:mysql pw:mysql
用ln -s 於/var/db/mysql建link至/usr/local/mysql(可省略)
make WITH_CHARSET=utf8 WITH_XCHARSET=all WITH_COLLATION=utf8_general_ci BUILD_OPTIMIZED=yes BUILD_STATIC=yes install clean
cp /usr/local/share/mysql/my-huge.cnf /var/db/mysql/my.cnf
ee my.cnf
[mysqld]
skip-name-resolve
4. install apache22 (for a long time with perl)
make config
BerkleyDB(subversion) mod_proxy all
/etc/newsyslog.conf
#newsyslog
/var/log/httpd-access.log 644 3 1 @T00 Z
/var/log/httpd-error.log 644 3 1 @T00 Z /var/run/httpd.pid
modify apache22.conf
#kenny
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
5. install php5
6. install pure-ftpd
7. http://blog.cheyingwu.tw/index.php/2007/05/04/freebsd-utf8-env/
FreeBSD UTF-8 環境
FreeBSD 5.x 以上,就已經支援 i18n,之前因為 ftp 日文檔名的問題,所以全面 utf-8 記錄一下整個過程
改 csh 的登入設定
#~/.cshrc setenv LC_ALL zh_TW.UTF-8
安裝 convmv 轉 big5 中文檔名
cd /usr/ports/converters/convmv make install clean;rehash
使用法
convmv -f big5 -t utf-8 -r --notest [檔名 or 目錄名]
檔案內容編碼用 iconv 轉
iconv -f big5 -t utf-8 檔名 > 檔名
重編 pure-ftpd 支援 RFC 2640,在 Makefile 裡面加上
--with-rfc2640
編完後編輯 pure-ftpd.conf
FileSystemCharset utf-8 ClientCharset big5
這樣一來就完成 FreeBSD UTF-8 化
延伸閱讀
兔耳八克斯 » FreeBSD遠端Console設定UTF-8環境
MC104 :: 觀看文章 - [推薦] 轉換目錄/檔名編碼的 perl 程式
8. install phpmyadmin (安裝很多雜七雜八的port,也是很久)
mysqladmin -u root password xxxxxx(更改root password)
modify httpd.conf
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
Options none
AllowOverride Limit
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.1.x(自己的網段)
http://x.x.x.x/phpmyadmin/setup
9.cd /usr/ports/devel/ruby-gems
# make install clean
remember to install ruby-iconv
不然rails會出現undefined method `camelize' for "app":String
cd /usr/ports/converters/ruby-iconv
No comments:
Post a Comment