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

Linux(Centos 7.6)软件包安装

 Linux软件安装,常见的有三种方式,rpm方式yum方式源码编译安装方式。其中rpm方式可能存在依赖方式,可能会比较麻烦;源码编译安装同样可能会缺少一些编译需要的软件需要安装,也会比较麻烦;相对比较好的方式是yum方式,只要源仓库软件包齐全,安装时,缺少的依赖,会自动进行安装,简单方便。推荐使用yum方式

注:除以上三种方式外,也有其他的一些安装方式,比如有一些应用软件,解压安装包后,里面可能有install的shell脚本或者python脚本,执行这些脚本进行安装。

1.rpm方式安装

1.1.rpm软件包下载上传

1.双击iso文件,使用DVD驱动器加载iso文件,Packages目录下找httpd的软件包。

注:也可以去网络上找对应Linux系统版本的rpm包

2.左上角的搜索框,填写httpd-搜索,找到httpd-后紧接版本号的文件,鼠标选中推出到本地。

3.通过SFTP协议工具(如Xftp)上传httpd软件包,上传到Downloads目录。

[root@localhost ~]# cd Downloads/
[root@localhost Downloads]# ll
total 2780
-rw-r--r--. 1 root root 2844028 Dec 24 16:18 httpd-2.4.6-88.el7.centos.x86_64.rpm
[root@localhost Downloads]# 

 1.2.rpm方式安装软件包

1.rpm方式安装软件包,可能会出现如下情况,错误信息提示:Failed dependencies(错误的依赖),代表安装httpd需要提前安装httpd-tools、libapr-1.so.0相关的软件包、libaprutil-1.so.0相关软件包。

注:这里需要注意,httpd-tools是明确直到缺少什么软件包,可以去镜像或者网络上下载;但是下面两个提示有一些是无法确认具体缺什么,只能找apr相关的软件包,安装后再安装httpd服务,软件包的查找、下载、上传、安装、确认等步骤都很麻烦。像这类软件依赖多的情况,建议使用yum方式安装。

[root@localhost Downloads]# rpm -ivh httpd-2.4.6-88.el7.centos.x86_64.rpm 
error: Failed dependencies:/etc/mime.types is needed by httpd-2.4.6-88.el7.centos.x86_64httpd-tools = 2.4.6-88.el7.centos is needed by httpd-2.4.6-88.el7.centos.x86_64libapr-1.so.0()(64bit) is needed by httpd-2.4.6-88.el7.centos.x86_64libaprutil-1.so.0()(64bit) is needed by httpd-2.4.6-88.el7.centos.x86_64

2.部分简单的软件是可以直接使用rpm方式安装的;如free软件包,上传free软件包,直接使用rpm -ivh 软件包文件的名称即可安装,提示already installed即安装完成。

rpm -ivh中,i代表install(安装),v代表verbose(详细信息),h代表hash(打印散列标记)

[root@localhost Downloads]# ll
total 2828
-rw-r--r--. 1 root root 2844028 Dec 24 16:18 httpd-2.4.6-88.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root   47508 Dec 24 16:39 tree-1.6.0-10.el7.x86_64.rpm
[root@localhost Downloads]# rpm -ivh tree-1.6.0-10.el7.x86_64.rpm 
Preparing...                          ################################# [100%]package tree-1.6.0-10.el7.x86_64 is already installed
[root@localhost Downloads]# rpm -qa | grep tree
tree-1.6.0-10.el7.x86_64
[root@localhost Downloads]# 

2.yum方式安装

2.1.yum源配置

yum详细的配置步骤见Linux(Centos 7.6)yum源配置

2.2.yum源方式安装软件包

yum方式安装,直接执行yum install 软件包名称(不是文件名称,不带版本号);安装过程可以看到具体还需要安装哪些依赖的软件包(依赖软件包包括apr、apr-util、httpd-tools、mailcap),最后看到Complete!提示即安装完成。

