time make -j3 buildworld
.......
>>> World build completed on Sat Jan 10 19:04:49 CST 2009
--------------------------------------------------------------
9292.395u 2229.234s 3:22:56.44 94.6% -1214+1043k 58595+5062io 5663pf+8w
真是慢到爆炸了……
軟體開發、伺服器和生活瑣事
time make -j3 buildworld
.......
>>> World build completed on Sat Jan 10 19:04:49 CST 2009
--------------------------------------------------------------
9292.395u 2229.234s 3:22:56.44 94.6% -1214+1043k 58595+5062io 5663pf+8w
真是慢到爆炸了……
FreeBSD 復原使用者帳號資料庫:
pwd_mkdb
vipw
Virtual Host 的功能是能讓你將不同的 domain name 對到同一台機器上,但是能依照不同的 domain 來顯示不同的資訊。例如你擁有這三個網址:
http://www.zeroplex.orz/
http://mail.zeroplex.orz/
http://game.zeroplex.orz/
但是你可以讓這些網址全部連到同一台機器,但是根據網址不同,讓一個看到的是首頁、一個是電子郵件服務、另一個是遊戲下載。
Apache 有提供這項功能 (之後簡稱 vhost),只要把設定檔後面一段語法的注解取消掉就可以了。
/usr/local/etc/apache22/httpd.conf :
# Virtual hosts
Include etc/apache22/extra/httpd-vhosts.conf
設定檔大概會長的像這個樣子:
<VirtualHost *:80>
ServerAdmin your.mail@mail.com
DocumentRoot /www/game/
ServerName game.zeroplex.orz
ErrorLog /var/log/http-error_log
CustomLog /var/log/http-access_log common
</VirtualHost>
vhost 設定好了以後不要忘記設定資料夾的權限:
<VirtualHost *:80>
ServerAdmin your.mail@mail.com
DocumentRoot /www/game/
ServerName game.zeroplex.orz
ErrorLog /var/log/http-error_log
CustomLog /var/log/http-access_log common
<Directory "/www/game/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
存檔以後 appachectl restart 即可。
當你有多個 vhost 時,使用這個方法會讓你的設定檔落落長,之後要修改也會變的非常麻煩。cookys 提供了一個不錯的管理方法,先在 httpd.conf 中加上:
Include /usr/local/etc/apache22/vhosts/*.conf
之後把所有設定檔存放在 vhosts 目錄下即可:
www.zeroplex.orz.conf
mail.zeroplex.orz.conf
game.zeroplex.orz.conf
參考資料:
http://httpd.apache.org/docs/1.3/vhosts/
http://wiki.debian.org.hk/w/Virtual_hosting_with_Apache
#PF conf
device pf
device pflog
device pfsync#ALTQ conf
options ALTQ
options ALTQ_CBQ # Class Bases Queuing (CBQ)
options ALTQ_RED # Random Early Detection (RED)
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC)
options ALTQ_PRIQ # Priority Queuing (PRIQ)
options ALTQ_NOPCC # Required for SMP build