当前位置: 首页 > article >正文

Java、Python、NodeJS等开发环境安装及配置镜像加速到国内源

文章目录Java1.我应该用哪个版本的JDK1.1 版本推荐1.2 发行版推荐1.3 下载JDK1.4 ubuntu版本1.5 JDK镜像选择2.Windows2.1 scoop方式安装JDK3.Linux3.1 apt方式安装JDK3.1.1 切换JDK3.1.2 验证版本3.1.3 原理Python1.Windows1.1 scoop方式安装Python1.2 uv方式安装Python推荐2.Linux2.1 apt方式安装Python2.1.1 配置版本切换2.1.2 切换Python2.1.3 验证版本2.2 uv方式安装Python推荐3.uv方式说明3.1 查看版本列表3.2 初始化项目3.3 添加依赖3.4 查看依赖3.5 同步依赖NodeJS1.Windows1.1 scoop方式安装NodeJS1.2 nvm方式安装NodeJS推荐2.Linux2.1 nvm方式安装NodeJS推荐3.nvm方式说明3.1 安装版本3.2 查看版本列表3.3 切换版本3.4 验证版本配置国内源1.linuxmirrors2.pip国内源3.maven和gradle国内源4.npm5.apt国内源(backup)6.uv国内源Java从图中可以看出下载8/11/17三个版本即可其他版本按需下载。从图中可以看出除了Oracle外Amazon和Eclipse Adoptium都挺好。来源https://newrelic.com/resources/report/2024-state-of-the-java-ecosystem1.我应该用哪个版本的JDKhttps://whichjdk.com/首选Adoptium Eclipse Temurin 21且需确保本地、CI持续集成和生产环境版本一致。1.1 版本推荐JDK VersionTypeRelease DateHighlightsRecommendation8LTS03/2014LambdasLast LTS version under previous release model. Free updates by Oracle ended, but still maintained by others. Upgrade to 21 now!9Feature09/2017ModulesNew release model was introduced. EOL. Upgrade to 21 now!10Feature03/2018varEOL. Upgrade to 21 now!11LTS09/2018New HTTP ClientUpgrade to 21 now!12Feature03/2019EOL. Upgrade to 21 now!13Feature09/2019EOL. Upgrade to 21 now!14Feature03/2020Switch expressionsEOL. Upgrade to 21 now!15Feature09/2020Text blocksEOL. Upgrade to 21 now!16Feature03/2021RecordsEOL. Upgrade to 21 now!17LTS09/2021Sealed ClassesIt’s time to upgrade to 21.18Feature03/2022UTF-8 by DefaultEOL. Upgrade to 21 now!19Feature09/2022EOL. Upgrade to 21 now!20Feature03/2023EOL. Upgrade to 21 now!21LTS09/2023Pattern Matching, Virtual ThreadsCurrent LTS version.22Feature03/2024Stick with 21.23Feature09/2024Markdown Documentation CommentsStick with 21.24Feature03/2025Ahead-of-Time Class LoadingStick with 21.1.2 发行版推荐Adoptium Eclipse TemurinEclipse 基金会项目高质量、 vendor-neutral厂商中立、经 TCK 测试支持 LTS强烈推荐。Amazon CorrettoAWS 提供适合在 AWS 的 Amazon Linux 2 上运行推荐。1.3 下载JDKhttps://adoptium.net/zh-CN/temurin/releases?version8osanyarchany1.4 ubuntu版本https://releases.ubuntu.com/Ubuntu 24.04.3 LTS (Noble Numbat) ›Ubuntu 22.04.5 LTS (Jammy Jellyfish) ›Ubuntu 20.04.6 LTS (Focal Fossa) ›1.5 JDK镜像选择https://hub.docker.com/_/eclipse-temurin2.Windows2.1 scoop方式安装JDKscoopinstalltemurin8-jdk temurin17-jdk temurin21-jdk# 不建议scoopinstallcorretto8-jdk corretto17-jdk corretto21-jdk3.Linux3.1 apt方式安装JDKaptinstallsoftware-properties-common-yaptinstallopenjdk-8-jdk openjdk-11-jdk openjdk-17-jdk openjdk-21-jdk-y3.1.1 切换JDKupdate-alternatives--configjava3.1.2 验证版本java-version3.1.3 原理# 入口: /usr/bin/java - /etc/alternatives/java*ll /usr/bin/java# 切换 /etc/alternatives/java - /usr/lib/jvm/java-21-openjdk-amd64/bin/java*ll /etc/alternatives/java# 版本目录/usr/lib/jvmll /usr/lib/jvmPython1.Windows1.1 scoop方式安装Pythonscoopinstallpython38 python39 python310 python311 python312 python313 python3141.2 uv方式安装Python推荐scoopinstalluv2.Linux2.1 apt方式安装Pythonaptinstallsoftware-properties-common-yadd-apt-repository ppa:deadsnakes/ppaaptinstallpython{3.7,3.8,3.9,3.10,3.11,3.12,3.13,3.14}-y2.1.1 配置版本切换update-alternatives--install/usr/bin/python python /usr/bin/python2.71update-alternatives--install/usr/bin/python python /usr/bin/python3.72update-alternatives--install/usr/bin/python python /usr/bin/python3.83update-alternatives--install/usr/bin/python python /usr/bin/python3.94update-alternatives--install/usr/bin/python python /usr/bin/python3.105update-alternatives--install/usr/bin/python python /usr/bin/python3.116update-alternatives--install/usr/bin/python python /usr/bin/python3.127update-alternatives--install/usr/bin/python python /usr/bin/python3.138update-alternatives--install/usr/bin/python python /usr/bin/python3.1492.1.2 切换Pythonupdate-alternatives--configpython2.1.3 验证版本python--version2.2 uv方式安装Python推荐curl-LsSfhttps://astral.sh/uv/install.sh|sh或wget-qO- https://astral.sh/uv/install.sh|shinstalling to /home/d/.local/bin uv uvx everythings installed! To add $HOME/.local/bin to your PATH, either restart your shell or run: source $HOME/.local/bin/env (sh, bash, zsh) source $HOME/.local/bin/env.fish (fish)来源https://docs.astral.sh/uv/getting-started/installation/3.uv方式说明uv pythoninstallpython3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.143.1 查看版本列表uv python list3.2 初始化项目uv init3.3 添加依赖uvaddrequests3.4 查看依赖uv tree3.5 同步依赖uvsyncNodeJS1.Windows1.1 scoop方式安装NodeJSscoopinstallnodejs16 nodejs17 nodejs18 nodejs19 nodejs20 nodejs21 nodejs22 nodejs231.2 nvm方式安装NodeJS推荐scoopinstallnvm2.Linux2.1 nvm方式安装NodeJS推荐curl-o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh|bash或wget-qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh|bash Appending nvm source string to /home/d/.zshrc Appending bash_completion source string to /home/d/.zshrc Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR$HOME/.nvm [ -s $NVM_DIR/nvm.sh ] \. $NVM_DIR/nvm.sh # This loads nvm [ -s $NVM_DIR/bash_completion ] \. $NVM_DIR/bash_completion # This loads nvm bash_completion来源https://github.com/nvm-sh/nvm?tabreadme-ov-file#install–update-script3.nvm方式说明3.1 安装版本nvminstall23nvminstall22nvminstall21nvminstall20nvminstall19nvminstall18nvminstall17nvminstall163.2 查看版本列表nvm list3.3 切换版本nvm use233.4 验证版本node-v配置国内源1.linuxmirrorshttps://linuxmirrors.cn/giteebash(curl-sSLhttps://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)defaultbash(curl-sSLhttps://linuxmirrors.cn/main.sh)githubbash(curl-sSLhttps://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh)auto推荐https://github.com/SuperManito/LinuxMirrors/blob/main/docs/use/index.mdbash(curl-sSLhttps://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)\--sourcemirrors.tuna.tsinghua.edu.cn\--protocolhttp\--use-intranet-sourcefalse\--install-epeltrue\--backuptrue\--upgrade-softwarefalse\--clean-cachefalse\--ignore-backup-tipsaliyun会报错应该是请求太大被封了https://mirrors.aliyun.com/ubuntubash(curl-sSLhttps://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)\--sourcemirrors.aliyun.com\--protocolhttp\--use-intranet-sourcefalse\--install-epeltrue\--backupfalse\--upgrade-softwarefalse\--clean-cachefalse\--ignore-backup-tips# 403 Forbidden You dont have permission to access the URL on this server. denied by IP ACL blacklist --- Powered by Tengine CDN Request Id: 7c5fbe2b17549643434472542etencent不支持pvehttps://mirrors.tencent.com/proxmox/debian/pvebash(curl-sSLhttps://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)\--sourcemirrors.tencent.com\--protocolhttp\--use-intranet-sourcefalse\--install-epeltrue\--backupfalse\--upgrade-softwarefalse\--clean-cachefalse\--ignore-backup-tipsE: The repository http://mirrors.tencent.com/proxmox/debian/pve bookworm Release does not have a Release file.2.pip国内源清华贼快推荐https://mirrors.tuna.tsinghua.edu.cn/help/pypi/腾讯备用https://mirrors.cloud.tencent.com/pypi/simple/阿里贼慢还缺包https://developer.aliyun.com/mirror/pypi豆瓣重定向到腾讯https://pypi.doubanio.com/simple/python-mpipinstall-ihttps://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple--upgradepip pip configsetglobal.index-url https://mirrors.cloud.tencent.com/pypi/simple/ pip configsetglobal.extra-index-urlhttps://mirrors.cloud.tencent.com/pypi/simple/ https://mirrors.aliyun.com/pypi/simple# 阿里有时候缺包 (venv) dd:~/SourceCode/test-gpu$ pip3 install torch torchvision torchaudio --index-url https://developer.aliyun.com/mirror/pypi Looking in indexes: https://developer.aliyun.com/mirror/pypi ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch # 豆瓣重定向到腾讯了 (venv) dd:~/SourceCode/test-gpu$ pip3 install torch torchvision torchaudio --index-url https://pypi.doubanio.com/simple/ Looking in indexes: https://pypi.doubanio.com/simple/ Collecting torch Downloading https://mirrors.cloud.tencent.com/pypi/packages/d1/35/e8b2daf02ce933e4518e6f5682c72fd0ed66c15910ea1fb4168f442b71c4/torch-2.5.1-cp311-cp311-manylinux1_x86_64.whl (906.5 MB)3.maven和gradle国内源参考https://developer.aliyun.com/mvn/guide.m2/settings.xmlmirrorsmirroridaliyunmaven/idmirrorOfcentral/mirrorOfname阿里云公共仓库/nameurlhttps://maven.aliyun.com/repository/public/url/mirrormirroridpentaho-public/idnamePentaho Public/namemirrorOf*/mirrorOfurlhttp://nexus.pentaho.org/content/groups/omni//url/mirror/mirrors\init.d\init.gradleallprojects{repositories{mavenLocal()maven{nameAlibaba;urlhttps://maven.aliyun.com/repository/public}mavenCentral()}buildscript{repositories{maven{nameAlibaba;urlhttps://maven.aliyun.com/repository/public}}}}4.npm#npm config set registry https://registry.npm.taobao.orgnpmconfigsetregistry https://registry.npmmirror.comnpmupdate5.apt国内源(backup)#--quiet#-O filewget-qO- https://gitee.com/duhongming/shell-script/raw/master/mirrors/apt-sources.sh|bash6.uv国内源cat~/.config/uv/uv.toml[pip]index-urlhttps://mirrors.aliyun.com/pypi/simple/extra-index-url[https://pypi.org/simple]

相关文章:

Java、Python、NodeJS等开发环境安装及配置镜像加速到国内源

文章目录Java1.我应该用哪个版本的JDK?1.1 版本推荐1.2 发行版推荐1.3 下载JDK1.4 ubuntu版本1.5 JDK镜像选择2.Windows2.1 scoop方式安装JDK3.Linux3.1 apt方式安装JDK3.1.1 切换JDK3.1.2 验证版本3.1.3 原理Python1.Windows1.1 scoop方式安装Python1.2 uv方式安装…...

Confluence 8.5.18 - windows 安装部署详解

本文我们所讲述的是Confluence - 8.5.18 -windows版本版本的详细安装破解步骤,与Confluence - 8.0.0之前的版本不同的是,部分文件名称发生了变化,以前的破解方式已不适用。 1.首先我们先准备安装所需要的文件,所需文件可以直接在…...

终极指南:MXNet深度学习极速入门教程(从零到一)

终极指南:MXNet深度学习极速入门教程(从零到一) 【免费下载链接】mxnet-the-straight-dope An interactive book on deep learning. Much easy, so MXNet. Wow. [Straight Dope is growing up] ---> Much of this content has been incorp…...

MCP 2.0协议安全配置全链路实战:从TLS握手加固到RBAC策略落地的5大关键动作

