CentOS7下yum安装php7

1.安装epel-release

EPEL(Extra Packages for Enterprise Linux)存储库提供了标准 Red Hat 和 CentOS 存储库中未包含的其他软件包。EPEL 存储库的创建是因为 Fedora 贡献者希望使用他们在 Red Hat Enterprise Linux(RHEL)及其衍生产品(如CentOS,Oracle Linux和Scientific Linux)上维护的软件包。
启用此存储库后,您可以访问流行的软件包,包括 Nginx等。

命令:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -ivh epel-release-latest-7.noarch.rpm 

[root@centos79-3 ~]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
--2023-08-31 15:37:33--  https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.60.22, 38.145.60.24, 38.145.60.23
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.60.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15608 (15K) [application/x-rpm]
Saving to: ‘epel-release-latest-7.noarch.rpm’100%[================================================================>] 15,608      48.1KB/s   in 0.3s   2023-08-31 15:37:35 (48.1 KB/s) - ‘epel-release-latest-7.noarch.rpm’ saved [15608/15608][root@centos79-3 ~]# ls
anaconda-ks.cfg  basic_init.sh  epel-release-latest-7.noarch.rpm
[root@centos79-3 ~]# rpm -ivh epel-release-latest-7.noarch.rpm 
Preparing...                          ################################# [100%]package epel-release-7-14.noarch is already installed
[root@centos79-3 ~]# cd /etc/yum.repos.d/
[root@centos79-3 yum.repos.d]# ls
bak           epel.repo          nginx.repo             webtatic.repo
CentOS7.repo  epel-testing.repo  webtatic-archive.repo  webtatic-testing.repo
[root@centos79-3 yum.repos.d]# 

通过yum repolist验证epel存储库是否启用,该命令将显示已启用的存储库的 repo ID,名称和程序包数量。输出的信息中如包含 EPEL存储库这一行,说明EPEL库已启用。

命令:

yum repolist

