当前位置: 首页 > news >正文

全网独家:编译CentOS6.10系统的openssl-1.1.1多版本并存的rpm安装包

CentOS6.10系统原生的openssl版本太老,1.0.1e,不能满足一些新版本应用软件的要求,但是它又被wget、mysql-libs、python-2.6.6、yum等一众系统包所依赖,不能再做升级。故需考虑在不影响系统原生openssl的情况下,安装较新版的openssl形成多版本并存,本文采用编译rpm包的方式完成了可并存的openssl-1.1.1的安装文件制作。

一、准备编译环境:

 1、发布一台虚拟机,最小化安装CentOS6.10,查看系统信息如下:

[root@localhost ~]# cat /etc/redhat-release 
CentOS release 6.10 (Final)

 2、查看系统所带openssl的版本信息:

[root@localhost ~]# rpm -qa|grep openssh
openssh-5.3p1-123.el6_9.x86_64
openssh-server-5.3p1-123.el6_9.x86_64
[root@localhost ~]# rpm -qa|grep openssl
openssl-1.0.1e-57.el6.x86_64

 3、修改系统源为阿里源:

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# rm CentOS-* -rf
[root@localhost yum.repos.d]# vi http.repo 
[root@localhost yum.repos.d]# cat http.repo 
[os]
name=os
baseurl=https://mirrors.aliyun.com/centos-vault/6.10/os/x86_64/
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# cd ~
[root@localhost ~]# yum repolist
已加载插件:fastestmirror
Determining fastest mirrors
os                                                                                                                                | 3.7 kB     00:00     
os/primary_db                                                                                                                     | 4.7 MB     00:04     
仓库标识                                                                     仓库名称                                                               状态
os                                                                           os                                                                     6,713
repolist: 6,713

 4、准备相关目录及工具

[root@localhost ~]# cd ~
[root@localhost ~]# mkdir -p rpmbuild/{SOURCES,SPECS}
[root@localhost ~]# yum install wget tree -y
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
解决依赖关系
--> 执行事务检查
---> Package tree.x86_64 0:1.5.3-3.el6 will be 安装
---> Package wget.x86_64 0:1.12-10.el6 will be 安装
--> 完成依赖关系计算依赖关系解决=========================================================================================================================================================软件包                            架构                                版本                                        仓库                             大小
=========================================================================================================================================================
正在安装:tree                              x86_64                              1.5.3-3.el6                                 os                               36 kwget                              x86_64                              1.12-10.el6                                 os                              484 k事务概要
=========================================================================================================================================================
Install       2 Package(s)总下载量:520 k
Installed size: 1.9 M
下载软件包:
(1/2): tree-1.5.3-3.el6.x86_64.rpm                                                                                                |  36 kB     00:00     
(2/2): wget-1.12-10.el6.x86_64.rpm                                                                                                | 484 kB     00:00     
---------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                     799 kB/s | 520 kB     00:00     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务正在安装   : tree-1.5.3-3.el6.x86_64                                                                                                               1/2 正在安装   : wget-1.12-10.el6.x86_64                                                                                                               2/2 Verifying  : wget-1.12-10.el6.x86_64                                                                                                               1/2 Verifying  : tree-1.5.3-3.el6.x86_64                                                                                                               2/2 已安装:tree.x86_64 0:1.5.3-3.el6                                                   wget.x86_64 0:1.12-10.el6                                                  完毕!

5、 准备源文件

[root@localhost ~] # cd rpmbuild/SOURCES/
[root@localhost SOURCES]# wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz --no-check-certificate
--2023-09-06 17:08:04--  https://www.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz
正在解析主机 www.openssl.org... 184.30.9.21, 2402:4f00:4002:19e::c1e, 2402:4f00:4002:198::c1e
正在连接 www.openssl.org|184.30.9.21|:443... 已连接。
...
2023-09-06 17:08:13 (924 KB/s) - 已保存 “openssl-1.1.1.tar.gz” [8337920/8337920])
[root@localhost SOURCES]# ll openssl-1.1.1.tar.gz
-rw-r--r--. 1 root root 8337920 9月  11 2018 openssl-1.1.1.tar.gz

6、 安装编译工具

[root@localhost SPECS]# yum install -y gcc make perl rpm-build rpmlint perl-WWW-Curl
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
os                                                                                                                                | 3.7 kB     00:00     
包 gcc-4.4.7-23.el6.x86_64 已安装并且是最新版本
包 1:make-3.81-23.el6.x86_64 已安装并且是最新版本
包 4:perl-5.10.1-144.el6.x86_64 已安装并且是最新版本
包 rpm-build-4.8.0-59.el6.x86_64 已安装并且是最新版本
解决依赖关系
--> 执行事务检查
---> Package perl-WWW-Curl.x86_64 0:4.09-4.el6 will be 安装
---> Package rpmlint.noarch 0:0.94-3.1.el6 will be 安装
--> 处理依赖关系 python-magic,它被软件包 rpmlint-0.94-3.1.el6.noarch 需要
--> 处理依赖关系 python-enchant,它被软件包 rpmlint-0.94-3.1.el6.noarch 需要
--> 执行事务检查
---> Package python-enchant.x86_64 0:1.3.1-5.2.el6 will be 安装
--> 处理依赖关系 libenchant.so.1()(64bit),它被软件包 python-enchant-1.3.1-5.2.el6.x86_64 需要
---> Package python-magic.x86_64 0:5.04-30.el6 will be 安装
--> 执行事务检查
---> Package enchant.x86_64 1:1.5.0-5.el6 will be 安装
--> 处理依赖关系 libhunspell-1.2.so.0()(64bit),它被软件包 1:enchant-1.5.0-5.el6.x86_64 需要
--> 执行事务检查
---> Package hunspell.x86_64 0:1.2.8-16.el6 will be 安装
--> 完成依赖关系计算依赖关系解决=========================================================================================================================================================软件包                                   架构                             版本                                       仓库                          大小
=========================================================================================================================================================
正在安装:perl-WWW-Curl                            x86_64                           4.09-4.el6                                 os                            47 krpmlint                                  noarch                           0.94-3.1.el6                               os                           186 k
为依赖而安装:enchant                                  x86_64                           1:1.5.0-5.el6                              os                            49 khunspell                                 x86_64                           1.2.8-16.el6                               os                           177 kpython-enchant                           x86_64                           1.3.1-5.2.el6                              os                            82 kpython-magic                             x86_64                           5.04-30.el6                                os                            29 k事务概要
=========================================================================================================================================================
Install       6 Package(s)总下载量:569 k
Installed size: 1.7 M
下载软件包:
(1/6): enchant-1.5.0-5.el6.x86_64.rpm                                                                                             |  49 kB     00:00     
(2/6): hunspell-1.2.8-16.el6.x86_64.rpm                                                                                           | 177 kB     00:00     
(3/6): perl-WWW-Curl-4.09-4.el6.x86_64.rpm                                                                                        |  47 kB     00:00     
(4/6): python-enchant-1.3.1-5.2.el6.x86_64.rpm                                                                                    |  82 kB     00:00     
(5/6): python-magic-5.04-30.el6.x86_64.rpm                                                                                        |  29 kB     00:00     
(6/6): rpmlint-0.94-3.1.el6.noarch.rpm                                                                                            | 186 kB     00:00     
---------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                     303 kB/s | 569 kB     00:01     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务正在安装   : python-magic-5.04-30.el6.x86_64                                                                                                       1/6 正在安装   : hunspell-1.2.8-16.el6.x86_64                                                                                                          2/6 正在安装   : 1:enchant-1.5.0-5.el6.x86_64                                                                                                          3/6 正在安装   : python-enchant-1.3.1-5.2.el6.x86_64                                                                                                   4/6 正在安装   : rpmlint-0.94-3.1.el6.noarch                                                                                                           5/6 正在安装   : perl-WWW-Curl-4.09-4.el6.x86_64                                                                                                       6/6 Verifying  : hunspell-1.2.8-16.el6.x86_64                                                                                                          1/6 Verifying  : perl-WWW-Curl-4.09-4.el6.x86_64                                                                                                       2/6 Verifying  : rpmlint-0.94-3.1.el6.noarch                                                                                                           3/6 Verifying  : python-magic-5.04-30.el6.x86_64                                                                                                       4/6 Verifying  : python-enchant-1.3.1-5.2.el6.x86_64                                                                                                   5/6 Verifying  : 1:enchant-1.5.0-5.el6.x86_64                                                                                                          6/6 已安装:perl-WWW-Curl.x86_64 0:4.09-4.el6                                             rpmlint.noarch 0:0.94-3.1.el6                                            作为依赖被安装:enchant.x86_64 1:1.5.0-5.el6      hunspell.x86_64 0:1.2.8-16.el6      python-enchant.x86_64 0:1.3.1-5.2.el6      python-magic.x86_64 0:5.04-30.el6     完毕!

