نمایش نتایج: از شماره 1 تا 9 , از مجموع 9

موضوع: Server Optimization Guide

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    عضو انجمن MelatHOST آواتار ها
    تاریخ عضویت
    Jan 2009
    محل سکونت
    رشت
    نوشته ها
    412
    تشکر تشکر کرده 
    81
    تشکر تشکر شده 
    330
    تشکر شده در
    232 پست

    پیش فرض Server Optimization Guide


    MySQL Optimization:
    BACKUP:
    cp /etc/my.cnf /etc/my.cnf.backup

    Use Pico (pico /etc/my.cnf) or Download via WinSCP for editing,
    Delete everything that is currently in the file and add the following...
    Code:

    [mysqld]
    port = 3306
    socket = /var/lib/mysql/mysql.sock
    skip-locking
    skip-innodb
    query_cache_limit=8M
    query_cache_size=256M
    query_cache_type=1
    max_connections=500
    max_user_connections=100
    interactive_timeout=60
    wait_timeout=60
    connect_timeout=30
    thread_cache_size=128
    key_buffer=16M
    join_buffer=1M
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=2M
    read_buffer_size=2M
    max_connect_errors=100
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency=2
    myisam_sort_buffer_size=64M
    #log-bin
    server-id=1

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [mysql]
    no-auto-rehash

    [isamchk]
    key_buffer = 256M
    sort_buffer_size = 256M
    read_buffer = 2M
    write_buffer = 2M

    [myisamchk]
    key_buffer = 256M
    sort_buffer_size = 256M
    read_buffer = 2M
    write_buffer = 2M

    [mysqlhotcopy]
    interactive-timeout

    To Save: CTRL-X
    Restart Service: "service mysqld restart" or "service mysql restart" or "/etc/rc.d/init.d/mysql restart"


    HTTP/APACHE Optimization:

    BACKUP:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.backup

    Use Pico (pico /usr/local/apache/conf/httpd.conf) or Download via WinSCP for editing,
    Change the following settings in your httpd.conf...

    Set "Timeout" value to "Timeout 60"
    Set "KeepAlive" to "KeepAlive on"
    Set "KeepAliveTimeout" to "KeepAliveTimeout 3"
    Set "MinSpareServers" to "MinSpareServers 16"
    Set "MaxSpareServers" to "MaxSpareServers 32"
    Set "MaxRequestsPerChild" to "MaxRequestsPerChild 256"
    Set "HostnameLookups" to "HostnameLookups Off"

    Note:
    These settings will not work under all server environments its recommended that you tweak around with the numbers until your web server is running 100% please read Apache documentation before changing any settings so you know what you are changing Documentation: Apache HTTP Server - The Apache HTTP Server Project

    To Save: CTRL-X
    Restart Service: "service httpd restart" or "/etc/rc.d/init.d/httpd restart"


    Installing eAccelerator:
    eAccelerator is a further development from mmcache PHP Accelerator & Encoder. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. eAccelerator - Trac

    If you run CPanel please visit eAccelerator auto installer - for cPanel : Hosting Security and Technology Tutorials : Web Hosting Talk for an auto-installer which will do all the hard work for you.

    Run the following in SSH.
    Code:

    cd /

    mkdir ea

    cd ea

    wget Download eAccelerator from SourceForge.net

    bunzip2 eaccelerator-0.9.5.tar.bz2
    tar -xvf eaccelerator-0.9.5.tar

    cd eaccelerator-0.9.5

    export PHP_PREFIX="/usr"

    $PHP_PREFIX/bin/phpize

    ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config

    make

    make install

    mkdir /phpcache

    chmod 0777 /phpcache

    Edit your PHP.INI file and at the bottom add...
    Code:

    To install as a ZEND extension:

    zend_extension="/ea/eaccelerator-0.9.5/modules/eaccelerator.so"
    eaccelerator.shm_size="16"
    eaccelerator.cache_dir="/phpcache"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.check_mtime="1"
    eaccelerator.debug="0"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    eaccelerator.compress_level="9"

    OR to install as a PHP extension:

    extension="/ea/eaccelerator-0.9.5/modules/eaccelerator.so"
    eaccelerator.shm_size="16"
    eaccelerator.cache_dir="/phpcache"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.check_mtime="1"
    eaccelerator.debug="0"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    eaccelerator.compress_level="9"

    Restart Service: "service httpd restart" or "/etc/rc.d/init.d/httpd restart"

    For a great tutorial on Optimizing host.conf & sysctl.conf visit..
    Optimizing host.conf and sysctl.conf | eth0.us - Server admin info for cPanel, plesk, ensim and linux!

    Common SSH Commands visit..
    Common SSH Commands - Linux Shell Commands - Hosting Tutorials

    How to block an IP using iptables visit..
    Security - Block IP Addresses With IPtables - Printable View

    منبع پستهای wht.com
    ویرایش توسط MelatHOST : February 16th, 2010 در ساعت 02:20
    بزرگواری آن است که هرگز از بالا به کسی نگاه نکنی مگر آنکه بخواهی او را از زمین بلند کنی !

  2. تعداد تشکر ها ازMelatHOST به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. over optimization بهینه سازی بیش از حد
    توسط mohsen.unlimited در انجمن مباحث و منابع آموزشی
    پاسخ ها: 0
    آخرين نوشته: February 10th, 2015, 01:10
  2. کتاب Sun Web Server: The Essential Guide
    توسط aalireza439 در انجمن مباحث دیگر
    پاسخ ها: 0
    آخرين نوشته: November 22nd, 2010, 13:59
  3. A Beginner's Guide to Securing Your Server
    توسط HugeServer در انجمن مباحث و منابع آموزشی
    پاسخ ها: 6
    آخرين نوشته: November 4th, 2010, 14:31
  4. MCITP: Windows Server 2008 Server Administrator Study Guide: (Exam 70-646)
    توسط hamedch67 در انجمن مباحث دیگر
    پاسخ ها: 1
    آخرين نوشته: July 9th, 2010, 17:04
  5. پاسخ ها: 2
    آخرين نوشته: July 9th, 2010, 17:02

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •