1. 安装ubuntu 16.04
2. sudo rm /var/lib/apt/lists/lock
3. sudo apt-get remove libappstream3
4. sudo apt-get update
5. sudo apt-get install openjdk-8-jdk
6. sudo apt-get install openssh-server
7. sudo adduser userA
8. sudo apt-get install samba
sudo smbpasswd -a userA
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
[userA] comment = Shared Folder with username and password
path = /home/userA
public = yes
writable = yes
valid users = userA
create mask = 0664
directory mask = 0775
force user = userA
force group = userA
available = yes
browseable = yes
sudo /etc/init.d/samba restart
9. sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip libssl-dev libxml-simple-perl
10. sudo apt-get install ccache
echo "export USE_CCACHE=1" >> ~/.bashrc
echo "export CCACHE_DIR=~/.ccache" >> ~/.bashrc
11. 挂载新硬盘
sudo fdisk /dev/sdb
->m
->n
->e
->w
sudo mkfs -t ext4 /dev/sdb
vim /etc/fstab
# /etc/fstab: static file system information.
...
# /share was on /dev/sdd during installation
UUID=4b8c4c0e-1b91-4153-94b4-ec4b2eae7f66 /opt ext4 defaults 0 1
编译环境真难搭建