[root@localhost Downloads]# yum install httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-99.el7.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-99.el7.centos.1 for package: httpd-2.4.6-99.el7.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-99.el7.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-99.el7.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-99.el7.centos.1.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-7.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7_9.1 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-99.el7.centos.1 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================================================Package                  Arch                Version                               Repository            Size
===============================================================================================================
Installing:httpd                    x86_64              2.4.6-99.el7.centos.1                 updates              2.7 M
Installing for dependencies:apr                      x86_64              1.4.8-7.el7                           base                 104 kapr-util                 x86_64              1.5.2-6.el7_9.1                       updates               92 khttpd-tools              x86_64              2.4.6-99.el7.centos.1                 updates               94 kmailcap                  noarch              2.1.41-2.el7                          base                  31 kTransaction Summary
===============================================================================================================
Install  1 Package (+4 Dependent packages)Total download size: 3.0 M
Installed size: 10 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): apr-util-1.5.2-6.el7_9.1.x86_64.rpm                                              |  92 kB  00:00:04     
(2/5): apr-1.4.8-7.el7.x86_64.rpm                                                       | 104 kB  00:00:04     
(3/5): httpd-tools-2.4.6-99.el7.centos.1.x86_64.rpm                                     |  94 kB  00:00:00     
(4/5): httpd-2.4.6-99.el7.centos.1.x86_64.rpm                                           | 2.7 MB  00:00:06     
(5/5): mailcap-2.1.41-2.el7.noarch.rpm                                                  |  31 kB  00:00:04     
---------------------------------------------------------------------------------------------------------------
Total                                                                          311 kB/s | 3.0 MB  00:00:09     
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : apr-1.4.8-7.el7.x86_64                                                                      1/5 Installing : apr-util-1.5.2-6.el7_9.1.x86_64                                                             2/5 Installing : httpd-tools-2.4.6-99.el7.centos.1.x86_64                                                    3/5 Installing : mailcap-2.1.41-2.el7.noarch                                                                 4/5 Installing : httpd-2.4.6-99.el7.centos.1.x86_64                                                          5/5 Verifying  : httpd-2.4.6-99.el7.centos.1.x86_64                                                          1/5 Verifying  : mailcap-2.1.41-2.el7.noarch                                                                 2/5 Verifying  : apr-1.4.8-7.el7.x86_64                                                                      3/5 Verifying  : httpd-tools-2.4.6-99.el7.centos.1.x86_64                                                    4/5 Verifying  : apr-util-1.5.2-6.el7_9.1.x86_64                                                             5/5 Installed:httpd.x86_64 0:2.4.6-99.el7.centos.1                                                                         Dependency Installed:apr.x86_64 0:1.4.8-7.el7       apr-util.x86_64 0:1.5.2-6.el7_9.1  httpd-tools.x86_64 0:2.4.6-99.el7.centos.1 mailcap.noarch 0:2.1.41-2.el7 Complete!
[root@localhost Downloads]# rpm -qa | grep httpd
httpd-2.4.6-99.el7.centos.1.x86_64
httpd-tools-2.4.6-99.el7.centos.1.x86_64

3.源码编译安装

3.1.httpd软件卸载

注:以下卸载方法,谨慎卸载ssh相关的软件包,卸载ssh相关的软件包可能导致远程ssh不能访问,然后必须去机房服务器上去恢复ssh服务(很麻烦)。

1.httpd软件包卸载可以使用rpm -e 软件包名称-e代表erase(擦除软件)。

[root@localhost Downloads]# rpm -e httpd
[root@localhost Downloads]# rpm -qa | grep httpd
httpd-tools-2.4.6-99.el7.centos.1.x86_64
[root@localhost Downloads]# 

2.httpd软件包卸载也可以使用yum remove 软件包名称

