Bboysoul's Blog

首页 公告 RSS

树洞外链安装

November 16, 2017 本文有 563 个字 需要花费 2 分钟阅读

概述

一直想给树莓派安装一个图床什么的,一直没有找到合适的程序,直到发现了这个树洞外链
树洞外链是一个开源的,支持本地存储远程存储,多用户的一个外链系统,界面也是挺好看的,总之安装上再说

安装

首先下载主程序到站点文件夹,我是安装在树莓派上的,树莓派上安装了lnmp环境,不管你安装在哪里lnmp环境肯定是要安装的
unzip shudong-share-master.zip
mv shudong-share-master /www/shudong
接着配置nginx
下面是我的配置文件

 server {
    server_name shudong.ngrok.bboysoul.com 192.168.1.100;
    listen      8082;
    
    location / { 
        root /www/shudong;
        index index.html index.php;
    }

    location ~ \.php$ {
        fastcgi_pass   unix:/tmp/php-cgi.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME /www/shudong/$fastcgi_script_name;
        include        fastcgi_params;
    }
 }

因为我想使用ngrok代理到外面去,所以设置了一个ngrok的地址,其他的你看着设置
重启nginx
sudo service nginx restart
之后本地浏览器访问树洞外链

先同意协议再说
之后

设置数据库,先创建一个数据库

➜  vhost mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 269
Server version: 5.5.56-log Source distribution

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database shudong;
Query OK, 1 row affected (0.01 sec)

接着在网页上填写数据库信息
修改网站的权限
chown -Rf www:www shudong
之后填写完密码等基本信息之后点击开始安装安装,但是记住网站地址一定要对,如果不是80端口的那么把端口也要写上

安装完成,确认一下install目录是不是删除了

➜  shudong ls
admin  config.php  content  data  favicon.ico  f.php  includes  index.php  LICENSE  README.md  s.php  views

的确删除了

登录后台主界面上没有后台登录的链接,你只要在url后添加/admin就好了

欢迎关注我的博客www.bboy.app
Have Fun


Tags:

本站总访问量 本站总访客数