2012年2月:测试

© ㄒiger / Posted in 主机域名 / February 27, 2012

http://vpsforfree.com/topic/69-vpsforfree-faq-update-030212/

老外论坛的,必须发帖后申请。 注册超过3天。超过10个帖子 。活跃的会员。

保持vps的话每月必须有15帖子。、、


What are the pre requisites for registering a VPS?
You must have 10 legitimate posts or more to get a VPS Server.
You must be a registered member of VPS For Free for a minimum of three days (3 days)
In addition, we will only process your application once we feel that you are participating in the community actively and not a potential lecher.


What are the requirements for me to keep my VPS?
To keep the VPS you must:
Make at least 15 informative/helpful/useful posts per month.
All accounts will be subjected to review at the end of each month.


How long will I able to keep my VPS?
As long as you DO NOT infringe any of the TOS or Rules and regulations of VPSForFree.com, maintain
The requirements mentioned above and DO NOT gives us a valid reason to do so.


Can I request for an upgrade?
Not at the moment.

© ㄒiger / Posted in 程序代码 / February 27, 2012

用IP查询,IP段查询,可用IP数查询,查询IP段可用的IP数目

比如我们以前要添加125个IP(/25),每次都要去重新查下,在改写个脚本,次数多了觉得麻烦,直接写了个小程序,可自动生成windows/centos 批量添加IP的代码,可节约些时间。
http://www.ctohome.com/linux-vps-pack/ip.php
比如一次添加125个IP(172.203.46.128/25):
CentOS 系统里创建下面的配置文件,可直接绑定上述IP地址到网卡eth0
然后 service network restart 使之生效,能ping通就说明绑定成功了。说明:Linux批量添加IP:

vi /etc/sysconfig/network-scripts/ifcfg-eth0-range125

DEVICE=eth0
BOOTPROTO=static
CLONENUM_START=8
IPADDR_START=172.203.46.130
IPADDR_END=172.203.46.254
NETMASK=255.255.255.128
ONBOOT=yes


Windows 系统里面,请在DOS窗口下执行下面的命令,可批量添加IP地址。说明:Windows批量添加IP

DOS命令(复制,粘贴到你服务器的dos窗口,回车即可):

for /l %i in (130,1,254) do netsh interface ip add address "你机器的网卡名称" 172.203.46.%i 255.255.255.128

IP段中 子网掩码、网关 有什么作用?请看这里:

  1. 子网掩码作用:就是将某个IP地址划分成网络地址和主机地址两部分子网掩码的设定必须遵循一定的规则。
  2. 网关到底是什么:网关实质上是一个网络通向其他网络的IP地址。在没有路由器的情况下,两个网络之间是不能进行TCP/IP通信的,即使是两个网络连接在同一台交换机(或集线器)上,TCP/IP协议也会根据子网掩码(255.255.255.0)判定两个网络中的主机处在不同的网络里。而要实现这两个网络之间的通信,则必须通过网关。

© ㄒiger / Posted in 杂七杂八 / February 26, 2012

查看Centos 版本位数

getconf LONG_BIT

© ㄒiger / Posted in 主机域名 / February 25, 2012

TCMalloc(Thread-Caching Malloc)是google开发的开源工具──“google-perftools”(改成gperftools )中的成员。与标准的glibc库的malloc相比,TCMalloc在内存的分配上效率和速度要高得多,可以在很大程度上提高MYSQL服务器在高并发情况下的性能,降低系统负载。
为MySQL添加TCMalloc库的安装步骤(Linux环境):
1、64位操作系统请先安装libunwind库,32位操作系统不要安装。libunwind库为基于64位CPU和操作系统的程序提供了基本的堆栈辗转开解功能,其中包括用于输出堆栈跟踪的API、用于以编程方式辗转开解堆栈的API以及支持C++异常处理机制的API。

wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-alpha.tar.gz 
tar zxvf libunwind-0.99-alpha.tar.gz 
cd libunwind-0.99-alpha/ 
CFLAGS=-fPIC ./configure 
make CFLAGS=-fPIC 
make CFLAGS=-fPIC install

2、安装gperftools:

wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
tar zxvf  gperftools-2.0.tar.gz
cd gperftools-2.0/
./configure  
make && make install 
echo “/usr/local/lib” > /etc/ld.so.conf.d/usr_local_lib.conf 
/sbin/ldconfig

继续阅读全文... »

© ㄒiger / Posted in 主机域名 / February 25, 2012

123system.net dallas 15刀年付 192内存突发384内存 10G硬盘 500G流量

$15/Year (€11EUR) 192MB/384MB Burst  1 0GB HDD 500GB/Month

order link:https://123systems.net/billing/cart.php?a=add&pid=121

dallas一直很稳定。不折腾的话。很不错