[root@localhost Downloads]# yum remove httpd
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-99.el7.centos.1 will be erased
--> Finished Dependency ResolutionDependencies Resolved===============================================================================================================Package              Arch                  Version                              Repository               Size
===============================================================================================================
Removing:httpd                x86_64                2.4.6-99.el7.centos.1                @updates                9.4 MTransaction Summary
===============================================================================================================
Remove  1 PackageInstalled size: 9.4 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionErasing    : httpd-2.4.6-99.el7.centos.1.x86_64                                                          1/1 Verifying  : httpd-2.4.6-99.el7.centos.1.x86_64                                                          1/1 Removed:httpd.x86_64 0:2.4.6-99.el7.centos.1                                                                         Complete!
[root@localhost Downloads]# rpm -qa | grep httpd
httpd-tools-2.4.6-99.el7.centos.1.x86_64
[root@localhost Downloads]# 

3.2.httpd源码下载

1.下载地址:Index of /httpd,双击软件包名称进行下载。

2.如果linux(Centos 7.6)可以连接外网,可以直接使用wget进行下载。 

[root@localhost Downloads]# wget https://dlcdn.apache.org/httpd/httpd-2.4.62.tar.gz
--2024-12-24 16:52:14--  https://dlcdn.apache.org/httpd/httpd-2.4.62.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9872432 (9.4M) [application/x-gzip]
Saving to: ‘httpd-2.4.62.tar.gz’100%[=====================================================================>] 9,872,432    971KB/s   in 11s    2024-12-24 16:52:30 (898 KB/s) - ‘httpd-2.4.62.tar.gz’ saved [9872432/9872432][root@localhost Downloads]# ll httpd-2.4.62.tar.gz 
-rw-r--r--. 1 root root 9872432 Jul 18 01:48 httpd-2.4.62.tar.gz

3.3.httpd源码安装

3.3.1.解压安装包

tar.gz后缀的压缩包代表gzip压缩格式的压缩包,解压命令为targzip压缩方式对应解压参数是zx代表解压v代表详细信息f后跟压缩文件。解压后可以看到httpd-2.4.62的目录。

[root@localhost Downloads]# tar -zxvf httpd-2.4.62.tar.gz 
httpd-2.4.62/
httpd-2.4.62/acinclude.m4
httpd-2.4.62/README.cmake
httpd-2.4.62/INSTALL
httpd-2.4.62/CMakeLists.txt
httpd-2.4.62/LICENSE
... ...
[root@localhost Downloads]# ll
total 12476
drwxr-xr-x. 13  501 games    4096 Jul 15 20:12 httpd-2.4.62
-rw-r--r--.  1 root root  9872432 Jul 18 01:48 httpd-2.4.62.tar.gz
-rw-r--r--.  1 root root  2844028 Dec 24 16:18 httpd-2.4.6-88.el7.centos.x86_64.rpm
-rw-r--r--.  1 root root    47508 Dec 24 16:39 tree-1.6.0-10.el7.x86_64.rpm
[root@localhost Downloads]# 

3.3.2.源码安装

3.3.2.1.安装说明

进入解压目录,查看INSTALL文件,即可了解如何进行软件的编译、安装、启动服务。

./configure --prefix=PREFIX:是配置检查,执行该脚本主要是检查环境是否符合要求,也可以定义一些功能,如--prefix=PREFIX部分可以写为--prefix=/usr/local/httpd,以此定义httpd服务安装在/usr/lical/httpd目录。

[root@localhost Downloads]# cd httpd-2.4.62/
[root@localhost httpd-2.4.62]#
[root@localhost httpd-2.4.62]# cat INSTALL APACHE INSTALLATION OVERVIEWQuick Start - Unix------------------For complete installation documentation, see [ht]docs/manual/install.html orhttp://httpd.apache.org/docs/2.4/install.html$ ./configure --prefix=PREFIX$ make$ make install$ PREFIX/bin/apachectl start
... ...
3.3.2.2.源码编译安装前检查

1.创建安装目录,执行编译安装前检查命令。

