Merge pull request #11 from haiwen/migrate

improve for script
This commit is contained in:
Daniel Pan 2015-12-23 15:13:53 +08:00
commit 5fcd645f0a
2 changed files with 20 additions and 55 deletions

View File

@ -70,3 +70,23 @@ rm -rf /opt/seafile
### 配置邮件发送
参考 http://manual-cn.seafile.com/config/sending_email.html
### 版本升级
* 切换为 root 用户
* 关闭 seafile-server 相关服务servie seafile-server stop
* 切换为 seafile 用户su - seafile -s /bin/bash
* 下载高版本的安装包到 /opt/seafile 目录,并解压
* 进入安装包下的 upgrade 目录,执行相关的升级脚本,具体可参考 http://manual.seafile.com/deploy/upgrade.html
* 退出 seafile 用户exit
* 启动 seafile-server 相关服务service seafile-server start
### 迁移社区版到专业版
* 切换为 root 用户
* 关闭 seafile-server 相关服务servie seafile-server stop
* 切换为 seafile 用户su - seafile -s /bin/bash
* 下载专业版安装包到 /opt/seafile 目录,并解压
* 进入解压好的安装包目录,执行 ./pro/pro.py setup --migrate具体可参考 http://manual.seafile.com/deploy_pro/migrate_from_seafile_community_server.html
* 退出 seafile 用户exit
* 启动 seafile-server 相关服务service seafile-server start

View File

@ -1,55 +0,0 @@
#/bin/bash
#set -x
# -------------------------------------------
# Save at /usr/local/sbin/seafile-server-change-address and set permissions with
# chmod 600 /usr/local/sbin/seafile-server-change-address
# -------------------------------------------
# -------------------------------------------
# Vars
# -------------------------------------------
HOSTNAME=$(hostname -f)
SEAFILE_DIR=/opt/seafile
# -------------------------------------------
# Intro
# -------------------------------------------
clear
echo "Enter the new IP address or domain"
read -e -p "New domain address:" -i " ${HOSTNAME}" URL
cat <<EOF
New domain address is: ${URL}
-------------------------------------------
Continue with ENTER. Stop with CTRL-C...
EOF
read dummy
clear
# -------------------------------------------
# Change address in seahub_settings.py und ccnet.conf
# -------------------------------------------
sed -i "s/^FILE_SERVER_ROOT.*/FILE_SERVER_ROOT = '\http:\/\/${URL}\/seafhttp\'/g" ${SEAFILE_DIR}/seahub_settings.py
sed -i "s/^SERVICE_URL.*/SERVICE_URL = http:\/\/${URL}/g" ${SEAFILE_DIR}/ccnet/ccnet.conf
# -------------------------------------------
# restart seafile-server
# -------------------------------------------
service seafile-server restart
cat <<EOF
Finished! The seafile server restarted.
Now can visit seahub by http://${URL}.
EOF