小心別讓日子把你給混了

          光榮在于平淡...艱巨在于漫長...
          posts - 26, comments - 7, trackbacks - 0, articles - 1
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          Linux命令筆記

          Posted on 2010-04-24 01:18 60 閱讀(348) 評論(0)  編輯  收藏 所屬分類: Linux筆記
          查看操作系統信息
          cat /proc/version

          查看rpm安裝列表
          rpm -qa |grep sql
          rpm 卸載
          rpm -e 查到的名字

          ulimit -SHn 51200
          pcre安裝
           
          ./configure --prefix=/usr/local/pcre --enable-shared --enable-static
          nginx 安裝
          ./configure --prefix=/usr/local/nginx --with-pcre=[pcre的安裝文件] --with-http_stub_status_module  --user=www --group=www

          啟動mysql
          /usr/local/mysql/bin/mysqld_safe --user=mysql --datadir=/usr/local/hdd2/mysql/data

          安裝jpeg
          ./configure --prefix=/usr/local/jpeg/ --enable-shared --enable-static


          安裝png
          ./configure --prefix=/usr/local/libpng/ --enable-shared --enable-static

          安裝gd

          ./configure --prefix=/usr/local/gd --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/jpeg --with-zlib=/usr/local/zlib

          php
          ./configure --prefix=/usr/local/php --enable-fastcgi --enable-fpm --enable-mbstring=LANG --with-mysql=/usr/local/mysql --with-gd=/usr/local/gd --with-libxml-dir=/usr/local/libxml --with-zlib-dir=/usr/local/zlib with-gettext=/usr/local/gettext --enable-debug=no --enable-ftp=no --with-config-file-path=/usr/local/php  --with-jpeg-dir=/usr/local/jpeg   --with-ttf --with-freetype-dir=/usr/local/freetype   --with-png-dir=/usr/local/libpng  --with-iconv --enable-force-cgi-redirect
          升級
          gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1

          eaccelerator 安裝
          ./configure --enable-eaccelerator --with-php-config=/usr/local/php/bin/php-config


          優化linux
          vi /etc/sysctl.conf
          生效 /sbin/sysctl -p
          net.ipv4.tcp_fin_timeout = 30
          net.ipv4.tcp_keepalive_time = 300
          net.ipv4.tcp_syncookies = 1
          net.ipv4.tcp_tw_reuse = 1
          net.ipv4.tcp_tw_recycle = 1
          net.ipv4.ip_local_port_range = 5000    65000

          查看網絡流量
          watch -n 1 "/sbin/ifconfig eth0 | grep bytes"
          vnstat -u -tr -i eth0

          防火墻設置
          [root@localhost php]# cat /etc/sysconfig/iptables
          # Firewall configuration written by system-config-securitylevel
          # Manual customization of this file is not recommended.
          *filter
          :INPUT ACCEPT [0:0]
          :FORWARD ACCEPT [0:0]
          :OUTPUT ACCEPT [0:0]
          :RH-Firewall-1-INPUT - [0:0]
          -A INPUT -j RH-Firewall-1-INPUT
          -A FORWARD -j RH-Firewall-1-INPUT
          -A RH-Firewall-1-INPUT -i lo -j ACCEPT
          -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT

          -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
          -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
          -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
          -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
          COMMIT

          主站蜘蛛池模板: 襄汾县| 潞西市| 原平市| 饶阳县| 乌苏市| 汕尾市| 济宁市| 马龙县| 佛学| 台湾省| 万盛区| 南充市| 西峡县| 高安市| 厦门市| 旌德县| 贡山| 嘉峪关市| 东源县| 武乡县| 琼海市| 灵丘县| 延安市| 霞浦县| 师宗县| 迭部县| 左云县| 新乡县| 陆丰市| 萨迦县| 民勤县| 凤阳县| 原阳县| 保靖县| 宣恩县| 长兴县| 通州市| 龙游县| 铁岭市| 建瓯市| 泗洪县|