[root@localhost httpd-2.4.62]# mkdir /usr/local/httpd
[root@localhost httpd-2.4.62]# 
[root@localhost httpd-2.4.62]# ./configure --prefix=/usr/local/httpd
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure: 
configure: Configuring Apache Portable Runtime library...
configure: 
checking for APR... no
configure: error: APR not found.  Please read the documentation.
[root@localhost httpd-2.4.62]# rpm -qa | grep apr
apr-util-1.5.2-6.el7_9.1.x86_64
apr-1.4.8-7.el7.x86_64

2.检查报错,提示APR没发现,但是apr相关的已经安装,处理方式是下载apr源码文件到httpd源码目录。

下载地址:Download - The Apache Portable Runtime Project,网站内查看,鼠标右键查看下载链接,然后wget下载或者下载后上传Linux服务器。

[root@localhost httpd-2.4.62]# cd ..
[root@localhost Downloads]# wget https://dlcdn.apache.org//apr/apr-1.7.5.tar.gz
--2024-12-24 17:34:46--  https://dlcdn.apache.org//apr/apr-1.7.5.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1131871 (1.1M) [application/x-gzip]
Saving to: ‘apr-1.7.5.tar.gz’100%[=====================================================================>] 1,131,871    725KB/s   in 1.5s   2024-12-24 17:34:53 (725 KB/s) - ‘apr-1.7.5.tar.gz’ saved [1131871/1131871][root@localhost Downloads]# wget https://dlcdn.apache.org//apr/apr-util-1.6.3.tar.gz
--2024-12-24 17:35:02--  https://dlcdn.apache.org//apr/apr-util-1.6.3.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 556623 (544K) [application/x-gzip]
Saving to: ‘apr-util-1.6.3.tar.gz’100%[=====================================================================>] 556,623      224KB/s   in 2.4s   2024-12-24 17:35:10 (224 KB/s) - ‘apr-util-1.6.3.tar.gz’ saved [556623/556623][root@localhost Downloads]#

解压安装包,修改解压后的目录名称(去掉版本号信息),最后移动到http源码的srclib目录下。 

[root@localhost Downloads]# tar -zxf apr-1.7.5.tar.gz 
[root@localhost Downloads]# tar -zxf apr-util-1.6.3.tar.gz  
[root@localhost Downloads]# mv apr-1.7.5 apr
[root@localhost Downloads]# mv apr-util-1.6.3 apr-util
[root@localhost Downloads]# mv apr httpd-2.4.62/srclib/
[root@localhost Downloads]# mv apr-util httpd-2.4.62/srclib/

3.再次源码编译安装前检查。提示缺少pcre,查看有pcre,还需要pcre-devel,yum安装pcre-devel。 

[root@localhost httpd-2.4.62]# ./configure --prefix=/usr/local/httpd --with-include-apr
... ...
configure: error: pcre(2)-config for libpcre not found. PCRE is required and available from http://pcre.org/
[root@localhost httpd-2.4.62]# 
[root@localhost httpd-2.4.62]# rpm -qa | grep pcre
pcre2-utf16-10.23-2.el7.x86_64
pcre2-10.23-2.el7.x86_64
pcre-8.32-17.el7.x86_64
[root@localhost httpd-2.4.62]# yum install pcre-devel
... ...
Installed:pcre-devel.x86_64 0:8.32-17.el7                                                                              Complete!
[root@localhost httpd-2.4.62]#

4.再次源码编译安装前检查,最后信息如下,没有报错信息,表示成功。

[root@localhost httpd-2.4.62]# ./configure --prefix=/usr/local/httpd --with-include-apr
... ...
config.status: executing default commands
configure: summary of build options:Server Version: 2.4.62Install prefix: /usr/local/httpdC compiler:     gcc -std=gnu11CFLAGS:          -g -O2 -pthread  CPPFLAGS:        -DLINUX -D_REENTRANT -D_GNU_SOURCE  LDFLAGS:           LIBS:             C preprocessor: gcc -std=gnu11 -E[root@localhost httpd-2.4.62]#
3.3.2.3.make编译

