Centos7.x部署SeaFile私有網盤

1.安裝依賴環境
yum -y install wge gcc-c++ ..........python

2.關閉Firewalld防火牆和SElinux
systemctl stop firewalld
systemct disable firewalld
cd /etc/selinux/config
把enable更改爲disabledmysql

3.安裝epel、Nux Dextoplinux

安裝epel

rpm -ivh http://mirrors.ustc.edu.cn/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpmc++

安裝Nux Dextop

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpmgit

4.安裝mysql或mariadb
yum -y install mariadb mariadb-server
systemctl enable mariadb
systemctl start mariadbsql

5.進行mariadb初始化設置
mysql_secure_installation數據庫

根據內容自行更改設置

第一次運行密碼爲空,回車。

Enter current password for root (enter for none):dom

須要設置root密碼,輸入y後回車。

Set root password? [Y/n] y
接着輸入兩次新密碼。ide

是否刪除匿名用戶,回車。

Remove anonymous users? [Y/n]memcached

是否禁止root遠程登陸,回車。

Disallow root login remotely? [Y/n]

是否刪除test數據庫,回車。

Remove test database and access to it? [Y/n]

是否從新加載權限表,回車。

Reload privilege tables now? [Y/n]

6.登陸數據庫
mysql -uroot -p #能正常進入數據庫說明已經部署成功

7.給數據庫設置權限

容許任意ip使用root遠程鏈接

create user 'root'@'%' identified by 'root遠程登陸的密碼';

添加權限給該root

grant all privileges on . to 'root'@'%' identified by 'root遠程登陸的密碼';

配置當即生效

flush privileges;

8.安裝seafile依賴環境
yum install -y python-memcached python-ldap python-urllib3 python-imaging MySQL-python python-distribute ffmpeg ffmpeg-devel

9.下載源碼包
wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.2.5_x86-64.tar.gz

10.解壓源碼包
tar -zxf seafile-server_6.2.5_x86-64.tar.gz -C 路徑

11.進入已經解壓的文件進行安裝
cd seafile-server-*
./setup-seafile-mysql.sh

12.根據下面內容進行自行設置

顯示給客戶端的服務名,輸入服務名後回車。

What is the name of the server? It will be displayed on the client.

  • 15 letters or digits
    [ server name ] OpsBakPE

輸入ip或域名,因爲內部使用直接ip,輸入ip後回車。

What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 192.168.16.203

使用默認,將數據文件放在/root/seafile-data下,回車。

Where do you want to put your seafile data?
Please use a volume with enough free space
[ default "/root/seafile-data" ]

使用默認的文件服務端口8082,回車。

Which port do you want to use for the seafile fileserver?
[ default "8082" ]

# 使用新的seahub數據庫,輸入1後回車。

Please choose a way to initialize seafile databases:

[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases

[ 1 or 2 ] 1

因爲剛纔裝了mariadb,使用默認本地,回車。

What is the host of mysql server?
[ default "localhost" ]

mariadb的默認端口就是3306,回車。

What is the port of mysql server?
[ default "3306" ]

使用默認的seafile做爲seafile使用mariadb的用戶,回車。

Enter the name for mysql user of seafile. It would be created if not exists.
[ default "seafile" ]

輸入mariadb的用戶seafile的密碼,回車。

Enter the password for mysql user "seafile":
[ password for seafile ]

使用默認ccnet-db做爲ccnet-server使用的數據庫名,回車。

Enter the database name for ccnet-server:
[ default "ccnet-db" ]

使用默認seafile-db做爲seafile-server使用的數據庫名,回車。

Enter the database name for seafile-server:
[ default "seafile-db" ]

使用默認seahub-db做爲seahub使用的數據庫名,回車。

Enter the database name for seahub:
[ default "seahub-db" ]
等待片刻........提示安裝成功

13.啓動服務
./seafile.sh start

14.啓動端口
./seafile.sh start 80 #沒有設置端口默認是8000端口

15.訪問
http://ip:80/ #若是沒設置端口號就默認就行

16.登陸帳號密碼

相關文章
相關標籤/搜索