FREEBSD安装中文桌面的过程

FreeBSD 7.0-RELEASE-i386

CD安装Xorg、KDE(速度快)

# sysinstall
Configuration->packages->选择cd->进入x11->找xorg->选中->install
Configuration->packages->选择cd->进入KDE->找kde->选中->install
(选择FTP也可以)

或者编译安装Xorg、KDE(速度慢)

# cd /usr/ports/x11/xorg && make OPTIONS=NO install clean
# cd /usr/ports/x11/kde3 && make OPTIONS=NO install clean
(约20—-30小时,期间可能有错误停止编译)

或者使用
# pkg_add -r xorg
# pkg_add -r kde3
(速度比较快)

不配置/etc/X11/xorg.conf,使用系统自动配置
要自己配置的话:

# Xorg -configure
# Xorg -config xorg.conf.new
# cp xorg.conf.new /etc/X11/xorg.conf

# startx
测试,Ctrl+Alt+Backspace退出X

安装中文环境
# cd /usr/ports/chinese/kcfonts && make install clean
# cd /usr/ports/chinese/arphicttf && make install clean
# cd /usr/ports/chinese/kde3-i18n-zh_CN && make install clean
# cd /usr/ports/chinese/koffice-i18n-zh_CN && make install clean
如果您想要有Windows的字体,可以到将Win上面的字体COPY到下面的目录
# cd /usr/X11R6/lib/X11/fonts/TrueType

安装FireFox:
# cd /usr/ports/www/firefox3 && make install clean
# cd /usr/ports/www/firefox3-i18n && make install clean
在地址栏输入about:config,搜索general.useragent.locale,改为zh-CN

