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

私有云基础架构

基础配置

使用 VMWare Workstation 创建三台 2 CPU、8G内存、100 GB硬盘 的虚拟机

主机

IP

安装服务

web01

192.168.184.110

Apache、PHP

database

192.168.184.111

MariaDB

web02

192.168.184.112

Apache、PHP

由于 openEuler 22.09 系统已经停止维护了,所以我们需要修改 yum 源为官方 Archive 的 yum 源

打开 /etc/yum.repos.d/openEuler.repo 文件,将下面所有涉及到 http://repo.openeuler.org/ 的部分改成 https://archives.openeuler.openatom.cn/

在三台机器上

[root@controller ~]#

sed -i 's|http://repo.openeuler.org/|https://archives.openeuler.openatom.cn/|g' /etc/yum.repos.d/openEuler.repo

# 然后更新 yum 源

[root@controller ~]# dnf update

关闭防火墙等

在三台机器上

        # 关闭防火墙

[root@web01 ~]# systemctl disable --now firewalld              

# 关闭 SELinux

[root@web01 ~]# vi /etc/selinux/config

# 修改以下内容

SELINUX=disabled

修改hosts

在三台机器上

[root@web01 ~]# cat >> /etc/hosts << EOF

192.168.184.110 web01

192.168.184.111 database

192.168.184.112 web02

EOF

此时最好重启一下机器,以便应用刚才关闭的 SELinux

安装数据库

数据库需要安装在 Controller 节点,这里我们选用 MariaDB 作为我们的数据库

首先安装 MariaDB

[root@controller ~]# dnf install mysql-config mariadb mariadb-server python3-PyMySQL -y

新增配置文件 /etc/my.cnf.d/openstack.cnf 内容如下所示

[root@controller ~]# vi /etc/my.cnf.d/openstack.cnf

[mysqld]

bind-address = 192.168.184.110

default-storage-engine = innodb

innodb_file_per_table = on

max_connections = 4096

collation-server = utf8_general_ci

character-set-server = utf8

然后启动服务器

[root@controller ~]# systemctl start mariadb

然后初始化数据库