[root@centos79-3 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* epel: mirrors.bfsu.edu.cn
repo id                              repo name                                                      status
CentOS7                              "localserver"                                                   4,070
*epel/x86_64                         Extra Packages for Enterprise Linux 7 - x86_64                 13,770
nginx-stable/7/x86_64                nginx stable repo                                                 318
webtatic/x86_64                      Webtatic Repository EL7 - x86_64                                  789
repolist: 18,947
[root@centos79-3 yum.repos.d]# 

2.安装php7的rpm源

对于服务器而言,php7的rpm源最为常见的即是提供 web 服务,而对于 web 服务中常用的一些软件,在系统默认的源下,一般版本较低,如若需要使用相对较新的版本(如 PHP),webtatic 源是一个很好的选择。

命令:

wget https://mirror.webtatic.com/yum/el7/webtatic-release.rpm --no-check-certificate

rpm -ivh webtatic-release.rpm

yum list |grep php7

[root@centos79-3 ~]# wget https://mirror.webtatic.com/yum/el7/webtatic-release.rpm --no-check-certificate
--2023-08-31 15:50:44--  https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Resolving mirror.webtatic.com (mirror.webtatic.com)... 104.21.71.8, 172.67.141.68, 2606:4700:3037::6815:4708, ...
Connecting to mirror.webtatic.com (mirror.webtatic.com)|104.21.71.8|:443... connected.
WARNING: cannot verify mirror.webtatic.com's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=E1’:Issued certificate has expired.
HTTP request sent, awaiting response... 200 OK
Length: 13152 (13K) [application/x-rpm]
Saving to: ‘webtatic-release.rpm’100%[================================================================>] 13,152      40.2KB/s   in 0.3s   2023-08-31 15:50:48 (40.2 KB/s) - ‘webtatic-release.rpm’ saved [13152/13152][root@centos79-3 ~]# ls
anaconda-ks.cfg  basic_init.sh  epel-release-latest-7.noarch.rpm  webtatic-release.rpm
[root@centos79-3 ~]# rpm -ivh webtatic-release.rpm 
Preparing...                          ################################# [100%]package webtatic-release-7-3.noarch is already installed
[root@centos79-3 yum.repos.d]# yum list |grep php7
mod_php71w.x86_64                        7.1.33-1.w7                   webtatic 
mod_php72w.x86_64                        7.2.34-1.w7                   webtatic 
php70w.x86_64                            7.0.33-1.w7                   webtatic 
php70w-bcmath.x86_64                     7.0.33-1.w7                   webtatic 
php70w-cli.x86_64                        7.0.33-1.w7                   webtatic 
php70w-common.x86_64                     7.0.33-1.w7                   webtatic 
php70w-dba.x86_64                        7.0.33-1.w7                   webtatic 
php70w-devel.x86_64                      7.0.33-1.w7                   webtatic 
php70w-embedded.x86_64                   7.0.33-1.w7                   webtatic 
php70w-enchant.x86_64                    7.0.33-1.w7                   webtatic 
php70w-fpm.x86_64                        7.0.33-1.w7                   webtatic 
php70w-gd.x86_64                         7.0.33-1.w7                   webtatic 
php70w-imap.x86_64                       7.0.33-1.w7                   webtatic 
php70w-interbase.x86_64                  7.0.33-1.w7                   webtatic 
php70w-intl.x86_64                       7.0.33-1.w7                   webtatic 
php70w-ldap.x86_64                       7.0.33-1.w7                   webtatic 
php70w-mbstring.x86_64                   7.0.33-1.w7                   webtatic 
php70w-mcrypt.x86_64                     7.0.33-1.w7                   webtatic 
php70w-mysql.x86_64                      7.0.33-1.w7                   webtatic 
php70w-mysqlnd.x86_64                    7.0.33-1.w7                   webtatic 
php70w-odbc.x86_64                       7.0.33-1.w7                   webtatic 
php70w-opcache.x86_64                    7.0.33-1.w7                   webtatic 
php70w-pdo.x86_64                        7.0.33-1.w7                   webtatic 
php70w-pdo_dblib.x86_64                  7.0.33-1.w7                   webtatic 
php70w-pear.noarch                       1:1.10.4-1.w7                 webtatic 
php70w-pecl-apcu.x86_64                  5.1.9-1.w7                    webtatic 
php70w-pecl-apcu-devel.x86_64            5.1.9-1.w7                    webtatic 
php70w-pecl-geoip.x86_64                 1.1.1-1.w7                    webtatic 
php70w-pecl-igbinary.x86_64              2.0.5-1.w7                    webtatic 
php70w-pecl-igbinary-devel.x86_64        2.0.5-1.w7                    webtatic 
php70w-pecl-imagick.x86_64               3.4.3-1.w7                    webtatic 
php70w-pecl-imagick-devel.x86_64         3.4.3-1.w7                    webtatic 
php70w-pecl-memcached.x86_64             3.0.4-1.w7                    webtatic 
php70w-pecl-mongodb.x86_64               1.5.3-1.w7                    webtatic 
php70w-pecl-redis.x86_64                 3.1.6-1.w7                    webtatic 
php70w-pecl-xdebug.x86_64                2.6.1-1.w7                    webtatic 
php70w-pgsql.x86_64                      7.0.33-1.w7                   webtatic 
php70w-phpdbg.x86_64                     7.0.33-1.w7                   webtatic 
php70w-process.x86_64                    7.0.33-1.w7                   webtatic 
php70w-pspell.x86_64                     7.0.33-1.w7                   webtatic 
php70w-recode.x86_64                     7.0.33-1.w7                   webtatic 
php70w-snmp.x86_64                       7.0.33-1.w7                   webtatic 
php70w-soap.x86_64                       7.0.33-1.w7                   webtatic 
php70w-tidy.x86_64                       7.0.33-1.w7                   webtatic 
php70w-xml.x86_64                        7.0.33-1.w7                   webtatic 
php70w-xmlrpc.x86_64                     7.0.33-1.w7                   webtatic 
php71w-bcmath.x86_64                     7.1.33-1.w7                   webtatic 
php71w-cli.x86_64                        7.1.33-1.w7                   webtatic 
php71w-common.x86_64                     7.1.33-1.w7                   webtatic 
php71w-dba.x86_64                        7.1.33-1.w7                   webtatic 
php71w-devel.x86_64                      7.1.33-1.w7                   webtatic 
php71w-embedded.x86_64                   7.1.33-1.w7                   webtatic 
php71w-enchant.x86_64                    7.1.33-1.w7                   webtatic 
php71w-fpm.x86_64                        7.1.33-1.w7                   webtatic 
php71w-gd.x86_64                         7.1.33-1.w7                   webtatic 
php71w-imap.x86_64                       7.1.33-1.w7                   webtatic 
php71w-interbase.x86_64                  7.1.33-1.w7                   webtatic 
php71w-intl.x86_64                       7.1.33-1.w7                   webtatic 
php71w-ldap.x86_64                       7.1.33-1.w7                   webtatic 
php71w-mbstring.x86_64                   7.1.33-1.w7                   webtatic 
php71w-mcrypt.x86_64                     7.1.33-1.w7                   webtatic 
php71w-mysql.x86_64                      7.1.33-1.w7                   webtatic 
php71w-mysqlnd.x86_64                    7.1.33-1.w7                   webtatic 
php71w-odbc.x86_64                       7.1.33-1.w7                   webtatic 
php71w-opcache.x86_64                    7.1.33-1.w7                   webtatic 
php71w-pdo.x86_64                        7.1.33-1.w7                   webtatic 
php71w-pdo_dblib.x86_64                  7.1.33-1.w7                   webtatic 
php71w-pear.noarch                       1:1.10.4-1.w7                 webtatic 
php71w-pecl-apcu.x86_64                  5.1.9-1.w7                    webtatic 
php71w-pecl-apcu-devel.x86_64            5.1.9-1.w7                    webtatic 
php71w-pecl-geoip.x86_64                 1.1.1-1.w7                    webtatic 
php71w-pecl-igbinary.x86_64              2.0.5-1.w7                    webtatic 
php71w-pecl-igbinary-devel.x86_64        2.0.5-1.w7                    webtatic 
php71w-pecl-imagick.x86_64               3.4.3-1.w7                    webtatic 
php71w-pecl-imagick-devel.x86_64         3.4.3-1.w7                    webtatic 
php71w-pecl-memcached.x86_64             3.0.4-1.w7                    webtatic 
php71w-pecl-mongodb.x86_64               1.5.3-1.w7                    webtatic 
php71w-pecl-redis.x86_64                 3.1.6-1.w7                    webtatic 
php71w-pecl-xdebug.x86_64                2.6.1-1.w7                    webtatic 
php71w-pgsql.x86_64                      7.1.33-1.w7                   webtatic 
php71w-phpdbg.x86_64                     7.1.33-1.w7                   webtatic 
php71w-process.x86_64                    7.1.33-1.w7                   webtatic 
php71w-pspell.x86_64                     7.1.33-1.w7                   webtatic 
php71w-recode.x86_64                     7.1.33-1.w7                   webtatic 
php71w-snmp.x86_64                       7.1.33-1.w7                   webtatic 
php71w-soap.x86_64                       7.1.33-1.w7                   webtatic 
php71w-tidy.x86_64                       7.1.33-1.w7                   webtatic 
php71w-xml.x86_64                        7.1.33-1.w7                   webtatic 
php71w-xmlrpc.x86_64                     7.1.33-1.w7                   webtatic 
php72w-bcmath.x86_64                     7.2.34-1.w7                   webtatic 
php72w-cli.x86_64                        7.2.34-1.w7                   webtatic 
php72w-common.x86_64                     7.2.34-1.w7                   webtatic 
php72w-dba.x86_64                        7.2.34-1.w7                   webtatic 
php72w-devel.x86_64                      7.2.34-1.w7                   webtatic 
php72w-embedded.x86_64                   7.2.34-1.w7                   webtatic 
php72w-enchant.x86_64                    7.2.34-1.w7                   webtatic 
php72w-fpm.x86_64                        7.2.34-1.w7                   webtatic 
php72w-gd.x86_64                         7.2.34-1.w7                   webtatic 
php72w-imap.x86_64                       7.2.34-1.w7                   webtatic 
php72w-interbase.x86_64                  7.2.34-1.w7                   webtatic 
php72w-intl.x86_64                       7.2.34-1.w7                   webtatic 
php72w-ldap.x86_64                       7.2.34-1.w7                   webtatic 
php72w-mbstring.x86_64                   7.2.34-1.w7                   webtatic 
php72w-mysql.x86_64                      7.2.34-1.w7                   webtatic 
php72w-mysqlnd.x86_64                    7.2.34-1.w7                   webtatic 
php72w-odbc.x86_64                       7.2.34-1.w7                   webtatic 
php72w-opcache.x86_64                    7.2.34-1.w7                   webtatic 
php72w-pdo.x86_64                        7.2.34-1.w7                   webtatic 
php72w-pdo_dblib.x86_64                  7.2.34-1.w7                   webtatic 
php72w-pear.noarch                       1:1.10.12-1.w7                webtatic 
php72w-pecl-apcu.x86_64                  5.1.18-1.w7                   webtatic 
php72w-pecl-apcu-devel.x86_64            5.1.18-1.w7                   webtatic 
php72w-pecl-geoip.x86_64                 1.1.1-1.2.w7                  webtatic 
php72w-pecl-igbinary.x86_64              3.1.2-1.w7                    webtatic 
php72w-pecl-igbinary-devel.x86_64        3.1.2-1.w7                    webtatic 
php72w-pecl-imagick.x86_64               3.4.4-1.2.w7                  webtatic 
php72w-pecl-imagick-devel.x86_64         3.4.4-1.2.w7                  webtatic 
php72w-pecl-libsodium.x86_64             1.0.6-1.2.w7                  webtatic 
php72w-pecl-memcached.x86_64             3.1.5-1.w7                    webtatic 
php72w-pecl-mongodb.x86_64               1.7.4-1.w7                    webtatic 
php72w-pecl-redis.x86_64                 3.1.6-1.w7                    webtatic 
php72w-pecl-xdebug.x86_64                2.9.6-1.w7                    webtatic 
php72w-pgsql.x86_64                      7.2.34-1.w7                   webtatic 
php72w-phpdbg.x86_64                     7.2.34-1.w7                   webtatic 
php72w-process.x86_64                    7.2.34-1.w7                   webtatic 
php72w-pspell.x86_64                     7.2.34-1.w7                   webtatic 
php72w-recode.x86_64                     7.2.34-1.w7                   webtatic 
php72w-snmp.x86_64                       7.2.34-1.w7                   webtatic 
php72w-soap.x86_64                       7.2.34-1.w7                   webtatic 
php72w-sodium.x86_64                     7.2.34-1.w7                   webtatic 
php72w-tidy.x86_64                       7.2.34-1.w7                   webtatic 
php72w-xml.x86_64                        7.2.34-1.w7                   webtatic 
php72w-xmlrpc.x86_64                     7.2.34-1.w7                   webtatic 
[root@centos79-3 yum.repos.d]# 

3.安装php7

命令:

yum install -y php72w php72w-cli  php72w-common  php72w-devel php72w-mysql php72w-fpm

rpm -qa | grep php72

[root@centos79-3 yum.repos.d]# yum install -y php72w php72w-cli  php72w-common  php72w-devel php72w-mysql php72w-fpm php72w-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* epel: mirrors.bfsu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package php72w-fpm.x86_64 0:7.2.34-1.w7 will be installed
--> Processing Dependency: php72w-common(x86-64) = 7.2.34-1.w7 for package: php72w-fpm-7.2.34-1.w7.x86_64
---> Package php72w-mysql.x86_64 0:7.2.34-1.w7 will be installed
--> Processing Dependency: php72w-pdo(x86-64) for package: php72w-mysql-7.2.34-1.w7.x86_64
--> Running transaction check
---> Package php72w-common.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-pdo.x86_64 0:7.2.34-1.w7 will be installed
--> Finished Dependency ResolutionDependencies Resolved=============================================================================================================================================================Package                                  Arch                              Version                                Repository                           Size
=============================================================================================================================================================
Installing:php72w-fpm                               x86_64                            7.2.34-1.w7                            webtatic                            1.6 Mphp72w-mysql                             x86_64                            7.2.34-1.w7                            webtatic                             83 k
Installing for dependencies:php72w-common                            x86_64                            7.2.34-1.w7                            webtatic                            1.3 Mphp72w-pdo                               x86_64                            7.2.34-1.w7                            webtatic                             90 kTransaction Summary
=============================================================================================================================================================
Install  2 Packages (+2 Dependent packages)Total download size: 3.0 M
Installed size: 18 M
Downloading packages:
(1/4): php72w-common-7.2.34-1.w7.x86_64.rpm                                                                                           | 1.3 MB  00:00:04     
(2/4): php72w-mysql-7.2.34-1.w7.x86_64.rpm                                                                                            |  83 kB  00:00:00     
(3/4): php72w-pdo-7.2.34-1.w7.x86_64.rpm                                                                                              |  90 kB  00:00:00     
(4/4): php72w-fpm-7.2.34-1.w7.x86_64.rpm                                                                                              | 1.6 MB  00:00:04     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        624 kB/s | 3.0 MB  00:00:04     
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : php72w-common-7.2.34-1.w7.x86_64                                                                                                          1/4 Installing : php72w-pdo-7.2.34-1.w7.x86_64                                                                                                             2/4 Installing : php72w-mysql-7.2.34-1.w7.x86_64                                                                                                           3/4 Installing : php72w-fpm-7.2.34-1.w7.x86_64                                                                                                             4/4 Verifying  : php72w-mysql-7.2.34-1.w7.x86_64                                                                                                           1/4 Verifying  : php72w-fpm-7.2.34-1.w7.x86_64                                                                                                             2/4 Verifying  : php72w-pdo-7.2.34-1.w7.x86_64                                                                                                             3/4 Verifying  : php72w-common-7.2.34-1.w7.x86_64                                                                                                          4/4 Installed:php72w-fpm.x86_64 0:7.2.34-1.w7                                              php72w-mysql.x86_64 0:7.2.34-1.w7                                             Dependency Installed:php72w-common.x86_64 0:7.2.34-1.w7                                             php72w-pdo.x86_64 0:7.2.34-1.w7                                            Complete!
[root@centos79-3 yum.repos.d]# rpm -qa | grep php72w
php72w-fpm-7.2.34-1.w7.x86_64
php72w-common-7.2.34-1.w7.x86_64
php72w-mysql-7.2.34-1.w7.x86_64
php72w-cli-7.2.34-1.w7.x86_64
php72w-pdo-7.2.34-1.w7.x86_64
php72w-devel-7.2.34-1.w7.x86_64
[root@centos79-3 yum.repos.d]# 

4.查看php版本

命令:

php -v

[root@centos79-3 yum.repos.d]# php -v
PHP 7.2.34 (cli) (built: Oct  1 2020 13:37:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@centos79-3 yum.repos.d]# 

另外:

php-fpm启动

命令:

systemctl enable php-fpm

systemctl start php-fpm

systemctl status php-fpm

[root@centos79-3 yum.repos.d]# systemctl enable php-fpm
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.
[root@centos79-3 yum.repos.d]# 
[root@centos79-3 yum.repos.d]# systemctl start php-fpm
[root@centos79-3 yum.repos.d]# 
[root@centos79-3 yum.repos.d]# systemctl status php-fpm
● php-fpm.service - The PHP FastCGI Process ManagerLoaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)Active: active (running) since Thu 2023-08-31 16:02:13 CST; 1s agoMain PID: 20949 (php-fpm)Status: "Ready to handle connections"CGroup: /system.slice/php-fpm.service├─20949 php-fpm: master process (/etc/php-fpm.conf)├─20951 php-fpm: pool www├─20952 php-fpm: pool www├─20953 php-fpm: pool www├─20954 php-fpm: pool www└─20955 php-fpm: pool wwwAug 31 16:02:13 centos79-3 systemd[1]: Starting The PHP FastCGI Process Manager...
Aug 31 16:02:13 centos79-3 systemd[1]: Started The PHP FastCGI Process Manager.
[root@centos79-3 yum.repos.d]# 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/81323.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

