怎样给Ubuntu VPS添加额外IP

Posted by zuzhihui in vps技术 on 2010/11/19 with No Comments

本文介绍怎样给Ubuntu/Debian VPS或者独立主机增加新的额外IP地址。

增加新IP需要知道的是新的IP地址和子网掩码,其他信息(比如网关)都不再需要了。假如需要增加的ip是177.252.202.179,子网掩码是255.255.255.248

Debian和Ubuntu Linux的网卡配置文件都是/etc/network/interfaces ,配置额外IP仅修改这个文件即可。

ssh登录到centos之后

cd /etc/network/
vi interfaces

然后在文件末位假如如下四行

auto eth0:1
iface eth0:1 inet static
address 177.252.202.179
netmask 255.255.255.248

然后保存退出,执行

ifup eth0:1

就可以启用174.252.202.179这个新增的ip

给centos vps添加额外的ip

Posted by yar999 in Linux技术 on 2010/11/18 with No Comments

本文介绍怎样给CentOS的VPS或者独立主机增加新的IP地址。

增加新IP需要知道的是新的IP地址和子网掩码,其他信息(比如网关)都不再需要了。假如需要增加的ip是177.252.202.179,子网掩码是255.255.255.248

在目录/etc/sysconfig/network-scripts/ 下面是一些网卡的配置文件,新增加一个额外IP地址,需要在这个目录下新增加一个新网卡配置文件。额外IP的网卡配置文件的文件名是有要求的,必须是ifcfg-eth0:XXXX的形式,其中eth0代表物理网卡,eth0:XXXX 代表是附加在这个物理网卡上的虚拟网卡,XXXX可以是1到4位的字符串,字符串内容可以包含任意字母和数字。

ssh登录到centos之后

cd /etc/sysconfig/network-scripts/
vi ifcfg-eth0:1

然后输入下面的内容

DEVICE=eth0:1
BOOTPROTO=static
IPADDR=177.252.202.179
NETMASK=255.255.255.248
ONBOOT=yes

然后保存退出,执行

ifup eth0:1

就可以启用177.252.202.179这个新增的ip

如果您需要增加第二个ip,您可以执行

vi ifcfg-eth0:2

然后输入,下面的内容

DEVICE=eth0:2
BOOTPROTO=static
IPADDR=177.252.202.179
NETMASK=255.255.255.248
ONBOOT=yes

然后执行下面的命令,启用177.252.202.179这个ip

ifup eth0:2

注意:

网卡配置文件中的变量名例如DEVICE等等,都需要大写。配置不同的网卡只需要修改
DEVICE(设备名字) IPADDR(ip地址) NETMASK(子网掩码)这3项就可以了

给windows vps 添加额外ip

Posted by yar999 in Windows技术 on 2010/11/15 with No Comments

给windows vps 增加一个额外的ip

需要增加的ip信息如下:

ip:192.168.1.77
子网掩码:255.255.255.0

您首先使用远程桌面连接登陆到服务器,右键点击桌面“网上邻居”—属性,弹出“网络连接”窗口:

在弹出的“网络连接”窗口中右键点击可用的“本地连接”—属性,弹出“本地连接 属性”窗口,同时将“本地连接 属性”窗口滚动条拉到最下端,查看到“Internet 协议 (TCP/IP)”:


双击“本地连接 属性”中“Internet 协议 (TCP/IP)”:

在“Internet 协议 (TCP/IP) 属性”点击“高级”选项,弹出“高级 TCP/IP 设置”:

在“IP设置”标签—“IP 地址”项中点击“添加”,弹出“TCP/IP 地址”窗口:

将新IP地址:192.168.1.77输入“IP地址”栏,子网掩码:255.255.255.0输入“子网掩码”栏。
。填写完毕点击“添加”按钮,然后一路确定下来,这样就添加好了新ip。如果您需要添加多个ip重复执行上面的操作即可。

怎样给VPS重装系统(Rebuild VPS)

Posted by zuzhihui in Linux技术 on 2010/11/11 with No Comments

瑞豪开源的VPS支持客户自主重装系统。VPS开通后,客户如果想给VPS重装一下系统,可以通过ras-shell进行自主重装。重装VPS需要客户熟悉ras-shell的操作,关于ras-shell详见 http://rashost.com/blog/ras-shell-manual

重装VPS之前,一定要备份自己VPS上的所有有用的数据,重装VPS会删除旧VPS上面的所有数据,不可恢复!

备份完数据之后,登录ras-shell,然后运行rebuild:

ras-shell(debian64.test) > rebuild
Do you want 32 bits or 64 bits Linux? We recommend to use 32 bits. 32 or 64 bits(32):

如果是想rebuild成32为的系统,直接回车,如果想rebuild成64为系统,在这里输入64即可。我们推荐使用32位的系统,32位是使用最普遍的,并且也省内存。

然后是选择操作系统,界面如下:

