服务器简单开设OpenVZ(OpenVZ Web Panel)

VPS都是主机商开设的,那么我们可不可以自己买个服务器开VPS玩呢?找来一个闲置的服务器,简单的实施了这个过程。另外,我使用的是免费的面板,因为一些功能方面不够完善,是不适合拿来卖的,这点请务必留意。如果只是自用,直接用vzctl命令开设也是非常简单的,但是没有图形化的界面,使用了免费的面板来开设和管理。

准备工作:独立服务器1台

以root登陆我们的服务器,首先,我们需要安装OpenVZ

1.关闭SELinux

编辑vim /etc/sysconfig/selinux 修改为: SELINUX=disabled SELINUXTYPE=targeted

2.关闭iptables防火墙或者开启防火墙3000端口

假如您的服务器iptables规则已经做了限定,您可以暂时关闭iptables,或者提前打开3000端口

iptables -I INPUT -p tcp ?dport 3000 -j ACCEPT /etc/rc.d/init.d/iptables save /etc/init.d/iptables restart

3.开始安装OpenVZ

cd /etc/yum.repos.d wget http://download.openvz.org/openvz.repo wget http://download.openvz.org/RPM-GPG-Key-OpenVZ rpm ?import RPM-GPG-Key-OpenVZ yum update yum install vzkernel

4.修改 /etc/sysctl.conf文件

vi /etc/sysctl.conf

留意下面的部分,参照修改

net.ipv4.ip_forward = 1 net.ipv4.conf.default.proxy_arp = 0 net.ipv4.conf.all.rp_filter = 1 kernel.sysrq = 1 net.ipv4.conf.default.send_redirects = 1 net.ipv4.conf.all.send_redirects = 0 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.default.forwarding = 1

然后生效。

sysctl ?p

重启服务器

reboot

5.安装OpenVZ面板(OpenVZ Web Panel)

wget -O ? http://ovz-web-panel.googlecode.com/svn/installer/ai.sh | sh

(附官方安装及升级指引:http://code.google.com/p/ovz-web-panel/wiki/Installation)

6.登陆面板及管理

安装完成后,使用IP+端口3000登陆,默认管理用户和密码均为admin。

openvz-web-panel

面板的使用就非常简单了,不习惯英文的朋友还可以找个汉化包来耍。

 

原文地址: http://www.zrblog.net/6545.html

文章评论已关闭