快速搭建SpringBoot3.x项目

快速搭建SpringBoot3.x项目 写在前面一、创建项目二、配置多环境三、连接数据库查询数据3.1 新建数据库mybatisdemo并且创建sys_user表3.2 创建实体类3.2 创建Mapper接口3.3 添加mybatis.xml文件3.4 新建service 接口及实现类3.5 创建Controller 四、封装统一结果返回4.1 定义 …

Attention is all you need 论文笔记

该论文引入Transformer,主要核心是自注意力机制,自注意力(Self-Attention)机制是一种可以考虑输入序列中所有位置信息的机制。 RNN介绍 引入RNN为了更好的处理序列信息,比如我 吃 苹果,前后的输入之间是有…

【PowerQuery】PowerBI的增量刷新设置

在进行数据库查询的过程中,如果查询的数据量非常大就会存在查询效率问题。在PowerBI中在进行SQL Server数据库查询的过程中,支持两种不同的方式:数据导入方式和DirectQuery方式。Direct Query 是实现即时数据查询,数据将不会保存在PowerBI的数据缓存中。但是如果我们采用的…

【问题记录】解决Git上传文件到GitHub时收到 “GH001: Large files detected” 错误信息!

环境 Windows 11 家庭中文版git version 2.41.0.windows.1GitHub 问题情况 在命令行中使用git上传pdf文件到GitHub服务器时,提示了如下警告信息: 原因是 GitHub 有一个文件大小限制,通常为 100 MB。 如果尝试上传大于此限制的文件&#xff0c…

