Warning: Undefined array key "cperpage" in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 255

Warning: Undefined variable $output in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 325

Warning: Undefined variable $fixed_tags in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 326

Warning: Undefined variable $isshowdots in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 327

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 330

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 333

Warning: Undefined variable $tag_aditional in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 336

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Undefined variable $post in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Attempt to read property "ID" on null in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345

Warning: Undefined variable $more_text_link in /www/wwwroot/www.now163.com/wp-content/themes/twentytwentyfive/functions.php on line 345
理想社会 – 第 6 页 – 记载我的成功之路

博客

  • 解决安装msn时出现0x80072ee6的错误方法

    到官网下载了一个在线安装程序,可是一运行就提示无法安装,显示错误:0x80072ee6。

    (更多…)

  • iptables开启ftp规则

    设置了iptables的禁止所有的端口,只容许可能访问了策略后大部分情况下会出现ftp不能正常访问的问题,因为ftp有主动和被动连接两种模式,少添加一些策略就会出问题。
    首先要加载ftp模块

    modprobe ip_conntrack_ftp
    modprobe ip_nat_ftp

    然后加载策略

    iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -I INPUT -p tcp --dport 21 -j ACCEPT
    iptables -I OUTPUT -p tcp --dport 21 -j ACCEPT

    要是不想每次都加载模块的话 那就要修改/etc/sysconfig/iptables-config
    添加ip_conntrack_ftp ip_nat_ftp 2个模块 保存退出就ok了

    本文出自 “mcshell学习博客” 博客,请务必保留此出处http://mcshell.blog.51cto.com/803455/396125

  • 用awk统计正在连接的ip

    方法一

    netstat -antp | awk -F"[ :]+" '/80/{a[$6]}END{for(i in a)print i|"sort -n"}'

    方法二

    netstat -antp | grep 80 | awk '{print $5}' | cut -d":" -f1 | sort -n | awk -F'.' '!a[$NF]++'
    netstat -antp | grep 80 | awk '{print $5}' | cut -d":" -f1 | sort -n | awk -F'.' '!a[$NF]++' | wc -l
  • 解决linux下mp3乱码问题

    只需要把mp3标签里面用gbk、gb18030、big5等编码存储的中文内容修改为Unicode编码,那么基本上所有Linux下的播放器都能正常识别mp3标签了。

    安装Mutagen
    yum install python-mutagen

    #转换mp3文件所在的目录下,执行:
    mid3iconv -e gbk *.mp3

    #转换当前目录下所有mp3文件(包括子目录)执行:
    find . -iname “*.mp3” -execdir mid3iconv -e gbk {} ;

  • Centos5.5下搭建Seedbox

    之前转过一篇关于利用vps来刷pt流量的帖子,里面繁琐的编译安装着实麻烦。很多鞋童看着都头大。
    今天无意间发现transmission更新到2.22。 令人兴奋的是竟然有了rpm安装包。下面我就说说如何安装transmission的rpm包吧。

    Built on CentOS 5.5 i386 (libevent 2.0.10 compiled with “make verify” disabled):
    如果你的系统是32位的,就下载以下5个文件。
    (更多…)

  • Netstat命令详解 如何关闭TIME_WAIT连接 如何查看nginx的访问流量

    做计算机管理员,我们都必要了解一下netstat这个命令,它是一个查看网络连接状态的工具,在windows下也默认有这个工具。
    Netstat命令详解 netstat命令怎样使用 如何关闭TIME_WAIT连接 如何统计web服务器的访问量 如果查看nginx的访问流量?

    下面我们来看看它主要的用法和详解!
    (netstat -na 命令),本文主要是说Linux下的netstat工具,然后详细说明一下各种网络连接状态。
    netstat -nat |awk ‘{print $6}’|sort|uniq -c|sort -nr
    1.netstat命令详解
    其实我常用的是 netstat -tnl | grep 443 (查看443端口是否被占用),如果有当前是root用户,我喜欢用netstat -pnl | grep 443 (还可显示出占用本机443端口的进程PID)。 (更多…)

  • Linux下Inotify + Rsync文件实时同步

    一、使用前言*

    随着公司业务的发展,单web服务器不能满足用户的访问,需要增加多台web服务器实现均衡高可用性访问。为了统一各web服务器之间的数据随时一致,人工方式肯定是不可取,考虑到需要实时同步,进而采用inotify+rsync的方案进行同步!

    配置环境:centos 5.3 x86_64

    rsync版本:rsync-0.3.7

    inotify版本:inotify-tools-3.14

    服务器端:192.168.2.79 【也是rsync+inotify服务端】

    客户端:192.168.2.100 【需要同步,保持数据一致的服务器】 (更多…)

  • 你见,或者不见我

    你见,或者不见我
    我就在那里
    不悲不喜

    你念,或者不念我
    情就在那里
    不来不去

    你爱,或者不爱我
    爱就在那里
    不增不减

    你跟,或者不跟我
    我的手就在你手里
    不舍不弃

    来我的怀里
    或者
    让我住进你的心里

    默然 相爱

    寂静 欢喜

  • 特殊的shell变量

    特殊的shell变量:

    $0 获取当前执行的shell脚本的文件名
    $n 获取当前执行的shell脚本的第n个参数值,n=1..9
    $* 获取当前shell的所有参数 “$1 $2 $3 …注意与$#的区别
    $# 获取当前shell命令行中参数的总个数
    $$ 获取当前shell的进程号(PID)
    $! 执行上一个指令的PID
    $? 获取执行的上一个指令的返回值(0 为成功, 非零为失败)
    $@ 这个程序的所有参数 “$1″ “$2″ “$3″ “…” (更多…)

  • 已编译php的情况下,动态添加ftp扩展

    编译php时没有加载ftp扩展 ,有什么方法么
    已经在使用了
    现在已经在跑网站了
    编译php时没有加载ftp扩展 ,有什么方法么
    能不在重新编译的情况下解决么
    现在对方向要ftp 支持图片上传

    # cd /usr/local/src/php-5.2.13/ext/ftp 进入源码目录的相应扩展模块文件夹
    # /usr/local/php-5.2.13/bin/phpize 进入编译好的php相关目录,调用phpize程序生成编译配置文件 (更多…)