7、备份原始版本的rpm包,以备不时之需

[root@localhost ~]# cd /opt
[root@localhost opt]# mkdir openssl-devel-1.0.1e
[root@localhost opt]# cd openssl-devel-1.0.1e/
[root@localhost openssl-devel-1.0.1e]# wget https://mirrors.aliyun.com/centos-vault/6.10/os/x86_64/Packages/openssl-1.0.1e-57.el6.x86_64.rpm
--2023-09-06 19:26:42--  https://mirrors.aliyun.com/centos-vault/6.10/os/x86_64/Packages/openssl-1.0.1e-57.el6.x86_64.rpm
正在解析主机 mirrors.aliyun.com... 120.226.194.113, 120.226.194.114, 120.226.194.119, ...
正在连接 mirrors.aliyun.com|120.226.194.113|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1600772 (1.5M) [application/x-rpm]
正在保存至: “openssl-1.0.1e-57.el6.x86_64.rpm”100%[===============================================================================================================>] 1,600,772   1.58M/s   in 1.0s    2023-09-06 19:26:44 (1.58 MB/s) - 已保存 “openssl-1.0.1e-57.el6.x86_64.rpm” [1600772/1600772])[root@localhost openssl-devel-1.0.1e]# wget https://mirrors.aliyun.com/centos-vault/6.10/os/x86_64/Packages/openssl-devel-1.0.1e-57.el6.x86_64.rpm
--2023-09-06 19:27:05--  https://mirrors.aliyun.com/centos-vault/6.10/os/x86_64/Packages/openssl-devel-1.0.1e-57.el6.x86_64.rpm
正在解析主机 mirrors.aliyun.com... 120.226.194.112, 120.226.194.116, 120.226.194.115, ...
正在连接 mirrors.aliyun.com|120.226.194.112|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1227684 (1.2M) [application/x-rpm]
正在保存至: “openssl-devel-1.0.1e-57.el6.x86_64.rpm”100%[===============================================================================================================>] 1,227,684   2.40M/s   in 0.5s    2023-09-06 19:27:06 (2.40 MB/s) - 已保存 “openssl-devel-1.0.1e-57.el6.x86_64.rpm” [1227684/1227684])[root@localhost openssl-devel-1.0.1e]# ll
总用量 2764
-rw-r--r--. 1 root root 1600772 3月  23 2017 openssl-1.0.1e-57.el6.x86_64.rpm
-rw-r--r--. 1 root root 1227684 3月  23 2017 openssl-devel-1.0.1e-57.el6.x86_64.rpm 

 二、正式编译

1、编写spec文件

