打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Seafile Server 安裝實錄

安裝環境: CentOS 6 x86_64, CentOS 7 x86_64, Ubuntu 15.04 Server x86_64

Step 1. 安裝需求套件

CentOS 6

# yum install python-imaging MySQL-python python-simplejson python-setuptools
# yum install wget mysql-server
# service mysqld start
# chkconfig mysqld on
# mysql_secure_installation

CentOS 7

# yum install python-imaging MySQL-python python-simplejson python-setuptools
# yum install wget mariadb-server
# systemctl start mariadb.service
# systemctl enable mariadb.service
# mysql_secure_installation

Ubuntu 15.04 Server

# sudo apt-get install python-imaging python-mysqldb python-simplejson python-setuptools
# sudo apt-get install mysql-server

Step 2. 建立 seafile 帳號

CentOS 6 & 7

# useradd seafile
# passwd seafile

Ubuntu 15.04 Server

$ sudo adduser seafile

Step 3. 以 seafile 身分安裝 Seafile Server

CentOS 6 & 7

# su - seafile

Ubuntu 15.04 Server

$ sudo su - seafile

$ wget https://bitbucket.org/haiwen/seafile/downloads/seafile-server_4.1.2_x86-64.tar.gz
$ tar zxf seafile-server_4.1.2_x86-64.tar.gz
$ cd seafile-server-4.1.2
$ ./setup-seafile-mysql.sh

Step 4. 以 seafile 身分啟動 Seafile Server

$ cd ~/seafile-server-latest/
$ ./seafile.sh start
$ ./seahub.sh start

Step 5. 開啟瀏覽器, 連入 http://my.linux.host:8000 即可使用 Seafile



開機自動啟動

upstart

# vi /etc/init.d/seafile

#!/bin/sh
#chkconfig: 345 99 10
#description: Seafile auto start-stop script.
 
# source function library
. /etc/rc.d/init.d/functions
 
start() {
        echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
su - seafile -c "seafile-server-latest/seahub.sh start"
}
 
stop() {
        echo "Stopping Seafile process..."
su - seafile -c "seafile-server-latest/seafile.sh stop"
su - seafile -c "seafile-server-latest/seahub.sh stop"
}
 
restart() {
        echo "Stopping Seafile process..."
su - seafile -c "seafile-server-latest/seafile.sh stop"
su - seafile -c "seafile-server-latest/seahub.sh stop"
 
         echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
su - seafile -c "seafile-server-latest/seahub.sh start"
}
 
case "$1" in
    start)
       start
        ;;
    stop)
       stop
        ;;
    restart)
       restart
        ;;
        *)
      echo "Usage: $0 start stop restart"
        ;;
esac

# chmod +x /etc/init.d/seafile
# chkconfig --add seafile

systemd

# vi /etc/systemd/system/seafile.service

[Unit]
Description=Seafile
After=network.target mysql.service
 
[Service]
Type=oneshot
ExecStart=/home/seafile/seafile-server-latest/seafile.sh start
ExecStop=/home/seafile/seafile-server-latest/seafile.sh stop
RemainAfterExit=yes
User=seafile
Group=seafile
 
[Install]
WantedBy=multi-user.target

# vi /etc/systemd/system/seahub.service

[Unit]
Description=Seafile hub
After=network.target seafile.service
 
[Service]
# change start to start-fastcgi if you want to run fastcgi
ExecStart=/home/seafile/seafile-server-latest/seahub.sh start
ExecStop=/home/seafile/seafile-server-latest/seahub.sh stop
User=seafile
Group=seafile
Type=oneshot
RemainAfterExit=yes
 
[Install]
WantedBy=multi-user.target

# systemctl enable seafile.service
# systemctl enable seahub.service

Ref:


(Visited 93 times, 1 visits today)

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Seafile Pro 8 在CentOS 7上的部署
Seafile Cloud
放弃百度网盘吧!搭建自己的私有云盘seafile
所用端口说明 · Seafile Server Manual
Config Seahub with Nginx · Seafile Server Manual
使用seafile搭建自己的私有云存储
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服