django-vue-admin ubuntu 20.04 环境准备 记录

news2024/11/18 18:41:25

django-vue-admin 运行记录

https://django-vue-admin.com/document/hjbs.html
https://django-vue-admin.com/document/hjbs.html
https://bbs.django-vue-admin.com/article/9.html
https://gitee.com/liqianglog/django-vue-admin/tree/demo_project

1. 安装 ubuntu-20.04.6 桌面版

ubuntu-20.04.6-desktop-amd64.iso
桌面版本
桌面版的目的是 有浏览器可以看 django vue 的localhost网页。
用server版,需要用别的机器看,别的机器在权限上可能有问题。

sudo apt install vim -y
sudo apt install lrzsz
rz
sz
命令

2. 设置 ssh

sudo apt-get update
sudo apt-get install openssh-server -y

sudo systemctl status ssh
sudo vim /etc/ssh/sshd_config 不用修改
sudo service ssh restart
ssh username@your_server_ip_address -p port_number
systemctl restart sshd
// 开启防火墙ssh的服务端口

ufw allow ssh

// 查看ssh服务状态

systemctl status ssh

// 关闭ssh服务

systemctl stop ssh

// 开启ssh服务

systemctl start ssh

// 重启ssh服务

systemctl restart ssh

// 设置开启自启

sudo systemctl enable ssh

// 关闭开机自启

sudo systemctl disable ssh

3. 桌面版设置固定ip地址

sudo apt install net-tools
ens33
cd /etc/netplan/
sudo vi /etc/netplan/01-network-manager-all.yaml


# Let NetworkManager manage all devices on this system
network:
  ethernets:
    ens33:
      dhcp4: no
      addresses: [192.168.99.143/24]
      optional: true
      gateway4: 192.168.99.1
      nameservers:
        addresses: [114.114.114.114]
  version: 2
  renderer: NetworkManager
~                                      

sudo netplan apply

4. server版本设置固定ip地址

cat /etc/netplan/00-installer-config.yaml

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
      dhcp4: no
      addresses: [192.168.99.57/24]
      optional: true
      gateway4: 192.168.99.1
      nameservers:
              addresses: [114.114.114.114]
  version: 2

sudo netplan apply

5. 查看python版本

python3 -V
Python 3.8.10
sudo apt install python3-pip -y

6. 安装 mysql 8.0

sudo apt-get update
sudo apt install mysql-server -y
systemctl status mysql
netstat -an |grep 3306
mysqladmin --version
mysqladmin Ver 8.0.33-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
sudo apt-get install mysql-client
sudo systemctl start mysql.service
sudo systemctl restart mysql.service
sudo systemctl stop mysql.service
sudo systemctl enable mysql.service
sudo netstat -anp | grep mysql
sudo ufw allow 3306
sudo netstat -anp | grep mysql
netstat -ntulp | grep 3306

6.1 配置文件

sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/mysql.conf.d/bak_mysqld.cnf
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
在这里插入图片描述
有的地方说是 只注释掉,好像是不行
sudo systemctl restart mysql

6.2 修改

sudo mysql
use mysql
select host,user from user;
update user set host=‘%’ where user=‘root’;
select host,user from user;
alter user ‘root’@‘%’ identified with mysql_native_password by ‘123456’;
exit
mysql -u root -p123456
exit

在这里插入图片描述

创建数据库

django-vue-admin
utf8mb4
utf8mb4_general_ci
在这里插入图片描述

6.2 登录

mysql -h ip(本机) -uroot –p
mysql -hlocalhost -uroot –p
mysql -h 192.168.99.57 -uroot –p
mysql -h 127.0.0.1 -uroot –p
mysql -h127.0.0.1 -uroot –p
mysql -uroot -p
mysql -u root –p

6.3 远程访问

Ubuntu22.04.2安装&卸载MySQL8.0.33详细步骤
https://blog.csdn.net/m0_56349886/article/details/130751157

7. 安裝 redis

sudo apt update
sudo apt install redis -y

https://redis.io/
https://redis.io/docs/getting-started/

