All Projects → mengyou658 → awesome-env-config-cn

mengyou658 / awesome-env-config-cn

Licence: Apache-2.0 license
各种开发语言项目环境国内(中国国内加速镜像)配置教程和部分实践经验,包括github.com, nodejs,npm,nvm, yarn, java, maven, gradle, python, mysys2, elasticsearch, php,golang等等,更多正在加入中...

Projects that are alternatives of or similar to awesome-env-config-cn

Verdaccio
📦🔐 A lightweight Node.js private proxy registry
Stars: ✭ 12,667 (+25234%)
Mutual labels:  yarn, yarnpkg
Blog Tutorials
⭐️ Codebase for the tutorials on my blog about Java, Spring Boot, AWS, Kotlin and Testing
Stars: ✭ 257 (+414%)
Mutual labels:  maven, jdk
maven-springboot-electron
Package your Java Web Application with Electron + OpenJDK only using Maven
Stars: ✭ 44 (-12%)
Mutual labels:  maven, jdk
yarn-global
A set of useful methods for @yarnpkg
Stars: ✭ 12 (-76%)
Mutual labels:  yarn, yarnpkg
Install nodejs and yarn homebrew
The guide for installing nvm | node | yarn via homebrew
Stars: ✭ 261 (+422%)
Mutual labels:  yarn, nvm
setup-linux-debian
Installs essential JavaScript development programs.
Stars: ✭ 16 (-68%)
Mutual labels:  yarn, nvm
Spring Boot Quick
🌿 基于springboot的快速学习示例,整合自己遇到的开源框架,如:rabbitmq(延迟队列)、Kafka、jpa、redies、oauth2、swagger、jsp、docker、spring-batch、异常处理、日志输出、多模块开发、多环境打包、缓存cache、爬虫、jwt、GraphQL、dubbo、zookeeper和Async等等📌
Stars: ✭ 1,819 (+3538%)
Mutual labels:  maven, aliyun
Fish Nvm
nvm wrapper for fish-shell
Stars: ✭ 336 (+572%)
Mutual labels:  yarn, nvm
zsh-yarn-completions
Yarn completions for Z-shell that supports yarn workspaces
Stars: ✭ 35 (-30%)
Mutual labels:  yarn, yarnpkg
laravel-admin
LaravelAdmin是基于PHP开发的基础管理后台系统,做到开箱即用,为新项目开发省去了基础功能开发的步骤;此系统采用前后端分离模式,后端使用Laravel,前端使用vue;主要包含:登录、注销、可视化数据大屏、管理员、角色管理、菜单管理、权限管理、错误日志、登录日志、访问日志、获取服务器CPU使用率、内存使用率等功能。后端主要使用Artisan命令行、Jobs消息队列、 Rules验证规则、Restful API、Composer扩展包、Redis秒杀、Extend自定义扩展类:微信授权、钉钉告警推送、MongoDB、阿里云OSS、七牛云存储、七牛云直播、php-jwt TOKEN、Phpoffice、MySql数据库字典、Elasticsearch等技术。
Stars: ✭ 45 (-10%)
Mutual labels:  aliyun
CampusForum
校园论坛
Stars: ✭ 62 (+24%)
Mutual labels:  maven
bazel-maven-proxy
A local (read-only) proxy for Bazel to access Maven resources behind a secure repository or from the local Maven repository
Stars: ✭ 22 (-56%)
Mutual labels:  maven
package-info.nvim
✍️ All the npm/yarn commands I don't want to type
Stars: ✭ 248 (+396%)
Mutual labels:  yarn
taxondna
Taxonomy-aware DNA sequence processing toolkit
Stars: ✭ 28 (-44%)
Mutual labels:  maven
dtsearch
Find packages with TypeScript types, either bundled or on Definitely Typed
Stars: ✭ 24 (-52%)
Mutual labels:  yarn
xdu-cloudcourse-web
西电云计算课程大作业Web端代码示例
Stars: ✭ 26 (-48%)
Mutual labels:  maven
oracle-java-downloads
Oracle Java Downloads
Stars: ✭ 40 (-20%)
Mutual labels:  jdk
koa-mongoDB
😊😊Koa and mongoose build services
Stars: ✭ 24 (-52%)
Mutual labels:  yarn
cimg-node
The CircleCI Node.js Docker Convenience Image.
Stars: ✭ 35 (-30%)
Mutual labels:  yarn
nandomoreira.me-nuxt-theme
🏃🏻‍♂️ My superfast personal SPA blog/site using Vuejs and Nuxt :D
Stars: ✭ 44 (-12%)
Mutual labels:  nvm

