Linux – (7) Use Ubuntu to be NFS client

OS: Ubuntu 14.04

To install nfs-common first

$ apt-get install nfs-common

After that, we can mount nfs server

$ mount -t nfs 192.0.0.1:/nfs_folder /home/jennifer/fs

$ mount -t nfs [nfs server ip]:/[nfs server folder] [folder on host]

Also, we can create docker data volume (data volume name = my_nfs)

$ docker volume create –driver local \
–opt type=nfs \
–opt o=nfsvers=3,addr=192.0.0.1,rw \
–opt device=:/nfs_folder \
my_nfs

Use data volume while creating docker container

$ docker run -d –net=host –restart=always -v my_nfs:/tmp:ro nginx:1.13.3-alpine

Linux – (6) apt-get update 失敗:無法取得公鑰

apt_update_error_public_key.png

apt-get update時發生了「無法取得公鑰」的錯誤,解決方法如下:

curl -L https://debian.datastax.com/debian/repo_key | sudo apt-key add –

之前有遇過無法取得docker網址的公鑰,則是用以下網址:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

Python (37) – pip 一堆坑

☁ 連線被拒絕

Looking in indexes: http://192.168.0.1:8081/repository/pypi-group/simple
Retrying (Retry(total=1, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'NewConnectionError('
<pip._vendor.urllib3.connection.HTTPConnection object at 0x7fb2f4e55f28>: 
Failed to establish a new connection: [Errno 111] 連線被拒絕',)': 
/repository/pypi-group/simple/pip/
設定index-url
pip install Pillow --index-url=https://pypi.python.org/simple/

☁ root tmp空間不足

Could not install packages due to an EnvironmentError: [Errno 28] 裝置上已無多餘空間
在Jennifer(非root用戶)的位置建立一個root_tmp資料夾,再指向tmpdir為此資料夾
mkdir root_tmp
export TMPDIR=/home/jennifer/root_tmp

(若又跳坑,會再繼續更新)