sudo systemctl status redis
sudo systemctl restart redis

配置文件 应该是不用修改
sudo cp /etc/redis/redis.conf /etc/redis/bak_redis.conf
sudo vi /etc/redis/redis.conf
redis-cli

127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> select 1
OK
127.0.0.1:6379[1]> keys *
(empty list or set)
127.0.0.1:6379[1]> 

8. 安装 nodejs

cd ~
sudo apt install curl -y
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

## Run `sudo apt-get install -y nodejs` to install Node.js 14.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn

sudo apt-get install -y nodejs

node --version
v14.21.3

npm --version
6.14.18
sudo apt install build-essential (可以不执行)

正式工作

https://django-vue-admin.com/document/hjbs.html

sudo apt-get install libmysqlclient-dev -y

cd ~
mkdir work
cd work
下载正式 版
django-vue-admin-v2.1.4.tar.gz
tar xvf django-vue-admin-v2.1.4.tar.gz
cd django-vue-admin-v2.1.4/
cd backend/

cd conf/
cp env.example.py env.py
vi env.py
在这里插入图片描述

import os

from application.settings import BASE_DIR

# ================================================= #
# *************** mysql数据库 配置  *************** #
# ================================================= #
# 数据库 ENGINE ,默认演示使用 sqlite3 数据库,正式环境建议使用 mysql 数据库
# sqlite3 设置
# DATABASE_ENGINE = "django.db.backends.sqlite3"
# DATABASE_NAME = os.path.join(BASE_DIR, "db.sqlite3")

# 使用mysql时,改为此配置
DATABASE_ENGINE = "django.db.backends.mysql"
DATABASE_NAME = 'django-vue-admin' # mysql 时使用

# 数据库地址 改为自己数据库地址
DATABASE_HOST = "127.0.0.1"
# # 数据库端口
DATABASE_PORT = 3306
# # 数据库用户名
DATABASE_USER = "root"
# # 数据库密码
DATABASE_PASSWORD = "123456"

# 表前缀
TABLE_PREFIX = "dvadmin_"
# ================================================= #
# ******** redis配置,无redis 可不进行配置  ******** #
# ================================================= #
# REDIS_PASSWORD = ''
# REDIS_HOST = '127.0.0.1'
# REDIS_URL = f'redis://:{REDIS_PASSWORD or ""}@{REDIS_HOST}:6380'
# ================================================= #
# ****************** 功能 启停  ******************* #
# ================================================= #
DEBUG = True
# 启动登录详细概略获取(通过调用api获取ip详细地址。如果是内网,关闭即可)
ENABLE_LOGIN_ANALYSIS_LOG = True
# 登录接口 /api/token/ 是否需要验证码认证,用于测试,正式环境建议取消
LOGIN_NO_CAPTCHA_AUTH = True
# 是否启动API日志记录
API_LOG_ENABLE = locals().get("API_LOG_ENABLE", True)
# API 日志记录的请求方式
API_LOG_METHODS = locals().get("API_LOG_METHODS", ["POST", "UPDATE", "DELETE", "PUT"])
# API_LOG_METHODS = 'ALL' # ['POST', 'DELETE']
# ================================================= #
# ****************** 其他 配置  ******************* #
# ================================================= #
ENVIRONMENT = "local"  # 环境,test 测试环境;prod线上环境;local本地环境
ALLOWED_HOSTS = ["*"]
# 系统配置存放位置:redis/memory(默认)
DISPATCH_DB_TYPE = 'redis'


cd …
pwd
/home/jack/work/django-vue-admin-v2.1.4/backend
echo ‘export PATH=/home/jack/.local/bin:$PATH’ >> ~/.bashrc
source ~/.bashrc
echo $PATH

pip3 install -r requirements.txt

ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
  WARNING: The script chardetect is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script normalizer is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script sqlformat is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script django-admin is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pypinyin is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script automat-visualize is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts cftp, ckeygen, conch, mailmail, pyhtmlizer, tkconch, trial, twist and twistd are installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts wamp, xbrnetwork and xbrnetwork-ui are installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script daphne is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script uvicorn is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script gunicorn is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