Long类型雪花算法ID返回前端后三位精度缺失问题解决

目录 一、问题描述二、问题复现1.Maven依赖2.application.yml 配置3.DemoController.java4.snowflakePage.html 页面5.DemoControllerAdvice.java 监听6.问题复现 三、原因分析四、问题解决方案一方案二 一、问题描述 Java 后端使用雪花算法生成 Long 类型的主键 ID&#xff0…

快速学会搭建微信小程序的基础架构

(创作不易,感谢有你,你的支持,就是我前行的最大动力,如果看完对你有帮助,请留下您的足迹) 目录 基础架构 构建界面 引入 uni-ui 组件库 组件自动引入 配置TS类型 状态管理 持久化 数据交互 请…

最小二乘法

Least Square Method 1、相关的矩阵公式2、线性回归3、最小二乘法3.1、损失函数(Loss Function)3.2、多维空间的损失函数3.3、解析法求解3.4、梯度下降法求解 1、相关的矩阵公式 P r e c o n d i t i o n : ξ ∈ R n , A ∈ R n ∗ n i : σ A ξ σ ξ…

leetcode 332. Reconstruct Itinerary(重构行程)

有一些票tickets, tickets[ i ] [from, to], 每个出发到达城市名字都是3个大写英文字母, 同一个出发城市时,优先去字母顺序较小的到达城市。 必须先从“JFK”出发。 每个ticket必须用且只用一次,所有ticket一定会形成至少一个有效的行程&…

