Linux教程網
作者:jackbillow
安裝前的准備工作:
1.更新你的服務器時間:
ntpdate -b
2.更新ports:
cd /usr/share/examples/cvsup
cvsup -g -L 2 ports-supfile
cvsup -g -L 2 stable-supfile
cvsup -g -L 2 www-supfile
3.更新bash:
pkg_add -r bash
4.安裝perl(在5.6以上):
cd /usr/ports/lang/perl5.8
make & make install
5.安裝裝是用的wget:
cd /usr/ports/ftp/wget
make & make install
開始安裝:
下載vhcs2 for freebsd 下的ports源程序,有兩個版本:
vhcs2-prealpha-port-2.4.7.1-20060502.tar.gz
vhcs2-whole-port-2.4.6-20060502.tar.gz(vhcs2.4.6)
我下載是2.4.6的,因為2.4.7的還有一些bug沒有fixed的。
1. 解壓vhcs2需要的proftpd服務:
cd /usr/ports/ftp
tar xvfz /proftpd-vhcs2.tar.gz
2. 解壓vhcs2需要的courier-imap服務:
cd /usr/ports/mail
tar xvfz /courier-imap-vhcs2.tar.gz
3.解壓vhcs2需要的postfix服務:
cd /usr/ports/mail
tar xvfz /postfix-vhcs2.tar.gz
4.解壓vhcs2源程序:
cd /usr/ports/www
tar xvfz /vhcs.tar.gz
5.開始編譯安裝vhcs2:
cd vhcs
make && make install
這個過程需要的時間比較成。因為編譯安裝的東西多。請耐心等待完成。
6.上面編譯安裝完成後,沒有什麼error,進入下步,系統會提示:
apache2_enable="YES"
courier_authdaemond_enable="YES"
courier_imap_imapd_enable="YES"
courier_imap_pop3d_enable="YES"
mysql_enable="YES"
proftpd_enable="YES"
sendmail_enable="NONE"
vhcsd_enable="YES"
named_enable="YES"
(2)編輯/etc/pam.d/ftpd文件,在裡面添加下面的行:
(3)編輯/etc/pam.d/imap文件,在裡面添加下面的行:
(4)然後在做一個2個軟連接:
cd /usr/local/etc/rc.d
ln -s /usr/local/sbin/postfix postfix.sh
cd /usr/local/etc/rc.d/
ln -s /usr/local/etc/rc.d/courier-authlib courier-authlib.sh
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
(7)啟動mysql服務,修改mysql密碼:
/usr/local/etc/rc.d/mysql-server.sh start
mysqladmin -u root password
(8)運行如下命令開始安裝vhcs2:
make setup
7.下面就象在debian,ubuntn上安裝的界面一樣:
出現提示,根據提示輸入你的相關信息:
輸入服務器的hostname:
Please enter system hostname (Enter for defaults) (tangra):
輸入服務器的ip地址,建議用內網的ip,比較安全:
Please enter system network address (Enter for defaults) (192.168.0.1):
輸入mysql服務器地址,默認是本機:
Please enter SQL server host (Enter for defaults) (localhost):
輸入用於vhcs2系統的msyql數據庫的名字,默認是vhcs2:
Please enter system SQL database (Enter for defaults) (vhcs2):
輸入訪問mysql數據庫的用戶名:
Please enter system SQL user (Enter for defaults) (root):
輸入訪問mysql數據庫用戶名對應的密碼:
Please enter system SQL password (Enter for defaults) (none):
輸入登陸vhcs2系統的管理員用戶名:
Please enter administrator login name (Enter for defaults) (admin):
輸入登陸vhcs2系統的管理員密碼:
Please enter administrator password:
輸入管理員的email地址:
Please enter admininistrator email address:
注:阿根廷的vhcs2 for freebsd的包提示:
--------------------------------------------------------------------------------
WARNING - WARNING - WARNING!!!
Please, DO NOT USE IN PRODUCTION SERVERS!!!
This code is an initial release, and it needs a deep-in testing.
Use it at your OWN risk.
--------------------------------------------------------------------------------
呵呵,不用理它,配置成功,把安全做好!對於做虛擬主機的成本很低的!
Copyright ©
Linux教程網 All Rights Reserved