OS List:
0 : CentOS 5.5 (14M 760M 2.6.18)
1 : CentOS 5 with Kloxo (21M 1.2G 2.6.18)
2 : Debian 5 (12M 478M 2.6.26)
3 : Fedora 13 (14M 628M 2.6.33.4)
4 : Gentoo 2010.0 (15M 1.9G 2.6.31.6)
5 : Ubuntu 10.04 LTS (40M 508M 2.6.32)
6 : Ubuntu 10.10 (49M 510M 2.6.32)
Type the number of the OS:

在这里选择自己熟悉的Linux系统,输入系统的序号即可。需要解释的是,列表中每个Linux系统后面括号里都有3个数字,这3个数字分别表示这个操作系统新安装后占用的内存大小,磁盘大小,操作系统内核的版本号码。可以看出最省内存的是Debian 5,比较占用内存的是ubuntu,其他几种都差不多。

选择完操作系统后,ras-shell会让客户最后确认一次:

Rebuild the VPS will destroy all your data. Are you sure you want to destroy all the data and rebuild the VPS? (TRUE/FALSE) :

这时输入TRUE后就开始删除旧VPS然后rebuild了,如果数据还没有备份,或者此时后悔了,就不要输入TRUE。

几分钟后,VPS就rebuild好了,新VPS的密码会显示出来。如果需要把新密码发邮件给自己,输入mailpw命令即可。

windows配置了路由和远程访问服务之后workstation服务自动停止导致不能访问服务器的问题

Posted by yar999 in Windows技术 on 2010/11/10 with No Comments

windows配置了远程和路由访问之后workstation服务自动停止导致不能访问服务器的问题

安装360给系统打好补丁,然后开启arp防火墙,即可解决

kloxo下配置lighttpd下的zencart 1.3.9h基于ultimate seo urls插件的伪静态规则

Posted by yar999 in lighttpd on 2010/11/07 with No Comments

环境:
kloxo面板的lighttpd php mysql
zencart 1.3.9h
伪静态插件ultimate seo urls 2.101

zencart及ultimate seo urls插件的安装,网上有很多教程我们这里就不再赘述了。

您登录进kloxo之后,选择您的域名,然后在右边点 lighttpd地址重写规则 ,然后把下面的伪静态规则贴进去,然后点update。这样就配置好了lighttpd下的zencart基于ultimate seo urls插件的伪静态规则。
配置好规则之后您需要重启lighttpd才可以是伪静态规则生效。
怎么重启lighttpd,请参见http://rashost.com/blog/kloxo-newdomain

注意:
需要使用ultimate seo urls这个插件默认的seo.url.php文件,
如果您修改了seo.url.php则下面的规则无法工作
ultimate seo urls插件安装好的默认配置如下

登录zencart后台 -> Configuration -> SEO URLs -> Enter pages to allow rewrite


内容如下:
index, product_info, products_new, products_all, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4

ssh登录之后执行下面的命令升级lighttpd


yum update -y lighttpd
/etc/init.d/lighttpd restart

伪静态规则:

url.rewrite-if-not-file = (
"^/news$" => "index.php?main_page=news",
"^/page\.html\?chapter=(.*)&id=(.*)$"=>"/index.php?main_page=page&id=$2&chapter=$1",
"^/page\.html\?id=(.*)$"=>"/index.php?main_page=page&id=$1",
"^/(.*)-ezp-(.*)\.html(\?(.*))*$"=>"/index.php?main_page=page&id=$2",
"^/page_(.*)\.html$"=>"/index.php?main_page=page_$1",
"^/checkout\/cart\/(\?(.*))?$" => "/index.php?main_page=shopping_cart&$2",
"^/(.*)-p-(.*)\.html(\?(.*))?$" => "/index.php?main_page=product_info&products_id=$2&$4",
"^/(.*)-a-(.*)\.html(\?(.*))?$" => "index.php?main_page=news_article&article_id=$2&$4",
"^/(.*)-c-(.*)\.html(\?(.*))?$" => "/index.php?main_page=index&cPath=$2&$4",
"^/(.*)-pi-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=popup_image&pID=$2&$4",
"^/(.*)-m-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=index&manufacturers_id=$2&$4",
"^/(.*)-pr-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=product_reviews&product_id=$2&$4",
"^/(.*)-pri-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=product_reviews_info&product_id=$2&$4",
"^/checkout\/shipping_method\/(\?(.*))?$" => "/index.php?main_page=checkout_shipping&$2",
"^/news/archive/(.*)\.html$" => "/index.php?main_page=news_archive&date=$1",
"^/news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html(\?(.*))?$" => "index.php?main_page=news&date=$1-$2-$3&$4",
"^(.*)\.html(\?(.*))?$"=>"/index.php?main_page=$1&$3",
#"^(.*)\.html((.*))?$"=>"/index.php?main_page=$1&$3"
)

Back to Top

2007-2017 © 北京瑞豪开源科技有限公司 京ICP备13004995号-2