安装mysql
apt install mariadb-server
mysql_secure_installation ##设置密码**db
mysql
设置数据库
>CREATE DATABASE filerun;
>CREATE USER 'filerun'@'localhost' IDENTIFIED BY '密码'; #注意修改密码
>GRANT ALL ON filerun.* TO 'filerun'@'localhost';
>FLUSH PRIVILEGES;
>exit
修改数据库用户密码的方法
mysql -u root -p
> SET PASSWORD FOR 'filerun'@'localhost' = PASSWORD('新密码');
>flush privileges;
>exit
安装nginx
#使用webdav功能,需要编译安装,https://www.kkiikk.top/index.php/archives/68/
#不使用webdav功能,直接apt安装
apt-get install nginx
安装php
apt-get install php7.3-fpm php7.3-mbstring php7.3-zip php7.3-curl php7.3-gd php7.3-ldap php7.3-xml php7.3-imagick php7.3-mysql
安装ionCube
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xzf ioncube_loaders_lin_x86-64.tar.gz
查看php版本
php -v
查看php扩展路径
php -i | grep extension_dir
输出类似下面的内容
extension_dir => /usr/lib/php/20180731 => /usr/lib/php/20180731 #路径以实际情况为准
cp ioncube/ioncube_loader_lin_7.3.so /usr/lib/php/20180731 #使用上面得到的路径
在php.ini
文件中添加扩展名
nano /etc/php/7.3/cli/php.ini
nano /etc/php/7.3/fpm/php.ini
添加
zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so
重启程序
systemctl restart nginx
systemctl restart php7.3-fpm
查看ionCube是否安装
php -v
显示如下
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.3.27-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
安装filerun
mkdir /d/html
rm -rf /d/html/*
wget -O FileRun.zip http://www.filerun.com/download-latest
apt-get install unzip
unzip -o -d /d/html FileRun.zip
chmod -R 777 /d/html/*
nano /etc/php/7.3/fpm/pool.d/www.conf
将listen = /run/php/php7.3-fpm.sock
用“;”注释掉
然后添加
listen = 127.0.0.1:9000
nano /etc/nginx/nginx.conf
配置如下(注意网址和路径)
user root;
worker_processes auto;
error_log /etc/nginx/error.log warn;
pid /run/nginx.pid;
events {
use epoll;
worker_connections 1024;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 10G;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 720;
fastcgi_connect_timeout 3600;
fastcgi_send_timeout 3600;
fastcgi_read_timeout 3600;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
server_tokens off;
include /etc/nginx/conf.d/*.conf;
}
nano /etc/nginx/conf.d/default.conf
配置如下
server{
listen 80;
server_name ft2.kkiikk02.top;
return 301 https://ft2.kkiikk02.top$request_uri;
}
server{
listen 443 ssl http2;
server_name ft2.kkiikk02.top;
root /d/html; #注意路径
index index.php index.html index.htm; #注意这里一定要有index.php
location ~ [^/]\.php(/|$) {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000; #这里注意,填写与php-fpm的listen相对应的端口
fastcgi_index index.php;
set $path_info $fastcgi_path_info;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
ssl_ciphers TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES;
#ssl_ciphers TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_stapling on;
ssl_stapling_verify on;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/nginx/ssl/ft2.kkiikk02.top.crt;
ssl_certificate_key /etc/nginx/ssl/ft2.kkiikk02.top.key;
ssl_session_cache shared:SSL:1m;
ssl_verify_depth 10;
ssl_session_timeout 30m;
}
systemctl restart php7.3-fpm
systemctl restart nginx
登陆网站
Database name:filerun
MySQL user:filerun
Password:设置的密码(**99fr)
中文补丁
https://raw.githubusercontent.com/filerun/translations/master/chinese.php
语言修改选项在interface
设置中
登陆后配置
面板>用户>权限>路径
设置如下/d/html/data/admin
注意路径