[root@localhost SOURCES]# cd /root/rpmbuild/SPECS/
[root@localhost SPECS]# vi openssl-1.1.1.spec
[root@localhost SPECS]# cat openssl-1.1.1.spec 
Summary: OpenSSL 1.1.1 Portable for Centos
Name: openssl
Version: %{?version}%{!?version:1.1.1}
Release: 25%{?dist}
Obsoletes: %{name} <= %{version}
Provides: %{name} = %{version}
URL: https://www.openssl.org/
License: GPLv2+Source: https://www.openssl.org/source/openssl-1.1.1.tar.gzBuildRequires: make gcc perl perl-WWW-Curl
BuildRoot: %{_tmppath}/openssl-%{version}-%{release}-root
%global openssldir /usr/openssl-%{version}%description
OpenSSL RPM for version 1.1.1 on Centos%package devel
Summary: Development files for programs which will use the openssl library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}%description devel
OpenSSL Portable RPM for version 1.1.1 on Centos (development package)%prep
%setup -q%build
./config --prefix=%{openssldir} --openssldir=%{openssldir} -fPIC
make%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%make_installmkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}
ln -sf %{openssldir}/lib/libssl.so.1.1 %{buildroot}%{_libdir}
ln -sf %{openssldir}/lib/libcrypto.so.1.1 %{buildroot}%{_libdir}
ln -sf %{openssldir}/bin/openssl-1.1.1 %{buildroot}%{_bindir}%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}%files
%{openssldir}
%defattr(-,root,root)
/usr/bin/openssl-1.1.1
/usr/lib64/libcrypto.so.1.1
/usr/lib64/libssl.so.1.1%files devel
%{openssldir}/include/*
%defattr(-,root,root)%post -p /sbin/ldconfig%postun -p /sbin/ldconfig
%changelog
* Wed Sep 6 2023 daijianbing - 1.1.1
- Rebuilt for https://www.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz
[root@localhost SPECS]# 

 注:上面代码有一处需添加一行,请见面的讲解,可以避免后面rpm包安装后的软链接问题。

2、开始编译

[root@localhost SPECS]# rpmbuild -bb openssl-1.1.1.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.JWwxii
+ umask 022
+ cd /root/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /root/rpmbuild/BUILD
+ rm -rf openssl-1.1.1
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/openssl-1.1.1.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd openssl-1.1.1
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.3NZp5J
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd openssl-1.1.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ ./config --prefix=/usr/openssl --openssldir=/usr/openssl -fPIC
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1 (0x1010100fL) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile**********************************************************************
***                                                                ***
***   If you want to report a building issue, please include the   ***
***   output from this command:                                    ***
***                                                                ***
***     perl configdata.pm --dump                                  ***
***                                                                ***
**********************************************************************
+ make
...
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/openssl-1.1.1-25.el6.x86_64
Wrote: /root/rpmbuild/RPMS/x86_64/openssl-1.1.1-25.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/openssl-devel-1.1.1-25.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/openssl-debuginfo-1.1.1-25.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.xriOpv
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd openssl-1.1.1
+ '[' /root/rpmbuild/BUILDROOT/openssl-1.1.1-25.el6.x86_64 '!=' / ']'
+ /bin/rm -rf /root/rpmbuild/BUILDROOT/openssl-1.1.1-25.el6.x86_64
+ exit 0

3、如上最后出现“+ exit 0”即正常编译完成,在/root/rpmbuild/RPMS/x86_64目录下可以看到编译生成的rpm文件

[root@localhost SPECS]# ll /root/rpmbuild/RPMS/x86_64/*-1.1.1-*
-rw-r--r--. 1 root root 5439452 9月   6 17:25 /root/rpmbuild/RPMS/x86_64/openssl-1.1.1-25.el6.x86_64.rpm
-rw-r--r--. 1 root root  133508 9月   6 17:25 /root/rpmbuild/RPMS/x86_64/openssl-debuginfo-1.1.1-25.el6.x86_64.rpm
-rw-r--r--. 1 root root  237604 9月   6 17:25 /root/rpmbuild/RPMS/x86_64/openssl-devel-1.1.1-25.el6.x86_64.rpm

三、测试安装及验证

1、尝试直接安装新版

[root@localhost SPECS]# cd /root/rpmbuild/RPMS/x86_64/
[root@localhost x86_64]# ll
总用量 5684
-rw-r--r--. 1 root root 5440868 9月   6 20:39 openssl-1.1.1-25.el6.x86_64.rpm
-rw-r--r--. 1 root root  133428 9月   6 20:39 openssl-debuginfo-1.1.1-25.el6.x86_64.rpm
-rw-r--r--. 1 root root  237644 9月   6 20:39 openssl-devel-1.1.1-25.el6.x86_64.rpm
[root@localhost x86_64]# rpm -ivh *
Preparing...                ########################################### [100%]1:openssl                ########################################### [ 33%]2:openssl-devel          ########################################### [ 67%]3:openssl-debuginfo      ########################################### [100%]
[root@localhost x86_64]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

 可见安装新版以后,并没有影响系统默认安装的openssl

2、查看新版openssl安装的目录文件

[root@localhost x86_64]# rpm -qpl openssl-1.1.1-25.el6.x86_64.rpm |more
/usr/bin/openssl-1.1.1
/usr/lib64/libcrypto.so.1.1
/usr/lib64/libssl.so.1.1
/usr/openssl-1.1.1
/usr/openssl-1.1.1/bin
/usr/openssl-1.1.1/bin/c_rehash
/usr/openssl-1.1.1/bin/openssl
/usr/openssl-1.1.1/certs
/usr/openssl-1.1.1/ct_log_list.cnf
/usr/openssl-1.1.1/ct_log_list.cnf.dist
/usr/openssl-1.1.1/include
/usr/openssl-1.1.1/include/openssl
/usr/openssl-1.1.1/include/openssl/aes.h
/usr/openssl-1.1.1/include/openssl/asn1.h
...
/usr/openssl-1.1.1/share/man/man7/passphrase-encoding.7
/usr/openssl-1.1.1/share/man/man7/scrypt.7
/usr/openssl-1.1.1/share/man/man7/ssl.7
/usr/openssl-1.1.1/share/man/man7/x509.7

3、执行新版本查看信息,发现问题

 可见是链接文件指向错误,手工修正

[root@localhost x86_64]# rm /usr/bin/openssl-1.1.1
rm:是否删除符号链接 "/usr/bin/openssl-1.1.1"?y
[root@localhost x86_64]# ll /usr/openssl-1.1.1/bin/openssl
-rwxr-xr-x. 1 root root 646152 9月   6 21:28 /usr/openssl-1.1.1/bin/openssl
[root@localhost x86_64]# /usr/openssl-1.1.1/bin/openssl version
OpenSSL 1.1.1  11 Sep 2018
[root@localhost x86_64]# cp /usr/openssl-1.1.1/bin/openssl /usr/openssl-1.1.1/bin/openssl-1.1.1
[root@localhost x86_64]# ln -sf /usr/openssl-1.1.1/bin/openssl-1.1.1 /usr/bin/openssl-1.1.1
[root@localhost x86_64]# openssl-1.1.1 version                                       
OpenSSL 1.1.1  11 Sep 2018
[root@localhost x86_64]# openssl version      
OpenSSL 1.0.1e-fips 11 Feb 201

经排查,出现软链接错误的原因是因为编译生成的openssl命令文件不带1.1.1,将spec文件中的以下行:

ln -sf %{openssldir}/bin/openssl-1.1.1 %{buildroot}%{_bindir}

之前添加一行,如下:

cp %{openssldir}/bin/openssl %{openssldir}/bin/openssl-1.1.1

ln -sf %{openssldir}/bin/openssl-1.1.1 %{buildroot}%{_bindir} 

 再次编译即可。

至此,CentOS6.10系统的openssl 1.0.1e和1.1.1多版本运行环境建立完成,运行openssl即是系统原生老版,运行openssl-1.1.1则是新安装的1.1.1版本。

相关文章:

全网独家:编译CentOS6.10系统的openssl-1.1.1多版本并存的rpm安装包

CentOS6.10系统原生的openssl版本太老&#xff0c;1.0.1e&#xff0c;不能满足一些新版本应用软件的要求&#xff0c;但是它又被wget、mysql-libs、python-2.6.6、yum等一众系统包所依赖&#xff0c;不能再做升级。故需考虑在不影响系统原生openssl的情况下&#xff0c;安装较新…...

【go】异步任务解决方案Asynq实战

文章目录 一.Asynq介绍二.所需工具三.代码示例四.Reference 一.Asynq介绍 Asynq 是一个 Go 库&#xff0c;一个高效的分布式任务队列。 Asynq 工作原理&#xff1a; 客户端&#xff08;生产者&#xff09;将任务放入队列服务器&#xff08;消费者&#xff09;从队列中拉出任…...

掌握 Android 自动化测试框架 UiAutomator UiAutomator2

掌握 Android 自动化测试框架 UiAutomator & UiAutomator2 一、UiAutomator 简介二、UiAutomator2 的诞生三、UiAutomator2 的应用实践总结你是否曾经在进行 Android 应用开发时,对于如何进行全面、有效的自动化测试感到困惑?你是否想要更高效地进行 UI 测试,而不是一遍…...

c#抽象类(abstract)

概述&#xff1a; C#中的抽象类是一种特殊类型的类&#xff0c;它不能被实例化&#xff0c;只能被继承。抽象类用于提供一个共享的基类&#xff0c;其中定义了一些方法和属性的签名&#xff0c;但没有具体的实现。这些方法和属性可以在派生类中进行实现。 使用抽象类的主要目…...

语义分割实践思考记录(个人备忘录)

一、任务管理器、NVDIA的GPU利用率显示[1][2] 若需要在任务管理器中查看基于Pytorch框架的GPU利用率&#xff0c;那么&#xff0c;我们需要将监控面板监测内容调整为cuda。图一&#xff08;左&#xff09;即为英伟达命令行工具面板。 图一 英伟达GPU使用率监控 二、基于混淆矩阵…...

Zebec Protocol 成非洲利比亚展会合作伙伴,并将向第三世界国家布局

在 9 月 6 日&#xff0c;The Digital Asset Summit ’23&#xff08;利比亚大会&#xff09;在尼日利亚首度阿布贾的 NAF 会议中心举办&#xff0c;该会议对 Web3 领域在非洲地区的发展进行了探索&#xff0c;旨在推动非洲地区区块链产业的进一步发展&#xff0c;据悉该会议室…...

随机流-RandomAccessFile

RandomAccessFile RandomAccessFile 基本操作案例 RandomAccessFile 基本操作 案例 import java.io.*;public class TestMain09 {public static void main(String[] args) throws Exception {insert("D:\\home\\product\\aa.txt",2,"ni");}public static…...

单例和静态类

C#中的单例&#xff08;Singleton&#xff09;和静态类&#xff08;Static Class&#xff09;是两种不同的设计模式&#xff0c;它们各自有不同的用途和特点。 单例模式是一种设计模式&#xff0c;它确保一个类只有一个实例&#xff0c;并提供全局访问点。通常&#xff0c;单例…...

PMP-项目风险管理的重要性

一、什么是项目风险管理 项目风险管理旨在识别和管理未被其他项目管理过程所管理的风险。如果不妥善管理&#xff0c;这些风险有可能导致项目偏离计划&#xff0c;无法达成既定的项目目标。因此&#xff0c;项目风险管理的有效性直接关乎项目成功与否。 每个项目都在两个层面…...

学习的心得

文章目录 第一节课心得**学会了敲写数学公式** 第一节课心得 老师讲得非常好&#xff0c;我们下载了xmind&#xff0c;如何制作思维导图 学会了敲写数学公式 ∫ 10 20 ( x 2 − 3 x 2 ) d x \displaystyle\int_{10}^{20}(x^2-3x2)dx ∫1020​(x2−3x2)dx...

Python网络爬虫中这七个li标签下面的属性值,不是固定的,怎样才能拿到他们的值呢?...

点击上方“Python爬虫与数据挖掘”&#xff0c;进行关注 回复“书籍”即可获赠Python从入门到进阶共10本电子书 今 日 鸡 汤 愚以为宫中之事&#xff0c;事无大小&#xff0c;悉以咨之&#xff0c;然后施行&#xff0c;必能裨补阙漏&#xff0c;有所广益。 大家好&#xff0c;我…...

白鲸开源 DataOps 平台加速数据分析和大模型构建

作者 | 李晨 编辑 | Debra Chen 数据准备对于推动有效的自助式分析和数据科学实践至关重要。如今&#xff0c;企业大都知道基于数据的决策是成功数字化转型的关键&#xff0c;但要做出有效的决策&#xff0c;只有可信的数据才能提供帮助&#xff0c;随着数据量和数据源的多样…...

(其他) 剑指 Offer 65. 不用加减乘除做加法 ——【Leetcode每日一题】

❓ 剑指 Offer 65. 不用加减乘除做加法 难度&#xff1a;简单 写一个函数&#xff0c;求两个整数之和&#xff0c;要求在函数体内不得使用 “”、“-”、“*”、“/” 四则运算符号。 示例: 输入: a 1, b 1 输出: 2 提示&#xff1a; a, b 均可能是负数或 0结果不会溢出 …...

RestTemplate 的用法

1.引入对应依赖 2.private final RestTemplate restTemplate; 3.上代码 Service Slf4j public class CspWarehouseServiceImpl implements ICspWarehouseService { private final RestTemplate restTemplate;public CspWarehouseServiceImpl() {this.restTemplate new Rest…...

postgresql-使用plpgsql批量插入用户测试数据

目的 使用plpgsql批量插入用户测试数据 ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤我是分割线❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤ 我的环境 客户端&#xff1a;windows 版pgadmin4 服务端&#xff1a;linux版PostgreSQL 15.4 ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤…...

通过Siri打造智能爬虫助手:捕获与解析结构化数据

在信息时代&#xff0c;我们经常需要从互联网上获取大量的结构化数据。然而&#xff0c;传统的网络爬虫往往需要编写复杂代码和规则来实现数据采集和解析。如今&#xff0c;在苹果公司提供的语音助手Siri中有一个强大功能可以帮助我们轻松完成这项任务——通过使用自定义指令、…...

【电源专题】典型设备的接地设计

在文章:【电源专题】接地的类型 中我们讲到不同的历史时期接地概念是不同的,有为了安全的电气接地和物理接地,也有为了提供参考电位的接地。 那么在设备接地的设计中,我们会怎么进行操作呢? 在文章【电源专题】接地的类型讲到一个混合接地的例子,我们可以把大功率的地接…...

LeetCode-216-组合总和Ⅱ

题目链接&#xff1a; LeetCode-216-组合总和Ⅱ 解题思路&#xff1a;回溯算法 注意事项注释中有 代码实现&#xff1a; class Solution {/*** 和为 n&#xff0c;个数为 k* 求的是组合&#xff0c;不要求顺序* 递归的深度是 k*/public List<List<Integer>> combin…...