Pandas 数据变形和模型分析

数据概念 数据比对 在本练习中,我们使用灵活的比较技术对不同的DataFrame进行比较 import pandas as pd import randomrandom.seed(123) list1 [[A]*3,[B]*5,[C]*7] charlist [x for sublist in list1 for x in sublist] random.shuffle(charlist) ser1 pd.Se…

【JAVA-Day21】序列化和反序列化,学会Java的编解码方法

标题序列化和反序列化,学会Java的编解码方法 序列化和反序列化,学会Java的编解码方法摘要引言一、什么是序列化1.1 序列化的过程 二、什么是反序列化2.1 反序列化的过程 三、为什么要进行序列化和反序列化3.1 主要目的3.2 应用场景 四、总结参考资料 博主…

Springboot 实践(18)Nacos配置中心参数自动刷新测试

前文讲解了Nacos 2.2.3配置中心的服务端的下载安装,和springboot整合nacos的客户端。Springboot整合nacos关键在于使用的jar版本要匹配,文中使用版本如下: ☆ springboot版本: 2.1.5.RELEASE ☆ spring cloud版本 Greenwich.RELEASE ☆ sp…

辅助驾驶功能开发-功能规范篇(21)-4-XP行泊一体方案功能规范

XPilot Parking 自动泊车系统 • 超级自动泊车辅助(Super AutoParking Assist)、语音控制泊车辅助(Autoparking with Speech) - 产品定义 超级自动泊车辅助是⼀个增强的自动泊车辅助系统。在超级自动泊车辅助系统中,识别车位将会变得实时可见, 并且不可泊入的⻋位也将…

