Posted in FreeBSD on Oct 29th, 2006
系統預設是不能使用 ipfw 指令,因為系統核心不支援,要使系統支援 ipfw,則需要修改核心
cd /usr/src/sys/i386/conf vi GENERIC
#在最後面加入
options IPFIREWALL options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=10 options [...]
Read Full Post »
Posted in Linux on Oct 28th, 2006
由於 redhat enterprise server 4 伺服器版本,沒有提供線上升級套件的功能yum
所以我利用 centos的yum/apt的server來更新
設定檔如下
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/4.4/os/$basearch/
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/4.4/updates/$basearch/
更新 yum 指令如下
yum的常用指令:
yum update [套件1] [套件2] [...]
更新套件,若後面不加任何的套件,則會更新所有系統目前已經安裝了的套件
yum install 套件1 [套件2] [...]
安裝套件
yum upgrade
[套件1] [套件2] [...]
升級套件,將一些過舊即將洮汰的套件也一起升級
yum remove 套件1 [套件2] [...]
移除套件
yum clean packages
清除暫存(/var/cache/yum)目錄下的套件
yum clean headers
清除暫存(/var/cache/yum)目錄下的 headers
yum clean oldheaders
清除暫存(/var/cache/yum)目錄下舊的 headers
yum clean 或是 yum clean all
清除暫存(/var/cache/yum)目錄下的套件及舊的 headers 等於是執行 yum clean packages [...]
Read Full Post »
Posted in Linux on Oct 22nd, 2006
因為在安裝 maple bbs 的時候 發現itoc的方式沒辦法解決開機自動執行
沒有 inetd.conf 也沒有 xinetd 的方式 ,所以利用下面方式才可以達成
我是增加一個檔案 /etc/init.d/bbsd
然後增加以下內容
--------------------------------------
#!/bin/sh
#
# MapleBBS
#
su bbs -c '/home/bbs/bin/camera'
su bbs -c '/home/bbs/bin/account'
/home/bbs/bin/bbsd
/home/bbs/bin/bmtad
/home/bbs/bin/bpop3d
/home/bbs/bin/gemd
/home/bbs/bin/bguard
/home/bbs/bin/xchatd
/home/bbs/innd/innbbsd
---------------------------------------
chmod 755 /etc/init.d/bbsd
然後 cd /etc
update-rc.d bbsd defaults 90
90為開機時的執行順序, 端看您如何設定.
update-rc.d會自動幫各個rcX.d目錄下建立一link至/etc/init.d/執行檔
或者是
update-rc.d iptables start 20 2 3 4 5 . stop 0 1 6 .
後面有一個點喔
2.3.4.5 是指 rcX.d 複製到底下 當開機run level 2.3.4.5 當開機run level的話才會執行 該執行檔
Read Full Post »
Posted in Linux, ubuntu on Oct 21st, 2006
ProFTPD Version 1.2.10
Mysql Version 4.1.0 支援 UTF8
請確定你的proftpd有支援sql module
proftpd -l | grep mysql
proftpd -l | grep sql
mod_sql.c
mod_sql_mysql.c
mod_quotatab_sql.c
確定有支援之後 再來就是建立mysql資料庫
* 建立 proftp 資料庫
CREATE DATABASE `ftp` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
* 建立使用者資料表
CREATE TABLE `ftp` (
`username` varchar( 60 ) DEFAULT NULL ,
`uid` int( 11 ) NOT NULL ,
`gid` int( 11 ) DEFAULT NULL ,
`password` varchar( 30 ) DEFAULT NULL [...]
Read Full Post »
Posted in FreeBSD on Oct 19th, 2006
安裝路徑
cd /usr/ports/www/awstats-devel/
安裝好之後 請在 httpd.conf 最後面加入
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "/usr/local/www/awstats/classes/"
Alias /awstatscss "/usr/local/www/awstats/css/"
Alias /awstatsicons "/usr/local/www/awstats/icons/"
ScriptAlias /awstats/ "/usr/local/www/awstats/cgi-bin/"
執行
/usr/local/www/awstats/tools/awstats_configure.pl
會出現錯誤訊息~
Error: Failed to open '/usr/local/www/awstats/wwwroot/cgi-bin/awstats.model.conf' for read.
Error: AWStats database directory defined in config file by 'DirData' parameter (/var/lib/awstats) does not exist or is not writable.
Setup ('/etc/awstats/awstats.192.168.100.244.conf' file, web server or permissions) may be wrong.
Check [...]
Read Full Post »