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

موضوع: آموزش نصب NginX دایرکت ادمین

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    عضو انجمن tanhasystem آواتار ها
    تاریخ عضویت
    Jan 2010
    محل سکونت
    Esfahan,Shahreza
    نوشته ها
    118
    تشکر تشکر کرده 
    82
    تشکر تشکر شده 
    64
    تشکر شده در
    49 پست

    پیش فرض آموزش نصب NginX دایرکت ادمین

    اول از همه از همه مدیران وب هاستینگ تالک تشکر می کنم

    یه لینکی گذاشتیم در مورد پلسک نال شده (حتما قوانین رعایت نکرده بودم)متاسفانه پاک گردید امیدواریم که این اموزش انشاءالله پاک نگردد





    Part 1 : NginX

    1. Visit their website at nginx news
    2. On their homepage, download either the stable or developmental version.

    *Note: I went for the developmental version, but it doesn't really matter.*
    *The command below is valid as of time of posting, but will probably be outdated.

    3. Execute :




    کد:
    
        wget http://sysoev.ru/nginx/nginx-0.6.5.tar.gz
    
    
     tar -xzf nginx-0.6.5.tar.gz
    
    
    cd nginx-0.6.5
    4. Configure according to your preference. I chose this :




    کد:
    
    
    ./configure --with-http_stub_status_module --with-openssl=/usr/lib/openssl
    make
    make install
    This ends the nginx install.




    Part 2 : PHP

    1. Prepare your configuration options. If PHP is already installed, create a phpinfo(); page and extract the configuration line.

    2. Download the latest version of PHP, extract and enter that directory.

    3. Execute


    کد:
    
    
    ./configure --enable-fastcgi ... (Insert your configuration) make make install
    This ends the PHP install.


    Part 3 : Spawn FCGI Script

    We need to download LightTPD to get it's spawn-fcgi.

    1. To get it, download it from lighttpd fly light.

    2. Download, extract, and then run :



    کد:
    
    
    ./configure make cd src cp ./spawn-fcgi /usr/local/bin/spawn-fcgi

    3. Try running /usr/local/bin/spawn-fcgi. Make sure it exists and returns this :

    کد:
    
    spawn-fcgi-1.4.15 - spawns fastcgi processes
    4. You can remove the extracted folder. lighttpd has not been installed as make install was not executed.

    Part 4 : Apache Parser

    I've written a parser to parse Apache configuration (attached to this post).

    1. Download the attachment, rename it nginx.php and place it in /etc/init.d/

    2. Execute :

    کد:
    chmod 700 nginx.php




    3. Use your favourite editor nano/pico/vi to open nginx.php.

    4. At the top of the file, you should see :

    کد:
    #!/usr/local/bin/php -n
    Replace /usr/local/bin/php with wherever your PHP binary is.
    Be careful NOT to remove the ending -n.

    5. The top part of the file (after that first line) should look like :

    کد:
    
    // Configuration Section $nginx_init = "/etc/init.d/nginx"; $apache_config = "/etc/httpd/conf/httpd.conf"; $da_vhosts = "/etc/httpd/conf/extra/directadmin-vhosts.conf"; $tmp_folder = "/tmp/"; $debug_level = 0; // 0 => FATAL, 1 => WARN, 2 => INFO  $killall_bin = "/usr/bin/killall"; $spawn_bin = "/usr/local/bin/spawn-fcgi";  // Nginx Configuration $nginx_config = "/usr/local/nginx/conf/nginx.conf"; $nginx_bin = "/usr/local/nginx/sbin/nginx"; $mod_status = true;  // PHP Configuration $php_childs = 3; $php_bin = "/opt/php/bin/php-cgi"; $php_startport = 11000;




    Make sure the file paths are correct. For example, my PHP is located in /opt/php.
    Yours probably isn't.

    Some particularly important variables :

    $nginx_init - Where the controllable nginx init script will be. Leaving as-is is probably fine.
    $da_vhosts - This file must contain the list of includes of every user's httpd.conf
    $tmp_folder - The temporary folder. Must be world writable.
    $php_startport - The PHP FastCGI will bind to a port starting from this number.

    6. Execute the php script was rewrite-init as the parameter.


    کد:
    /etc/init.d/nginx.php rewrite-init

    7. The init file will be written to wherever you specified it previously.

    8. You can now run [init_file] start/stop/restart/reload/graceful/status.

    Part 5 : DirectAdmin Touchup

    1. Open /usr/local/directadmin/data/admin/services.status in a text editor.

    2. Replace httpd=ON with nginx=ON.

    3. Execute : (remember to replace INIT_FILE below with where your nginx init file is)


    کد:
    mv /etc/init.d/httpd /etc/init.d/httpd.old ln -vs INIT_FILE /etc/init.d/httpd
    Part 6 : htscanner (Optional)
    This module installs a PHP plugin to emulate Apache's scanning for PHP options.

    1. Locate where your PHP Pecl is :

    کد:
    locate pecl
    2. Using the full path of pecl found, execute :

    کد:
    
    
    کد:
    /location/to/pecl install htscanner




    End




    Email: Tanhasystem@gmail.com
    گروه فناوری اطلاعات و ارتباطات ترنج
    زیر مجموعه شرکت فنی مهندسی پرتو گستر
    گروه فناوری اطلاعات وارتباطات ترنج مستقل بوده و هیچ یک از سایت های هم نام با ما ارتباطی نداشته و ندارند


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


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

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

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

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

  1. فیلم آموزشی نصب nginx و php-fpm
    توسط IrIsT در انجمن مباحث و منابع آموزشی
    پاسخ ها: 3
    آخرين نوشته: April 16th, 2015, 02:12
  2. درخواست اموزش رفع Nginx is functioning normally بعداز نصب وب سرور nginx
    توسط sms.bartarhost در انجمن دايرکت ادمين DirectAdmin
    پاسخ ها: 0
    آخرين نوشته: February 25th, 2015, 15:51
  3. آموزش نصب nginx
    توسط 1eng.ir در انجمن ردهت,فدورا,سنت-او-اس Redhat,Fedora,CentOS
    پاسخ ها: 16
    آخرين نوشته: October 28th, 2014, 02:08
  4. اموزش کانفیگ کردن nginx
    توسط musicayob در انجمن وب سرورها
    پاسخ ها: 0
    آخرين نوشته: September 21st, 2012, 20:00
  5. آموزش نصب nginx فقط با 4 فرمان!
    توسط mohammadHN در انجمن مباحث و منابع آموزشی
    پاسخ ها: 7
    آخرين نوشته: June 10th, 2010, 18:10

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

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