centos,nginx安裝備忘

來源:互聯網
上載者:User

標籤:

# ssh 登入慢解決

vim /etc/ssh/sshd_config

UseDNS no

# add limits
vi /etc/security/limits.conf
* soft nproc 102400
* hard nproc 102400
* soft nofile 102400
* hard nofile 102400
# add sysctl.conf
vi /etc/sysctl.conf
#numbers of timewait,180000 default
net.ipv4.tcp_max_tw_buckets = 6000

#quick recycle
net.ipv4.tcp_tw_recycle = 1

#socket reuse
net.ipv4.tcp_tw_reuse = 1

#use the cookies while syn cookies overflow
net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
"readme.txt" 39L, 1400C
# add limits
vi /etc/security/limits.conf
* soft nproc 102400
* hard nproc 102400
* soft nofile 102400
* hard nofile 102400
# add sysctl.conf
vi /etc/sysctl.conf
#numbers of timewait,180000 default
net.ipv4.tcp_max_tw_buckets = 6000

#quick recycle
net.ipv4.tcp_tw_recycle = 1

#socket reuse
net.ipv4.tcp_tw_reuse = 1

#use the cookies while syn cookies overflow
net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_syn_backlog = 8192

sysctl -p

#install nginx

#yum install gcc gcc-c++
#yum install gd-devel
#to GeoIP dir
#configure,make & make install
#echo ‘/usr/local/lib‘ > /etc/ld.so.conf.d/geoip.conf
#ldconfig
#to nginx dir
# patch -p1 < /usr/download/nginx/add_module/nginx_tcp_proxy_module-0.4.5/tcp.patch
# ./configure --with-openssl=/usr/local/lib/openssl-1.0.1g/ --with-pcre=/usr/local/lib/pcre-8.35/ --with-zlib=/usr/local/lib/zlib-1.2.8/ --with-http_image_filter_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_geoip_module --with-http_flv_module --with-http_addition_module --add-module=../add_module/ngx_cache_purge-2.1/ --add-module=../add_module/headers-more-nginx-module-0.25/ --add-module=../add_module/nginx_concat_module/ --add-module=../add_module/nginx_tcp_proxy_module-0.4.5/

centos,nginx安裝備忘

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.