如何在 Excel 中计算日期之间的天数

计算两个日期之间的天数是 Excel中的常见操作。无论您是规划项目时间表、跟踪时间还是分析一段时间内的趋势,了解如何在 Excel 中查找日期之间的天数都可以提供强大的日期计算功能。 幸运的是,Excel 提供了多种简单的方法来获取两个日期之间的天数。继续…

数据可视化

一、Flask #通过访问路径&#xff0c;获取用户的字符串参数 app.route(/user/<name>) def welcome(name):return "你好&#xff0c;%s"%nameapp.route(/user/<int:id>) def welcome2(id):return "你好&#xff0c;%d号的会员"%id能够自动根据…

【初阶数据结构】树(tree)的基本概念——C语言

目录 一、树&#xff08;tree&#xff09; 1.1树的概念及结构 1.2树的相关概念 1.3树的表示 1.4树在实际中的运用&#xff08;表示文件系统的目录树结构&#xff09; 二、二叉树的概念及结构 2.1二叉树的概念 2.2现实中真正的二叉树 2.3特殊的二叉树 2.4二叉树的性质…

字符集详解

一、为什么乱码&#xff1f; 所有的乱码实质上都是因为字符集选择错误造成的。 流在读取时&#xff0c;编码使用不当也会乱码。 二、什么是字符集&#xff1f; 字符是各种文字和符号的统称&#xff0c;包括各个国家的文字&#xff0c;标点符号&#xff0c;表情等等。字符集…

