Ubuntu 開發環境搭建教程
更新
sudo apt upgrade
sudo apt update
生成本機密鑰
ssh-keygen -t rsa -C "shitao0418@gamil.com"
默認位置: ~/.ssh/
安裝 vim
sudo apt install vim
免 sudo 密碼
echo -e 'Defaults:shitao !requiretty\nshitao ALL = (root) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/shitao
安裝軟件
htop 可視化系統監測
sudo apt install htop
ssh 遠程鏈接軟件
sudo apt-get install openssh-server openssh-client
jdk java 開發環境
sudo apt install openjdk-8-jdk
python pip 開發工具
sudo apt install python3 python3-pip
pip 升級
pip3 install --upgrade pip --user
curl
sudo apt install curl
安裝網絡相關包
sudo apt install net-tools
docker 安裝
sudo apt install docker.io
ibus-pinyin 中文輸入法
sudo apt install ibus-pinyin
-
重啟系統
-
進入語言設置
-
選擇中文輸入法
chines
然后找pinyin
chromium 瀏覽器
sudo apt install chromium-browser
全部安裝上述全部軟件
sudo apt install htop openssh-server openssh-client openjdk-8-jdk python3 python3-pip curl net-tools docker.io ibus-pinyin chromium-browser
安裝 nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
安裝 npm
nvm install node
更換源
更換 pipy 源
mkdir ~/.pip
vim ~/.pip/pip.conf
文件樣例:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
更換 maven 源
進入
maven
文件夾,在conf
目錄中找到settings.xml
文件
sudo vim /usr/share/maven/conf/settings.xml
配置
mirrors
的子節點,添加如下mirror
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
更換 npm 源
npm config set registry https://registry.npm.taobao.org
更換 docker 源
sudo vim /etc/docker/daemon.json
{
"insecure-registries":[
],
"registry-mirrors":[
"https://registry.docker-cn.com"
]
}
更換 gem 源
sudo gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/