第一章:MCP 2.0协议安全配置全景认知与实施准备MCP 2.0(Managed Configuration Protocol v2.0)是面向云原生环境设计的轻量级设备与服务配置分发协议,其安全模型基于双向TLS认证、细粒度策略控制与配置签名验证三位一体机制。在实…...

企业采购Agent 的完整流程是什么?2026企业智能采购自动化深度拆解

在2026年的数字化供应链环境下,企业采购Agent已从单纯的自动化工具进化为具备感知、推理与执行能力的“数字员工”。它不仅涵盖了从内部需求识别、预算合规审查到供应商深度评估及合同全生命周期管理的复杂工程,更通过大模型技术实现了业务流的端到端闭环…...

软考 系统架构设计师系列知识点之杂项集萃(91)

接前一篇文章:软考 系统架构设计师系列知识点之杂项集萃(90) 第166题 During the systems analysis phase, you must decide how data will be organized, stored, and managed. A( )is a framework for organizing, storing and managing data. Each file or table cont…...

GLM-4-9B-Chat-1M长文本对话模型实战:vLLM一键部署+Chainlit可视化界面

GLM-4-9B-Chat-1M长文本对话模型实战:vLLM一键部署Chainlit可视化界面 1. 模型简介与核心能力 GLM-4-9B-Chat-1M是智谱AI推出的新一代开源对话模型,在语义理解、数学推理、代码生成和知识问答等多个领域表现出色。该模型最突出的特点是支持1M&#xff…...

