發表文章

目前顯示的是有「FreeBSD」標籤的文章

利用 FreeBSD Ports 架設 Joomla3!

這裡大部份資料參考 Joomla3! 的官方網頁來翻譯,我配合我想要的 FreeBSD 的 OS 及軟體版本,稍微修改了一下。 https://docs.joomla.org/FreeBSD_Installation Pre-requisites Computer running FreeBSD. Ports directory downloaded from CVSUP or Portsnap. Knowledge on installing ports. Desktop Environment installed. Logged on to your DE as regular user. Notes This is just a quickstart guide; it does not deal with security settings, performance tuning, etc and therefore should not be used to set up a production server. This will be a local install. You MUST install via the ports because several packages lack vital settings. Preperations Open a terminal and log on as root. Installing Apache Server Execute the following commands to install your webserver. cd /usr/ports/www/apache24 make config Make any configuration changes you need to here. You need to enable MYSQL. make install clean Other options dialogs may pop up, make changes as you need. In most cases the defaults are just fine. When done, add the foll...

於 FreeBSD 7.2 安裝學務系統與Nopam

圖片
FreeBSD 7.2-RELEASE 學務系統暨Nopam架設記錄 Description : 所有軟體安裝皆採用 ports 安裝,軟體安裝前已先更新過 ports tree。 Environment : *OS:FreeBSD 7.2 Release * mysql-server-5.4.2:/usr/ports/database/mysql54-server * apache-2.2.13:/usr/ports/www/apache22 * php4-4.4.0:/usr/ports/lang/php4 進行時間校正︰ #ntpdate  clock.stdtime.gov.tw 設定make.conf FreeBSD為您預先設置了個 make.conf 檔案,它的位置在 /usr/share/examples/etc/make.conf,請將 它複製一份成為 /etc/make.conf。 #cp /usr/share/examples/etc/make.conf /etc/make.conf #vi /etc/make.conf MASTER_SITE_BACKUP?= \ ftp://ftp4.tw.freebsd.org/pub/FreeBSD/ports/distfiles/$ {DIST_SUBDIR}/\ ftp://ftp3.tw.freebsd.org/pub/FreeBSD/ports/distfiles/$ {DIST_SUBDIR}/\ ftp://ftp6.tw.freebsd.org/pub/FreeBSD/ports/distfiles/$ {DIST_SUBDIR}/\ ftp://ftp8.tw.freebsd.org/pub/FreeBSD/ports/distfiles/$ {DIST_SUBDIR}/ MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP} /etc/make.conf 這個檔案其實並非一定要存在的,沒有它的存在,您一樣能使用您的 FreeBSD,但是如果您使用了它,相信您會更加方便的。由 make.conf 這個檔案名稱中,我們不難聯想到與 make 這個編譯指令有關。我們可以將一些固定使用的 make 參數給加進這個 make 參數設置檔裡頭,像是針對所使用的中央處...

FreeBSD 系統安全

伺服器常被踹,除了防火牆外,從 TCP Wrappers 來防堵吧! 修改 /etc/hosts.allow sshd : ALL except 221.238.145.257 192.168.1.0/255.255.255.0 \ : spawn=(echo `date` - %u@%h[%a] attempted to access %s|/usr/bin/mail -s "%a[%h] access sshd" \ admin@tshes.tcc.edu.tw) & \ : deny sshd : ALL : allow 除了 221.238.145.257 以及 192.168.1.0/255.255.255.0 網域,其它地方的 connections 一律拒絕,並且發信通知網管人員。

FreeBSD 基本環境設定

我一直懶得去學 Linux 的原因就是 FreeBSD 的軟體安裝機制 ports。 首先,將 csup 的有關的三個設定範例檔 copy 到 root 家目錄。 %cp /usr/share/examples/cvsup/ports-supfile /root/ %cp /usr/share/examples/cvsup/stable-supfile /root/ %cp /usr/share/examples/cvsup/doc-supfile /root/ 將三個檔案中預設的 csup 站台,改成我慣用的 cvsup4.tw.FreeBSD.org(速度較快) 將 *host=CHANGE_THIS.FreeBSD.org 改為 *default host=cvsup4.tw.FreeBSD.org 開始下載安裝 ports、source 及說明文件。 %csup -g -L 2 /root/ports-supfile %csup -g -L 2 /root/stable-supfile %csup -g -L 2 /root/doc-supfile 如果不改範例檔,可直接指定 host 來安裝。 # csup -L 2 -h cvsup4.tw.FreeBSD.org /usr/share/examples/cvsup/ports-supfile 1. 遙控主機 /etc/rc.conf 要啟動 sshd,先在 /etc/rc.conf 中做設定: sshd_enable="YES" 直接將預設的文字抓出來修改比較快。 # grep 'sshd_eanble' /etc/defaults/rc.conf >> /etc/rc.conf 然後執行 # /etc/rc.d/sshd restart rc.conf 必須先有 sshd_enable="YES" 的設定,sshd 才能真的啟動。 如果只是想單純啟動sshd的話,可以不管  rc.conf 有無設定,直接啟動 sshd # /etc/rc.d/sshd onerestart 利用: # /etc/rc.d/sshd rcvar 這用來檢查 rc.conf 中關於 sshd 的設定,以及sshd有無啟動,大部分其它的 daemons的...