sh Git + Java + Spring Boot + Kotlin + Python + Node.js + Docker + Docker的安装脚本构建开发环境。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Git + Java + Spring Boot + Kotlin + Python + Node.js + Docker + Docker的安装脚本构建开发环境。相关的知识,希望对你有一定的参考价值。

#!/bin/bash
sudo apt-get update

# Libraries
sudo apt-get install -y build-essential \
                        checkinstall \
                        gcc-7 \
                        libreadline-gplv2-dev \
                        libncursesw5-dev \
                        libssl-dev \
                        libsqlite3-dev \
                        tk-dev \
                        libgdbm-dev \
                        libc6-dev \
                        libbz2-dev \
                        apt-transport-https \
                        ca-certificates \
                        software-properties-common

# Utilities
sudo apt-get install -y git \
                        curl \
                        wget \
                        meld \
                        htop \
                        terminator \
                        vim

# Chromium 
sudo apt-get install -y chromium-browser \
                        chromium-browser-l10n

# Python
sudo apt-get install -y python3.7 \
                        python3.7-dev \
                        python3.7-venv \
                        python3.7-dbg \
                        python3-pip \
                        python3-virtualenv \
                        python3-setuptools

# Set default .gitignore
echo ".classpath
.project
.settings
target
.idea
*.log
*.*~
.class
*.pyc
*.pyo
*.swp
*.swo
node_modules
" > ~/.gitignore && git config --global core.excludesfile ~/.gitignore

# Set Meld as difftool
git config --global diff.tool meld
git config --global difftool.prompt false

# Set Meld as mergetool
git config --global merge.tool meld
git config --global mergetool.keepbackup false

# Set vim as default commit editor
git config --global core.editor "vim"
git config --global core.commentchar "@"

# Set post buffer size
git config --global http.postBuffer 524288000

# Set ignore SSL verify
git config --global http.sslVerify false

# Set grep line number
git config --global grep.lineNumber true

# Se pull rebase
git config --global pull.rebase true

# Set --prune to git fetch and git pull
git config --global remote.origin.prune true

# Aliases
git config --global alias.s 'stash --all'
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

# Install sdkman.io
curl -s "https://get.sdkman.io" | bash && source "$HOME/.sdkman/bin/sdkman-init.sh"

# Install Java 9
sdk install java 9.0.7-zulu

# Install Maven
sdk install maven 3.6.0

# Install Gradle
sdk install gradle 4.10.2

# Install Kotlin
sdk install kotlin 1.2.70

# Install Spring Boot
sdk install springboot

# Install NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && source ~/.bashrc 
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install node

# Install Docker CE
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt-get update && sudo apt-get install -y docker-ce && sudo usermod -aG docker $USER

# Install Docker Compose
sudo curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
sudo chmod +x /usr/local/bin/docker-compose

以上是关于sh Git + Java + Spring Boot + Kotlin + Python + Node.js + Docker + Docker的安装脚本构建开发环境。的主要内容,如果未能解决你的问题,请参考以下文章

sh ubuntu 14.04安装scala 2.11.7和sbt 13.9以及java 8和git

sh ubuntu 14.04安装scala 2.11.7和sbt 13.9以及java 8和git

easy-rules-centraldogma-spring-boot-starter 引入外部rule

404-not-found-while-running-spring-boot-rest-api

自定义spring-boot-autocofigure使用maven打包的时候报错了:Failed to execute goal org.springframework.boot:spring-bo

使用 Spring Cloud Config java.lang.IllegalStateException: No .git