windows环境配置
每次重装系统都需要重新配置一遍环境,索性将配置步骤记录下来,方便以后重装系统后使用
windows 环境配置(win10/11)
开发环境配置
java
下载jdk8 安装包(
需要登录 oracle),环境变量设置参数如下:
1 |
|
JAVA_HOME
要根据自己的实际路径配置CLASSPATH
记得前面有个”.”- 在
Path
最前面新增变量值
python
下载 python 安装包,安装之后如果没勾选添加 python.exe
到系统变量,环境变量需要设置参数如下:
1 |
|
- 只有 python 的免安装版本需要配置
PYTHON_HOME
的路径根据自己 python 的实际路径配置
go
下载go 安装包
新建环境变量
GOROOT
,值为 go 安装目录 例如 D:\soft\go执行下面的命令修改
GOPROXY
:1
go env -w GOPROXY=https://goproxy.cn,direct
git
下载 git 安装包
并安装,需要勾选添加 git 到环境变量配置
用户名
和邮箱
1
2git config --global user.name "用户名"
git config --global user.email "邮箱"配置
代理
1
2
3
4
5
6
7# 设置代理
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808'
# 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxysock5 代理地址根据实际情况修改
maven
- 在maven 归档库
下载压缩包,解压缩到软件目录 - 新建系统变量
MAVEN_HOME
变量值:D:\soft\apache-maven-3.6.3
- 在
Path
最后面添加变量值:;%MAVEN_HOME%\bin
- 配置
settings.xml
该文件位于 maven 安装目录 conf下 配置如下▶settings.xml1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- 本地仓库路径 -->
<localRepository>D:\mvn_repo</localRepository>
<mirrors>
<!-- 阿里云镜像 -->
<mirror>
<id>aliyun</id>
<name>aliyun</name>
<mirrorOf>central</mirrorOf>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
<!-- 指定jdk版本 -->
<profiles>
<profile>
<id>jdk8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>8</jdk>
</activation>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
</settings>
tomcat
- 下载tomcat 压缩包
,解压缩重命名为 tomcat - 新建环境变量
TOMCAT_HOME
,值为 Tomcat 所在的目录,例如 D:\soft\tomcat - 新建
CATALINA_HOME
和CATALINA_BASE
, 值都设为%TOMCAT_HOME%
- 打开
PATH
,在最后面添加变量值:;%CATALINA_HOME%\lib;%CATALINA_HOME%\bin
idea
安装
idea
,解压破解包到idea
安装目录将以下内容添加到 idea 安装目录下的
idea64.exe.vmoptions
中,-javaagent
的ja-netfilter.jar
路径根据自己的实际路径填写1
2
3-javaagent:D:\soft\IntelliJ IDEA 2023.2.2\jetbra\ja-netfilter.jar=jetbrains
--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED在该网站获取激活码,填写到
Activation code
中,激活成功
不用关心激活时间,它是后备许可证,不会过期
其他软件
ffmpeg
- 下载压缩包,解压缩后重命名为
ffmpeg
- 打开
PATH
,在最后面添加环境变量值:;D:\soft\ffmpeg\bin
yt-dlp
- 下载exe 执行文件,新建
D:\soft\yt-dlp
目录,将yt-dlp.exe
移动到该目录 - 打开
PATH
,在最后面添加环境变量值:;D:\soft\yt-dlp
windows环境配置
https://blog.jaychou.site/2023/12/02/windows环境配置/