1.httpd-2.4.62目录下执行make进行编译。

[root@localhost httpd-2.4.62]# make
... ...
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory#include <expat.h>^
compilation terminated.
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: Leaving directory `/root/Downloads/httpd-2.4.62/srclib/apr-util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/Downloads/httpd-2.4.62/srclib/apr-util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Downloads/httpd-2.4.62/srclib'
make: *** [all-recursive] Error 1
[root@localhost httpd-2.4.62]# 

2.提示在 #include <expat.h>右下角的箭头,检查发现有expat,还需要expat-devel,使用yum安装。

[root@localhost httpd-2.4.62]# rpm -qa | grep expat
expat-2.1.0-10.el7_3.x86_64
[root@localhost httpd-2.4.62]# yum install expat-devel
... ...
Installed:expat-devel.x86_64 0:2.1.0-15.el7_9                                                                          Dependency Updated:expat.x86_64 0:2.1.0-15.el7_9                                                                                Complete!
[root@localhost httpd-2.4.62]#

3.再次执行make编译,执行最后信息如下,没有报错信息,则表示成功。

[root@localhost httpd-2.4.62]# make
... ...
/root/Downloads/httpd-2.4.62/srclib/apr/libtool --silent --mode=link gcc -std=gnu11  -g -O2 -pthread           -o mod_rewrite.la -rpath /usr/local/httpd/modules -module -avoid-version  mod_rewrite.lo 
make[4]: Leaving directory `/root/Downloads/httpd-2.4.62/modules/mappers'
make[3]: Leaving directory `/root/Downloads/httpd-2.4.62/modules/mappers'
make[2]: Leaving directory `/root/Downloads/httpd-2.4.62/modules'
make[2]: Entering directory `/root/Downloads/httpd-2.4.62/support'
make[2]: Leaving directory `/root/Downloads/httpd-2.4.62/support'make[1]: Leaving directory `/root/Downloads/httpd-2.4.62'
[root@localhost httpd-2.4.62]# 
3.3.2.4.make install编译安装
[root@localhost httpd-2.4.62]# make install
... ...
Installing man pages and online manual
mkdir /usr/local/httpd/man
mkdir /usr/local/httpd/man/man1
mkdir /usr/local/httpd/man/man8
mkdir /usr/local/httpd/manual
make[1]: Leaving directory `/root/Downloads/httpd-2.4.62'
[root@localhost httpd-2.4.62]# 

3.3.3.服务和验证

1.服务启动

[root@localhost httpd-2.4.62]# /usr/local/httpd/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[root@localhost httpd-2.4.62]# 
[root@localhost httpd-2.4.62]# hostnamectl set-hostname node2
[root@localhost httpd-2.4.62]# 
[root@localhost httpd-2.4.62]# /usr/local/httpd/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::6d79:37d0:2840:d17f%ens33. Set the 'ServerName' directive globally to suppress this message
httpd (pid 119463) already running
[root@localhost httpd-2.4.62]# 

2.服务启动验证,网页访问IP地址信息如下

如果无法访问,检查防火墙是否关闭,关闭命令systemctl stop firewalld.service。

相关文章:

Linux(Centos 7.6)软件包安装

Linux软件安装&#xff0c;常见的有三种方式&#xff0c;rpm方式、yum方式、源码编译安装方式。其中rpm方式可能存在依赖方式&#xff0c;可能会比较麻烦&#xff1b;源码编译安装同样可能会缺少一些编译需要的软件需要安装&#xff0c;也会比较麻烦&#xff1b;相对比较好的方…...

[WASAPI]音频API:从Qt MultipleMedia走到WASAPI,相似与不同

[WASAPI] 从Qt MultipleMedia 来看WASAPI 最近在学习有关Windows上的音频驱动相关的知识&#xff0c;在正式开始说WASAPI之前&#xff0c;我想先说一说Qt的Multiple Media&#xff0c;为什么呢&#xff1f;因为Qt的MultipleMedia实际上是WASAPI的一层封装&#xff0c;它在是线…...

【畅购商城】微信支付之支付模块

目录 支付页面 接口 后端实现 前端实现​​​​​​​ ​​​​​​​支付页面 步骤一&#xff1a;创建 flow3.vue组件 步骤二&#xff1a;引入第三方资源&#xff08;js、css&#xff09; <script> import TopNav from ../components/TopNav import Footer from …...

网络安全专有名词详解_2

57.Webshell 就是以ASP、php、jsp、cgi等网页文件形式存在的一种命令执行环境&#xff0c;也叫做网页的后门&#xff0c;可以上传下载文件&#xff0c;查看数据库和执行任意的程序命令等。 58.跨站攻击 XSS&#xff0c;是指攻击者利用网站程序对用户输入过滤不足&#xff0c;输…...

【传感器技术与应用】第2章 基本电量传感器,电位器式传感器,电感式传感器,电容式传感器

注作者了解更多 我的其他CSDN专栏 毕业设计 求职面试 大学英语 过程控制系统 工程测试技术 虚拟仪器技术 可编程控制器 工业现场总线 数字图像处理 智能控制 传感器技术 嵌入式系统 复变函数与积分变换 单片机原理 线性代数 大学物理 热工与工程流体力学 数…...

【day20】集合深入探讨

模块19回顾 在深入探讨模块20之前&#xff0c;让我们回顾一下day19中的关键内容&#xff1a; Collection集合&#xff1a;单列集合的顶级接口&#xff0c;提供了add、addAll、clear、size、isEmpty、remove、toArray、contains等方法。迭代器&#xff08;Iterator&#xff09…...

【英语语法】用must表对过去推测时,要用完成时must have been / must have done(不能直接用过去时)

文章目录 疑问解释1. 表达过去的推测2. 与时态一致3. 语法结构的限制4. 例子对比总结 疑问 This must have been a year-round activity as no structures have been found which would have been used to shelter animals in the winter. 为什么must表示对过去推测要用完成时&…...

数值计算期末考试重点(一)(黄云清版教材)

1.误差的分类 2.绝对误差和绝对误差限 3.绝对误差和绝对误差限 例题&#xff08;课后习题1.2&#xff09; 4.有效数字 例题&#xff08;课后习题1.6&#xff09; 5.算法的数值稳定性 例题&#xff08;课后习题1.9&#xff09; 这个手算比较艰难&#xff0c;还是给计算机算吧&am…...

使用 pushy 热更新后 sentry 不能正常显示源码

问题 使用 Android Studio 打包后&#xff0c;上传使用 sentry 官网命令打包的 sourcemap 文件&#xff0c;sentry能正常显示异常位置源码。 使用 pushy 热更新之后&#xff0c;sentry 不能正常显示异常位置的源代码。 如下图&#xff1a; 问题原因&#xff1a; 使用 pushy …...

IntelliJ IDEA 远程调试

IntelliJ IDEA 远程调试 在平时开发 JAVA 程序时&#xff0c;在遇到比较棘手的 Bug 或者是线上线下结果不一致的情况下&#xff0c;我们会通过打 Log 或者 Debug 的方式去定位并解决问题&#xff0c;两种方式各有利弊&#xff0c;今天就简要介绍下如何通过远程 Debug 的情况下…...

Java实现简单爬虫——爬取疫情数据

1.项目准备 在项目中使用到了jsoup和fastjson jsoup用于创建一个连接(绘画) 用于获取和解析HTML页面 而fastjson对数据进行一个格式化 在pom.xml导入坐标 <dependencies><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</a…...

大数据技术-Hadoop(一)Hadoop集群的安装与配置

目录 一、准备工作 1、安装jdk&#xff08;每个节点都执行&#xff09; 2、修改主机配置 &#xff08;每个节点都执行&#xff09; 3、配置ssh无密登录 &#xff08;每个节点都执行&#xff09; 二、安装Hadoop&#xff08;每个节点都执行&#xff09; 三、集群启动配置&a…...

04.HTTPS的实现原理-HTTPS的混合加密流程

04.HTTPS的实现原理-HTTPS的混合加密流程 简介1. 非对称加密与对称加密2. 非对称加密的工作流程3. 对称加密的工作流程4. HTTPS的加密流程总结 简介 主要讲述了HTTPS的加密流程&#xff0c;包括非对称加密和对称加密两个阶段。首先&#xff0c;客户端向服务器发送请求&#xf…...

flutter插件开发-ios

flutter插件开发是一个重要的技能&#xff0c;拓展flutter与原生的通信&#xff0c;将一些公用的东西封装&#xff0c;给不同的项目使用。 阅读前置&#xff1a; flutter基本通道调用 objective-c基础语法 ios项目基础知识 目录 1、创建一个插件项目2、项目结构3、编写原生代码…...

【AI日记】24.12.29 kaggle 比赛 2-17

【AI论文解读】【AI知识点】【AI小项目】【AI战略思考】【AI日记】 工作 参加&#xff1a;kaggle 比赛 Regression with an Insurance Dataset时间&#xff1a;6 小时 读书 书名&#xff1a;教育的本质时间&#xff1a;1 小时 律己 工作时间&#xff1a;优作息&#xff1a…...

设计模式-创建型-工厂方法模式

什么是工厂方法模式&#xff1f; 工厂方法模式&#xff08;Factory Method Pattern&#xff09;是 创建型设计模式之一&#xff0c;目的是通过定义一个用于创建对象的接口&#xff0c;让子类决定实例化哪个类。简而言之&#xff0c;工厂方法模式通过延迟对象的创建过程到子类来…...

解决opencv在windows环境下读取中文图片名问题

在Windows系统下&#xff0c;cv2读取中文图片名时可能会报错&#xff0c;主要是因为OpenCV的imread函数在处理文件路径时&#xff0c;默认使用的是系统的编码格式&#xff0c;而Windows的默认编码可能与文件名的编码不匹配。具体原因包括&#xff1a; 编码不匹配&#xff1a;Wi…...

Apache Commons Pool :介绍与使用

Apache Commons Pool &#xff1a;介绍与使用 什么是 commons-pool2&#xff1f; commons-pool2 是 Apache Commons 提供的一个开源对象池实现框架。它旨在为应用程序提供通用的对象池支持&#xff0c;方便开发者管理资源&#xff08;如数据库连接、网络连接等&#xff09;复…...

sentinel-请求限流、线程隔离、本地回调、熔断

请求限流&#xff1a;控制QPS来达到限流的目的 线程隔离&#xff1a;控制线程数量来达到限流的目录 本地回调&#xff1a;当线程被限流、隔离、熔断之后、就不会发起远程调用、而是使用本地已经准备好的回调去提醒用户 熔断&#xff1a;熔断也叫断路器&#xff0c;当失败、或者…...

微信小程序 app.json 配置文件解析与应用

目录 一、什么是 app.json&#xff1f; 二、app.json 文件的基本结构 三、详细解析 app.json 配置项 1. pages&#xff1a;小程序页面路径配置 2. window&#xff1a;窗口样式配置 3. tabBar&#xff1a;底部标签栏配置 4. networkTimeout&#xff1a;网络请求超时配置 …...

第二篇:Liunx环境下搭建PaddleOCR识别

第二篇&#xff1a;Liunx环境下搭建Paddleocr识别 一&#xff1a;前言二&#xff1a;安装PaddleOCR三&#xff1a;验证PaddleOCR是否安装成功 一&#xff1a;前言 PaddleOCR作为业界领先的多语言开源OCR工具库&#xff0c;其核心优势在于深度整合了百度自主研发的飞桨PaddlePa…...

4.1 HarmonyOS NEXT原生AI能力集成:盘古大模型端侧部署与多模态交互实战

HarmonyOS NEXT原生AI能力集成&#xff1a;盘古大模型端侧部署与多模态交互实战 在HarmonyOS NEXT的全场景生态中&#xff0c;原生AI能力成为连接设备、服务与用户的核心纽带。通过盘古大模型端侧轻量化部署、多模态交互技术及环境感知系统&#xff0c;开发者能够构建"主…...

Java基础 Day28 完结篇

一、方法引用 对 Lambda 表达式的进一步简化 方法引用使用一对冒号 :: Tips&#xff1a;静态方法用类名加双冒号&#xff0c;非静态方法用对象名加双冒号 通过方法的名字来指向一个方法 参数可推导即可省略 可以使语言的构造更紧凑简洁&#xff0c;减少冗余代码 二、单元…...

内存管理【Linux操作系统】

文章目录 简单谈一下物理内存管理页框为什么要把物理内存划分成一个一个固定大小的页框使用&#xff1f;对页框进行描述对页框进行组织管理虚拟地址→物理地址&#xff08;真实的页表&#xff09;真实的页表那我们如何把虚拟地址→物理地址呢&#xff1f;页表懒加载时&#xff…...

华为OD机试真题——文件目录大小(2025 A卷:100分)Java/python/JavaScript/C++/C语言/GO六种语言最佳实现

2025 A卷 100分 题型 本文涵盖详细的问题分析、解题思路、代码实现、代码详解、测试用例以及综合分析; 并提供Java、python、JavaScript、C++、C语言、GO六种语言的最佳实现方式! 2025华为OD真题目录+全流程解析/备考攻略/经验分享 华为OD机试真题《文件目录大小》: 目录 题…...

Linux应用开发之网络套接字编程

套接字&#xff08;Socket&#xff09;是计算机网络数据通信的基本概念和编程接口&#xff0c;允许不同主机上的进程&#xff08;运行中的程序&#xff09;通过网络进行数据交换。它为应用层软件提供了发送和接收数据的能力&#xff0c;使得开发者可以在不用深入了解底层网络细…...

20250529-C#知识:继承、密封类、密封方法、重写

C#知识&#xff1a;继承、密封类、密封方法、重写 继承是面向对象的三大特性之一&#xff0c;通过继承能够减少重复代码的编写&#xff0c;有助于提升开发效率。 1、继承 C#不同于C&#xff0c;只支持单继承当子类出现与父类同名的成员时&#xff0c;父类成员被隐藏&#xff0…...

spring切面

概念 两个特点&#xff1a; IOC控制反转AOP主要用来处理公共的代码 例如一个案例就是添加用户&#xff0c;重复的代码包含了记录日志、事务提交和事务回滚等&#xff0c;都是重复的&#xff0c;为了简单&#xff0c;交给AOP来做。 即将复杂的需求分解出不同方面&#xff0c…...

DNS (Domain Name System) 域名系统 将域名解析为 IP 地址

✅ DNS 服务器是指什么&#xff1f; **DNS 服务器&#xff08;Domain Name System Server&#xff09;是一个将域名&#xff08;如 www.baidu.com&#xff09;解析为 IP 地址&#xff08;如 220.181.38.150&#xff09;**的服务器。 &#x1f9e0; 一句话理解&#xff1a; DNS…...

NVIDIA DOCA 3.0:引领AI基础设施革命的引擎简析

引言 在当今快速发展的AI时代,大规模AI模型的训练和部署对数据中心基础设施提出了前所未有的挑战。传统的CPU-centric架构已经难以满足超大规模AI工作负载对性能、效率和安全性的需求。NVIDIA于2025年4月正式发布了DOCA 3.0软件框架,这一创新性平台彻底改变了AI基础设施的设计…...