花蕾 發表於 2024-1-30 00:00:00

CentOS 5.4+OpenVZ+Vtonf打造VPS服务器的方法

<p>
        Vtonf是一款免费的基于web界面的控制面板(符合GPL),它可以管理OpenVz上虚拟专用服务器(VPS)。使用她甚至是那些有很少专业只是的用户也可以很简单地创建和管理OpenVZ上的虚拟机。到目前为止,Vtonf仅仅支持RedHat, Fedora, 和 CentOS(支持Debian正在计划中)。</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">
                                <p>
                                        <font color="#000000">vi /etc/sysconfig/selinux</font></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">
                                <p>
                                        <font color="#000000">SELINUX=disabled<br>
                                        SELINUXTYPE=targeted</font></p>
                        </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">
                                <p>
                                        /sbin/iptables -I INPUT -p tcp –dport 8001 -j ACCEPT<br>
                                        /etc/rc.d/init.d/iptables save<br>
                                        /etc/init.d/iptables restart</p>
                        </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">
                                <p>
                                        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</p>
                        </td>
                </tr></tbody></table>
<p>
         </p>
<p>
         </p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
                                <p>
                                        vi /etc/sysctl.conf</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">
                                <p>
                                        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</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">
                                <p>
                                        sysctl -p</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">
                                <p>
                                        reboot</p>
                        </td>
                </tr></tbody></table>
<p>
         </p>
<p>
         </p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
                                <p>
                                        uname -r</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">
                                <p>
                                        2.6.18-164.15.1.el5.028stab068.9</p>
                        </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">
                                <p>
                                        yum -y install vzpkg expect</p>
                        </td>
                </tr></tbody></table>
<p>
         </p>
<p>
         </p>
<table align="center" border="0" cellpadding="6" cellspacing="0" width="95%"><tbody><tr>
<td bgcolor="#ddedfb">
                                <p>
                                        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</p>
                        </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/b4e3051edd82012592c3a0bac46c0c37.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/fbe5f4049042b4c12372da6f9306b139.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/1d91cad54f0b23283be2506c40ae7225.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/9b54077ebad09e5490a05aea3d72f683.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/137b4042d6924d3cf00fbd00c22c4eea.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>
<p>
        原文地址:http://www.armysoul.org/archives/973.html</p>
頁: [1]
查看完整版本: CentOS 5.4+OpenVZ+Vtonf打造VPS服务器的方法