[技术杂谈]几款常用的安装包制作工具

下面是几款常用的安装包制作工具&#xff1a; Inno Setup&#xff1a;Inno Setup 是一款免费开源的 Windows 平台上的安装包制作工具&#xff0c;支持多种自定义选项和脚本编写&#xff0c;提供了可视化的界面和易于使用的向导引导。它可以创建用户友好的安装程序&#xff0c;…...

旋转屏幕显示方向-rk3568

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 步骤屏幕旋转处理旋转后触摸问题下面将操作如何旋转RK3568的屏幕显示 步骤 屏幕旋转 屏幕旋转包括俩个部分:Android 显示旋转和 Recovery 显示旋转,如果我们想要物理横屏显示为竖屏,物理竖屏…...

07 Linux补充|秋招刷题|9月6日

目录 Linux 结构体内存字节对齐 静态变量static 空指针 Linux 结构体内存字节对齐 结构体内存字节要对⻬&#xff1a; 32位系统&#xff1a;4 8 32&#xff1b;64位系统&#xff1a;8 16 24 字节对⻬&#xff1a;字节对⻬是指在计算机中&#xff0c;各种类型数据按照⼀定…...

【JavaGuide学习笔记】Day.1

目录 Java基础常见面试题&#xff08;上&#xff09; 1.JDK&#xff1f;JRE&#xff1f;JVM&#xff1f; 2.为什么说Java语言是“编译与解释并存”&#xff1f; 3.Java基本数据类型 4.基本类型和包装类型的区别 5.包装类型的缓存机制 6.自动装箱与拆箱了解吗&#xff1f;…...

大数据课程K18——Spark的ALS算法与显式矩阵分解

文章作者邮箱:yugongshiye@sina.cn 地址:广东惠州 ▲ 本章节目的 ⚪ 掌握Spark的ALS算法与显式矩阵分解; ⚪ 掌握Spark的ALS算法原理; 一、ALS算法与显式矩阵分解 1. 概述 我们在实现推荐系统时,当要处理的那些数据是由用户所提供的自身的偏好数据,这些…...

Android Jetpack架构组件库:Hilt

一、开发者官网关于Hilt库使用链接如下 使用 Hilt 实现依赖项注入 Hilt版本说明 二、工程目录图 请点击下面工程名称&#xff0c;跳转到代码的仓库页面&#xff0c;将工程 下载下来 Demo Code 里有详细的注释 代码&#xff1a;LearnJetpack-hilt&#xff1a;hilt版本2.48 代…...

企业帮助中心如何在线搭建,还能多场景使用呢?

搭建一个企业帮助中心的在线平台可以帮助企业提供高效的客户支持和解决方案。同时&#xff0c;这个平台还可以用于其他场景&#xff0c;例如内部员工培训、知识共享等。下面我将详细介绍如何在线搭建一个企业帮助中心&#xff0c;并且使其能够多场景使用。 选择合适的在线平台…...

