下面是在腾讯云服务器上搭建seafile专业版的全部过程,记录备查。
一.部署环境
1.云服务器:腾讯云 标准型S2 centos 7.4 64位
2.部署mysql5.7
(1) 下载mysql源安装包
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
(2)安装mysql源
shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm
检查mysql源是否安装成功
shell> yum repolist enabled | grep "mysql.*-community.*"
(3)安装mysql
shell> yum install mysql-community-server
(4)启动mysql服务
shell> systemctl start mysqld
(5)设置开机启动
shell> systemctl enable mysqld
shell> systemctl daemon-reload
(6)修改root本地登录密码
#查看root默认密码
shell> grep 'temporary password' /var/log/mysqld.log
#修改root密码
shell> mysql -uroot -pmysql> set password for 'root'@'localhost'=password('密码');
注意:mysql5.7默认安装了密码安全检查插件(validate_password),默认密码检查策略要求密码必须包含:大小写字母、数字和特殊符号,并且长度不能少于8位。否则会提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements错误。
(7)重新启动mysql服务使配置生效:
systemctl restart mysqld
(8)打开远程登录和配置默认编码utf8
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY ‘密码’WITH GRANT OPTION
mysql>FLUSH PRIVILEGES
修改/etc/my.cnf配置文件,在[mysqld]下添加编码配置,如下所示:
[mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8'
3.部署nginx 1.12.2
yum install -y openssl-devel pcre-devel
yum install nginx
启动nginx
systemctl start nginx
4.部署python关联包
按照seafile官方手册安装如下:
yum -y install epel-release
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
yum -y install python-imaging MySQL-python python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-devel
pip install pillow moviepy这步提示错误,没有pip,然后
yum -y install python-pip和 pip install --upgrade pip仍然报错,然后
pip install setuptools==33.1.1 后再安装pillow成功。
5.部署jre
yum install jre
二.部署seafile
参考:https://manual-cn.seafile.com/deploy/using_mysql.html seafile安装部署手册
https://www.howtoforge.com/tutorial/how-to-install-seafile-with-nginx-on-centos-7/#step-configure-nginx-as-reverse-proxy centos 7下面的部署手册
1.目录设计
mkdir haiwen
mv seafile-server_* haiwen
cd haiwen
#将 seafile-server_* 移动到 haiwen 目录下后
tar -xzf seafile-server_*
mkdir installed
mv seafile-server_* installed
2.部署seafile
cd seafile-server-*
./setup-seafile-mysql.sh #运行安装脚本并回答预设问题
参数 | 作用 | 说明 |
---|---|---|
seafile server name |
seafile 服务器的名字,目前该配置已经不再使用 |
3 ~ 15 个字符,可以用英文字母,数字,下划线 |
seafile server ip or domain |
seafile 服务器的 IP 地址或者域名 |
客户端将通过这个 IP 或者地址来访问你的 Seafile 服务 |
seafile data dir |
seafile 数据存放的目录,用上面的例子,默认将是 /data/haiwen/seafile-data |
seafile 数据将随着使用而逐渐增加,请把它 |