加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

seafile7.0.3安装

发布时间:2020-12-13 22:37:48 所属栏目:Linux 来源:网络整理
导读:1.查看系统版本和系统内核 命令: cat /etc/redhat-release uname -r 2.编辑selinux文件,关闭selinux(需要重启计算机才能生效) 命令:vi /etc/sysconfig/selinux 不重新启动关闭selinux生效方法 命令:setenforce 0 3.查看并关闭开机自动启动防火墙 查看防
1.查看系统版本和系统内核
命令:
cat /etc/redhat-release
uname -r

2.编辑selinux文件,关闭selinux(需要重启计算机才能生效)
命令:vi /etc/sysconfig/selinux

不重新启动关闭selinux生效方法
命令:setenforce 0

3.查看并关闭开机自动启动防火墙
查看防火墙的状态
命令:systemctl status firewalld

关闭防火墙开机自动启动(重启生效)
命令:systemctl disable firewalld

临时关闭防火墙(立即生效)
命令:systemctl stop firewalld

4.安装组件包
4.1 安装epel源
命令:yum -y install epel-release

4.2 安装nux
命令:
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-1.el7.nux.noarch.rpm

4.3 安装python-pip
命令:yum -y install python-pip

对pip进行更新
命令:pip install --upgrade pip

更新setuptools工具
命令:
pip install --upgrade setuptools
python -m pip install --upgrade pip

4.4 安装其它的依赖组件包
命令:yum -y install python-imaging MySQL-python python-memcached python-ldap mariadb-server mariadb python-urllib3 ffmpeg ffmpeg-devel

4.5 安装pillow moviepy
命令:pip install pillow moviepy

5.启动mariadb数据库
命令:systemctl start mariadb


对数据库进行密码设置(数据库root用户的密码)
命令:mysql_secure_installation


登录数据库
命令:
mysql -uroot -p
a123456


创建seafile需要的数据库及用户,并对此些数据库进行授权
create database ccnet_db character set = ‘utf8‘;
create database seafile_db character set = ‘utf8‘;
create database seahub_db character set = ‘utf8‘;
create user [email?protected]‘192.168.80.%‘ identified by ‘b123456‘;

grant all privileges on ccnet_db.* to [email?protected]‘192.168.80.%‘ identified by ‘b123456‘;

grant all privileges on seafile_db.* to [email?protected]‘192.168.80.%‘ identified by ‘b123456‘;

grant all privileges on seahub_db.* to [email?protected]‘192.168.80.%‘ identified by ‘b123456‘;
flush privileges;
exit

6.从官网上下载最新版的seafile-server文件(最新版本为:seafile-server-7.0.3并上传至服务器指定的目录)
安装lrzsz
命令:yum -y install lrzsz


上传文件至指定的目录(/usr/local/seafile),如seafile目录不存在,则新建此目录
命令:
mkdir -pv /usr/local/seafile
cd /usr/local/seafile

7.解压seafile-server文件
命令:
tar xf seafile-server_7.0.3_x86-64.tar.gz

8.对解压出来的目录seafile-server-7.0.3进入改名并删除上传的tar.gz文件
命令:
mv seafile-server-7.0.3 seafile-server
rm -fr /usr/local/seafile/seafile-server_7.0.3_x86-64.tar.gz

9.安装seafile

命令:
cd /usr/local/seafile/seafile-server
./setup-seafile-mysql.sh #设置服务器,IP地址,数据存储位置,seafile端口,数据库IP地址,前面创建的用户和三个库等





10.启动seafile
命令:
cd /usr/local/seafile/seafile-server
./seafile.sh start

11.启动seahub, 开初始化web页面的用户名和密码(第一次运行)
命令:
cd /usr/local/seafile/seafile-server
./seahub.sh start


12.安装完成了seafile7.X,默认是不允许直接使用ip:端口访问(192.168.80.120:8001),如果需要使用(192.168.80.120:8001)来访问,修改/usr/local/seafile/conf/gunicorn.conf文件,把里面的
bind="127.0.0.1:8000"修改为bind="0.0.0.0:8001"
命令:
cd /usr/local/seafile/conf
vi gunicorn.conf

13.重新启动seahub
命令:
cd /usr/local/seafile/seafile-server
./seahub.sh restart

14.打开网页,在地址栏处输入:http://192.168.80.120:8001即可访问seafile了

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读