远飞闲记

阅读、思考、技术

阿里云OSS+docker Owncloud安装

🗓️发布日期:2017-12-20 · 🗺️总字数: 270 字 · ⏱️阅读时间: 1 Minute

安装编译所需的库

apt-get install automake autotools-dev g++ git libcurl4-gnutls-dev 
                     libfuse-dev libssl-dev libxml2-dev make pkg-config

源码编译

git clone https://github.com/aliyun/ossfs.git
cd ossfs
./autogen.sh
./configure
make
sudo make install

挂载

依次执行下面命令:

echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
ossfs my-bucket my-mount-point -ourl=my-oss-endpoint -ouid=your_uid -ogid=your_gid -o allow_other

挂载权限问题:-ouid=33(www-data) -ogid=0 (root) 参见:https://github.com/aliyun/ossfs/blob/master/README-CN.md

卸载

ps -e | greop "ossfs"
kill id

docker install owncloud

docker pull owncloud
docker run -v /mnt/aliyunoss/owncloud/data:/var/www/html/data -d -p 8080:80 owncloud:8.1
🏷️