echo ‘export PATH=/home/jack/.local/bin:$PATH’ >> ~/.bashrc
source ~/.bashrc
echo $PATH
pip3 uninstall -r requirements.txt -y
pip3 install -r requirements.txt
python3 -m pip install launchpadlib

安装依赖环境:
pip3 install -r requirements.txt
执行迁移命令:
python3 manage.py makemigrations
python3 manage.py migrate
初始化数据:
python3 manage.py init
初始化省市县数据:
python3 manage.py init_area
启动项目:
python3 manage.py runserver 0.0.0.0:8000

在这里插入图片描述

web

cd /home/jack/work/django-vue-admin-v2.1.4/web
前端运行
进入前端项目目录 cd web
安装依赖 npm install --registry=https://registry.npm.taobao.org
启动服务 npm run dev
#访问项目
访问地址:http://localhost:8080 (opens new window)(默认为此地址,如有修改请按照配置文件)
账号:superadmin 密码:admin123456

[vue-echarts] Switched to Vue 2 environment.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN cosmiconfig-typescript-loader@4.3.0 requires a peer of cosmiconfig@>=7 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.3.2 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN django-vue-admin@2.1.4 No license field.

added 2252 packages from 1183 contributors in 122.451s

146 packages are looking for funding
  run `npm fund` for details

在这里插入图片描述
http://localhost:8080 火狐浏览器 可以
http://192.168.99.143:8080/ 谷歌浏览器 不可以
如果想让他可以,需要部署一下

安装 nginx服务器

保证以 sudo 用户身份登录,并且你不能运行 Apache 或者 其他处理进程在80端口和443端口。
sudo apt install nginx
sudo systemctl status nginx
查看安装版本
nginx -v
查看状态
sudo systemctl status nginx
启动
sudo systemctl start nginx
停止
sudo systemctl stop nginx
重启

sudo systemctl restart nginx

sudo systemctl enable nginx

sudo systemctl start nginx

如何在Ubuntu20.04上配置Nginx以及使用Nginx部署一个网站
https://developer.aliyun.com/article/895750

①打包Vue项目——npm run build
②将静态资源文件上传至服务器
③配置Nginx文件开启一个网点
使用vim打开该配置文件——vim /etc/nginx/nginx.conf
修改完成之后进行保存退出。
④重启Nginx服务——service nginx restart

普通部署流程

进入如下目录:
/home/jack/work/django-vue-admin-v2.1.4/web/
修改环境配置 .env.preview 文件中,VUE_APP_API 地址为后端服务器地址
VUE_APP_API=192.168.99.143
/home/jack/work/django-vue-admin-v2.1.4/web
在这里插入图片描述
构建生产环境 npm run build,等待生成 dist 文件夹
生成的 dist 文件放到服务器 /opt/django-vue-admin/web/dist 目录下
使用 nginx 进行静态文件代理

Nginx配置
sudo cp /etc/nginx/nginx.conf /etc/nginx/bak_nginx.conf

sudo vi /etc/nginx/nginx.conf
修改为如下内容,并重启sudo systemctl restart nginx

# 此nginx配置默认项目放在服务器的 /opt 目录下,前端默认端口为 8080,后端为8000,如需修改请自行对照修改

events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;

	server {
        listen 80 default_server;
        server_name _;
        return 404;
        }
    # 前端配置
    server {
        listen       8080;
        client_max_body_size 100M;
        server_name  dvadmin-web;
        charset utf-8;
        location / {
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            root /opt/django-vue-admin/web/dist;
            index  index.html index.php index.htm;
        }
        # 后端服务
        location /api {
          root html/www;
          proxy_set_header Host $http_host;
          proxy_set_header  X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto $scheme;
          rewrite ^/api/(.*)$ /$1 break;  #重写
          proxy_pass http://127.0.0.1:8000;
    
        }
        # Django media
        location /media  {
            root /opt/django-vue-admin/backend;  # your Django project's media files - amend as required
        }
        # Django static
        location /static {
            root /opt/django-vue-admin/backend; # your Django project's static files - amend as required
        }
        #禁止访问的文件或目录
        location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
        {
            return 404;
        }
    }
}