自动驾驶开发者必看:Frenet坐标系如何让路径规划更简单(附Python示例)

自动驾驶开发者必看:Frenet坐标系如何让路径规划更简单(附Python示例) 在自动驾驶系统的开发中,路径规划是最具挑战性的环节之一。想象一下,当车辆行驶在蜿蜒的山路或复杂的城市道路时,传统的笛卡尔坐标系会…...

Wireshark实战:如何用ARP协议抓包分析局域网通信(附常见问题排查)

Wireshark深度解析:ARP协议抓包实战与网络故障排查指南 在中小型企业网络运维中,ARP协议引发的通信问题往往是最隐蔽却又最频繁的故障源。想象这样一个场景:财务部的打印机突然无法连接,市场部的共享文件夹时断时续,而…...

Llama-3.2V-11B-cot实战:构建政务热线录音转文字+配图的联合推理分析系统

Llama-3.2V-11B-cot实战:构建政务热线录音转文字配图的联合推理分析系统 1. 项目背景与价值 在政务服务领域,热线电话录音包含了大量有价值的民生诉求信息。传统处理方式需要人工听取录音、记录关键信息并分类处理,效率低下且容易遗漏重要细…...

Firejail终极性能优化指南:10个技巧在不牺牲安全性的前提下提升运行效率

Firejail终极性能优化指南:10个技巧在不牺牲安全性的前提下提升运行效率 【免费下载链接】firejail Linux namespaces and seccomp-bpf sandbox 项目地址: https://gitcode.com/gh_mirrors/fi/firejail Firejail是一款基于Linux namespaces和seccomp-bpf的沙…...

写作路上的迷茫与突破

曾经,我也是那个在写作面前踌躇不前的人。每次提笔,满心都是“我写不好”“我没什么可写的”“我达不到别人的高度”……这些念头像藤蔓一样,紧紧缠绕着我,让我寸步难行。我看着群里的小伙伴们一个个妙笔生花,自己却只…...

揭秘Amlogic S9xxx系列Armbian系统:从电视盒子到高性能ARM服务器的技术革命

揭秘Amlogic S9xxx系列Armbian系统:从电视盒子到高性能ARM服务器的技术革命 【免费下载链接】amlogic-s9xxx-armbian amlogic-s9xxx-armbian: 该项目提供了为Amlogic、Rockchip和Allwinner盒子构建的Armbian系统镜像,支持多种设备,允许用户将…...

Atmosphere深度解析:Nintendo Switch定制固件的架构演进与技术实践

Atmosphere深度解析:Nintendo Switch定制固件的架构演进与技术实践 【免费下载链接】Atmosphere Atmosphre is a work-in-progress customized firmware for the Nintendo Switch. 项目地址: https://gitcode.com/GitHub_Trending/at/Atmosphere Atmosphere作…...

终极指南:如何构建SEO友好的Python Web应用 - Brython与服务器端渲染完美结合

终极指南:如何构建SEO友好的Python Web应用 - Brython与服务器端渲染完美结合 【免费下载链接】brython Brython (Browser Python) is an implementation of Python 3 running in the browser 项目地址: https://gitcode.com/gh_mirrors/br/brython 在当今竞…...

MATLAB-Appdesigner中动态文本区域的交互设计与实现

1. 动态文本区域的基础搭建 在MATLAB Appdesigner中创建动态文本区域就像搭积木一样简单。我最近做了一个实时显示传感器数据的项目,第一步就是从组件库拖拽文本区域到设计视图。这里有个小技巧:给组件命名时最好用有意义的名称,比如"Te…...

Symfony Translation终极指南:微前端应用翻译共享的完整解决方案

Symfony Translation终极指南:微前端应用翻译共享的完整解决方案 【免费下载链接】translation symfony/translation: 是一个用于 PHP 的翻译库,支持多种消息源和翻译格式,可以用于构建多语言的 Web 应用程序和 API。 项目地址: https://gi…...

告别VSCode远程开发:用Xshell+ProxyJump打造轻量级服务器连接方案

轻量级服务器连接方案:Xshell与ProxyJump的高效实践 在资源受限的开发环境中,寻找一个既能满足远程开发需求又不会过度消耗系统资源的解决方案至关重要。对于许多中小团队和个人开发者来说,VSCode虽然功能强大,但其远程开发插件往…...

终极HoloCubic智能家居集成指南:如何通过MQTT协议实现物联网设备互联

终极HoloCubic智能家居集成指南:如何通过MQTT协议实现物联网设备互联 【免费下载链接】HoloCubic 带网络功能的伪全息透明显示桌面站 项目地址: https://gitcode.com/gh_mirrors/ho/HoloCubic HoloCubic是一款带网络功能的伪全息透明显示桌面站,能…...

网络工程师面试必看:如何用eNSP设计一个高可用的企业网?从VRRP、MSTP到防火墙策略详解

