小心別讓日子把你給混了

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

          Linux命令筆記

          Posted on 2010-04-24 01:18 60 閱讀(354) 評論(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

          主站蜘蛛池模板: 宁阳县| 丽水市| 桦南县| 郑州市| 磴口县| 定西市| 德庆县| 日照市| 合肥市| 博罗县| 张家口市| 成都市| 巫山县| 青河县| 宝清县| 清远市| 宁阳县| 封开县| 怀化市| 宜昌市| 巴林左旗| 河曲县| 宜宾市| 许昌县| 手游| 镇原县| 浙江省| 嘉黎县| 梅河口市| 宽城| 浦城县| 紫云| 定远县| 临颍县| 雅江县| 读书| 仪征市| 漳浦县| 凤冈县| 南部县| 平利县|