آموزش نصب Nginx بر روی Kloxo
برای نصب Nginx ابتدا با دسترسی ریشه به سرور متصل شوید .
حال با استفاده از دستور زیر httpd را Stop می کنیم :
service httpd stop
حالا وقت نصب کردن فرا رسیده است.فایل را بر روی سرور دانلود کنید و سپس از حالت فشرده خارج کنید:
wget http://nginx.org/download/nginx-0.8.33.tar.gz tar -zxf nginx-0.8.33.tar.gz
با دستور زیر وارد فلدر nginx شوید:
cd nginx-0.8.33
حال وقت کامپایل کردن و نصب نهایی nginx می باشد.
از دستور بسیار طویل زیر برای این کار استفاده کنید:
./configure --without-select_module --without-poll_module --without-http_charset_module --without-http_gzip_module --without-http_ssi_module --without-http_userid_module --without-http_access_module --without-http_auth_basic_module --without-http_autoindex_module --without-http_geo_module --without-http_map_module --without-http_referer_module --without-http_rewrite_module --without-http_fastcgi_module --without-http_memcached_module --without-http_limit_zone_module --without-http_limit_req_module --without-http_empty_gif_module --without-http_browser_module --without-http_upstream_ip_hash_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-pcre --with-openssl=/usr/lib/openssl --with-ipv6 make make install
نصب به اتمام رسیده وقت آن فرا رسیده که بیایم nginx را فعال کنیم.
وارد فلدر Nginx می شویم:
cd /etc/nginx/
=================
با دستور nano فایل nginx.conf باز و خط ۳۲ آن را به صورت زیر ویرایش می کنیم.
(این قسمت لزوم به ویرایش ندارد چون نسخه ی nginx/0.6.39 به صورت پیش فرض این قسمت را انجام داده)
nano nginx.conf
این را در خط ۳۲ وارد میکنیم . و در نهایت ذخیره ….
include /etc/nginx/conf.d/*.conf;
================
حالا پرمیشن nginx را به ۷۵۵ تغییر می دهیم:
chmod 755 /etc/init.d/nginx
با استفاده از یکی از ۲ دستور زیر nginx را start کنید:
/etc/init.d/nginx start
یا
service nginx start
باید تصویری رویت شود تا نوید نصب کامل و فعال سازی nginx را به شما بدهد.