Chevereto 是一个图像托管脚本,可让您创建自己的图像托管网站,例如流行的 Tinypic 和 Photobucket。Chevereto 提供免费版和付费版,付费版具有存储、横幅、点赞、关注者、社交登录等所有功能,而免费版总是比付费版晚 6 个月。Chevereto 具有所有主要功能,例如用户帐户、相册、管理仪表板、HTML 5 拖动等等。Chevereto-logoChevereto-logo

在 Debian 11 Bullseye 上安装 Chevereto

apt步骤 1. 在我们安装任何软件之前,通过在终端中运行以下命令来确保您的系统是最新的,这一点很重要:

sudo apt update
sudo apt upgrade

步骤 2. 安装 LAMP 堆栈。

需要 Debian 11 LAMP 服务器。如果您没有安装 LAMP,请阅读我们之前的教程以在 Debian 11 上安装 LAMP 服务器。

步骤 3. 在 Debian 11 上安装 Chevereto。

默认情况下,Chevereto 在 Debian 11 基础存储库中不可用。所以,现在我们从GitHub 页面下载 Chevereto 的最新稳定版本:

wget https://github.com/rodber/chevereto-free/releases/download/1.6.0/1.6.0.zip

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

unzip 1.6.0.zip
sudo mv * /var/www/html/www.your-domain.com/

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

chown -R www-data:www-data /var/www/html/www.your-domain.com/
chmod -R 775 /var/www/html/www.your-domain.com/

步骤 4. 配置 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 控制台并为 Chevereto 创建一个数据库。运行以下命令:

mysql -u root -p

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

MariaDB [(none)]> CREATE DATABASE chevereto_db;
MariaDB [(none)]> CREATE USER \'chevereto_user\'@\'localhost\' IDENTIFIED BY \'your-strong-password\';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON chevereto_db.* to chevereto_user@\'localhost\';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

步骤 5. 配置 Apache。

现在我们创建一个新的 VirtualHost 来更好地管理 Chevereto 网站:

sudo nano /etc/apache2/sites-available/www.your-domain.com.conf

添加以下文件:



   ServerName your-domain.com
   ServerAlias www.your-domain.com
   ServerAdmin admin@your-domain.com
   DocumentRoot /var/www/html/www.your-domain.com

   ErrorLog ${APACHE_LOG_DIR}/www.your-domain.com_error.log
   CustomLog ${APACHE_LOG_DIR}/www.your-domain.com_access.log combined

   
      Options FollowSymlinks
      AllowOverride All
      Require all granted
   

保存并关闭,然后重新启动 Apache 网络服务器,以便进行更改:

sudo a2ensite www.your-domian.com
sudo a2enmod rewrite ssl
sudo systemctl restart apache2

步骤 6. 配置防火墙。

要通过防火墙启用 HTTP 和 HTTPS 连接,请执行以下命令:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

步骤 7. 安装 Let\’s Encrypt 证书。

首先,使用以下命令将 Certbot 安装到您的 Debian 系统:

sudo apt install certbot python3-certbot-apache

然后,使用以下命令生成证书:

sudo certbot --apache -d [your-domain.com]

然后将提示您输入证书的电子邮件地址。输入后,您必须同意 T&C 并决定是否要与电子前沿基金会共享您的电子邮件地址。最后一步是可选的。成功后,再次重新加载 Apache 以加载所有新配置。

步骤 8. 访问 Chevereto Web 界面。

成功安装后,打开您的网络浏览器并输入 URL 。您将被重定向到 Chevereto 数据库配置页面:http://your-domain.com

Chevereto-Web-InterfaceChevereto-Web-Interface

感谢您使用本教程在 Debian 11 Bullseye 上安装最新版本的 Chevereto。如需更多帮助或有用信息,我们建议您查看Chevereto 官方网站。