用友客开

https+apache+tomcat Linux 环境

时间:2022-09-06 15:45:14   作者:五块二   来源:转载   阅读:8   评论:0

 

记录的 apche + tomcat +https 在centos6.9上的安装配置过程(NC65)

cd /yonyou/

mkdir https
cd https/
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.zip
wget https://ftp.pcre.org/pub/pcre/pcre-8.10.zip --no-check-certificate
wget http://archive.apache.org/dist/httpd/httpd-2.4.29.tar.gz
wget http://mirrors.shu.edu.cn/apache/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.43-src.tar.gz

yum -y install gcc
yum -y install gcc+ gcc-c++
yum -y install autoconf
yum -y install libtool

tar -zxvf tomcat-connectors-1.2.43-src.tar.gz
tar -zxvf apr-1.4.5.tar.gz
tar -zxvf apr-util-1.3.12.tar.gz
tar -zxvf httpd-2.4.29.tar.gz
unzip pcre-8.10.zip

cd apr-1.4.5/
./configure --prefix=/usr/local/apr
make && make install
cd apr-util-1.3.12/
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
make && make install
cd ../pcre-8.10/
./configure --prefix=/usr/local/pcre
make && make install
./configure --disable-shared --prefix=/usr/local/pcre --with-pic
make && make install
cd ../httpd-2.4.29/
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
make && make install
cd tomcat-connectors-1.2.43-src
cd native/
./configure --with-apxs=/usr/local/apache/bin/apxs
locate mod_jk.so
which apxs
cd /usr/local/apache/bin/
cd /yonyou/
cd https/
cd tomcat-connectors-1.2.43-src
cd native/
./buildconf.sh
make install
./configure --with-apxs=/usr/local/apache/bin/apxs
make
more /usr/local/apache/conf/httpd.conf
!
updatedb
locate mod_jk.so
vi /usr/local/apache/conf/httpd.conf
/usr/bin/openssl req -new -key server.key -out server.csr
/usr/bin/openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
/usr/bin/openssl x509 -noout -text -in server.crt
vi /usr/local/apache/conf/httpd.conf
vi /usr/local/apache/conf/extra/httpd-ssl.conf

cd /usr/local/apache/bin/
./apachectl -k start
#yum install mod_ssl
updatedb
locate mod_ssl
cd /usr/local/apache/include/
#cp /usr/lib64/httpd/modules/mod_ssl.so /usr/local/apache/modules/
#/usr/local/apache/bin/apxs -a -i -c -L/usr/lib/openssl/engines/lib -c *.c -lcrypto -lssl -ldl
#cd /yonyou/https/httpd-2.4.29/modules/ssl
#/usr/local/apache/bin/apxs -a -i -c mod_ssl.c
#./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl
#openssl version -a
#./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl --with-ssl=/etc/pki/tls
#yum update openssl
openssl version -a
yum install openssl-devel
openssl version -a
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl
make && make install
vi /usr/local/apache/conf/httpd.conf
cd /usr/local/apache/conf/extra/
vi httpd-ssl.conf
cd bin/
./apachectl -k start
cd ../conf/httpd.conf
vi ../conf/httpd.conf
./apachectl -k start
cat -n /usr/local/apache/conf/ncmodjk.conf
./apachectl -k start
cat -n /usr/local/apache/conf/ncmodjk.conf
/usr/local/apache/conf/ncmodjk.con
vi /usr/local/apache/conf/ncmodjk.conf
./apachectl -k start
vi /usr/local/apache/conf/httpd.conf
./apachectl -k start
cat -n /usr/local/apache/conf/ncmodjk.conf
vi /usr/local/apache/conf/ncmodjk.conf
./apachectl -k start
vi httpd-ssl.conf ------------JKMountFile conf/ncmapping.properties
./apachectl -k start

 

全过程在https://scrat.oss-cn-beijing.aliyuncs.com/qst/NC65HTTPS_LINUX%E6%B5%81%E6%B0%B4%E8%B4%A6.txt

 

 

升级openssl 和apache参见如下

https://blog.51cto.com/407711169/1399556

apache或IHS http跳转https

http://publib.boulder.ibm.com/httpserv/ihsdiag/questions.html?highlight=rewrite

https://cwiki.apache.org/confluence/display/HTTPD/RewriteHTTPToHTTPS

 

LoadModule rewrite_module modules/mod_rewrite.so

 <IfModule rewrite_module>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*)  https://%{SERVER_NAME}/$1 [R,L]
</IfModule>


转自:https://www.cnblogs.com/qtong/p/9021945.html

 

1、官方公众号:尘果科技
2、本站地址:www.5kuai2.com

3、资源部分来源于网络,如有侵权,请联系QQ827566124进行删除处理。



                                          

                                      
                 

相关评论
阅读排行
栖霞区尘果科技工作室版权所有  苏ICP备2022021227号-1