awesome-env-config-cn

各种开发语言项目环境国内(中国国内加速镜像)配置教程和部分实践经验,包括github.com, nodejs,npm,nvm, yarn, java, maven, gradle, python, mysys2, elasticsearch, php等等,更多正在加入中

本项目地址:https://github.com/mengyou658/awesome-env-config-cn

TODO 待补充的

欢迎大家一起补充

  • ruby
  • pod
  • ...

目录


linux

github

nodejs

nvm

yarn

  • yarn 安装

    官方地址:https://yarnpkg.com/

    • 需要首先安装nodejs
    • 然后使用npm安装yarn或者更新
      npm i -g yarn 
      或者
      npm install -g yarn 
  • 配置国内源

    yarn config set registry https://registry.npmmirror.com

npm

  • npm 默认安装nodejs后就已经有了,使用以下命令查看
    npm -v
  • npm更新,一下不适用于nvm安装的node
    npm i -g npm 
  • 配置国内源,最简单的一种方式,自动配置淘宝源中多个配置
    npm install -g --registry=https://registry.npmmirror.com mirror-config-china

jdk

maven

gradle

  • gradle 安装

  • gradle 配置

    终极配置,在用户目录下~/.gradle/目录下增加init.gradle文件,内容如下

     allprojects {
     	buildscript {
     		repositories {
     			mavenLocal()
     			def NEXUS_URL = 'https://maven.aliyun.com/repository/public'
     			def jcenter_URL = 'https://maven.aliyun.com/repository/jcenter'
     			def m2_URL = 'https://maven.aliyun.com/repository/gradle-plugin'
     			def spring_plugin_URL = 'https://maven.aliyun.com/repository/spring-plugin'
     			def spring_URL = 'https://maven.aliyun.com/repository/spring'
     			def GOOGLE_URL = 'https://maven.aliyun.com/repository/google'
     			all { ArtifactRepository repo ->
     				if(repo instanceof MavenArtifactRepository){
     					def url = repo.url.toString()
     					if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com') || 		url.startsWith('http://mirrors.ibiblio.org')) {
     						project.logger.lifecycle "Repository ${repo.url} replaced by $jcenter_URL."
     						remove repo
     					} else if (url.startsWith('https://plugins.gradle.org/m2/')) {
     						project.logger.lifecycle "Repository ${repo.url} replaced by $m2_URL."
     						remove repo
     					} else if (url.startsWith('http://repo.spring.io/libs-milestone/')) {
     						project.logger.lifecycle "Repository ${repo.url} replaced by $spring_URL."
     						remove repo
     					} else if (url.startsWith('http://repo.spring.io/plugins-release/')) {
     						project.logger.lifecycle "Repository ${repo.url} replaced by $spring_plugin_URL."
     						remove repo
                        // 这里是安卓相关下载的加速,本地没有出现下载慢的情况,所以这个就屏蔽了
     					//}else if (url.startsWith('https://dl.google.com/dl/android/maven2/')) {
     					//	project.logger.lifecycle "Repository ${repo.url} replaced by $GOOGLE_URL."
     					//	println("buildscript ${repo.url} replaced by $GOOGLE_URL.")
     					//	remove repo
     					}
     				}
     			}
     			
     			maven { url 'https://maven.aliyun.com/repository/public' }
     			maven { url 'https://maven.aliyun.com/repository/spring' }
     			maven { url 'https://maven.aliyun.com/repository/spring-plugin' }
     			maven { url "https://maven.aliyun.com/repository/grails-core" }
     			maven { url "https://maven.aliyun.com/repository/apache-snapshots" }
     			maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
     			maven { url 'https://maven.aliyun.com/repository/google' }
     			jcenter {
     				url jcenter_URL
     			}
     			maven {
     				url NEXUS_URL
     			}
     		}
     	
     	}
         repositories {
             mavenLocal()
     		def NEXUS_URL = 'https://maven.aliyun.com/repository/public'
     		def jcenter_URL = 'https://maven.aliyun.com/repository/jcenter'
     		def m2_URL = 'https://maven.aliyun.com/repository/gradle-plugin'
     		def spring_plugin_URL = 'https://maven.aliyun.com/repository/spring-plugin'
     		def spring_URL = 'https://maven.aliyun.com/repository/spring'
     		def GOOGLE_URL = 'https://maven.aliyun.com/repository/google'
             all { ArtifactRepository repo ->
                 if(repo instanceof MavenArtifactRepository){
                     def url = repo.url.toString()
                     if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com') || 		url.startsWith('http://mirrors.ibiblio.org')) {
                         project.logger.lifecycle "Repository ${repo.url} replaced by $jcenter_URL."
                         remove repo
                     } else if (url.startsWith('https://plugins.gradle.org/m2/')) {
                         project.logger.lifecycle "Repository ${repo.url} replaced by $m2_URL."
                         remove repo
                     } else if (url.startsWith('http://repo.spring.io/libs-milestone/')) {
                         project.logger.lifecycle "Repository ${repo.url} replaced by $spring_URL."
                         remove repo
                     } else if (url.startsWith('http://repo.spring.io/plugins-release/')) {
                         project.logger.lifecycle "Repository ${repo.url} replaced by $spring_plugin_URL."
                         remove repo
                    // 这里是安卓相关下载的加速,本地没有出现下载慢的情况,所以这个就屏蔽了
                    //}else if (url.startsWith('https://dl.google.com/dl/android/maven2/')) {
     				//	project.logger.lifecycle "Repository ${repo.url} replaced by $GOOGLE_URL."
     				//	println("buildscript ${repo.url} replaced by $GOOGLE_URL.")
     				//	remove repo
     				}
                 }
             }
             
     		maven { url 'https://maven.aliyun.com/repository/public' }
             maven { url 'https://maven.aliyun.com/repository/spring' }
             maven { url 'https://maven.aliyun.com/repository/spring-plugin' }
     		maven { url "https://maven.aliyun.com/repository/grails-core" }
             maven { url "https://maven.aliyun.com/repository/apache-snapshots" }
             maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
     		maven { url 'https://maven.aliyun.com/repository/google' }
             jcenter {
     			url jcenter_URL
     		}
     		maven {
     			url NEXUS_URL
     		}
         }
     }
    

python

  • python 安装
    • windows 系统安装,直接下载安装包
    • linux 系统默认自带python,需要单独安装新版本,linux系统镜像配置请参考linux系统镜像源
      • ubuntu
          sudo apt-get update
          sudo apt-cache search python3*
          sudo apt-get install python3.8 # python3.5 python3.6 python3.7 等,python3.8是当前书写的时候最新稳定版本
      • centos
          sudo yum install epel-release -y
          sudo yum -y update
          sudo yum list python3* # 使用此命令查看当前支持的python3版本
          sudo yum install python37 # python35 python36 python37 等,python38是当前书写的时候最新稳定版本

pip

  • pip 安装 python 安装成功后,默认自带pip
  • 阿里云镜像说明,https://developer.aliyun.com/mirror/pypi
    • windows 下配置
      mkdir %USERPROFILE%\.pip\
      start %USERPROFILE%\.pip\
      • 在这个目录下创建pip.conf文件(推荐使用notepad++) 写入内容如下:
      [global]
      index-url = https://mirrors.aliyun.com/pypi/simple/
      
      [install]
      trusted-host=mirrors.aliyun.com
      
    • linux
      mkdir -p ~/.pip
      # ubuntu 桌面下可以使用 gedit ~/.pip/pip.conf
      # vi 入门可以参考 https://github.com/wsdjeg/vim-galore-zh_cn
      vi ~/.pip/pip.conf
      写入内容如下:
      [global]
      index-url = https://mirrors.aliyun.com/pypi/simple/
      
      [install]
      trusted-host=mirrors.aliyun.com
      

