构建Ubuntu工作环境
作为一个小有“情怀”的程序员,长期以来在 Ubuntu 环境工作,也一直比较嗨皮。不过前两天折腾 docker 把系统搞挂了,又快速重新恢复了一遍系统环境,觉得有必要记录一下环境的构建过程。
系统快速安装
用U盘启动盘安装最为简洁方便,过程如下:
wget http://cdimage.ubuntu.com/ubuntu/releases/14.04.3/release/ubuntu-14.04-desktop-amd64+mac.iso
𝟐. 在 windows 环境下推荐使用 Universal USB Installer 制作U盘启动盘
𝟑. 重启机器,在 BIOS 里面设置U盘优先启动
𝟒. 进入 Ubuntu 安装界面
𝟓. 分区安装
这里一定要养成的一个好习惯是
/home
目录与根目录/
分开在不同的逻辑分区上,这样如果重装,/home
中的所有东西包括设置都可以原样保留
安装过程中最好有网络,这样可以把比较新的更新包含进来。大概十分钟之后,你的系统就安装好了。
系统必备
下载后直接 deb 安装,重启系统后就OK了;其源为
ppa:fcitx-team/nightly
下载 deb 安装,由于官网被墙,可以在国内的非官方镜像下载(一搜一大把),然后再更新
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
𝟑. 更新源设置
一般增加 网易源 和 官方 的源
# offical source
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
# 163 source
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
开发环境构建
𝟏. 基础开发工具
sudo apt-get install build-essential libstdc++6 cmake maven
𝟐. 升级 gcc 到 4.9.2(支持 C++11)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
𝟑. 安装代码管理工具
sudo apt-get install git subversion mercurial
𝟒. 翻墙还是必不可少的,推荐免费的 goagent
git clone https://github.com/goagent/goagent.git
常用工具
- 文档写作推荐 Markdown
- 离线编辑器推荐 haroopad
- 在线编辑器推荐 Github-Flavored Markdonw Editor
- 画图工具
- 编辑器
- 最好的笔记与任务管理工具(没有之一): org-mode
- 数据分析: R
以上基本上是构建 Ubuntu 工作环境最基本最基本的步骤(当然我们是根据需求随时 apt-get 的),整个时间不会超过1个小时,是不是比某软的系统重装一次要爽得多呢,哈哈~