后端启动

进入如下目录:
/home/jack/work/django-vue-admin-v2.1.4/backend

使用daphne启动:daphne -b 0.0.0.0 -p 8000 application.asgi:application
后台运行: nohup daphne -b 0.0.0.0 -p 8000 application.asgi:application > run.log 2>&1 &
不用sudo
在这里插入图片描述

访问项目
访问地址:http://公网或本服务器ip:8080 (服务器需注意供应商端防火墙是否开启对应端口)
账号:superadmin 密码:admin123456

http://192.168.99.143:8080/
谷歌浏览器
在这里插入图片描述

运行项目并查看接口
打开swgger可以看到我们配置的接口已经生效了

http://192.168.99.143:8000/
在这里插入图片描述

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

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

相关文章

【八股】【C++】函数与类

这里写目录标题 形参与实参的区别函数调用过程指针和引用当函数参数引用作为函数参数有哪些好处回调函数友元函数重载匹配运算符重载直接初始化与拷贝初始化函数指针C中struct(结构)和class(类)的区别C有哪几种构造函数构造函数的…

中华太极图

python代码: import turtle turtle.circle(100) turtle.color(black,black) turtle.begin_fill() turtle.circle(50,180) turtle.circle(-50,180) turtle.right(180) turtle.circle(100,180) turtle.end_fill() turtle.penup() turtle.goto(0,25) turtle.pendown()…

06_pinctr子系统与gpio子系统

目录 pinctrl子系统简介 I.MX6ULL的pinctrl子系统驱动 PIN驱动程序讲解 设备树中添加pinctrl节点模板 gpio子系统简介 I.MX6ULL的gpio子系统驱动 GPIO驱动程序简介 gpio子系统API函数 设备树中添加gpio节点模板 与gpio相关的OF函数 LED实验 LED灯驱动程序编写 运行…

单片机中断

89C51/52的中断系统有5个中断源 ,2个优先级,可实现二级中断嵌套 。 ( P3.2)可由IT0(TCON.0)选择其为低电平有效还是下降沿有效。当CPU检测到P3.2引脚上出现有效的中断信号时,中断标志IE0(TCON.1)置1,向CPU申请中断。 &…

基于 unity 配置 adb

1.打开环境变量配置path的环境 2 找到自己的unity安装目录,找到对应路径 配置到 path 属性中 C:\~\Editor\2021.3.0f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools 3 应用保存即可

chatgpt赋能python:Win7下Python:轻松实现SEO优化

Win7下Python:轻松实现SEO优化 Python作为一门高级程序语言,不仅广泛应用于人工智能和数据科学领域,也在Web开发中扮演着重要角色。在SEO方面,Python也展现了强大的能力。本文将介绍如何在Win7下使用Python实现SEO优化。 什么是…

chatgpt赋能python:同一行Python给两个变量赋值:如何提高编程效率?

同一行Python给两个变量赋值:如何提高编程效率? 作为Python编程方面经验丰富的工程师,我们都知道Python是一种非常易学易用的编程语言,其灵活性和高效性问题业已广为人知。然而,当我们在同时对多个变量进行赋值时&…

docker学习(一)docker概述

Docker 是什么 Docker 是一个开源的应用容器引擎,基于 Go 语言,并遵从 Apache2.0 协议开源。它可以让开发者打包应用以及依赖包到一个轻量级、可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。Docker 可用于…

MobaXterm通过RDP连接Ubuntu

