centos搭建个人网盘

2022-11-21 18:56:44 浏览数 (1)

参考:腾讯云手动实验https://cloud.tencent.com/developer/labs/lab/10093

安装Seafile

安装依赖环境

代码语言:javascript复制
[root@localhost ~]# yum -y install python python-setuptools python-imaging python-ldap 
python-memcached MySQL-python mariadb mariadb-server

启动mariadb服务

代码语言:javascript复制
[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl enable mariadb

配置MySQL

代码语言:javascript复制
[root@localhost ~]# /usr/bin/mysql_secure_installation
# 除以下两处其他默认回车,设置好自己密码
New password: 
Re-enter new password:

下载Seafile安装包

代码语言:javascript复制
[root@localhost ~]# wget https://mc.qcloudimg.com/static/archive/3d8addbe52be88df4f6139ec7e35b453/seafile-server_5.1.4_x86-64.tar.gz

解压安装Seafile安装包

代码语言:javascript复制
[root@localhost ~]# tar zxf seafile-server_5.1.4_x86-64.tar.gz 
[root@localhost ~]# mkdir -p /opt/seafile/installed
[root@localhost ~]# mv seafile-server_5.1.4_x86-64.tar.gz /opt/seafile/installed/
[root@localhost ~]# mv seafile-server-5.1.4/ /opt/seafile/
[root@localhost ~]# cd /opt/seafile/seafile-server-5.1.4/
[root@localhost seafile-server-5.1.4]# ./setup-seafile-mysql.sh
# 过程中出现的需要填写的信息,其他的按照默认回车即可
[ server name ] Seafile
[ This server's ip or domain ] hello.com
[ 1 or 2 ] 1
[ root password ]  # 输入上面准备好MySQL的密码

启动Seafile及修改防火墙规则

启动Seafile

代码语言:javascript复制
[root@localhost seafile-server-5.1.4]# ./seafile.sh start
[root@localhost seafile-server-5.1.4]# ./seahub.sh start
# 登录网盘用户名,登录网盘密码,重复密码
[ admin email ] root@hello.com
[ admin password ] 
[ admin password again ]

修改防火墙规则

代码语言:javascript复制
[root@localhost ~]# firewall-cmd --zone=public --permanent --add-port=8082/tcp
[root@localhost ~]# firewall-cmd --zone=public --permanent --add-port=8000/tcp
[root@localhost ~]# firewall-cmd --reload

验证

访问http://192.168.1.10:8000

0 人点赞