archlinux安装seafile的过程(呃,其实像是安装Docker并应用的过程)

糊一笑 2020-06-15

一、安装Docker
pacman -S docker

二、拉取seafile环境
docker pull jenserat/seafile
按照网上教程,执行这步时报错:"Cannot connect to the Docker daemon"
所以不能抄书啊,连服务都没开启:
systemctl start docker
systemctl enable docker

三、同样,第二步还是没法完成,呵呵,叫你不科学去浏览网站,那就改源
http://hub-mirror.c.163.com
创建或修改/etc/docker/daemon.json文件,修改为:
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}
然后重新启动docker服务:
systemctl restart docker
此时可以重新执行第二步拉取环境了

四、启动容器
docker run -d --restart=always -p 10001:10001 -p 12001:12001 -p 8000:8000 -p 8080:8080 -p 8082:8082 -v/home/app/seafile:/opt/seafile -e autostart=true --name=seafile jenserat/seafile
呃,又出现报错了:“docker: Error response from daemon: Conflict. The container name "/seafile" is already in use by container "2a7fe96eef1a122a4785c7afc99bd29bbbb623e97fa1ea6bf39fabca27f83596". You have to remove (or rename) that container to be able to reuse that name.”
嘿,docker container ls一看,貌似已经启动过了……

五、进入容器搞事:
docker exec -it seafile bash
cd /opt
wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.0.8_x86-64.tar.gz
tar -zxcf seafile-server_6.0.8_x86-64.tar.gz
mv seafile-server_6.0.8_x86-64 seafile
呃,到这时候我才发现,原来这是安装seafile服务的,难怪开容器时看到一堆端口映射了
本意想装个客户端的,好吧,先整完它再说,到相应目录:
./setup-seafile.sh
./seafile.sh
./seahub.sh
然后看进程应该就有seafile了,可以测试一下:
http://127.0.0.1:8000

六、好吧,意外产物docker,先停掉那个容器:
docker stop seafile

其实要安装seafile客户端,只需要pacman -S seafile-client就可以了……
以后有docker玩了

相关推荐