在本教程中,我们将向您展示如何在您的 CentOS 7 上安装和配置 Roundcube Webmail。对于那些不知道的人,Roundcube 是一个 Web 应用程序,可用于从 Web 浏览器访问您的电子邮件。 它是 Roundcube Webmail 项目的一个免费和开源软件工具。 它有一个干净的用户界面,并提供了许多功能,如对 MIME 和 HTML 消息的完全支持、多语言功能、按键入查找地址簿、线程消息列表、拼写检查等等。
本文假设您至少具备 Linux 的基本知识,知道如何使用 shell,最重要的是,您将网站托管在自己的 VPS 上。 安装非常简单,假设您在 root 帐户下运行,如果不是,您可能需要添加 ‘sudo
‘ 到命令以获取 root 权限。 我将向您展示在 CentOS 7 服务器上逐步安装 Roundcube Webmail。
先决条件
- 运行以下操作系统之一的服务器:CentOS 7。
- 建议您使用全新的操作系统安装来防止任何潜在问题。
- 对服务器的 SSH 访问(或者如果您在桌面上,则只需打开终端)。
- 一种
non-root sudo user
或访问root user
. 我们建议充当non-root sudo user
,但是,如果您在充当 root 时不小心,可能会损害您的系统。
Roundcube 网络邮件功能
- 多语言能力
- 键入时查找地址簿
- 富文本/HTML 消息撰写
- 搜索消息和联系人
- 罐头响应模板新的!
- 诠释。 域名 (IDNA)
- 共享文件夹和 ACL
- 功能齐全的通讯录
- 可使用插件 API 进行扩展
- 还有很多
在 CentOS 7 上安装 Roundcube Webmail
第 1 步。首先,让我们首先确保您的系统是最新的。
yum clean all yum -y update
步骤 2. 安装 LAMP 服务器。
需要 CentOS 7 LAMP 堆栈服务器。 如果您没有安装 LAMP,您可以在此处按照我们的指南进行操作。 此外,安装所需的 PHP 模块:
yum install php-json php-xml php-mbstring php-imap php-pear-DB php-mysql -y
步骤 3. 安装 Roundcube Webmail。
首先要做的就是去 Roundcube的下载页面 并下载最新的稳定版 Roundcube,在撰写本文时它是 1.1.4 版:
wget https://nchc.dl.sourceforge.net/project/roundcubemail/roundcubemail/1.1.4/roundcubemail-1.1.4-complete.tar.gz
将 Roundcube 存档解压缩到服务器上的文档根目录:
tar -zxpvf roundcubemail-1.1.4-complete.tar.gz -C /var/www/html/ mv roundcubemail-1.1.3 roundcube
我们将需要更改一些文件夹权限:
chown apache:apache -R /var/www/html/roundcube
步骤 4. 为 Roundcube Webmail 配置 MariaDB。
默认情况下,MariaDB 未加固。 您可以使用 mysql_secure_installation
脚本。 您应该仔细阅读下面的每个步骤,这些步骤将设置 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 控制台并为 Roundcube Webmail 创建一个数据库。 运行以下命令:
mysql -u root -p
这将提示您输入密码,因此输入您的 MariaDB 根密码并点击 Enter. 登录到数据库服务器后,您需要为 Roundcube Webmail 安装创建一个数据库:
MariaDB [(none)]> CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; MariaDB [(none)]> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost IDENTIFIED BY 'password'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> q
步骤 5. 使用 Web 浏览器安装程序开始 Roundcube 安装。
Roundcube Webmail 默认在 HTTP 端口 80 上可用。 打开您喜欢的浏览器并导航到 https://your-domain.com/roundcube/installer
或者 https://server-ip-address/roundcube/installer
并完成所需的步骤以完成安装。 如果您使用防火墙,请打开端口 80 以启用对控制面板的访问。
安装完成后,从您的 Web 服务器文档根目录中删除安装程序目录 (/var/www/html/roundcube
):
cd /var/www/html/roundcube/ rm -rf installer
现在使用 Roundcube 访问您的帐户,导航到 https://your-domain.com/roundcube
并使用您的电子邮件帐户的用户名和密码登录。 如果您的配置正常,Roundcube 将允许您从域名内部和外部接收、阅读和发送电子邮件。
恭喜! 您已成功安装 Roundcube。 感谢您使用本教程在您的 CentOS 7 系统上安装 Roundcube Webmail。 如需其他帮助或有用信息,我们建议您查看 Roundcube官方网站.