Vhcs 2.4.7 For Debian 3.1
olylinux:花了一天时间,挺爽的开源虚拟主机管理平台
参考文章地址:
http://www.debianhelp.co.uk/vhcs.htm
我也不做翻译了,呵呵,懒了些,一天忙的事情多,也太累了。命令部分和修改部分我用颜色分开
①首先安装DEBIAN系统,ISO文件名称为 debian-31r2-i386-netinst.iso
②安装过程不用多说了,这里说个大概的:
(参考:http://holz.byethost15.com/node/256)
启动输入 linux26 以 2.6 内核开始安装基本系统 (以下方法经过本人测试 2.4 内核依然完全符合)
语言选择英文
国家/地区选择 other->asia->china
键盘选一般为第一个 英语
主机名选 olylinux (A记录)
域名选 china.com (域名)
在最后安装过程中如下提示 图一 -》 图二
确定后,图三
以root身份登陆系统
重新启动系统后即进入 图四
默认进入系统ROOT密码为空 可以利用passwd 修改密码
同时无法SSH连接
我们先:
配置 apt 并更新系统
使用 cn99 的源
wget http://debian.cn99.com/sources.list.sarge.cn99
mv /etc/apt/sources.list /etc/apt/sources.list.old
mv sources.list.sarge.cn99 /etc/apt/sources.list
vi /etc/apt/sources.list
将 sources.list 文件中所有 testing 的项目全部注释,如果决定不用源代码编译,将所有 deb-src 项目也注释。
更新系统
apt-get update
apt-get upgrade
安装SSH
apt-get install ssh
在 Exim 配置中选择不配置。
在更新完毕后有了新的内核,重新启动系统。
配置网络
IP 地址
vi /etc/network/interfaces (其实在安装ISO过程中我们可以顺便设置了IP地址)
修改为以下内容:
# /etc/network/interfaces — configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 服务器IP
netmask 子网掩码
network 网络地址
broadcast 广播地址
gateway 网关地址
解析
vi /etc/resolv.conf
修改为下面的内容:
search olylinux
nameserver DNSIP
nameserver DNSIP
主机
vi /etc/hosts
修改为下面的内容:
127.0.0.1 localhost.localdomain localhost
服务器IP olylinux.china.com olylinux
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
设置主机名并重启网络
echo olylinux.china.com > /etc/hostname
/bin/hostname -F /etc/hostname
/etc/init.d/networking restart
安装一些支持软件 (此步建议一次性装完)
apt-get install bzip2 rdate fetchmail libdb3++-dev unzip zip ncftp xlispstat libarchive-zip-perl zlib1g-dev libpopt-dev nmap openssl fileutils
删除一些无用软件(此步伐可以放心去KILL掉)
apt-get –purge remove lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig
update-rc.d -f exim remove
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
/etc/init.d/inetd reload
接下来我们安装必须的支持包
(可以将以下全部复制一起安装,假如:当我们在安装 libmime-base64-perl 时会出现提示 perl 5.8.???提示,可以将其换为
libmime-base32-perl)
apt-get install postfix postfix-tls proftpd-mysql courier-authdaemon courier-base courier-imap courier-maildrop courier-pop libberkeleydb-perl libc-dev 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 iptables libmcrypt4 mysql-client-4.1 mysql-common-4.1 mysql-server-4.1 patch php4 php4-mcrypt php4-mysql php4-pear procmail libterm-readpassword-perl libsasl2-modules libsasl2 sasl2-bin apache2 apache2-common apache2-mpm-prefork libapache2-mod-php4 gawk libgd1g make gcc
配置 Courier 时选 No
配置 Postfix 时选 Internet Site, Mail 处输入 root,在 sync updates 处选 No
配置 MySQL 选择 Standalone
服务安装完毕后,MYSQL APACHE等已经启动了
接下来我们要为MYSQL设置密码,安全第一啊
mysqladmin -u root password olylinuxolylinux
mysql -u root -p
create database vhcs2;
use vhcs2;
grant all privileges on *.* to ‘olylinux’@'localhost’ identified by ‘olylinuxolylinux’ with grant option;
\q
每次都会装个 apache 1,因为决定使用 apache 2,所以KILL掉 (安装ubuntu时不用此操作)
apt-get remove apache-common
———————————————————————————————–
(来源:http://holz.byethost15.com/node/257)
配置 MySQL 和 Apache2
加入密码
mysql -u root -p
use mysql
update user set password=password(”新的密码”) where user=”root”;
flush privileges;
\q
修改 MySQL 配置文件
vi /etc/mysql/my.cnf
查找 skip-external-locking, 在下面添加一行:
max_connections = 2000
修改 Apache 配置文件
vi /etc/apache2/apache2.conf
查找 MaxKeepAliveRequests ,将其改成
MaxKeepAliveRequests 1000
下方添加:
ServerLimit 5000
稍下方可以看到:
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 20
MaxRequestsPerChild 0
修改如下(maxclients的大小请根据你的服务器性能来定,主要取决于ram的大小,一般512M可以改为300,
1G改为 700, 2G改为 1200):
StartServers 10
MinSpareServers 10
MaxSpareServers 15
MaxClients 1000
MaxRequestsPerChild 50000
————————————————————————————————————
(来源:http://holz.byethost15.com/node/258)
tar -xjvf vhcs2.4.7.1.tar.bz2
cd vhcs2.4.7.1
cd configs
vi vhcs2.conf
DEFAULT_ADMIN_ADDRES = olylinux@126.com
SERVER_HOSTNAME = olylinux.china.com
BASE_SERVER_IP = 服务器IP
DATABASE_TYPE = mysql
DATABASE_HOST = localhost
DATABASE_NAME = vhcs2
DATABASE_PASSWORD = olylinuxolylinux
DATABASE_USER = olylinux
cd .. (返回vhcs2所在目录)
make install (if command not found run ‘apt-get install make’)
cd /tmp/vhcs2*
cp -R * /
cd /var/www/vhcs2/engine/setup
./vhcs2-setup (install script)
Code:
Wlecome 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]: 服务器主机名
Please enter system network address (Enter for defaults) [192.168.0.128]: 服务器IP
Please enter SQL server host (Enter for defaults) [localhost]:这里为默认 本地
Please enter system SQL database (Enter for defaults) [vhcs2]: vhcs2 (这里输入VHCS数据库名)
Please enter system SQL user (Enter for defaults) [root]: olylinux (这里输入VHCS数据库用户)
Please enter system SQL password (Enter for defaults) [none]: olylinuxolylinux (这里输入VHCS数据库用户密码)
Please repeat system SQL password: olylinuxolylinux(确认密码)
Please enter VHCS ftp SQL user (Enter for defaults) [vftp]: vftp(输入FTP默认数据库名)
Please enter VHCS ftp SQL user password (Enter for defaults) [none]: vftpvftp(输入FTP密码,建议设置复杂密码)
Please repeat VHCS ftp SQL user password: vftpvftp(再次输入FTP密码)
Please enter administrator login name (Enter for defaults) [admin]:默认为admin
Please enter administrator password: 输入管理员密码
Please repeat administrator password: 重复输入管理员密码
Please enter admininistrator email address: olylinux@126.com
echo “Include /etc/apache2/sites-available/vhcs2.conf” >> /etc/apache2/httpd.conf
echo “ServerName olylinux.china.com” >> /etc/apache2/httpd.conf
(forgotten in install script)
sh /etc/init.d/apache2 restart
vi /etc/init.d/courier-authdaemon
Code:
${libexecdir}/authlib/authdaemon stop (找到此行)
killall authdaemond.plain (替换为此)
sh /etc/init.d/courier-authdaemon restart
vi /etc/resolv.conf (添加到文件顶部)
Code:
nameserver DNSIP
ln -s /etc/init.d/vhcs2_daemon /etc/rc2.d/S98vhcs
chmod -R 766 /var/www/vhcs2/gui/tools
到这里全部OK
可以输入
http://olylinux.china.com
访问
其他:
已经装完了,非常可惜的是是英文的,不用担心,好心的朋友已经给我们做了简体中文和繁体中文了
从主机管理平台登陆,找到语言那一栏,首先选择 chinese 然后 save后,在从下方导入解压后的中文txt文件即可
Posted: 十一月 1st, 2006 under 学习资料.
Comments
Comment from Dynamic shilling
Time 2007年10月18日 at 4:31 下午
Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent. Calvin Coolidge
Comment from mewling department
Time 2007年10月18日 at 8:42 下午
You ask me if I keep a notebook to record my great ideas I’ve only ever had one — Albert Einstein
Comment from mewling alternative
Time 2007年10月19日 at 5:54 下午
All sorts of computer errors are now turning up You’d be surprised to know the number of doctors who claim they are treating pregnant men — Isaac Asimov
Comment from guts-griping advertising
Time 2007年10月22日 at 3:22 上午
There’s no trick to being a humorist when you have the whole government working for you — Will Rogers (1879-1935)
Comment from sheep-biting musician
Time 2007年10月23日 at 9:16 下午
To laugh often and much; to win the respect of intelligent people and the affection of children; to earn the appreciation of honest critics and endure the betrayal of false friends; to appreciate beauty, to find the best in others; to leave the world a bit better, whether by a healthy child, a garden patch or a redeemed social condition; to know even one life has breathed easier because you have lived. This is to have succeeded.
Comment from fawning hip
Time 2007年10月23日 at 10:15 下午
That is the saving grace of humor, if you fail no one is laughing at you — A Whitney Brown
Comment from honorable nip
Time 2008年02月21日 at 12:12 上午
The only one listening to both sides of an argument is the neighbor in the next apartment — unknown
We must all hear the universal call to like your neighbor like you like to be liked yourself — George W Bush
The secret of creativity is knowing how to hide your sources — Albert Einstein
A great many people think they are thinking when they are merely rearranging their prejudices — William James
Comment from nefarious claw
Time 2008年02月21日 at 8:24 上午
Am I lightheaded because I’m not dead or because I’m still alive? — Heidi Sandige
All I need to make a comedy is a park, a policeman and a pretty girl — Charlie Chaplin (1889-1977), in My Autobiography (1964)
A child of five could understand this Fetch me a child of five — Groucho Marx
I’m desperately trying to figure out why kamikaze pilots wore helmets — Dave Edison
Trackback from Bill109286285′,’974127177billy@msn.com’,”,’97.154.15.74′,’2008-06-12 05:51:07′,’2008-06-12 05:51:07′,”,’0′,’lynx’,'comment’,'0′,’0′),(’0′, ”, ”, ”, ”, ‘2008-06-13 05:51:07′, ‘2008-06-13 05:51:07′, ”, ’spam’, ”, ‘comment’, ‘0′,’0′ ) /*
Time 2008年06月12日 at 4:58 上午
None…
None…
Trackback from Bill278617141′,’828943720billy@msn.com’,”,’198.42.20.30′,’2008-06-12 15:41:46′,’2008-06-12 15:41:46′,”,’0′,’lynx’,'comment’,'0′,’0′),(’0′, ”, ”, ”, ”, ‘2008-06-13 15:41:46′, ‘2008-06-13 15:41:46′, ”, ’spam’, ”, ‘comment’, ‘0′,’0′ ) /*
Time 2008年06月12日 at 2:49 下午
None…
None…
Comment from jackbillow
Time 2006年11月26日 at 5:22 下午
写的不错!
那为兄弟配置vhcs,联系我qq:13903080 msn: yhc_hai@hotmail.com