在CentOS8下利用seafile軟件搭建私有雲


一、安裝前准備工作

1. 安裝EPEL源

EPEL (Extra Packages for Enterprise Linux)是基於Fedora的一個項目,為“紅帽系”的操作系統提供額外的軟件包,適用於RHEL、CentOS和Scientific Linux. 

yum -y install epel-release

2. 安裝MySQL

yum -y install mariadb mariadb-server

 啟動mariadb,並配置root密碼

systemctl start mariadb
mysql_secure_installation

Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
 

3. 安裝依賴項 (Python相關)

yum install python3 python3-setuptools python3-pip python3-ldap -y

pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools django-pylibmc django-simple-captcha

二、下載、安裝seafile

1. 直接從官網下載 http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.1.4_x86-64.tar.gz

遵從如下目錄結構  

mkdir /opt/seafile
cd /opt/seafile
#下載安裝文件
wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.1.4_x86-64.tar.gz

#如果已下載則移動至目標文件夾
# mv seafile-server_7.1.4_x86-64.tar.gz /opt/seafile

tar -xzf seafile-server_7.1.4_x86-64.tar.gz

mkdir installed

mv seafile-server_7.1.4_x86-64.tar.gz  installed

 現在目錄結構如圖

 

/opt/seafile
├── installed
│   └── seafile-server_7.0.0_x86-64.tar.gz
└── seafile-server-7.0.0
    ├── reset-admin.sh
    ├── runtime
    ├── seafile
    ├── seafile.sh
    ├── seahub
    ├── seahub.sh
    ├── setup-seafile-mysql.sh
    └── upgrade

  

這樣設計目錄的好處在於

  • 和 seafile 相關的配置文件都可以放在 /opt/seafile/conf 目錄下,便於集中管理.

  • 后續升級時,你只需要解壓最新的安裝包到 /opt/seafile 目錄下.

2. 安裝

cd seafile-server-7.1.4_x86-64

./setup-seafile-mysql.sh #運行安裝腳本並回答預設問題

  

如果你的系統中沒有安裝上面的某個軟件,那么 Seafile初始化腳本會提醒你安裝相應的軟件包.

該腳本會依次詢問你一些問題,從而一步步引導你配置 Seafile 的各項參數:

在這里, 你會被要求選擇一種創建 Seafile 數據庫的方式:

-------------------------------------------------------
Please choose a way to initialize seafile databases:
------------------------------------------------------- 

[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases
    • 如果選擇1, 你需要提供根密碼. 腳本程序會創建數據庫和用戶。(一般選1即可)

    • 如果選擇2, ccnet/seafile/seahub 數據庫應該已經被你(或者其他人)提前創建。

現在安裝完成,目錄如下

seafile
├── ccnet               # configuration files
│   ├── mykey.peer
│   ├── PeerMgr
│   └── seafile.ini
├── conf
│   └── ccnet.conf
│   └── seafile.conf
│   └── seahub_settings.py
│   └── gunicorn.conf
├── installed
│   └── seafile-server_7.0.0_x86-64.tar.gz
├── seafile-data
├── seafile-server-7.0.0  # active version
│   ├── reset-admin.sh
│   ├── runtime
│   ├── seafile
│   ├── seafile.sh
│   ├── seahub
│   ├── seahub.sh
│   ├── setup-seafile-mysql.sh
│   └── upgrade
├── seafile-server-latest  # symbolic link to seafile-server-7.0.0
├── seahub-data
│   └── avatars 
seafile-server-latest文件夾為指向當前 Seafile 服務器文件夾的符號鏈接. 將來你升級到新版本后, 升級腳本會自動更新使其始終指向最新的 Seafile 服務器文件夾.

 

三、啟動服務器

可以根據官網說明啟動

https://cloud.seafile.com/published/seafile-manual-cn/deploy/using_mysql.md

 

 

一並感謝以下文檔的作者

seafile

https://manual-cn-origin.seafile.com/

https://seafile.gitbook.io/seafile-server-manual/deploy-seafile-pro-edition/download-and-setup-seafile-professional-server#get-the-license 

https://www.howtoforge.com/tutorial/how-to-install-seafile-with-nginx-on-centos-7/

https://bbs.seafile.com/t/seafile-centos7-selinux/1452

https://bbs.seafile.com/t/topic/12057

https://blog.csdn.net/VicdorLin/article/details/80858823

https://blog.csdn.net/weixin_30507481/article/details/96771554 

https://www.jianshu.com/p/61e0e66be9e1 

https://www.ittel.cn/archives/2300.html

 

https://bbs.seafile.com/t/topic/9720

 

https://blog.csdn.net/weixin_44204751/article/details/106526481

https://www.jianshu.com/p/1a2c60e3f118


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM