Octopress 部落格

一個靜態網站的部落格框架

FreeBSD 更新程式的方式

用 pkg_version -v|grep needs 找出可以更新的程式, 找出來後,
如果要更新cvsup-without-gui , 請問要如何更新呢?

Ans:用pkg_version -vIL=找出可以更新的,
然後portupgrade cvsup-without-gui即可

FreeBSD 更新 Ports Tree

cvsup -g -L 2 /root/ports-supfile

/root/ports-supfile 的內容:

# $FreeBSD: src/share/examples/cvsup/ports-supfile,v 1.33.2.3 2007/09/10 17:29:34 gabor Exp $
#
# This file contains all of the “CVSup collections” that make up the
# FreeBSD-current ports collection.
#
# CVSup (CVS Update Protocol) allows you to download the latest CVS
# tree (or any branch of development therefrom) to your system easily
# and efficiently (far more so than with sup, which CVSup is aimed
# at replacing). If you’re running CVSup interactively, and are
# currently using an X display server, you should run CVSup as follows
# to keep your CVS tree up-to-date:
#
# cvsup ports-supfile
#
# If not running X, or invoking cvsup from a non-interactive script, then
# run it as follows:
#
# cvsup -g -L 2 ports-supfile
#
# You may wish to change some of the settings in this file to better
# suit your system:
#
# host=CHANGE_THIS.FreeBSD.org
# This specifies the server host which will supply the
# file updates. You must change it to one of the CVSup
# mirror sites listed in the FreeBSD Handbook at
# http://www.freebsd.org/doc/handbook/mirrors.html.
# You can override this setting on the command line
# with cvsup’s “-h host” option.
#
# base=/var/db
# This specifies the root where CVSup will store information
# about the collections you have transferred to your system.
# A setting of “/var/db” will generate this information in
# /var/db/sup. You can override the “base” setting on the
# command line with cvsup’s “-b base” option. This directory
# must exist in order to run CVSup.
#
# prefix=/usr
# This specifies where to place the requested files. A
# setting of “/usr” will place all of the files requested
# in “/usr/ports” (e.g., “/usr/ports/devel”, “/usr/ports/lang”).
# The prefix directory must exist in order to run CVSup.

# Defaults that apply to all the collections

#
# IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at http://www.freebsd.org/doc/handbook/mirrors.html.
*default host=cvsup.tw.freebsd.org
*default base=/usr
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix

# If you seem to be limited by CPU rather than network or disk bandwidth, try
# commenting out the following line. (Normally, today’s CPUs are fast enough
# that you want to run compression.)
*default compress

## Ports Collection.
#
# The easiest way to get the ports tree is to use the “ports-all”
# mega-collection. It includes all of the individual “ports-*”
# collections,
ports-all

# These are the individual collections that make up “ports-all”. If you
# use these, be sure to comment out “ports-all” above.
#
# Be sure to ALWAYS cvsup the ports-base collection if you use any of the
# other individual collections below. ports-base is a mandatory collection
# for the ports collection, and your ports may not build correctly if it
# is not kept up to date.
#ports-base
#ports-accessibility
#ports-arabic
#ports-archivers
#ports-astro
……… (略)

Apache 在 FreeBSD 上的安裝步驟

Apache2 在 FreeBSD 上安裝的步驟: (使用 Configure 方式安裝) :



1. Download httpd-2.2.10.tar.gz

2. tar xzvf httpd-2.2.10.tar.gz

3. cd httpd-2.2.10

4. /bin/sh ../httpd.configure.sh (先將要configure 的餐數設定為一個檔案)

5. make install

安裝完畢後, 執行

/usr/local/apache2/bin/apachectl start

Apache 即會啟動, 如果要停止, 執行

/usr/local/apache2/bin/apachectl stop

即會停止, 如果開始後想再次啟動,執行

/usr/local/apache2/bin/apachectl restart

即可再次啟動

以下列出為參考其他人使用的Apache configure 的參數設定:

#!/bin/bash
./configure –prefix=/usr/local/apache2 –infodir=/usr/local/apache2/info –mandir=/usr/local/apache2/man –enable-so –enable-MODULE=shared –enable-ssl –enable-mods-shared=most

Configure Glib20 時出現錯誤

今天在FreeBSD上面, Configure glib20 的時候, 出現錯誤!

後來上 IRC請教一些前輩後, 告知要在 /usr/ports/devel/glib20 下, make config中, 將選項移除後, 在 make clean 在make install clean , 就可以安裝了!!

FreeBSD 下用來上網安裝下載 KDE4 的方法

pkg_add -r http://ftp.ncnu.edu.tw/FreeBSD/ports/i386/packages/kde/kde4-4.1.1.tbz

之前先用 cvsup 的方式更新後, 再使用 ports 的方式安裝KDE4, 一直都無法安裝成功,

常常出現錯誤, 後來上IRC詢問後, 告知可以使用 PKG 的方式安裝看看~~

安裝 KDE 的方式可以參考 :

http://www.freebsd.org/doc/en/books/handbook/x11-wm.html

or

http://www.freebsd.org/doc/zh_TW/books/handbook/ports.html

應該可以用 # pkg_add -r kde4 這樣的方式安裝, 只是還沒有試過!!

新站如何加入Yahoo、Google及MSN等搜尋引擎

