ssh 와 nginx 스 크 립 트 업그레이드
- #!/bin/bash
- #for update nginx and update openssh
-
- # for install telnet
- yum install -y telnet-server telnet
- chkconfig telnet on
- /etc/init.d/xinetd restart
- netstat -tnlp
- useradd sshinstall
- echo "123456@sshinstall" | passwd --stdin sshinstall
- echo "sshinstall ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
-
- # for install openssl
- tar -xzf openssl-1.0.1c.tar.gz
- cd openssl-1.0.1c
- ./config enable-tl***t --prefix=/usr/local/openssl-1.0.0c
- make && make test && make install
- echo /usr/local/openssl-1.0.0c/lib/ >> /etc/ld.so.conf
- ln -s /usr/local/openssl-1.0.0c/ /usr/local/openssl
- echo 'PATH=/usr/local/openssl/bin:$PATH
- export PATH' >> /etc/profile
-
- source /etc/profile
- openssl version -a
-
- # delete old openssh
- rpm -e openssh-server-4.3p2-41.el5 --nodeps
- rpm -e openssh-4.3p2-41.el5 --nodeps
- rpm -e openssh-askpass-4.3p2-41.el5 --nodeps
- rpm -e openssh-clients-4.3p2-41.el5 --nodeps
- rm -rf /etc/ssh/
-
- # intall openssh
- yum install pam-devel
- cd ..
- tar -xzf openssh-6.1p1.tar.gz
- cd openssh-6.1p1
- ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0c --with-md5-passwords --mandir=/usr/share/man
- make && make install
- cp ./contrib/redhat/sshd.init /etc/init.d/sshd
- chmod u+x /etc/init.d/sshd
- chkconfig --add sshd
- chkconfig sshd on
- service sshd start
- ssh -v
- chkconfig telnet off
- /etc/init.d/xinetd restart
- userdel -r sshinstall
nginx 스 크 립 트 업그레이드:
- #!/bin/bash
- #for update nginx and update openssh
-
- yum install -y zlib-devel zlib gcc gcc-c++
- yum install pam-devel
-
- # update nginx
- tar zxvf libunwind-0.99.tar.gz
- cd libunwind-0.99/
- CFLAGS=-fPIC ./configure && make CFLAGS=-fPIC
- make CFLAGS=-fPIC install
-
- cd ..
- tar xzf google-perftools-1.6.tar.gz
- cd google-perftools-1.6
- ./configure
- make && make install
-
- cd ..
- tar -xzf pcre-8.12.tar.gz
- cd pcre-8.12
- ./configure && make && make install
-
- # for install geoip
- cd ..
- tar -xzf GeoIP.tar.gz
- cd GeoIP-1.4.8/
- ./configure && make && make install
-
- cd ..
- gunzip GeoIP.dat.gz
- echo '/usr/local/lib' > /etc/ld.so.conf.d/geoip.conf
- ldconfig
-
- unzip nginx_upstream_jvm_route.zip
- unzip master.zip
-
- tar -xzf nginx-sticky-module-1.1.tar.gz
- tar -xzf nginx-1.2.6.tar.gz
- cd nginx-1.2.6
- patch -p0 < /root/upgrade/nginx-upstream-jvm-route/nginx_upstream_jvm_route/jvm_route.patch
- patch -p1 < /root/upgrade/nginx_upstream_check_module-master/check_1.2.6+.patch
-
- ./configure --prefix=/usr/local/nginx --user=nobody --group=nobody --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module --with-http_sub_module --with-http_geoip_module --with-http_ssl_module --with-http_ssl_module --with-openssl=/root/upgrade/openssl-1.0.1c --with-pcre=/root/upgrade/pcre-8.12 --add-module=/root/upgrade/nginx-upstream-jvm-route/nginx_upstream_jvm_route/ --add-module=/root/upgrade/nginx_upstream_check_module-master/ --add-module=/root/upgrade/nginx-sticky-module-1.1/ --with-google_perftools_module
-
- make && make install
- /usr/local/nginx/sbin/nginx -v
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
간단! Certbot을 사용하여 웹 사이트를 SSL(HTTPS)화하는 방법초보자가 인프라 주위를 정돈하는 것은 매우 어렵습니다. 이번은 사이트를 간단하게 SSL화(HTTP에서 HTTPS통신)로 변경하는 방법을 소개합니다! 이번에는 소프트웨어 시스템 Nginx CentOS7 의 환경에서 S...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.