1. 安装配置Ubuntu nfs
1.1 安装配置nfs服务器
- 安装nfs:
sudo apt-get install nfs-kernel-server
- 配置nfs
cd ~
mkdir nfs
sudo vim /etc/exports # 在/etc/exports末尾增加下面一行
/home/am/nfs 192.168.*.*(sync,rw,no_root_squash,no_subtree_check)
sudo exportfs -a
- 重启rpcbind服务
sudo service rpcbind restart
- 重启nfs服务
sudo service nfs-kernel-server restart
1.2 板端挂载nfs服务器
- 配置ip
ifconfig eth0 192.168.1.10 netmask 255.255.255.0
- 挂载PC服务器文件夹于板上“/mnt/nfs”
mkdir -p /mnt/nfs
mount -t nfs -o nolock 192.168.1.100:/home/am/nfs /mnt/nfs
2. Ubuntu安装App问题
- 问题
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
- 解决方案
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock
3. tar打包目录
tar -czvf test.tar.gz test_dir
4. PC访问嵌入式目录
- 把设备目录映射到PC机
- 192.168.1.235:设备IP
sshfs -o idmap=user steve@192.168.1.235:/home/steve ~/device
- PC Login设备
ssh steve@192.168.1.235
5. Linux下多线程+断点续传功能
- 安装
sudo apt-get install axel
- 下载
axel -n 10 -av http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_train.tar