C++ primer plus第十五章编程练习答案

1.对Tv 和 Remote 类做如下修改: a&#xff0c;让它们互为友元; b.在 Remote类中添加一个状态变量成员&#xff0c;该成员描述遥控器是处于常规模式还是互动模式: c&#xff0c;在 Remote 中添加一个显示模式的方法 d.在T类中添加一个对 Remote 中新成员进行切换的方法&#xf…...

【精品】商品规格 数据库表 设计

特点 同一类商品的规格项分组一样同一类商品的规格项一样不同商品的规格值是不同的 规格参数规格组规格项&#xff1a;规格值本博客对应的SQL文件下载地址&#xff1a;https://download.csdn.net/download/lianghecai52171314/88306884 方案一 数据库设计 查询17号商品的规…...

无人机集群路径规划MATLAB:孔雀优化算法POA求解无人机集群三维路径规划

一、无人机模型简介 单个无人机三维路径规划问题及其建模_IT猿手的博客-CSDN博客 二、孔雀优化算法POA介绍 孔雀优化算法( Peafowl Optimization Algorithm, POA), 是由 Jingbo Wang 等于2022 年提出的一种群体智能优化算法。其灵感来源于孔雀的群体行为。 智能优化算法&am…...

Dockerfile创建镜像异常问题解决

