特殊:Badtitle/NS100:VHCS/zh
![]() |
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/VHCS }} |
![]() |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/af | • {{#if: UbuntuHelp:VHCS|Afrikaans| [[::VHCS/zh/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ar | • {{#if: UbuntuHelp:VHCS|العربية| [[::VHCS/zh/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/az | • {{#if: UbuntuHelp:VHCS|azərbaycanca| [[::VHCS/zh/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/bcc | • {{#if: UbuntuHelp:VHCS|جهلسری بلوچی| [[::VHCS/zh/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/bg | • {{#if: UbuntuHelp:VHCS|български| [[::VHCS/zh/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/br | • {{#if: UbuntuHelp:VHCS|brezhoneg| [[::VHCS/zh/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ca | • {{#if: UbuntuHelp:VHCS|català| [[::VHCS/zh/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/cs | • {{#if: UbuntuHelp:VHCS|čeština| [[::VHCS/zh/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/de | • {{#if: UbuntuHelp:VHCS|Deutsch| [[::VHCS/zh/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/el | • {{#if: UbuntuHelp:VHCS|Ελληνικά| [[::VHCS/zh/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/es | • {{#if: UbuntuHelp:VHCS|español| [[::VHCS/zh/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/fa | • {{#if: UbuntuHelp:VHCS|فارسی| [[::VHCS/zh/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/fi | • {{#if: UbuntuHelp:VHCS|suomi| [[::VHCS/zh/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/fr | • {{#if: UbuntuHelp:VHCS|français| [[::VHCS/zh/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/gu | • {{#if: UbuntuHelp:VHCS|ગુજરાતી| [[::VHCS/zh/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/he | • {{#if: UbuntuHelp:VHCS|עברית| [[::VHCS/zh/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/hu | • {{#if: UbuntuHelp:VHCS|magyar| [[::VHCS/zh/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/id | • {{#if: UbuntuHelp:VHCS|Bahasa Indonesia| [[::VHCS/zh/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/it | • {{#if: UbuntuHelp:VHCS|italiano| [[::VHCS/zh/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ja | • {{#if: UbuntuHelp:VHCS|日本語| [[::VHCS/zh/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ko | • {{#if: UbuntuHelp:VHCS|한국어| [[::VHCS/zh/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ksh | • {{#if: UbuntuHelp:VHCS|Ripoarisch| [[::VHCS/zh/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/mr | • {{#if: UbuntuHelp:VHCS|मराठी| [[::VHCS/zh/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ms | • {{#if: UbuntuHelp:VHCS|Bahasa Melayu| [[::VHCS/zh/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/nl | • {{#if: UbuntuHelp:VHCS|Nederlands| [[::VHCS/zh/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/no | • {{#if: UbuntuHelp:VHCS|norsk| [[::VHCS/zh/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/oc | • {{#if: UbuntuHelp:VHCS|occitan| [[::VHCS/zh/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/pl | • {{#if: UbuntuHelp:VHCS|polski| [[::VHCS/zh/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/pt | • {{#if: UbuntuHelp:VHCS|português| [[::VHCS/zh/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ro | • {{#if: UbuntuHelp:VHCS|română| [[::VHCS/zh/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/ru | • {{#if: UbuntuHelp:VHCS|русский| [[::VHCS/zh/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/si | • {{#if: UbuntuHelp:VHCS|සිංහල| [[::VHCS/zh/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/sq | • {{#if: UbuntuHelp:VHCS|shqip| [[::VHCS/zh/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/sr | • {{#if: UbuntuHelp:VHCS|српски / srpski| [[::VHCS/zh/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/sv | • {{#if: UbuntuHelp:VHCS|svenska| [[::VHCS/zh/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/th | • {{#if: UbuntuHelp:VHCS|ไทย| [[::VHCS/zh/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/tr | • {{#if: UbuntuHelp:VHCS|Türkçe| [[::VHCS/zh/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/vi | • {{#if: UbuntuHelp:VHCS|Tiếng Việt| [[::VHCS/zh/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/yue | • {{#if: UbuntuHelp:VHCS|粵語| [[::VHCS/zh/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/zh | • {{#if: UbuntuHelp:VHCS|中文| [[::VHCS/zh/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/zh-hans | • {{#if: UbuntuHelp:VHCS|中文(简体)| [[::VHCS/zh/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VHCS | UbuntuHelp:VHCS | {{#if: | :}}VHCS/zh}}/zh-hant | • {{#if: UbuntuHelp:VHCS|中文(繁體)| [[::VHCS/zh/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:VHCS|:VHCS/zh|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :VHCS/zh/zh | | {{#ifexist: VHCS/zh/zh | | {{#ifeq: {{#titleparts:VHCS/zh|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:VHCS/zh|1|-1|}} | zh | | }}
这个页面详细的说明在一台UBUNTU server的机器上安装VHCS,此帮助在新安装的ubuntu server系统中测试成功.
预备工作
创建基本工作目录
mkdir -p /tmp/vhcs_tmp/install cd /tmp/vhcs_tmp/install
删除一些不必要的软件包
apt-get remove ppp pppconfig pppoeconf ubuntu-standard
从inetd关闭一些不必要的服务
update-inetd --remove daytime update-inetd --remove telnet update-inetd --remove time update-inetd --remove finger update-inetd --remove talk update-inetd --remove ntalk update-inetd --remove ftp update-inetd --remove discard
软件包安装
先安装一些系统的基本软件包,供之后使用,下面命令写成一行:
apt-get install ssh postfix postfix-tls proftpd-mysql courier-authdaemon courier-base courier-imap courier-maildrop courier-pop libberkeleydb-perl libcrypt-blowfish-perl libcrypt-cbc-perl libcrypt-passwdmd5-perl libdate-calc-perl libdate-manip-perl libdbd-mysql-perl libdbi-perl libio-stringy-perl libmail-sendmail-perl libmailtools-perl libmd5-perl libmime-perl libnet-dns-perl libnet-netmask-perl libnet-perl libnet-smtp-server-perl libperl5.8 libsnmp-session-perl libterm-readkey-perl libtimedate-perl perl perl-base perl-modules bind9 diff gzip iptables libmcrypt4 mysql-client-5.0 mysql-common mysql-server-5.0 patch php5 php5-mcrypt php5-mysql php-pear procmail tar original-awk libterm-readpassword-perl libsasl2-modules libsasl2-2 sasl2-bin apache2 apache2.2-common apache2-mpm-prefork libapache2-mod-php5 bzip2 build-essential
如果出现一些问答,可以作如下回答:
"courier" - No "postfix" - defaults "proftpd" - standalone
相关界面如下:
数据库安装
安装mysql的密码
# mysql -u root > create database vhcs2; > use vhcs2 > grant all privileges on *.* to 'vhcs2'@'localhost' identified by 'vhcs2' with grant option; > \q
如果在进入数据库时出现:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
输换成:
#mysql -u root -p
下载并解压缩 VHCS2
下载 VHCS2 2.4.7.1:
# wget http://easynews.dl.sourceforge.net/sourceforge/vhcs/vhcs2-2.4.7.1.tar.bz2
解压后,进入VHCS所在目录:
# tar xjvf vhcs2-2.4.7.1.tar.bz2 # cd ./vhcs2-2.4.7.1
配置文件
编辑 configs/vhcs2.conf 修改以下几条:
DEFAULT_ADMIN_ADDRES = your email SERVER_HOSTNAME = your hostname BASE_SERVER_IP = your ip DATABASE_TYPE = mysql DATABASE_HOST = localhost DATABASE_NAME = vhcs2 DATABASE_PASSWORD = vhcs2 DATABASE_USER = vhcs2
如果你愿意,也可以修改下这一条:
DATE_FORMAT = m.d.Y
编译并创建 VHCS 列表
创建 VHCS 列表:
# make install
从/tmp/目录中把VHCS的文件列表复制到正确的目录中:
# cp -R /tmp/vhcs-2.4.7.1/* /
配置脚本
首先你要修复一些有问题的文件
- 编辑 /var/www/vhcs2/engine/vhcs2_common_code.pl
- 找到一下文本(有两个,都在1400行左右的位置,我在编辑的时候,一个是在1445行,一个是在1410行)
`key`=>$main::db_pass_key,
- 跟其后,增加以下一行
'keysize' => 32,
接下来运行配置文件:
# cd /var/www/vhcs2/engine/setup # ./vhcs2-setup
然后脚本开始运行,它会给你提一些问题,这个回答应该不难自己看着办:
Welcome to VHCS2 '2.4 Spartacus' Setup Dialog. This program will set up VHCS2 system on your server. Please press 'Enter' to continue. Please enter system hostname (Enter for defaults) [debian]: ''yourhostname'' Please enter system network address (Enter for defaults) [192.168.0.128]: ''your ipaddress'' Please enter SQL server host (Enter for defaults) [localhost]: Please enter system SQL database (Enter for defaults) [vhcs2]: ''vhcs2'' Please enter system SQL user (Enter for defaults) [root]: ''vhcs2'' Please enter system SQL password (Enter for defaults) [none]: ''vhcs2'' Please repeat system SQL password: ''vhcs2'' Please enter VHCS ftp SQL user (Enter for defaults) [vftp]: ''vftp'' Please enter VHCS ftp SQL user password (Enter for defaults) [none]: ''vftp'' Please repeat VHCS ftp SQL user password: ''vftp'' Please enter administrator login name (Enter for defaults) [admin]: Please enter administrator password: your password Please repeat administrator password: your password Please enter admininistrator email address: ''your email address''
有时候,会出这个问题,我就经常出,也不知道是为什么,如果你在配置的时候,知道为什么,赶紧说明后补上:
ERROR: File '/etc/vhcs2/vhcs2.conf' does not exist !
这个目录没创建起来,我也不知道为什么这个会没创建,但是这个时候,可以把当初解压过来的这个文件包复制到/etc/vhcs2目录.然后再编译就可以了.
安装自动脚本
首先添加vhcs2_daemon脚本以多用户启动。
# cp /etc/vhcs2/init.d/vhcs* /etc/init.d # cd /etc/rc2.d # update-rc.d vhcs2_daemon multiuser 92
This will make vhcs2_daemon script run at startup right after apache
最后修复
创建postfix目录
# cp -r /etc/vhcs2/postfix/vhcs2 /etc/postfix
进行管理
http://IP/vhcs2/
登录后是英文界面,使用下图方式改变其语言,VHCS默认是有中文语言包的.