新Centos7 搭建seafile私有云盘

新Centos7 搭建seafile私有云盘

centos 7.9 2009

seafile-pro-server_7.0.19_x86-64_CentOS.tar

nps

文档

https://manual.seafile.com/deploy_pro/download_and_setup_seafile_professional_server/

下载中心

Downloads | Seafile Customer Center

1安装mariadb数据库

yum install mariadb-server mariadb -y systemctl start mariadb systemctl enable mariadb mysqladmin --version

mysql 》 exit;

mysqladmin -u root password "123456"; mysql -u root -p

2安装seafile

#对于cnetos 安装 seafile 7.0 yum install python python-setuptools python-imaging MySQL-python python-urllib3 python-ldap poppler-utils jre -y #对于centos 安装 seafile 9.0 cd /etc/yum.repos.d/ rm *.repo -rf wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo yum makecache yum install python3 python3-setuptools python3-pip python3-devel mysql-devel gcc jre -y python3 -m pip install --upgrade --force pip pip3 install --timeout=3600 django==3.2.* Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 django-pylibmc django-simple-captcha python3-ldap mysqlclient pycryptodome==3.12.0 cffi==1.14.0 lxml

开放8000 8082端口

firewall-cmd --zone=public --add-port=8000/tcp --permanent firewall-cmd --zone=public --add-port=8082/tcp --permanent firewall-cmd --reload

或者关闭防火墙

systemctl stop firewalld

./setup-seafile-mysql.sh 开始配置

vi /opt/conf/gunicorn.conf #改为 bind:"0.0.0.0:8000"

./seafile.sh start ./seahub.sh start

3设置开启自启动

新建seafile.service文件

vi /etc/systemd/system/seafile.service

输入以下内容(注意修改${seafile_dir}为你的seafile目录)

[Unit] Description=Seafile # add mysql.service or postgresql.service depending on your database to the line below # 如果没有使用memcached则去掉memcached.service After=network.target mariadb.service memcached.service [Service] Type=oneshot ExecStart=/opt/seafile-server-latest/seafile.sh start # 如果seahub使用了nginx反代,请修改为 ExecStart=${seafile_dir}/seafile-server-latest/seahub.sh start-fastcgi ExecStart=/opt/seafile-server-latest/seahub.sh start ExecStop=/opt/seafile-server-latest/seafile.sh stop ExecStop=/opt/seafile-server-latest/seahub.sh stop RemainAfterExit=yes # User 和 Group 如果未建立seafile用户和用户组,则修改为root,否则无法启动. User=seafile Group=seafile [Install] WantedBy=multi-user.target

运行systemctl daemon-reload使配置生效

systemctl daemon-reload systemctl start seafile #启动seafile systemctl stop seafile #停止seafile systemctl enable seafile #设置seafile随系统启动 systemctl is-enabled seafile #检查seafile是否已经设置为自启动 systemctl disable seafile #关闭seafile随系统启动

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值