如何在 AlmaLinux 8 上安装 FileRun
admin
2023-07-31 20:46:42
0

FileRun 是一个免费的、开源的、自托管的文件共享和同步应用程序,用 PHP 编写。通过用户友好的 Web 界面,您可以存储和管理文件、照片、电影等filerun-logofilerun-logo

在 AlmaLinux 8 上安装 FileRun

第 1 步。首先,让我们首先确保您的系统是最新的。

sudo dnf clean all
sudo dnf update

步骤 2. 安装 LAMP 服务器。

需要 AlmaLinux LAMP 服务器。如果您没有安装 LAMP,您可以在此处按照我们的指南进行操作。

步骤 3. 安装 Ioncube PHP Loader。

现在我们从官方页面下载 Ioncube Loader 安装包:

wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

接下来,解压下载的文件:

tar xzf ioncube_loaders_lin_x86-64.tar.gz
mv ioncube/ioncube_loader_lin_7.4.so /usr/lib64/php/modules/

之后,编辑 PHP 配置文件并定义 Ioncube 模块路径:

nano /etc/php.ini

添加以下配置:

zend.assertions = -1
zend_extension = \"/usr/lib64/php/modules/ioncube_loader_lin_7.4.so\"

保存并关闭文件,然后启动 Apache、MariaDB 和 PHP-FPM 服务:

sudo systemctl start httpd
sudo systemctl start mariadb 
ssudo ystemctl start php-fpm

步骤 4. 在 Rocky Linux 8 上安装 FileRun。

默认情况下,FileRun 在 Rocky Linux 8 基础存储库中不可用。现在我们运行以下命令从官方页面下载最新版本的 FileRun:

wget -O FileRun.zip https://filerun.com/download-latest

接下来,使用以下命令解压缩下载的文件:

unzip FileRun.zip -d /var/www/html/filerun/

我们将需要更改一些文件夹权限:

chown -R apache:apache /var/www/html/filerun

步骤 5. 配置 MariaDB。

默认情况下,MariaDB 未加固。mysql_secure_installation您可以使用脚本保护 MariaDB 。您应该仔细阅读以下每个步骤,这些步骤将设置 root 密码、删除匿名用户、禁止远程 root 登录、删除测试数据库和访问安全 MariaDB:

mysql_secure_installation

像这样配置它:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

接下来,我们需要登录 MariaDB 控制台并为 FileRun 创建一个数据库。运行以下命令:

mysql -u root -p

这将提示您输入密码,因此请输入您的 MariaDB 根密码并按 Enter。登录到数据库服务器后,您需要为 FileRun 安装创建一个数据库:

MariaDB [(none)]> CREATE DATABASE filerun;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON filerun.* TO \'filerun\'@\'localhost\' IDENTIFIED BY \'your-strong-password\';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

步骤 6. 配置 Apache。

现在我们使用以下命令创建一个 Apache 配置文件:

nano /etc/httpd/conf.d/filerun.conf

添加以下文件:


        ServerName your-domain.com
        DocumentRoot /var/www/html/filerun
        
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        
        ErrorLog /var/log/httpd/filerun.error.log
        CustomLog /var/log/httpd/filerun.access.log combined

保存并关闭文件,然后重新启动 Apache 服务以应用更改:

sudo systemctl restart httpd

步骤 7. 使用 Let\’s Encrypt SSL 免费证书保护 Apache

首先,我们使用以下命令安装 Certbot:

sudo dnf install certbot python3-certbot-apache

然后,为 Apache 安装 SSL 证书,如下所示:

sudo certbot --apache

进入交互式提示并安装证书。如果安装了证书,您将看到以下祝贺消息:

Deploying certificate
Successfully deployed certificate for your-domain.com to /etc/httpd/conf.d/your-domain-le-ssl.confCongratulations! You have successfully enabled HTTPS on https://your-domain.com
NEXT STEPS:
- The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let\'s Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

步骤 8. 配置防火墙。

允许防火墙使用 HTTP 和 HTTPS 并使用以下命令重新加载它:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

步骤 9. 访问 FileRun Web 界面。

成功安装后,打开 Web 浏览器并使用 URL 访问 FileRun 。您将被重定向到以下页面:https://your-domain.com

FileRun-web-UIFileRun-web-UI

感谢您使用本教程在您的 AlmaLinux 8 系统上安装 FileRun PHP 文件管理器和文件共享。如需其他帮助或有用信息,我们建议您查看FileRun 官方网站。

相关内容

热门资讯

Windows 11 和 10... Windows 11/10 文件夹属性中缺少共享选项卡 – 已修复 1.检查共享选项卡是否可用 右键...
Radmin VPN Wind... Radmin VPN 是一款免费且用户友好的软件,旨在牢固地连接计算机以创建一个有凝聚力的虚拟专用网...
如何修复 Steam 内容文件... Steam 内容文件锁定是当您的 Steam 文件无法自行更新时出现的错误。解决此问题的最有效方法之...
在 Windows 11 中打... 什么是链路状态电源管理? 您可以在系统控制面板的电源选项中看到链接状态电源管理。它是 PCI Exp...
Hive OS LOLMine... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
事件 ID 7034:如何通过... 点击进入:ChatGPT工具插件导航大全 服务控制管理器 (SCM) 负责管理系统上运行的服务的活动...
iPhone 屏幕上有亮绿色斑... iPhone 是市场上最稳定的智能手机之一,这主要归功于专为它们设计的 iOS 操作系统。然而,他们...
在 iCloud 上关闭“查找... 如果您是 Apple 的长期用户,您肯定会遇到过 Find My 应用程序,它本机安装在 iPhon...
balenaEtcher烧录后... balenaEtcher烧录后u盘或者内存卡无法识别不能使用的解决方法想要恢复原来的方法,使用win...
统信UOS每次开机后不直接进入... 统信UOS每次开机后不直接进入系统而是进入到recovery模式 按方向上键选择UOS 20 SP1...