当前位置:网站首页>Apache server OpenSSL upgrade
Apache server OpenSSL upgrade
2022-06-30 22:11:00 【Brother Xing plays with the clouds】
OpenSSL Painstaking efforts and loopholes made a lot of noise . At first , The company has several rds The small business machine of was notified to repair OpenSSL Loophole , These machines are separate small businesses , It stopped , Find a simple document and upgrade it OK( There are plenty of them nginx, There are plenty of them resin). After the repair is completed, restart the service OK.
The main business of the company also has a general entrance machine (LVS Hold on 2 platform ), Because this machine is very important ,13 There was a repair in OpenSSL There have been problems with the vulnerability of ,( Old machine , Have the intention of changing the environment ), So I'm worried this time . But last week, a customer service suddenly reported that there was a problem with the browser alert business when customers browse local services , As a result, the problem had to be solved immediately ( upgrade OpenSSL).
--------------------------------------------------------------------------------
Environment view and detection
PS:Apache compiled $homedir/build/config.nice The file records the previously compiled parameters .
"./configure" \
"--with-ldap" \
"--enable-mods-shared=all ssl ldap cache proxy authn_alias file_cache authnz_ldap charset_lite dav_lock cache_disk" \
"--with-included-apr" \
"--with-ssl=/usr/local/openssl/" ( For the first time, something went wrong here )\
Then use website detection after recompiling , Or continue to report the existence OpenSSL Loophole ..( It started with 360. Then I feel that I have been cheated by him , Then I found a website .)
https://lastpass.com/heartbleed ( Because this is an afterthought article , So I took a friend's website to demonstrate , His problem is the same .)
Then I knew something in an instant .
It's here 2 A question
-with-ssl=/usr/local/openssl/ It's old OpenSSL The path of .
When a new path is specified ,Apache Report errors .( Because this is an error report after the event, the information is not recorded . It looks something like this : The lack of apr-util Dependent related ldap.so**** You compile apr-util When he was young, he didn't rely on ldap Compile it )
got . Don't go around , Just start the right process .
One 、 install OpenSSL
Upgrade steps
0. First, through #openssl version –a Check the existing in the system OpenSSL Version number
1. adopt #wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz Get source code package
2. install openssl
tar xf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
./config -DOPENSSL_NO_HEARTBEATS shared zlib
make
make install
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
3 Configuration library file search path
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig -v
4 see openssl Version number , Verify installation correctness
#openssl version -a
You can see the newly installed version .
-DOPENSSL_NO_HEARTBEATS ( Prohibit heartbeat information )
Two 、 Compilation and installation apr apr-util
Special attention , I'll go straight to the bottom yum install ldap Related components , The reason is that the final compilation Apache Will depend on apr-util Inside ldap library , So compile apr-util You also need to specify .
yum install apr apr-devel apr-util apr-util-devel apr-util-ldap ( This is to solve apr-util rely on ladp The problem of , Because I can't find which library is missing )
tar xf apr-1.4.6.tar.bz2
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make && make install
cd ..
tar xf apr-util-1.5.2.tar.bz2
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-ldap
make && make install
3、 ... and 、 Compilation and installation Apache
$ tar xf httpd-2.4.4.tar.bz2
$ cd httpd-2.4.4
$ ./configure --with-ldap --enable-mods-shared="all ssl ldap cache proxy authn_alias file_cache authnz_ldap charset_lite dav_lock cache_disk" --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl=/usr/local/ssl/ ( We need to pay attention to ssl The path to this place )
$ make && make install
Finally added
Before the operation, I did not compress to back up Apache Original document ( The log is also typed in ).
I'll make it mv In the past , And then finally Delete from the compiled directory conf htdocs logs Three directories , Then these three directories in the backed up Directory mv To come over . The most convenient ( Of course you can copy logs The directory structure of is OK )
--------------------------------------------------------------------------------
Probably what needs attention is ldap Rely on the .
Among them, I'm compiling nginx OpenSSL upgrade When , One is also recompiled , It seems that environmental factors ( It's been too long ), At compile time , Directly designated OpenSSL Source file , Give Way nginx Will need OpenSSL Some of the dependent libraries of are recompiled .
It is recommended to upgrade the online environment , Test in the test environment , Then make it rpm package , Then go straight online install. If the local has its own yum Environmental Science , That's even better .
边栏推荐
- Bloom filter
- Windbg调试工具介绍
- Introduce an online platform for multi omics integration and network visual analysis
- 5G 在智慧医疗中的需求
- Analysis of PostgreSQL storage structure
- Document layout analysis: a comprehensive survey 2019 paper learning summary
- Go Web 编程入门: 一探优秀测试库 GoConvey
- Anfulai embedded weekly report no. 270: June 13, 2022 to June 19, 2022
- 《Dynamic Routing Between Capsules》论文学习总结
- The programmer's girlfriend gave me a fatigue driving test
猜你喜欢
![[micro service ~nacos] configuration center of Nacos](/img/c3/9d8fb0fd49a0ebab43ed604f9bd1cc.png)
[micro service ~nacos] configuration center of Nacos

Uniapp routing uni simple router

Label Contrastive Coding based Graph Neural Network for Graph Classification

Installing jupyter notebook under Anaconda

Mysql:sql overview and database system introduction | dark horse programmer

看阿里云 CIPU 的 10 大能力

Introduction and example of template method mode

Go language learning notes - Gorm usage - database configuration, table addition | web framework gin (VII)

电脑版微信文件存储在哪个文件夹可以找到

Vite2 is compatible with lower versions of chrome (such as Sogou 80). Some grammars requiring higher versions are processed through polyfills
随机推荐
Develop your own package
Troubleshooting the problem of pytorch geometric torch scatter and torch spark installation errors
win11更新后任务栏空白怎么办? win11更新后任务栏空白卡死的解决方法
《安富莱嵌入式周报》第271期:2022.06.20--2022.06.26
Introduction to go web programming: a probe into the excellent test library gocovey
How to use data sets in machine learning?
Develop technology - get time 10 minutes ago
Do machine learning jobs require graduate students?
1-14 express managed static resources
Some problems when SSH default port is not 22
Alibaba Kube eventer MySQL sink simple usage record
I want to know who I need to know to open a stock account? In addition, is it safe to open a mobile account?
Domestic database disorder
Summary of errors reported when using YML file to migrate CONDA environment
京东与腾讯续签三年战略合作协议;起薪涨至26万元,韩国三星SK争相加薪留住半导体人才;Firefox 102 发布|极客头条
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
Label Contrastive Coding based Graph Neural Network for Graph Classification
Vite2 is compatible with lower versions of chrome (such as Sogou 80). Some grammars requiring higher versions are processed through polyfills
About, Qianxin detects code vulnerabilities and XSS series solves them
Zhoushaojian, rare