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
Linux – 第 7 页 – 理想社会

分类: Linux

  • Nginx 0.8.x + PHP 5.2.13(FastCGI)搭建胜过Apache十倍的Web服务器

    [文章作者:张宴 本文版本:v6.0 最后修改:2010.03.04 转载请注明原文链接:http://blog.s135.com/nginx_php_v6/]

    前言:本文是我撰写的关于搭建“Nginx + PHP(FastCGI)”Web服务器的第6篇文章。本系列文章作为国内最早详细介绍 Nginx + PHP 安装、配置、使用的资料之一,为推动 Nginx 在国内的发展产生了积极的作用。本文可能不断更新小版本,请记住原文链接“http://blog.s135.com/nginx_php_v6/”, 获取最新内容。第6篇文章主要介绍了Nginx 0.8.x新的平滑重启方式,将PHP升级到了5.2.13,修正了PEAR问题。另将MySQL 5.1.x升级到了5.5.x系列,配置文件变更较大。 (更多…)

  • Postfix 电子邮件系统精要(二)

    系统加固及安全

    1、内核优化:用脚本实现
    [root@mailserv2 ~]# more /usr/local/bin/kernel_optimize
    #!/bin/bash
    #kernel optimize optimize ,create by 2007-7-29
    #enable broadcast echo protection
    echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
    #disble source routed packets
    #for f in /proc/sys/net/ipv4/conf/*/accept_source_rout; do
    #    echo 0 > $f
    #done
    #enable tcp syn cookie protection
    echo 1 > /proc/sys/net/ipv4/tcp_syncookies
    #disable icmp redirect acceptance
    for f in /proc/sys/net/ipv4/conf/*/accept_redirects; do
    echo 0 > $f
    done
    #don’t send redirect messages
    for f in /proc/sys/net/ipv4/conf/*/send_redirects; do
    echo 0 > $f
    done
    #drop spoofed packets
    for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
    echo 1 > $f
    done
    #log packets with impossible addresses
    for f in /proc/sys/net/ipv4/conf/*/log_martians; do
    echo 1 > $f (更多…)
  • Linux下查看CPU使用率,系统资源使用情况.

    top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器。下面详细介绍它 的使用方法。
    top – 01:06:48 up 1:22, 1 user, load average: 0.06, 0.60, 0.48
    Tasks: 29 total, 1 running, 28 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.3% us, 1.0% sy, 0.0% ni, 98.7% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 191272k total, 173656k used, 17616k free, 22052k buffers
    Swap: 192772k total, 0k used, 192772k free, 123988k cached
    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1379 root 16 0 7976 2456 1980 S 0.7 1.3 0:11.03 sshd
    14704 root 16 0 2128 980 796 R 0.7 0.5 0:02.72 top
    1 root 16 0 1992 632 544 S 0.0 0.3 0:00.90 init
    2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
    3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 (更多…)
  • vi常用快捷键

    进入编辑模式:
    i 插入:在目前的游标所在处插入输入之文字,已存在的文字会向后退;
    a 增加:由目前游标所在的下一个字开始输入,已存在的文字会向后退:
    o 插入新的一行:从游标所在的下一行枝行首开始输入文字;
    r 取代:会取代游标所在的那一个字元;
    R 全部取代:会一直取代游标所在的文字,直到按下 ESC 为止;
    (更多…)

  • linux日志管理命令详解

    日志对于安全来说,非常重要,他记录了系统每天发生的各种各样的事情,你可以通过他来检查错误发生的原因,或者受到攻击时攻击者留下的痕迹。日志主要的功能有:审计和监测。他还可以实时的监测系统状态,监测和追踪侵入者等等。

    在Linux系统中,有三个主要的日志子系统:
    连接时间日志–由多个程序执行,把纪录写入到/var/log/wtmp和/var/run/utmp,login等程序更新wtmp和utmp文件,使系统管理员能够跟踪谁在何时登录到系统。

    进程统计–由系统内核执行。当一个进程终止时,为每个进程往进程统计文件(pacct或acct)中写一个纪录。进程统计的目的是为系统中的基本服务提供命令使用统计。
    (更多…)

  • RHEL5系统apache2启用ssl加密传输

    1、安装包
    Linux下要启用SSL,得有openssl包,以下是我RHEL5系统rpm安装的openssl:
    [root@pps software]# rpm -qa | grep ssl
    openssl-0.9.8b-8.3.el5
    openssl-devel-0.9.8b-8.3.el5
    下载最新版本的apache2(源码版本):
    [url]http://httpd.apache.org/download.cgi[/url]
    [root@pps software]# tar zxf httpd-2.2.11.tar.gz
    [root@pps httpd-2.2.11]# ./configure –enable-so –enable-ssl
    【注意】如果是编译安装的openssl,需要在再加 –with-ssl=/usr/local/openssl 选项
    [root@pps httpd-2.2.11]# make (更多…)
  • nagios运用飞信实现短信报警监控服务器

    此平台是基于apache2.2.1+php5.3.0+nagios3.1.2+fetion2009等软件的组合搭建而出,这些软件的版本是现阶段 最新的。本人经过一段时间的搭建与测试,各个功能都能够成功实现,现源于开源软件,本人却不敢独享,现把搭建与配置过程介绍如下:
    一、服务器端的设置
    1、下载需求软件:
    nagios主程序:
    nagios插件程序:
    apache程序:
    php程序:
  • web服务的iptables防火墙规则

    #!/bin/bash
    /sbin/modprobe ip_conntrac
    /sbin/modprobe ip_conntrack_ftp
    
    /sbin/iptables -F
    /sbin/iptables -X
    /sbin/iptables -P INPUT DROP
    /sbin/iptables -P FORWARD ACCEPT
    /sbin/iptables -P OUTPUT ACCEPT
    /sbin/iptables -A INPUT -i lo -j ACCEPT
    /sbin/iptables -A INPUT -p tcp --sport 21 -j ACCEPT
    /sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
    /sbin/iptables -A INPUT -p udp --dport 53 -j ACCEPT
    /sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    /sbin/iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  • RHEL5下用vsftpd搭建FTP服务器

    RPM安装包名:vsftpd-2.0.5-10.el5.i386.rpm
    #rpm –ivh vsftpd-2.0.5-10.el5.i386.rpm 安装rpm程序包
    #service vsftpd start  =/etc/init.d/vsftpd start 启动vsftpd服务
    #service vsftpd stop  =/etc/init.d/vsftpd stop 停止vsftpd服务
    #service vsftpd restart  =/etc/init.d/vsftpd restart 重启vsftpd服务
    #service vsftpd status  =/etc/init.d/vsftpd status 检查vsftpd服务状态
    # ntsysv #chkconfig –level 35 vsftpd on 更改服务自动加载 (更多…)
  • Linux面试题

    1. 在Linux系统中,以 文件 方式访问设备 。
    2. Linux内核引导时,从文件 /etc/fstab 中读取要加载的文件系统。
    3. Linux文件系统中每个文件用 i节点 来标识。
    4. 全部磁盘块由四个部分组成,分别为引导块 、专用块 、 i节点表块和数据存储块。
    5. 链接分为: 硬链接和符号链接 。
    6. 超级块包含了i节点表和空闲块表 等重要的文件系统信息。
    7. 某文件的权限为:drw-r–r–,用数值形式表示该权限,则该八进制数为: 644 ,该文件属性是 目录 。
    8. 前台起动的进程使用 Ctrl+c 终止。
    9. 静态路由设定后,若网络拓扑结构发生变化,需由系统管理员修改路由的设置。
    10. 网络管理的重要任务是: 控制和监控 。 (更多…)