文章目录 RDP,FTP和SSH基础知识通过RDP连接UbuntuUbuntu安装RDP开放RDP默认端口使用MobaXterm进行连接 RDP,FTP和SSH基础知识 RDP, FTP和SSH是计算机网络中常用的远程连接协议,用于在不同计算机之间进行远程访问和文件传输。 RDP (Remote De…

Python L2: String、Class、Json

定义一个Python class class Node:def __init__(self):self.ip ""self.pods []self.count 0 Json 对象(instance) 转 dict 和字符串 n Node() n.count 1 n.ip "127.0.0.1" n.pods ["pod-x", "pod-y", "pod…

uniapp 一键登录

官网文档地址https://uniapp.dcloud.net.cn/univerify.html 一、开发前准备 1、需要先开通uni一键登录服务 开通成功后会得到 apiKey、apiSecret。这2个信息,后续需要配置在uniCloud的云函数里。同时注意保密,这2个信息也是计费凭证 2、开通uniCloud服…

机器学习实战 | emojify 使用Python创建自己的表情符号(深度学习初级)

目录 简介技术流程1. 加载依赖包2. 初始化训练和验证生成器3. 建立网络结构4. 编译和训练模型5. 保存模型权重6. 输出预测结果 完整程序1. train.py程序2. gui.py程序 简介 准备写个系列博客介绍机器学习实战中的部分公开项目。首先从初级项目开始。 本文主要介绍机器学习项目…

.Net 4726.0 Razor编译时的小差异

前言 几个月前在进行着.Net 472到6.0的升级,复用原有代码,在对Razor进行迁移中,发现原运行正常的代码,却存在报错,深入研究发现是Core下对Razor编译有一些变动。 问题复现 472 创建视图 新建.Net Framework下Mvc&#…

常州工学院单片机及应用系统设计2021-2022 学年第 二 学期 考试类型 开卷 课程编码 0302005

第一题 #include "SC95F861x_C.H" #include <INTRINS.H> unsigned char keydata0; void delay(unsigned int timer) //延时函数 { while(timer>0) timer--; } void IOinit() { P5CON0x00; P5PH0x03; P3CON0xFF; P3PH0xFF; } void readke…

字节跳动算法 提前批offer复盘

作者 | zjwang 面试锦囊之面经分享系列&#xff0c;持续更新中 欢迎后台回复"面试"加入讨论组交流噢 写在前面 北航本硕&#xff0c;非科班对搜索推荐比较感兴趣&#xff0c;平时看的文章比较多&#xff0c;所以聊的比较偏这一块大四时一段五个月的nlp方向实习&…

Dlib —— Windows下Vs2017编译dlib源码

Dlib Dlib 是一个现代C工具包&#xff0c;包含机器学习算法和 用于创建复杂软件的工具&#xff0c;C解决现实世界的问题。 它用于工业界和学术界的广泛领域 包括机器人、嵌入式设备、手机和大型高 性能计算环境。Dlib的开源许可允许您在任何应用程序中免费使用它。   Dlib相关…

项目计划、进度与控制

思维导图 项目计划、进度与控制-思维导图 第一部分 项目管理概述 什么是项目 约瑟夫朱兰博士也说过&#xff0c;项目就是在已经确定好的时间内必须解决的问题 什么是项目管理 图1-1 项目管理就是工具、人和系统 image.png 组织是人的集合&#xff0c;过程是人在处理。如果人…

Docker cuda libnvidia-compute Invalid cross-device link

docker apt 安装 cuda rootyeqiang-PC:/opt/speccpu2006# docker exec -it 881 /bin/bash root8815d0425401:/# apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Don…

Redis 事务与数据持久化

目录 一、Redis 事务 1.1 事务本质 1.2 数据库事务与redis事务 1.2.1 数据库事务 1.2.2 Redis事务 1.2.2.1 两种错误不同处理方式 1&#xff09;代码语法错误&#xff08;编译时异常&#xff09; 2&#xff09;代码逻辑错误&#xff08;运行时错误&#xff09; 1.2.2.2 这种做…

线性代数行列式的几何含义

行列式可以看做是一系列列向量的排列&#xff0c;并且每个列向量的分量可以理解为其对应标准正交基下的坐标。 行列式有非常直观的几何意义&#xff0c;例如&#xff1a; 二维行列式按列向量排列依次是 a \mathbf{a} a和 b \mathbf{b} b&#xff0c;可以表示 a \mathbf{a} a和…