网络工程师面试实战:用eNSP构建高可用企业网的三大核心技术解析 在当今数字化转型浪潮中,企业网络架构的稳定性和安全性已成为衡量网络工程师专业能力的重要标尺。无论是应对技术面试还是实际工作挑战,掌握企业级网络设计原理与eNSP仿真实操能…...

终极MiroFish部署指南:3种方式快速搭建你的AI预测引擎

终极MiroFish部署指南:3种方式快速搭建你的AI预测引擎 【免费下载链接】MiroFish A Simple and Universal Swarm Intelligence Engine, Predicting Anything. 简洁通用的群体智能引擎,预测万物 项目地址: https://gitcode.com/GitHub_Trending/mi/Miro…...

企业网安必修课:联软数据交换系统漏洞排查与应急响应指南

企业级数据交换系统安全防护实战:漏洞排查与应急响应全流程 在数字化转型浪潮中,企业数据交换系统已成为关键基础设施的"神经枢纽"。联软安全数据交换系统作为国内主流解决方案,其安全性直接关系到企业核心数据的保密性与完整性。当…...

终极性能优化指南:如何让go-sqlmock数据库测试速度提升300%

终极性能优化指南:如何让go-sqlmock数据库测试速度提升300% 【免费下载链接】go-sqlmock Sql mock driver for golang to test database interactions 项目地址: https://gitcode.com/gh_mirrors/go/go-sqlmock go-sqlmock是Go语言中最强大的数据库模拟测试库…...

Podman镜像加速配置全攻略:阿里云/清华/网易源一键切换(附避坑指南)

Podman镜像加速实战:国内主流源配置与私有仓库部署指南 引言 容器技术已成为现代开发流程中不可或缺的一环,而镜像拉取速度直接影响开发效率。对于国内开发者而言,直接从Docker官方仓库拉取镜像常常面临网络延迟问题。本文将深入探讨Podman环…...

ES6新特性终极指南:10个常见错误及完美解决方案

ES6新特性终极指南:10个常见错误及完美解决方案 【免费下载链接】es6-features ECMAScript 6: Feature Overview & Comparison 项目地址: https://gitcode.com/gh_mirrors/es/es6-features ECMAScript 6(简称ES6)作为JavaScript的…...

CosyVoice-300M-25Hz企业级应用:智能客服语音回复生成

CosyVoice-300M-25Hz企业级应用:智能客服语音回复生成 想象一下,你给一家公司的客服打电话,听到的回复不再是那种冷冰冰、一字一顿的机器录音,而是一个声音自然、语气亲切,甚至能根据你的问题流露出理解或抱歉情绪的“…...

系统优化工具革新:Windows Cleaner全方位实战指南——3大痛点解决与5步优化流程

系统优化工具革新:Windows Cleaner全方位实战指南——3大痛点解决与5步优化流程 【免费下载链接】WindowsCleaner Windows Cleaner——专治C盘爆红及各种不服! 项目地址: https://gitcode.com/gh_mirrors/wi/WindowsCleaner 在数字化办公与娱乐日…...

ejabberd移动端集成终极指南:iOS和Android客户端开发全攻略

ejabberd移动端集成终极指南:iOS和Android客户端开发全攻略 【免费下载链接】ejabberd Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server) 项目地址: https://gitcode.com/gh_mirrors/ej/ejabberd ejabberd作为一款强…...

微信聊天记录数据安全备份完全指南:从迁移到永久保存的完整方案

微信聊天记录数据安全备份完全指南:从迁移到永久保存的完整方案 【免费下载链接】WeChatExporter 一个可以快速导出、查看你的微信聊天记录的工具 项目地址: https://gitcode.com/gh_mirrors/wec/WeChatExporter 微信聊天记录承载着我们生活与工作中的重要信…...

终极移动端认证集成指南:用Goth在iOS和Android应用中快速实现多平台登录

终极移动端认证集成指南:用Goth在iOS和Android应用中快速实现多平台登录 【免费下载链接】goth Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications. 项目地址: https://gitcode.com/gh_mirror…...