Dockerfile创建 dockerfile文件一定要在Linux创建&#xff0c;windows会默认结尾带 /r 会导致生成的镜像文件无法启动&#xff0c;且报错十分诡异。 镜像启动查看日志可以通过 docker logs [容器ID] 来查看 由于是启动jar包&#xff0c;docker logs 显示的报错是&#xff1a…...

使用libcurl请求https的get/post

最近有个需求&#xff0c;需要用c请求下我自己的服务器&#xff0c;周末看了一下怎么发起http请求。 官方文档见&#xff1a; https://curl.se/libcurl/c/example.html 官网的demo是基于c的&#xff0c;我用的时候报错了。下面是我写的get/post的方法&#xff0c;同步执行。 n…...

伪静态网站/如何开通自己的网站

iphone4锁屏键坏了图文教你修复 来源&#xff1a;互联网 作者&#xff1a;佚名 时间&#xff1a;03-07 16:18:30 【大 中 小】iphone4锁屏键经常使用&#xff0c;所以坏的可能性是很大而且不在少说&#xff0c;接下来为你详细分享一下解决方法&#xff0c;感兴趣的朋友可以参考…...

网站建设费用包括/百度账号免费注册

移动端参考: 前端UI设计稿对比工具 - chromewebpack插件 PC端UI对比 1、Ps 打开UI设计稿 2、手动截取页面需要对比部分&#xff0c;复制到Ps上进行对比【如果实际截图大小和设计稿大小不一致&#xff0c;但是CSS大小设置确实是设计稿大小&#xff0c;调整浏览器的缩放看看】…...

怀化网络推广收费标准/阿亮seo技术

第一步 使用influxd config > influxd.config生成默认配置文件 influxd.config。 第二步 然后修改influxd.config文件中的相关配置&#xff0c;保存。再用influxd -config influxd.config指定默认的配置文件启动服务。...

杭州信贷网站制作/设计网站免费素材

Win7之家(www.win7china.com)&#xff1a;Win7系统优化&#xff1a;如何移动Win7我的文档保存位置如何把Win7用户文件夹移动到E盘&#xff1f;怎么把win7的用户文件夹移动到其他盘&#xff1f;如何把Win7在C盘的用户文件夹转移到其他分区&#xff1f;用户文件夹包含了各种用户数…...

wordpress 附件密码保护/电脑软件推广平台

一、动图演示 二、思路分析 1. 相邻两个数两两相比&#xff0c;n[i]跟n[j1]比&#xff0c;如果n[i]>n[j1]&#xff0c;则将连个数进行交换&#xff0c; 2. j, 重复以上步骤&#xff0c;第一趟结束后&#xff0c;最大数就会被确定在最后一位&#xff0c;这就是冒泡排序又称…...

wordpress文章导入插件/百度风云榜小说排行榜历届榜单

在文章的开头&#xff0c;先说下NPE问题&#xff0c;NPE问题就是&#xff0c;我们在开发中经常碰到的NullPointerException.假设我们有两个类&#xff0c;他们的UML类图如下图所示 在这种情况下&#xff0c;有如下代码 user.getAddress().getProvince();这种写法&#xff0c;在…...