deepin linux 初始化开发环境 jdk 、maven、
2018-09-21 本文已影响34人
蓝色_fea0
每次重装系统都要把开发环境弄回来,这里就记录一下把
1、jdk
这里直接使用openjdk 就行了
apt-cache search jdk //查询现有的jdk
apt-get install openjdk-8-jdk //安装jdk8
java -version //查看一下是否安装成功
2、maven
apt-get install maven
mvn -version
修改settings.xml 文件
vim /etc/maven/settings.xml
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>/var/lib/maven</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>
-->
<!--安装阿里云镜像-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
3、docker
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
wheezy \
stable"
sudo apt-get update
sudo apt-get install docker-ce
修改docker镜像为阿里云镜像
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://j0andt2p.mirror.aliyuncs.com"
],
"insecure-registries": [],
"debug": true,
"experimental": false
}
systemctl start docker
systemctl restart docker