(PS:此文章轉貼自:http://tw.myblog.yahoo.com/luntailang-blog/article?mid=18&prev=19&next=13&l=a&fid=13 ) 綸太郎的無盡藏



新設立一個網站,尤其是部落格,最重要的宣傳動作,就是讓你的網站更容易被搜尋到,所以必須在各大入口網站,如「Yahoo」、「Google」及「MSN」等搜尋引擎登錄你的網址,如果你是一個商業性的部落格,灑點錢購買關鍵字廣告,或許可為,但作為一個小小的blogger格主,以綸太郎而言是不可能花錢去作這個動作的,所以當然要親力親為了,目前有哪些入口網站可以登錄的呢?
首先當然就是Google了,因為Google對部落格最友善,收錄的數量與速度大過Yahoo與MSN等搜尋引擎,以綸太郎的Yahoo部落格—「綸太郎的無盡藏」(http://tw.myblog.yahoo.com/luntailang-blog/) 而言,隔天Google就可以搜尋出我的網站,而Yahoo則是到第三天才有收錄,而MSN的搜尋引擎向來更新速度就像烏龜一樣慢,因為以我自己的其他網站在Google Analystic的分析結果,搜尋引擎來源以Google和Yahoo佔了90% 以上的佔有率,並不是說不要重視Msn,而是MSN比較注重商業性或是有指標性的網站,對於部落格使用者來說,或許不是那麼友善。
登錄網站就是要增加你的曝光率,讓網友在茫茫網海裡可以看到你的蹤影,以下搜尋引擎你都可以加入,但誠懇建議,如果你是個還在建置中的網站,沒有內容,或是只有一兩篇文,連部落格外觀都還沒搞定的就不要登錄,甚至連廣告都不要放,等稍具規模再來登錄,這樣搜尋引擎對你的收錄情形會較理想,這是綸太郎的經驗談,因為一開始收錄是收錄到其他網站對這個網站的連結,並非網站主體,所以會從其他網站的連結及內容文章開始收錄,而且以Yahoo部落格來說,我是後來才更新網址,所以收錄情形又有了變動。
● Google 登錄
在Google搜尋首頁下方有一個”Google完全手冊”,點進去就有這項服務”將您的內容提交給 Google “,選擇 新增 URL 至 Google 的索引 ,將你的網址(請輸入包含 http:// 的完整網址)填入,而網站名稱填入”說明”那欄即可,輸入驗證碼,按下新增網址即可,最快隔天就會出現,較慢的應該是一個禮拜。
如果你已被收錄而想要移除,可參見 “正在從 Google 的索引中移除我的內容”一文。
● Yahoo 登錄(需會員資格)
在首頁最下方,有一格是熱門分類,標題的右方就可以看到”網站登錄”這四個字,進入後點選”推薦網站給Yahoo!奇摩搜尋”,輸入url網址送出即可,記得登錄是需要有yahoo會員資格的,出現的速度比Google慢一些。
● MSN(Live Search)
在首頁上找不到可以登錄的地方,他是放在MSN LIVE的Live Search裡,如果想登錄,按下這個向 Live Search 登錄您的網站,輸入驗證碼及網址即可。
● yam天空(需填寫姓名、信箱)
在首頁左邊下方,有一格是”網站登錄”,進入後點選”如果您想新增登錄資料,請至 登錄網站”,這裡的登錄是需要填寫名字與信箱的,程序較為繁瑣,而且有一些相關規定,請看清楚再登錄,而且他有分門別類,讓你的網站在最適合的分類下出現,但以綸太郎的部落格兼具網路資訊與日本旅遊的綜合性網站,就只能選擇一種分類,對我而言是不太適合的,而且如果Yahoo及Google都有收錄的話,這裡一定也會收錄的。
● Google Blogger Search—Google網誌搜尋,有專門為部落格登錄的服務,Google Blog Search Ping Service,也可以登錄,只是更新速度比較慢。
其他如Hinet和新浪網Sina,好像沒有提供這樣的登錄服務,因為Hinet的搜索引擎來自Yahoo、Google及Live Search,而Sina則來自Google。
其實登錄只是一個開端,但是重要的是你要寫出有內容的文章,時常的更新,讓搜尋引擎機器人常常來找你,而且和其他網站的相互連結也是讓你的網站能見度提升的方法。
此篇文章大部分內容摘錄自0與1謎詭世界–如何宣傳你的網站—入口網站登錄,但這篇是去年9月寫的,一些情況都改變了,有些服務也消失了,因為自己最近也成立了新站,有感而發,把一些經驗寫下來,提供有同樣問題的網友參考。
後記:將此篇文章貼上FunP,果然Google對FunP是有愛好的,網站可被連結,但以網站來說變成Yahoo排名優先,想來在Google要展示頭角,推推王才是王道啊,Yahoo還是愛用自家產品,所以還是要成立分站,兩邊才不吃虧,慢慢努力吧。

KDE4 在 FreeBSD 安裝好後須如何執行 ?

For KDE3:

% echo “exec startkde” > ~/.xinitrc

For KDE4:

% echo “exec /usr/local/kde4/bin/startkde” > ~/.xinitrc

Now, whenever the X Window System is invoked with startx, KDE will be the desktop.

How to Upgrade FreeBSD 6.3 to 7.0 Stable Release

如何升級FreeBSD 6.3 to 7.0 的方法!!

(PS: 參考 http://www.cyberciti.biz/faq/howto-freebsd-server-upgrades/)

來至: http://www.to2100.idv.tw/?p=4641)
Step # 1: Upgrade ports

# portupgrade -faP

Step # 2: Download updated freebsd-update-upgrade tool

# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz.asc
# gpg –verify freebsd-update-upgrade.tgz.asc freebsd-update-upgrade.tgz
# tar -xf freebsd-update-upgrade.tgz
Step # 3: Start upgrade procedure

# sh freebsd-update.sh -f freebsd-update.conf -r 7.0-RELEASE upgrade
# sh freebsd-update.sh -f freebsd-update.conf install
# reboot
Step # 4: Install updated userland tools

# sh freebsd-update.sh -f freebsd-update.conf install
# portupgrade -faP
Step # 5: Remove all old libraries

# sh freebsd-update.sh -f freebsd-update.conf install
# reboot
Step # 6: Verify FreeBSD 7.0

# uname -a
# tail -f /var/log/messages
# tail -f /path/to/other/log/files
# egrep -i ‘error|warning’ /path/to/log/files
# sockstat -4 -l

更新 FreeBSD 6.x 版本的方式

1. freebsd-update upgrade -r 6.4-RC1

2. freebsd-update install

3. shutdown -r now

4. freebsd-update install

5. shutdown -r now