个人云盘——可道云
一、为什么需要网盘?
因为平时工作写的文档比较有价值,自己通常做完一个项目后就删除了,没有很好的保存下来,搭建一个个人网盘保存这些文件,而且此云盘使用的是自己的云服务器的云硬盘,可以提高自己服务器的磁盘利用率。
二、可道云简介
KODBOX是可道云推出的企业级私有云存储解决方案,旨在为中小企业提供安全可控、可靠易用的一站式在线文件存储管理与协同办公平台。
个人认为的优势:秒传,断点续传,上传大小无限制,漂亮的UI,手机app,博主个人评价:目前我用过的最好的云盘了
三、环境介绍
操作系统:CentOS8.3
web服务器:nginx 1.18
php:7.2
mysql:MariaDB-10.3.28
四、开始搭建
1、安装nginx,php,mariadb
yum install -y nginx mariadb-server mariadb php php-devel php-fpm php-cli php-gd php-mysqlnd php-pear php-xml php-mbstring php-pdo php-json php-pecl-apcu php-pecl-apcu-devel
2、mariadb初始化
mysql_secure_installation
#根据提示进行初始化
3、开启nginx,mariadb并设置成开机自启动
systemctl start nginx
systemctl start mariadb
systemctl enable nginx
systemctl enable mariadb
4、配置nginx
server {
listen 443 ssl;
server_name 域名;
ssl_certificate /etc/nginx/cert/证书.pem;
ssl_certificate_key /etc/nginx/cert/证书.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
root 网站根目录;
location / {
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?s=$1 last;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
server {
listen 80;
server_name 域名;
rewrite ^(.*)$ https://域名 permanent;
}
5、下载可道云安装包(在你的网站根目录执行)
wget https://static.kodcloud.com/update/download/kodbox.1.23.zip
6、解压
unzip kodbox.1.23.zip && chmod -Rf 777 ./*
7、浏览器访问你的域名即可进入安装界面
文章内容仅用于作者学习使用,如果内容侵犯您的权益,请立即联系作者删除,作者不承担任何法律责任。