miniAnaconda

  • (一般使用miniAnaconda,anaconda占用空间大,土豪可以直接忽略)清华镜像源,这里包括了anaconda的安装配置说明,https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
  • 安装 https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/ 下载对应的文件执行
    • windows安装 下载最新的exe文件安装
    • linux安装
      wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_4.8.3-Linux-x86_64.sh
      sh Miniconda3-py38_4.8.3-Linux-x86_64.sh.sh
  • 配置镜像
    • windows 下配置
      conda config --set show_channel_urls yes
      start %USERPROFILE%\
      • 在这个目录下编辑.condarc文件(推荐使用notepad++编辑,如果看不到这个文件,请打开windows系统的隐藏文件选项) 写入内容如下:
      channels:
        - defaults
      show_channel_urls: true
      channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
      default_channels:
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
      custom_channels:
        conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      
    • linux
      conda config --set show_channel_urls yes
      # ubuntu 桌面下可以使用 gedit ~/.condarc
      # vi 入门可以参考 https://github.com/wsdjeg/vim-galore-zh_cn
      vi ~/.condarc
      写入内容如下:
      channels:
        - defaults
      show_channel_urls: true
      channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
      default_channels:
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
      custom_channels:
        conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      

elasticsearch

kibana

php

composer

msys2

msys2-qt5

  • msys2 安装,清华镜像,https://mirror.tuna.tsinghua.edu.cn/help/msys2/
  • 配置镜像源
    1. 修改C:\msys64\etc\pacman.d(默认安装在c盘下面)下面得mirrorlist.*文件,把清华镜像相关得移动到最前面
    2. 安装
    # 更新系统包
    pacman -Syu
    # 基础包
    pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake bash wget p7zip pacman pacman-mirrors msys2-runtime
    # qt5
    pacman -S  mingw-w64-x86_64-clang mingw-w64-x86_64-clang-tools-extra  mingw-w64-x86_64-clang-analyzer mingw-w64-x86_64-qt5  mingw-w64-x86_64-qt-creator 

go

GOPROXY

  1. windows对应的设置环境变量即可(也可以自己手动设置环境变量,以下需要管理员运行命令行)
    setx /m GOPROXY https://goproxy.io,direct
    setx /m GO111MODULE auto
  2. linux 环境 编辑~/.bashrc(bash)或者~/.zshrc(zsh)
    export GOPROXY=https://goproxy.io,direct
    export GO111MODULE=auto

rust

cargo

  • 环境设置
  1. windows 到 %USERPROFILE%.cargo 当前用户的.cargo目录下,新建或者修改config,内容如下
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
# 替换成你偏好的镜像源
replace-with = 'tuna'

# 清华大学
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

# 中国科学技术大学
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

# 上海交通大学
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"

# rustcc社区
[source.rustcc]
registry = "git://crates.rustcc.cn/crates.io-index"
  1. linux 环境 编辑vi ~/.cargo/config
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
# 替换成你偏好的镜像源
replace-with = 'tuna'

# 清华大学
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

# 中国科学技术大学
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

# 上海交通大学
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"

# rustcc社区
[source.rustcc]
registry = "git://crates.rustcc.cn/crates.io-index"

github-gitconfig

备注:github clone的时候使用git方式下载基本不出问题

  • 环境设置
  1. windows 到 %USERPROFILE%.gitconfig 当前用户的.gitconfig文件,内容如下
[url "[email protected]:"]
	insteadOf = https://github.com/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].