[root@controller ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current

password for the root user. If you've just installed MariaDB, and

haven't set the root password yet, you should just press enter here.

# 这里输入密码,由于我们是初始化MariaDB,直接回车就行

Enter current password for root (enter for none):

OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody

can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

# 这里根据提示输入N

Switch to unix_socket authentication [Y/n] n

 ... skipping.

You already have your root account protected, so you can safely answer 'n'.

# 输入Y,修改密码

Change the root password? [Y/n] y

# 这里输入两次密码

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables..

 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them.  This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment.

# 输入Y,删除匿名用户

Remove anonymous users? [Y/n] y

 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

# 输入Y,关闭root远程登录权限

Disallow root login remotely? [Y/n] y

 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

# 输入Y,删除test数据库

Remove test database and access to it? [Y/n] y

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

# 输入Y,重载配置

Reload privilege tables now? [Y/n] y

 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

然后我们来验证一下

[root@controller ~]# mysql -uroot -p

# 输入密码

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 11

Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

1传统架构下的应用部署

    1. 安装Apache服务

首先安装服务

[root@web01 ~]# dnf install -y httpd

[root@web01 ~]# dnf install -y php php-cli php-common php-fpm

然后启动服务

[root@web01 ~]# systemctl enable --now httpd

查看版本

[root@web01 ~]# apachectl -v

Server version: Apache/2.4.51 (Unix)

Server built:   Sep  7 2022 00:00:00

到浏览器输入http://192.168.184.110/地址进行Apache访问测试

    1. 安装PHP服务

首先安装PHP及其模块

[root@web01 ~]# dnf -y install php php-common php-cli php-gd php-pdo php-devel php-xml php-mysqlnd

然后编写测试界面文件

[root@web01 ~]# vi /var/www/html/php-test.php

<?php

phpinfo();

?>

重启Apache服务,并到浏览器中访问 http://192.168.184.110/php-test.php

[root@web01 ~]# systemctl restart httpd

    1. 安装配置数据库

首先安装MariaDB服务

[root@web01 ~]# dnf -y install mariadb mariadb-server

[root@web01 ~]# systemctl enable --now mariadb.service

由于我们上面已经初始化完数据库了,这里就不初始化了

然后创建数据库

[root@web01 ~]# mysql -uroot -p

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 3

Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE wordpress;

Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpress.* to root@'%' IDENTIFIED BY '000000';

Query OK, 0 rows affected (0.047 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> exit;

Bye

    1. 安装WordPress

下载 wordpress-6.7.1-zh_CN.zip 到根目录

[root@web01 ~]# wget https://cn.wordpress.org/wordpress-6.7.2-zh_CN.tar.gz

然后解压到Apache网页文件夹里

[root@web01 ~]# tar -zxf wordpress-6.7.2-zh_CN.tar.gz -C /var/www/html/

对解压出来的wordpress文件夹赋予权限

设置http根目录/var/www/的所有组为apache

[root@web01 ~]# chown -R :apache /var/www/

设置http根目录/var/www的所有者为apache

[root@web01 ~]# chown -R apache /var/www/

设置http根目录/var/www的组下的所有用户具有读写权限

[root@web01 ~]# chmod -R 775 /var/www/

[root@web01 ~]# systemctl restart httpd

在浏览器中访问http://192.168.184.110/wordpress/界面查看

接下来,输入数据库相关配置信息即可完成数据库连接

数据库连接成功后,单击“运行安装程序”继续安装

自定义站点相关的表单,例如登录用户名及密码等

至此,WordPress部署成功

2集群架构下的应用部署

    1. 安装MariaDB服务

首先,在database节点安装MariaDB服务

[root@database ~]# dnf -y install mariadb mariadb-server

[root@database ~]# systemctl enable --now mariadb.service

然后初始化数据库

[root@database ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current

password for the root user. If you've just installed MariaDB, and

haven't set the root password yet, you should just press enter here.

# 这里输入密码,由于我们是初始化MariaDB,直接回车就行

Enter current password for root (enter for none):

OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody

can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

# 这里根据提示输入N

Switch to unix_socket authentication [Y/n] n

 ... skipping.

You already have your root account protected, so you can safely answer 'n'.

# 输入Y,修改密码

Change the root password? [Y/n] y

# 这里输入两次密码

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables..

 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them.  This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment.

# 输入Y,删除匿名用户

Remove anonymous users? [Y/n] y

 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

# 输入Y,关闭root远程登录权限

Disallow root login remotely? [Y/n] y

 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

# 输入Y,删除test数据库

Remove test database and access to it? [Y/n] y

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

# 输入Y,重载配置

Reload privilege tables now? [Y/n] y

 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

然后授权并创建数据库

[root@database ~]# mysql -uroot -p

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 3

Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE wordpress;

Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpress.* to root@'%' IDENTIFIED BY '000000';

Query OK, 0 rows affected (0.047 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> exit

Bye

    1. 安装Apache服务

Web 02节点进行如下操作

首先安装Apache

[root@web02 ~]# dnf install -y httpd

[root@web02 ~]# dnf install -y php php-cli php-common php-fpm

然后启动服务

[root@web02 ~]# systemctl enable --now httpd

查看版本

[root@web02 ~]# apachectl -v

Server version: Apache/2.4.51 (Unix)

Server built:   Sep  7 2022 00:00:00

2.3 安装PHP服务

Web 02节点进行如下操作

首先安装PHP服务

[root@web02 ~]# dnf -y install php php-common php-cli php-gd php-pdo php-devel php-xml php-mysqlnd php-mysqli

然后编写测试界面文件

[root@web01 ~]# vi /var/www/html/php-test.php

<?php

phpinfo();

?>

重启Apache服务,并到浏览器中访问 http://192.168.184.112/php-test.php

[root@web01 ~]# systemctl restart httpd

    1. 安装WordPress
Web 01节点

下载 wordpress-6.7.1-zh_CN.zip 到根目录

[root@web01 ~]# wget https://cn.wordpress.org/wordpress-6.7.2-zh_CN.tar.gz

然后解压到Apache网页文件夹里

[root@web01 ~]# tar -zxf wordpress-6.7.2-zh_CN.tar.gz -C /var/www/html/

对解压出来的wordpress文件夹赋予权限

设置http根目录/var/www/的所有组为apache

[root@web01 ~]# chown -R :apache /var/www/

设置http根目录/var/www的所有者为apache

[root@web01 ~]# chown -R apache /var/www/

设置http根目录/var/www的组下的所有用户具有读写权限

[root@web01 ~]# chmod -R 775 /var/www/

[root@web01 ~]# systemctl restart httpd

在浏览器中访问http://192.168.184.110/wordpress/界面查看

接下来,输入数据库相关配置信息即可完成数据库连接

数据库主机填写database节点的IP: 192.168.184.111

数据库连接成功后,单击“运行安装程序”继续安装

自定义站点相关的表单,例如登录用户名及密码等

至此,WordPress部署成功

Web 02节点

下载 wordpress-6.7.2zh_CN.zip 到根目录

[root@web01 ~]# wget https://cn.wordpress.org/wordpress-6.7.2-zh_CN.tar.gz

然后解压到Apache网页文件夹里

[root@web02 ~]# dnf install -y tar

[root@web01 ~]# tar -zxf wordpress-6.7.2-zh_CN.tar.gz -C /var/www/html/

对解压出来的wordpress文件夹赋予权限

设置http根目录/var/www/的所有组为apache

[root@web01 ~]# chown -R :apache /var/www/

设置http根目录/var/www的所有者为apache

[root@web01 ~]# chown -R apache /var/www/

设置http根目录/var/www的组下的所有用户具有读写权限

[root@web01 ~]# chmod -R 775 /var/www/

[root@web01 ~]# systemctl restart httpd

在浏览器中访问http://192.168.184.112/wordpress/界面查看

这里的数据库主机也是和Web01节点一样,都是填写database的IP: 192.168.184.111

       然后会提示已经安装过WordPress了,这说明Web02节点已经连接上了database节点的MariaDB数据库

Web02节点验证成功,直接单击“登录”便可以正常访问站点

即使把Web01节点的Apache服务关闭,Web02节点的WordPress仍然正常工作

[root@web01 ~]# systemctl stop httpd

2.4 Database节点验证

在database节点,登录MariaDB数据库,查看数据库列表信息

[root@database ~]# mysql -uroot -p

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 43

Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>  SHOW DATABASES;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| performance_schema |

| wordpress          |

+--------------------+

4 rows in set (0.000 sec)

MariaDB [(none)]> USE wordpress;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [wordpress]> SELECT * FROM wp_users;

+----+------------+------------------------------------+---------------+-------------------+----------------------------------+---------------------+---------------------+-------------+--------------+

| ID | user_login | user_pass                          | user_nicename | user_email        | user_url                         | user_registered     | user_activation_key | user_status | display_name |

+----+------------+------------------------------------+---------------+-------------------+----------------------------------+---------------------+---------------------+-------------+--------------+

|  1 | admin      | $P$B9CXb1jGD1hWsdcP63t1cYQNjZSnQN. | admin         | 2215916850@qq.com | http://192.168.184.110/wordpress | 2025-03-03 06:08:27 |                     |           0 | admin        |

+----+------------+------------------------------------+---------------+-------------------+----------------------------------+---------------------+---------------------+-------------+--------------+

1 row in set (0.000 sec)

MariaDB [wordpress]> exit;

Bye

[root@database ~]#

相关文章:

私有云基础架构

基础配置 使用 VMWare Workstation 创建三台 2 CPU、8G内存、100 GB硬盘 的虚拟机 主机 IP 安装服务 web01 192.168.184.110 Apache、PHP database 192.168.184.111 MariaDB web02 192.168.184.112 Apache、PHP 由于 openEuler 22.09 系统已经停止维护了&#xff…...

在 Windows 和 Linux 系统上安装和部署 Ollama

引言 Ollama 是一个强大的本地大语言模型&#xff08;LLM&#xff09;运行工具&#xff0c;允许用户轻松下载和运行不同的 AI 模型&#xff0c;如 LLaMA、Mistral 和 Gemma。无论是开发者还是研究人员&#xff0c;Ollama 都提供了一种简单而高效的方式来在本地环境中部署 AI 模…...

从零开始学习Slam--数学概念

正交矩阵 矩阵的转置等于它的逆矩阵&#xff0c;这样的矩阵称之为正交矩阵 即&#xff1a; Q T Q I Q^T Q I QTQI&#xff0c; 这样的矩阵列向量都是单位向量且两两正交。 旋转矩阵属于特殊的正交群&#xff0c;即SO(n)&#xff0c;这里n通常是3&#xff0c;所以SO(3)就是…...

【零基础到精通Java合集】第十五集:Map集合框架与泛型

课程标题:Map集合框架与泛型(15分钟) 目标:掌握泛型在Map中的键值类型约束,理解类型安全的键值操作,熟练使用泛型Map解决实际问题 0-1分钟:泛型Map的意义引入 以“字典翻译”类比泛型Map:明确键和值的类型(如英文→中文)。说明泛型Map的作用——确保键值对的类型一…...

从小米汽车召回看智驾“命门”:智能化时代 — 时间就是安全

2025年1月&#xff0c;小米因车辆“授时同步异常”召回3万余辆小米SU7&#xff0c;成为其造车历程中的首个重大安全事件。 从小米SU7召回事件剖析&#xff0c;授时同步何以成为智能驾驶的命门&#xff1f; 2024年11月&#xff0c;多名车主反馈SU7标准版的智能泊车辅助功能出现…...

Visual Studio Code 如何编写运行 C、C++ 程序

目录 安装 MinGW-w64 编译器&#xff08;推荐&#xff09;在 VS Code 中配置 C 开发环境 参考链接 在vs code上运行c脚本&#xff0c;报了下面的错误&#xff0c;我仅仅安装了vs code及在商店里下载了插件&#xff0c;其它配置操作没有做&#xff0c;直接对一个脚本进行运行&am…...

动静态库-Linux 学习

在软件开发中&#xff0c;程序库是一组预先编写好的程序代码&#xff0c;它们存储了常用的函数、变量和数据结构等。这些库可以帮助开发者节省大量的时间和精力&#xff0c;避免重复编写相同的代码。当我们在 Linux 系统中开发程序时&#xff0c;经常会用到两种类型的程序库&am…...

【Hudi-SQL DDL创建表语法】

CREATE TABLE 命令功能 CREATE TABLE命令通过指定带有表属性的字段列表来创建Hudi Table。 命令格式 CREATE TABLE [ IF NOT EXISTS] [database_name.]table_name[ (columnTypeList)]USING hudi[ COMMENT table_comment ][ LOCATION location_path ][ OPTIONS (options_lis…...

HTML label 标签使用

点击 <label> 标签通常会使与之关联的表单控件获得焦点或被激活。 通过正确使用 <label> 标签&#xff0c;可以使表单更加友好和易于使用&#xff0c;同时提高整体的可访问性。 基本用法 <label> 标签通过 for 属性与 id 为 username 的 <input> 元素…...

bge-large-zh-v1.5 与Pro/BAAI/bge-m3 区别

ge-large-zh-v1.5 和 Pro/BAAI/bge-m3 是两种不同的模型&#xff0c;主要区别在于架构、性能和应用场景。以下是它们的对比&#xff1a; 1. 模型架构 bge-large-zh-v1.5&#xff1a; 基于Transformer架构&#xff0c;专注于中文文本的嵌入表示。 参数量较大&#xff0c;适合处…...

JVM常用概念之对象初始化的成本

在JVM常用概念之新对象实例化博客中我讲到了对象的实例化&#xff0c;主要包含分配&#xff08;TLAB&#xff09;、系统初始化、用户初始化&#xff0c;而我在JVM常用概念之线程本地分配缓冲区&#xff08;ThreadLocal Allocation Buffer&#xff0c;TLAB&#xff09;博客中也讲…...

[AI机器人] Web-AI-Robot机器人前瞻版--比奇堡海之霸凯伦

文章目录 简述开源Web-AI-Robot 项目-比奇堡-海之霸-凯伦 技术架构效果预览 简述 本项目配合前端项目bikini_bottom_karen_ui运行&#xff0c;来源于柒杉工作室&#xff08;截止2025.2&#xff0c;目前我自己&#xff09;。 打造一个只需要在浏览器上运行的AI智能机器人&#…...

嵌入式学习-EXTI外部中断

STM32 是一种基于 ARM Cortex-M 内核的微控制器系列&#xff0c;广泛应用于嵌入式系统开发。中断&#xff08;Interrupt&#xff09;是 STM32 中一个非常重要的功能&#xff0c;它允许微控制器在执行主程序的同时&#xff0c;响应外部事件或内部事件的请求&#xff0c;从而实现…...

CSS—元素水平居中:2分钟掌握常用的水平居中

个人博客&#xff1a;haichenyi.com。感谢关注 1. 目录 1–目录2–行内元素水平居中3–块级元素水平居中 2. 行内元素水平居中 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" …...

PyTorch 中结合迁移学习和强化学习的完整实现方案

结合迁移学习&#xff08;Transfer Learning&#xff09;和强化学习&#xff08;Reinforcement Learning, RL&#xff09;是解决复杂任务的有效方法。迁移学习可以利用预训练模型的知识加速训练&#xff0c;而强化学习则通过与环境的交互优化策略。以下是如何在 PyTorch 中结合…...

大语言模型学习--本地部署DeepSeek

本地部署一个DeepSeek大语言模型 研究学习一下。 本地快速部署大模型的一个工具 先根据操作系统版本下载Ollama客户端 1.Ollama安装 ollama是一个开源的大型语言模型&#xff08;LLM&#xff09;本地化部署与管理工具&#xff0c;旨在简化在本地计算机上运行和管理大语言模型…...

Linux:vim快捷键

Linux打开vim默认第一个模式是&#xff1a;命令模式&#xff01; 命令模式快捷键操作&#xff1a; gg&#xff1a;光标快速定位到最开始 shift g G&#xff1a;光标快速定位到最结尾 n shift g n G&#xff1a;光标快速定位到第n行 shift 6 ^&#xff1a;当前行开始 …...

Unity 对象池技术

介绍 是什么&#xff1f; 在开始时初始化若干对象&#xff0c;将它们存到对象池中。需要使用的时候从对象池中取出&#xff0c;使用完后重新放回对象池中。 优点 可以避免频繁创建和销毁对象带来性能消耗。 适用场景 如果需要对某种对象进行频繁创建和销毁时&#xff0c;例…...

算法1-4 凌乱的yyy / 线段覆盖

题目描述 现在各大 oj 上有 n 个比赛&#xff0c;每个比赛的开始、结束的时间点是知道的。 yyy 认为&#xff0c;参加越多的比赛&#xff0c;noip 就能考的越好&#xff08;假的&#xff09;。 所以&#xff0c;他想知道他最多能参加几个比赛。 由于 yyy 是蒟蒻&#xff0c…...

【计网】数据链路层

数据链路层 3.1 数据链路层概述3.2 封装成帧3.3 差错检测3.4 可靠传输3.4.1 可靠传输的概念3.4.2 可靠传输的实现机制 - 停止等待协议3.4.3 可靠传输的实现机制 -回退N帧协议3.4.4 可靠传输的实现机制 -选择重传协议 3.5 点对点协议3.5.1 帧格式3.5.2 透明传输 3.6 媒体接入控制…...

【Axure高保真原型】引导弹窗

今天和大家中分享引导弹窗的原型模板&#xff0c;载入页面后&#xff0c;会显示引导弹窗&#xff0c;适用于引导用户使用页面&#xff0c;点击完成后&#xff0c;会显示下一个引导弹窗&#xff0c;直至最后一个引导弹窗完成后进入首页。具体效果可以点击下方视频观看或打开下方…...

【HarmonyOS 5.0】DevEco Testing:鸿蒙应用质量保障的终极武器

——全方位测试解决方案与代码实战 一、工具定位与核心能力 DevEco Testing是HarmonyOS官方推出的​​一体化测试平台​​&#xff0c;覆盖应用全生命周期测试需求&#xff0c;主要提供五大核心能力&#xff1a; ​​测试类型​​​​检测目标​​​​关键指标​​功能体验基…...

python/java环境配置

环境变量放一起 python&#xff1a; 1.首先下载Python Python下载地址&#xff1a;Download Python | Python.org downloads ---windows -- 64 2.安装Python 下面两个&#xff0c;然后自定义&#xff0c;全选 可以把前4个选上 3.环境配置 1&#xff09;搜高级系统设置 2…...

FastAPI 教程:从入门到实践

FastAPI 是一个现代、快速&#xff08;高性能&#xff09;的 Web 框架&#xff0c;用于构建 API&#xff0c;支持 Python 3.6。它基于标准 Python 类型提示&#xff0c;易于学习且功能强大。以下是一个完整的 FastAPI 入门教程&#xff0c;涵盖从环境搭建到创建并运行一个简单的…...

页面渲染流程与性能优化

页面渲染流程与性能优化详解&#xff08;完整版&#xff09; 一、现代浏览器渲染流程&#xff08;详细说明&#xff09; 1. 构建DOM树 浏览器接收到HTML文档后&#xff0c;会逐步解析并构建DOM&#xff08;Document Object Model&#xff09;树。具体过程如下&#xff1a; (…...

苍穹外卖--缓存菜品

1.问题说明 用户端小程序展示的菜品数据都是通过查询数据库获得&#xff0c;如果用户端访问量比较大&#xff0c;数据库访问压力随之增大 2.实现思路 通过Redis来缓存菜品数据&#xff0c;减少数据库查询操作。 缓存逻辑分析&#xff1a; ①每个分类下的菜品保持一份缓存数据…...

根据万维钢·精英日课6的内容,使用AI(2025)可以参考以下方法:

根据万维钢精英日课6的内容&#xff0c;使用AI&#xff08;2025&#xff09;可以参考以下方法&#xff1a; 四个洞见 模型已经比人聪明&#xff1a;以ChatGPT o3为代表的AI非常强大&#xff0c;能运用高级理论解释道理、引用最新学术论文&#xff0c;生成对顶尖科学家都有用的…...

OpenLayers 分屏对比(地图联动)

注&#xff1a;当前使用的是 ol 5.3.0 版本&#xff0c;天地图使用的key请到天地图官网申请&#xff0c;并替换为自己的key 地图分屏对比在WebGIS开发中是很常见的功能&#xff0c;和卷帘图层不一样的是&#xff0c;分屏对比是在各个地图中添加相同或者不同的图层进行对比查看。…...

聊一聊接口测试的意义有哪些?

目录 一、隔离性 & 早期测试 二、保障系统集成质量 三、验证业务逻辑的核心层 四、提升测试效率与覆盖度 五、系统稳定性的守护者 六、驱动团队协作与契约管理 七、性能与扩展性的前置评估 八、持续交付的核心支撑 接口测试的意义可以从四个维度展开&#xff0c;首…...

Java线上CPU飙高问题排查全指南

一、引言 在Java应用的线上运行环境中&#xff0c;CPU飙高是一个常见且棘手的性能问题。当系统出现CPU飙高时&#xff0c;通常会导致应用响应缓慢&#xff0c;甚至服务不可用&#xff0c;严重影响用户体验和业务运行。因此&#xff0c;掌握一套科学有效的CPU飙高问题排查方法&…...