{"id":2005,"date":"2014-01-02T23:36:15","date_gmt":"2014-01-02T15:36:15","guid":{"rendered":"http:\/\/www.huzs.top\/?p=2005"},"modified":"2014-01-02T23:36:15","modified_gmt":"2014-01-02T15:36:15","slug":"lnmp%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.huzs.top\/?p=2005","title":{"rendered":"lnmp\u7f16\u8bd1\u5b89\u88c5"},"content":{"rendered":"<pre>mv \/etc\/sysconfig\/i18n \/etc\/sysconfig\/i18n.default<br>vim \/etc\/sysconfig\/i18n<\/pre>\n<pre>LANGUAGE=\"zh_CN.GB18030:zh_CN.GB2312:zh_CN\"<br>SUPPORTED=\"zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en\"<br>SYSFONT=\"latarcyrheb-sun16\"<br>export LC_ALL=\"zh_CN.GB18030\"<\/pre>\n<pre>rm -rf \/etc\/localtime<br>ln -s \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime<\/pre>\n<pre>reboot<\/pre>\n<pre>yum remove httpd php mysql<\/pre>\n<p><\/p>\n<pre>yum install gcc pcre pcre-devel OpenSSL openssl-devel openssl-perl openssl-static openssl-devel libxml2 libxml2-devel libxslt libxslt-devel libgcrypt-devel gd gd-devel zlib-devel<\/pre>\n<pre>\/usr\/sbin\/groupadd www<br>\/usr\/sbin\/useradd -s \/sbin\/nologin -g www www<br>ulimit -SHn 65535<\/pre>\n<pre>mkdir \/usr\/src\/lnmp2014-1-2<\/pre>\n<p>GeoIP\u5b89\u88c5<\/p>\n<pre>cd \/usr\/src\/lnmp2014-1-2<br>wget http:\/\/geolite.maxmind.com\/download\/geoip\/api\/c\/GeoIP-1.6.0.tar.gz<br>gunzip GeoIP-1.6.0.tar.gz<br>cd GeoIP-1.6.0<br>.\/configure<br>make && make install<br>echo \"\/usr\/local\/lib\">>\/etc\/ld.so.conf<br>\/sbin\/ldconfig \/etc\/ld.so.conf<\/pre>\n<p><\/p>\n<pre>wget http:\/\/geolite.maxmind.com\/download\/geoip\/database\/GeoLiteCountry\/GeoIP.dat.gz<br>gunzip GeoIP.dat.gz<br>mv GeoIP.dat \/var\/lib\/<\/pre>\n<p>NGINX \u5b89\u88c5<\/p>\n<pre>cd \/usr\/src\/lnmp2014-1-2<br>wget http:\/\/nginx.org\/download\/nginx-1.4.4.tar.gz<br>tar xvf nginx-1.4.4.tar.gz<br>cd nginx-1.4.4<\/pre>\n<pre>.\/configure --user=www --group=www \\<br>--with-http_ssl_module \\<br>--with-http_realip_module \\<br>--with-http_addition_module \\<br>--with-http_xslt_module \\<br>--with-http_image_filter_module \\<br>--with-http_geoip_module \\<br>--with-http_sub_module \\<br>--with-http_dav_module \\<br>--with-http_flv_module \\<br>--with-http_gzip_static_module \\<br>--with-http_random_index_module \\<br>--with-http_secure_link_module \\<br>--with-http_stub_status_module<br>make && make install<\/pre>\n<pre>vi \/usr\/local\/nginx\/conf\/nginx.conf<br>\/usr\/local\/nginx\/sbin\/nginx<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>mv \/etc\/sysconfig\/i18n \/etc\/sysconfig\/i18n.defaultvim \/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,8],"tags":[],"class_list":["post-2005","post","type-post","status-publish","format-standard","hentry","category-linux","category-8"],"_links":{"self":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/2005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2005"}],"version-history":[{"count":1,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/2005\/revisions"}],"predecessor-version":[{"id":2006,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/2005\/revisions\/2006"}],"wp:attachment":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}