spring seccurity OAuth 2.0授权服务器工作流程

一、客户端配置&#xff1a;在configure(ClientDetailsServiceConfigurer clients)方法中&#xff0c;配置了一个客户端&#xff0c;包括客户端标识符、客户端秘密、授权类型、授权范围和令牌有效期等信息。这个客户端表示某个应用程序或服务&#xff0c;它将向授权服务器请求访…

MFC主框架和视类PreCreateWindow()函数学习

在VC生成的单文档应用程序中&#xff0c;主框架类和视类均具有PreCreateWindow函数&#xff1b; 从名字可知&#xff0c;可在此函数中添加一些代码&#xff0c;来控制窗口显示后的效果&#xff1b; 并且它有注释说明&#xff0c; Modify the Window class or styles here by…

Bash脚本学习:AWK, SED

1. AWK AWK 是一种编程语言&#xff0c;设计用于处理文件或数据流中基于文本的数据&#xff0c;或者使用 shell 管道。 可以将 awk 与 shell 脚本结合使用或直接在 shell 提示符下使用。 以上展示使用AWK分别打印第一个位置变量和第二个位置变量。 建立一个文档 csvtest.cs…

设计模式:单例模式

目录 什么是单例模式为什么使用单例模式常见的单例写法1. 懒汉式&#xff08;Lazy Initialization&#xff09;2. 双重检查锁定&#xff08;Double-Checked Locking&#xff09;3. 饿汉式&#xff08;Eager Initialization&#xff09;4. 枚举实现单例 总结 什么是单例模式 单…