寫這個的意義是爲了方便下次更換電腦或者重裝系統後 再去一個個百度的太麻煩
乾脆這次做個記錄
系統都是以WIN10爲準
此文章不是教程 小白請繞道 只是怕忘記 懂的自然懂。
Java環境變量
JAVA_HOME : D:\Java\jdk // 以自己電腦爲準
CLASSPATH : .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
PATH : %JAVA_HOME%\jre\bin
%JAVA_HOME%\bin
驗證成功: java javac java -version
Maven環境變量+setting.xml配置
MAVEN_HOME : D:\maven
PATH : %MAVEN_HOME%\bin
驗證成功: mvn -v
簡單的maven setting配置
<?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:\maven\repo</localRepository>
<offline>false</offline>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
Eclipse
配置jdk
Windows-Preferences-Java-Installed JREs
配置tomcat
Windows-Preferences-Server-Runtime Environments
配置完成後 雙擊服務
配置Maven
Windows-Preferences-Maven-User Settings
把Global Settings和User Settings 更換成自己的setting.xml路徑
D:\maven\conf\settings.xml
並更改Local Repository 根據需要
D:\maven\repo
MySQL
mysql 的 配置文件 my.ini 默認在 C:\ProgramData\MySQL\MySQL Server 5.7
[mysqld]
datadir=D:/MySQL Data #需要把原來的Data數據複製到新的目錄下 否則啓動不了
[mysql]
default-character-set = utf8