安装 Cloudreve

NAS

安装 Cloudreve

ubuntu 18.04

docker 那个版本总是有问题就算了 (2019/04/16)

之所以要安装是因为长得好看

安装

1
2
# 安装必备内容
apt install mysql-server apache2 php php-curl php-gd php-dom php-mbstring php-zip php-mysql php-mysqli -y

mysql 创建数据库

1
CREATE DATABASE cloudreve CHARACTER SET utf8 COLLATE utf8_general_ci;

安装 composer

1
2
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

安装 cloudreve

1
2
cd 你要安装的目录
composer create-project hfo4/cloudreve:dev-master

交互环节

1
2
3
4
5
6
7
8
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? # Y
Input the hostname of your MySQL server (Default:127.0.0.1): //数据库连接地址,本的话默认回车
The database name:pan //数据库名称
The username of your MySQL server (Default:root):root //数据库用户名
The password of your MySQL server:mf8.biz //数据库用户密码
The hostport of your MySQL server (Default:3306): //数据库端口,默认回车

The full-url to access to your Cloudreve (e.g. https://pan.aoaoao.me/ , 'http' must be included in the front and '/' must be included at the end): //网站域名, 必须 http:// 或者 https:// 开头, / 结尾

安装完毕

1
2
3
4
5
6
# Congratulations! Cloudreve has been installed successfully.
# Here's some informatioin about yor Cloudreve:
# Homepage: 刚才输入的地址/ //首页地址
# Admin Panel: 刚才输入的地址/Admin //后台地址
# Default username: admin@cloudreve.org //管理员账号
# Default password: admin //管理员密码

备注

  • 如果可以打开首页但是其他页面都无法访问,记得开启 apache2 伪静态

    1
    2
    3
    4
    sudo a2enmod rewrite
    sudo service apache2 restart
    # 替换 AllowOverride None -> AllowOverride All
    sudo nano /etc/apache2/apache2.conf