日志标签 ‘linux’

做cdn的电信网通ip的地址分配表下载。

2010年1月16日

ScanMon的旗下的网站因为服务器设在美国加州,国内的用户访问速度很慢,网络迟延在200ms 左右已经到了最理想的状态(美国到中国的跨海光缆距离过长)。

一般电信/网通用户访问美国站点网络数 据传输所走的路线先是本地ISP网络,然后是城域网,接着是各省市网络节点,然后是骨干网,最后从上海等出口出去,跨越一万多公里的浩瀚太平洋后,在美国 加州/俄勒冈州登陆。网络延时(latency)在200ms以上。很多人误认为GFW的网络过滤会影响网速,但事实上这种影响可以忽略不计的,网络延时 在200ms以上主要还是在于传输距离太长,日本/澳大利亚网民的对美网络延时和大陆用户差不多的,而欧洲用户跨越大西洋一般在100ms以上。如果是你 是移动用户的话,带宽资源想对于两大巨头要少的可怜,移动用户一般是先南下到香港连接NTT的节点,然后绕道日本达到美国,网络延时达到了惊人的七八百毫 秒。 » 阅读更多: 做cdn的电信网通ip的地址分配表下载。

schroot – chroot for any users

2010年1月7日

From manpages: schroot allows the user to run a command or a login shell in a chroot environment. If no command is specified, a login shell will be started in the user current working directory inside the chroot.

I’ve been trying some virtual machines solutions to execute some programs 32bits in my machine. But it’s take very time, start a xen VM or virtualbox. Often this solutions needs some maintain additional costs to setup a X server to run any X-based program.

» 阅读更多: schroot – chroot for any users

OpenSSH logging with ChrootDirectory

2010年1月7日

Finally following up on the previous article on the subject, I found some time to investigate logging what happens in an internal-sftp session using rsyslog.

Making syslog available in the chroot

Simply create a dev directory in each one of the chosen user chroot directories.

# mkdir /home/user/dev

Configuring rsyslog to probe the new logging source

Simply drop the following contents in /etc/rsyslog.d/sshd.conf :

# Create an additional socket for some of the sshd chrooted users.
$AddUnixListenSocket /var/fileserv/dev/log

# Log internal-sftp in a separate file
:programname, isequal, "internal-sftp" -/var/log/sftp.log
:programname, isequal, "internal-sftp" ~

 » 阅读更多: OpenSSH logging with ChrootDirectory

Linux: rm 删除文件太多出错的问题解决

2010年1月6日

Linux: rm and the ‘Argument list too long’ error message.

假设你要删除的目录中的词’spam’开头的所有文件:

[root@yoursite filter]# rm spam*
bash: /bin/rm: Argument list too long

错误: 这发生在您试图删除一个目录在同一时间太多的文件-它似乎是有极限的….

为了解决这个问题

使用  ‘find’ 到 管道来匹配文件到 ‘rm’,一次一个

[root@yoursite filter]# find . -name ’spam*’ | xargs rm

问题解决:本文来自鹏鹏工作室月影鹏鹏 http://jk.scanmon.com

» 阅读更多: Linux: rm 删除文件太多出错的问题解决

Linux下加载模块命令

2009年12月21日

» 阅读更多: Linux下加载模块命令

用Secure CRT来传输文件

2009年12月21日

» 阅读更多: 用Secure CRT来传输文件

tmpfs介绍 虚拟内存文件系统

2009年12月21日

» 阅读更多: tmpfs介绍 虚拟内存文件系统

linux 挂在windows 共享 假死状态解决

2009年12月21日

» 阅读更多: linux 挂在windows 共享 假死状态解决

如何取消cron的邮件通知

2009年12月21日

» 阅读更多: 如何取消cron的邮件通知

linux脚本对日志分析

2009年12月21日

» 阅读更多: linux脚本对日志分析