CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法
<span>到目前为止,Vtonf仅仅支持RedHat, Fedora, 和 CentOS(支持Debian正在计划中)。</span><p>
</p>
<p>
CentOS-5.4-i386系统(Vtonf不支持x86-64的系统,安装过程会出错,在其INSTALL中也有说明)</p>
<p>
<strong>1、关闭SELinux</strong></p>
<p>
打开setup界面–firewall configureation,将SELinux置为Disabled</p>
<p>
或修改</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
vi /etc/sysconfig/selinux</td>
</tr></tbody></table>
<p>
</p>
<p>
为</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
SELINUX=disabled<br>
SELINUXTYPE=targeted</td>
</tr></tbody></table>
<p>
</p>
<p>
2、Firewall</p>
<p>
如果不想关闭Firewall,需要打开8001端口:</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
/sbin/iptables -I INPUT -p tcp –dport 8001 -j ACCEPT<br>
/etc/rc.d/init.d/iptables save<br>
/etc/init.d/iptables restart</td>
</tr></tbody></table>
<p>
</p>
<p>
3、安装 OpenVZ</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
cd /etc/yum.repos.d<br>
wget http://download.openvz.org/openvz.repo<br>
rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ<br>
yum search ovzkernel <br>
yum -y install ovzkernel <br>
yum -y install vzctl vzquota</td>
</tr></tbody></table>
<p>
</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
vi /etc/sysctl.conf</td>
</tr></tbody></table>
<p>
</p>
<p>
修改或添加以下内容</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
net.ipv4.ip_forward = 1<br>
net.ipv4.conf.default.proxy_arp = 0<br>
net.ipv4.conf.all.rp_filter = 1<br>
kernel.sysrq = 1<br>
net.ipv4.conf.default.send_redirects = 1<br>
net.ipv4.conf.all.send_redirects = 0<br>
net.ipv4.icmp_echo_ignore_broadcasts=1<br>
net.ipv4.conf.default.forwarding=1</td>
</tr></tbody></table>
<p>
</p>
<p>
使之生效:</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
sysctl -p</td>
</tr></tbody></table>
<p>
</p>
<p>
重启系统</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
reboot</td>
</tr></tbody></table>
<p>
</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
uname -r</td>
</tr></tbody></table>
<p>
</p>
<p>
如果安装正常应该显示为:</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
2.6.18-164.15.1.el5.028stab068.9</td>
</tr></tbody></table>
<p>
</p>
<p>
4、安装Vtonf</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
yum -y install vzpkg expect</td>
</tr></tbody></table>
<p>
</p>
<p>
</p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
wget http://mesh.dl.sourceforge.net/sourceforge/vtonf/vtonfinstaller.1.0-beta1.tar.gz<br>
tar xvfz vtonfinstaller.1.0-beta1.tar.gz<br>
cd vtonfinstaller.1.0-beta1<br>
./install</td>
</tr></tbody></table>
<p>
</p>
<p>
会问你是否开始安装程序,输入yes</p>
<p>
Do you wish to start the installation procedure (y/n)? : <span>y</span><br>
Starting installation<br>
Please wait……………….</p>
<p align="center">
<img style="max-width:100%!important;height:auto!important;"title="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" alt="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" border="0" height="292" src="https://zhuji.jb51.net/uploads/img/20230519/49b18aabdf232820f5ebc9d4a0f12c2b.jpg" width="507"></p>
<p align="center">
<img style="max-width:100%!important;height:auto!important;"title="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" alt="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" border="0" height="291" src="https://zhuji.jb51.net/uploads/img/20230519/bf7c416848616b66ae687c53c4dca47c.jpg" width="511"></p>
<p align="center">
<img style="max-width:100%!important;height:auto!important;"title="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" alt="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" border="0" height="306" src="https://zhuji.jb51.net/uploads/img/20230519/d724bdda2fac1fc757fad5a6e3606d66.jpg" width="508"></p>
<p align="center">
<img style="max-width:100%!important;height:auto!important;"title="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" alt="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" border="0" height="300" src="https://zhuji.jb51.net/uploads/img/20230519/b33c34841e9f85eae20c4b37f1280b3d.jpg" width="503"></p>
<p align="center">
<img style="max-width:100%!important;height:auto!important;"title="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" alt="CentOS 5.4+OpenVZ+Vtonf实现VPS服务器的方法" border="0" height="292" src="https://zhuji.jb51.net/uploads/img/20230519/f810a941b3c11975cc91aa48c0bdd289.jpg" width="503"></p>
<p>
OK.安装完成。</p>
<p>
打开vtonf控制面板http://yourhostip:8001/</p>
<p>
输入安装过程中你设置的用户名和密码</p>
<p>
Login Name : admin</p>
<p>
Password :</p>
<p>
属于你自己的VPS已经呈现在你的眼前,晚些时候再把vtonf的使用方法弄出来。</p>
頁:
[1]