出错处理:
# cd /usr/ports/devel/glib20 && make OPTIONS=NO FORCE_PKG_REGISTER=YES install clean
(http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2008-10/msg01701.html)
# cd /usr/ports/x11/pixman && make OPTIONS=NO FORCE_PKG_REGISTER=YES install clean
# cd /usr/ports/graphics/cairo && make OPTIONS=NO FORCE_PKG_REGISTER=YES install clean
(http://www.nabble.com/CALL-FOR-TEST:-Updates-to-pixmap,-cairo,-poppler,-and-firefox-3.0!-td17960163.html)

安装聊天工具 gaim
# cd /usr/ports/net-im/pidgin && make install clean

中文输入法安装:
# cd /usr/ports/chinese/scim-tables/ && make install clean #五笔
# cd /usr/ports/chinese/scim-pinyin/ && make install clean #拼音
# ee ~/.cshrc

setenv LANG zh_CN.eucCN
setenv LC_CTYPE zh_CN.eucCN
setenv XMODIFIERS @im=SCIM
setenv GTK_IM_MODULE scim

# echo “exec /usr/local/bin/scim &” >> ~/.xinitrc
# echo “exec /usr/local/bin/startkde” >> ~/.xinitrc
# startx

进入KDE。
找到Setting->Desktop Setting Wizard选择中文。
然后打开”控制中心”->外观和主题->字体,里面设置你所需要的中文字体和字体大小。强制字体DPI越大字越大。
打开FireFox,打开about:config,搜索layout.css.dpi,设置dpi为0,-1为FireFox默认的DPI,0为KDE系统DPI。

备注:安装过程如有软件版本冲突,安装命令加FORCE_PKG_REGISTER=YES强行安装

# cat /etc/X11/xorg.conf
Section “ServerLayout”
Identifier “X.org Configured”
Screen 0 “Screen0” 0 0
InputDevice “Mouse0” “CorePointer”
InputDevice “Keyboard0” “CoreKeyboard”
EndSection

Section “Files”
RgbPath “/usr/local/share/X11/rgb”
ModulePath “/usr/local/lib/xorg/modules”
FontPath “/usr/local/lib/X11/fonts/misc/”
FontPath “/usr/local/lib/X11/fonts/TTF/”
FontPath “/usr/local/lib/X11/fonts/OTF”
FontPath “/usr/local/lib/X11/fonts/Type1/”
FontPath “/usr/local/lib/X11/fonts/100dpi/”
FontPath “/usr/local/lib/X11/fonts/75dpi/”
EndSection

Section “Module”
Load “GLcore”
Load “dbe”
Load “dri”
Load “extmod”
Load “glx”
Load “record”
Load “xtrap”
Load “freetype”
Load “type1”
EndSection

Section “InputDevice”
Identifier “Keyboard0”
Driver “kbd”
EndSection

Section “InputDevice”
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “auto”
#Option “Device” “/dev/sysmouse”
Option “ZAxisMapping” “4 5 6 7”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Monitor Vendor”
ModelName “Monitor Model”
EndSection

Section “Device”
Identifier “Card0”
Driver “vesa”
VendorName “Silicon Integrated Systems [SiS]”
BoardName “661/741/760 PCI/AGP or 662/761Gx PCIE VGA Display Adapter”
BusID “PCI:1:0:0”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Card0”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Viewport 0 0
Depth 24
Modes “1024×768” “800×600”
EndSubSection
EndSection


免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/

安装POSTGRESQL

FreeBSD 7.0-RELEASE-i386

# cd /usr/ports/databases/postgresql83-server && make install clean
# echo ‘postgresql_enable=”YES”‘ >> /etc/rc.conf
# /usr/local/etc/rc.d/postgresql initdb
# passwd pgsql
# su – pgsql
$ createuser -P -s -e XXXX (创建一个新的超级用户)

安装phpPgAdmin
# cd /usr/ports/databases/phppgadmin && make install clean
# ee /usr/local/etc/apache22/Includes/phppgadmin.conf

Alias /phppgadmin/ “/usr/local/www/phpPgAdmin/”

<Directory “/usr/local/www/phpPgAdmin/”>
Options none
AllowOverride Limit

Order Deny,Allow
Deny from all
#Allow from 127.0.0.1 .example.com
Allow from 127.0.0.1 192.168
#Allow from all
</Directory>

# ee /usr/local/www/phpPgAdmin/conf/config.inc.php

$conf[‘default_lang’] = ‘chinese-utf8-zh_CN’;

# apachectl restart

http://localhost/phppgadmin/

安装过程错误解决:
如果先安装了KDE3或者其他软件,再安装postgresql83可能会提示冲突终止安装,比如提示postgresql81-client冲突.
# cd /usr/ports/databases/postgresql81-client && make deinstall
卸载postgresql81-client再重新安装
如果有安装PHP5还要重新安装pgsql.so和pdo_pgsql.so
# cd /usr/ports/databases/php5-pgsql && make deinstall
# cd /usr/ports/lang/php5-extensions && make reinstall clean FORCE_PKG_REGISTER=YES

重启PGSQL
$ pg_ctl restart -D /usr/local/pgsql/data/
重载配置文件
$pg_ctl reload -D /usr/local/pgsql/data/

远程登录

postgresql.conf

listen_addresses = ‘*’

pg_hba.conf

hostssl all all 192.168.0.1/24 md5
hostssl all all 12.12.151.15/32 md5


免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/

安装FreeBSD

FreeBSD 7.0-RELEASE-i386

CD安装:7.0-RELEASE-i386-disc1.iso

Country Selection –> China
System Console Keymap –> USA ISO
FreeBSD/i386 7.0-RELEASE – Sysinstall Main Menu
–> Custom
  3. Partition 选择安装分区,多个硬盘要选择硬盘
    D 删除选择的分区
    A 自动分区,注意如果硬盘上有其他系统请注意!
    C 在选择的分区上创建FreeBSD
    Q 完成
    Install Boot Manager for drive 完成后要求选择启动
      Bootmgr 选择启动
      Standand 从FreeBSD启动
  4. Label 分区标记
    A 自动
    Q 完成
  5. Distributions 选择安装组件
    base
    kernels
    dict
    doc
    info
    man
    catman
    proflibs
    src >> All
    ports
    local
    需要桌面的再选择X.org
  6. Media 选择安装媒介
  7. Commit 开始安装
–>Configuration
  Networking
    –> Interfaces (选网卡,不选IPv6,选DHCP
    –> sshd
  Root Password
  Time Zone
退出安装,重启

安装后:
# ee /etc/portsnap.conf

SERVERNAME=portsnap.tw.FreeBSD.org

# portsnap fetch update
# portsnap extract

第一次使用可以 portsnap fetch extract
以后使用可以 portsnap fetch update
如果写在cron可以用 portsnap cron update

# ee /root/.cshrc

setenv EDITOR ee
set prompt = “%B%n@%m[%/]# “

%B(粗體字)
%n(UserName)
%m(HostName)
%/(目前所在的路徑)

# ee /etc/csh.cshrc

set prompt = “%B%n@%m[%/]% “

# source /etc/csh.cshrc
# source ~/.cshrc
# adduser

# ee /etc/make.conf

MASTER_SITE_BACKUP?=\
ftp://ftp.cn.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\
ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\
ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}

绑IP
# ee /etc/rc.conf

ifconfig_rl0=”inet X.X.X.X netmask 255.255.255.0″ //IP地址
defaultrouter=”X.X.X.X” //网关地址
hostname=”mywebsite.com”

# ee /etc/resolv.conf

search mywebsite.com
nameserver 218.85.157.99 //DNS地址


免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/

安装Apache2.2

FreeBSD 7.0-RELEASE-i386

# cd /usr/ports/www/apache22 && make install clean
# cd /usr/ports/www/awstats && make install clean 安装awstats的过程
# cd /usr/ports/sysutils/cronolog && make install clean

# ee /usr/local/etc/apache22/httpd.conf

Line 143: Set Administrator’s email address
Line 152: Uncomment, set machine.name.com for the ServerName
Line 205: Options All,AllowOverride All (.htaccess)
Line 323: For cgi-bin, Options FollowSymLinks ExecCGI
配置cronolog:
Line236: ErrorLog “|/usr/local/sbin/cronolog /var/log/apache/www.mysite.com/%Y%m/httpd-error_%Y%m%d.log”
Line271: CustomLog “|/usr/local/sbin/cronolog /var/log/apache/www.mysite.com/%Y%m/httpd-access_%Y%m%d.log” combined
# mkdir -m 777 /var/log/apache
# mkdir -m 777 /var/log/apache/www.mysite.com

# echo ‘apache22_enable=”YES”‘ >> /etc/rc.conf
# echo ‘apache22ssl_enable=”YES”‘ >> /etc/rc.conf

# apachectl configtest
# apachectl start

安装过程错误解决:
先安装Xorg和KDE后再安装Apache22,可能会出现安装错误提示:

===> Installing for apache-2.2.9

===> apache-2.2.9 conflicts with installed package(s):
apr-db42-1.2.8_2

They install files into the same place.
Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/apache22.
*** Error code 1

Stop in /usr/ports/www/apache22.

解决方法如下:

# cd /usr/ports/www/apache22
# make config
选择 APR_FROM_PORTS (第一个)
# make install clean

启动错误解决:
No such file or directory: Failed to enable the ‘httpready’ Accept Filter

# echo ‘accf_data_load=”YES”‘ >> /etc/rc.conf
# echo ‘accf_http_load=”YES”‘ >> /etc/rc.conf

mod_unique_id: unable to find IPv4 address of “#########” on Failed

关闭mod_unique_id.so

#LoadModule unique_id_module libexec/apache22/mod_unique_id.so

虚拟主机
# ee /usr/local/etc/apache22/extra/httpd-vhosts.conf

NameVirtualHost *:80

<virtualhost *:80>
ServerAdmin webmaster@mywebsite.org
DocumentRoot “/usr/local/www/apache22/data”
ServerName mywebsite.org
ErrorLog “|/usr/local/sbin/cronolog /var/log/apache/mywebsite.org/%Y%m/httpd-error_%Y%m%d.log”
CustomLog “|/usr/local/sbin/cronolog /var/log/apache/mywebsite.org/%Y%m/httpd-access_%Y%m%d.log” combined
Redirect 301 / http://www.mywebsite.com/
</virtualhost>

<virtualhost *:80>
ServerAdmin webmaster@mywebsite.com
DocumentRoot “/usr/local/www/apache22/data/mywebsite.com”
ServerName www.mywebsite.com
ServerAlias *.mywebsite.com
#ErrorLog “/var/log/dummy-host.example.com-error_log”
#CustomLog “/var/log/dummy-host.example.com-access_log” common
ErrorLog “|/usr/local/sbin/cronolog /var/log/apache/mywebsite.com/%Y%m/httpd-error_%Y%m%d.log”
CustomLog “|/usr/local/sbin/cronolog /var/log/apache/mywebsite.com/%Y%m/httpd-access_%Y%m%d.log” combined
</virtualhost>


免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/

安装PHP5

FreeBSD 7.0-RELEASE-i386

# cd /usr/ports/lang/php5 && make install clean

Options: CLI, APACHE, IPV6

# cd /usr/ports/devel/pear && make install clean
# cd /usr/ports/lang/php5-extensions && make install clean

Options:
  • bz2
  • calendar
  • curl
  • DBA
  • dom
  • FILTER
  • ftp
  • gd
  • gettext
  • HASH
  • iconv
  • imap
  • JSON
  • ldap
  • mbstring
  • mcrypt
  • mhash
  • mysql
  • mysqli
  • openssl
  • pcre
  • pdf
  • pdo
  • PDO_SQLITE
  • pgsql
  • posix
  • pspell
  • READLINE
  • session
  • simplexml
  • SNMP
  • soap
  • sockets
  • SPL
  • sqlite
  • tidy
  • tokenizer
  • wddx
  • XML
  • xmlreader
  • xmlrpc
  • xmlwriter
  • yaz
  • zip
  • zlib

(安装期间,如果Tidy出错,直接删除Tidy即可
# cd /usr/ports/www/tidy && make deinstall)

# cd /usr/ports/databases/php5-pdo_pgsql && make install clean
# cd /usr/ports/databases/php5-pdo_mysql && make install clean

# cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini
# chmod 644 /usr/local/etc/php.ini
# ee /usr/local/etc/php.ini

修改528行 include_path = “.:/usr/local/share/pear”

# ee /usr/local/etc/apache22/httpd.conf

第363行加入:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
修改219行:
<IfModule dir_module>
DirectoryIndex index.php index.html index.htm
</IfModule>

# mkdir -m 755 /usr/local/www/apache22/data/test
# ee /usr/local/www/apache22/data/test/info.php

<?php
phpinfo();
?>

# cd /usr/ports/databases/memcached && make install clean
# cd /usr/ports/databases/pecl-memcache && make install clean
# echo ‘memcached_enable=”YES”‘ >> /etc/rc.conf

# apachectl restart


免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/

【Graphic】how to start the first account! Apply to English (en) users.

1、Click into the “Voucher Input”。

2、Start the “Voucher Input” 。

Points:

  1. The date of importation of empty or 0 is the “Opening” of data.
  2. Voucher, for any characters, can neither be empty nor more than 24 bytes.
  3. Abstract can not be chosen.
  4. Remark also can not be filled.
  5. If your browser supports JavaScript, click on the “Add a line” then you can enter the same token number of data.

莫不令仪,莫不令德

诗经.小雅.南有嘉鱼之什.湛露

湛湛露斯,匪阳不曦。厌厌夜饮,不醉无归。
湛湛露斯,在彼丰草。厌厌夜饮,在宗载考。
湛湛露斯,在彼杞棘。显允君子,莫不令德。
其桐其椅,其实离离。岂弟君子,莫不令仪。

关于域名

“在线记账”从2004年开始至今,最早的域名是Gooot.com,2007年开始才将域名改为KeepAccounts.com(Keep Accounts == 记账)。

为了一些人的访问习惯,Gooot.com域名仍然可以使用,将重定向到KeepAccounts.com。

另外,我们还有一部分域名都可以重定向到KeepAccounts.com,他们都是与Keep Accounts相关的。

  1. keepaccounts.net
  2. keepaccounts.org