安裝環(huán)境: 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:///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.:8000 即可使用 Seafile
開機自動啟動
upstart
# vi /etc/init.d/seafile
#description: Seafile auto start-stop script. |
# source function library |
. /etc/rc.d/init.d/functions |
echo "Starting Seafile server..." |
su - seafile -c "seafile-server-latest/seafile.sh start" |
su - seafile -c "seafile-server-latest/seahub.sh start" |
echo "Stopping Seafile process..." |
su - seafile -c "seafile-server-latest/seafile.sh stop" |
su - seafile -c "seafile-server-latest/seahub.sh stop" |
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" |
echo "Usage: $0 start stop restart" |
# chmod +x /etc/init.d/seafile
# chkconfig --add seafile
systemd
# vi /etc/systemd/system/seafile.service
After=network.target mysql.service |
ExecStart=/home/seafile/seafile-server-latest/seafile.sh start |
ExecStop=/home/seafile/seafile-server-latest/seafile.sh stop |
WantedBy=multi-user.target |
# vi /etc/systemd/system/seahub.service
After=network.target seafile.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 |
WantedBy=multi-user.target |
# systemctl enable seafile.service
# systemctl enable seahub.service
Ref:
(Visited 93 times, 1 visits today)
|