Panda_01_开发环境搭建(一)_开发软件安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_26981333/article/details/82966664

一、前言

Panda的开发环境搭建主要涉及到以下内容

  • 开发软件安装
  • Idea相关配置
  • Panda项目部署
  • Idea插件安装

这一节,我们来看下开发软件的安装

二、开发工具及版本信息

  • JDK 1.8 及以上
  • maven 3.3 及以上
  • Tomcat 8+
  • Navicat Premium 12
  • Git
  • Redis 3.2及以上
  • IDEA

三、JDK安装

参见 JVM_总结_01_JDK的安装

四、Maven安装

1.下载Maven

官网下载地址:

https://maven.apache.org/download.cgi

下载之后解压即可
在这里插入图片描述

2.配置环境变量

  • 配置环境变量
MAVEN_HOME=bin所在目录
Path=%MAVEN_HOME%\bin;(注意是在Path中追加)
  • 验证

打开命令行工具,输入如下命令,若出现maven的版本信息,说明环境变量配置成功

mvn -version

3.设置全局settings

全局settings的路径为: %MAVEN_HOME%/conf/settings.xml

修改全局settings,设置下maven本地仓库地址:

 <localRepository>D:\maven-repository</localRepository>

4.设置hap-settings

hap-settings主要作用:设置私服仓库,下载jar包时直接从私服下载

  • %MAVEN_HOME%/conf 目录下新增文件夹 profile
  • 然后新增一个文件 hap-settings.xml
  • 文件内容如下(注意修改下maven本地仓库地址):
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${maven.home}/conf/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<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
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
    <localRepository>D:\maven-repository</localRepository>

  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |-->
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
  </pluginGroups>

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

  <servers>
     <server>
       <id>releases</id>
       <username>hec-deployer</username>
       <password>123456</password>
     </server>
     <server>
       <id>snapshots</id>
       <username>hec-deployer</username>
       <password>123456</password>
     </server>
     <server>
       <id>3rd</id>
       <username>hec-deployer</username>
       <password>123456</password>
     </server>
   </servers>

   <mirrors>
     <mirror>
       <id>central</id>
       <mirrorOf>*</mirrorOf>
       <url>http://nexus.saas.hand-china.com/content/groups/public</url>
     </mirror>
   </mirrors>

   <profiles>
     <profile>
       <id>central</id>

       <repositories>
         <repository>
           <id>central</id>
           <url>http://central</url>
           <releases>
             <enabled>true</enabled>
           </releases>
           <snapshots>
             <enabled>true</enabled>
           </snapshots>
         </repository>
       </repositories>

       <pluginRepositories>
         <pluginRepository>
           <id>central</id>
           <url>http://central</url>
           <releases>
             <enabled>true</enabled>
           </releases>
           <snapshots>
             <enabled>true</enabled>
           </snapshots>
         </pluginRepository>
       </pluginRepositories>

     </profile>
   </profiles>

   <activeProfiles>
     <activeProfile>
       central
     </activeProfile>
   </activeProfiles>

</settings>

五、Tomcat安装

1.下载

官网下载地址

https://tomcat.apache.org/download-90.cgi

下载后,解压即可。

2.配置环境变量

  • 配置环境变量
CATALINA_HOME=bin所在目录
Path=%CATALINA_HOME%\lib;%CATALINA_HOME%\bin
  • 验证
  • 启动TOMCAT:运行 %CATALINA_HOME%\bin\startup.bat
  • 访问 http://localhost:8080,若出现tomcat欢迎界面,则黄金变量配置成功

六、Navicat premuim安装

1.安装

安装及破解文件
在这里插入图片描述
运行安装文件,即可安装

2.破解

将破解文件放到安装目录,然后运行Navicat即可。

七、Git bash安装

1.下载

去官网下载:

https://git-scm.com/downloads

在这里插入图片描述

2.安装

参见 windows下Git BASH安装

八、Redis安装

1.安装Redis

1.1 下载

下载地址:

Redis-x64-3.2.100.zip

GitHub Windows版Redis 项目地址:

MicrosoftArchive/redis

1.2 安装

将下载的压缩包解压即可

1.3 启动

直接运行redis的home目录下的redis-server.exe即可。

出现下图界面,说明启动成功
在这里插入图片描述

2.安装Redis可视化工具

这里要安装的是 RedisDesktopManager

2.1 下载

下载地址:

亲测可用,也可自己百度搜索下载

GitHub RedisDesktopManager 项目地址

uglide/RedisDesktopManager

2.2 安装

一路默认安装即可

2.3 启动

双击可执行文件运行之后,点击 连接到 Redis服务器 ,设置下 连接名Redis 的ip&port,然后点击测试连接,测试成功之后点击即可连接redis。
在这里插入图片描述

下图为redis中的数据列表示例
在这里插入图片描述

九、Idea安装

1.下载

去官网下载旗舰版:

https://www.jetbrains.com/idea/download/#section=windows

在这里插入图片描述

2.安装

默认安装即可

3.激活

  • 访问如下网址

http://idea.lanyus.com/

在这里插入图片描述

  • 修改hosts文件

host文件路径:C:\Windows\System32\drivers\etc\hosts
0.0.0.0 account.jetbrains.com 追加到hosts文件中

  • 激活

使用激活码激活idea即可

猜你喜欢

转载自blog.csdn.net/qq_26981333/article/details/82966664