雷达智富

首页 > 内容 > 程序笔记 > 正文

程序笔记

在 Ubuntu 22.04|20.04|18.04 上安装 Sentora 虚拟主机

2024-06-30 42

欢迎阅读今天的文章,了解如何安装和配置 Sentora 网络托管面板,该面板由原始团队构建在 ZPanel 的坚实基础上,为中小型 ISP 提供强大的开源网络托管控制面板。创建此工具是为了简化网络托管的一般管理,并让您轻松管理客户网站和数据。

您可以使用 Sentora 附加商店安装第三方主题、模块和其他本地化版本。对于寻求经济高效且高度可定制平台的中小型 ISP 而言,Sentora 可以成为 Cpanel、DirectAdmin 和 Plesk 等商业产品的完美替代品。

我们在具有以下硬件配置的全新 Ubuntu 22.04 Linux 系统上执行此安装。

  • 内存
$ free -h
               total        used        free      shared  buff/cache   available
Mem:           3.7Gi       524Mi       2.9Gi       1.0Mi       284Mi       3.0Gi
Swap:             0B          0B          0B-
  • 中央处理器
$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         40 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               GenuineIntel
  Model name:            Intel Xeon Processor (Skylake, IBRS)
    CPU family:          6
    Model:               85
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           1
    Stepping:            4
  • 磁盘空间
$ df -hT
Filesystem     Type   Size  Used Avail Use% Mounted on
tmpfs          tmpfs  382M  748K  381M   1% /run
/dev/sda1      ext4    38G  3.6G   33G  10% /
tmpfs          tmpfs  1.9G     0  1.9G   0% /dev/shm
tmpfs          tmpfs  5.0M     0  5.0M   0% /run/lock
/dev/sda15     vfat   253M  142K  252M   1% /boot/efi
tmpfs          tmpfs  382M     0  382M   0% /run/user/0

此外,以下开放端口应开放并可供 Sentora Web 托管解决方案使用。

  • 20 & 21:FTP
  • 25 (TCP):SMTP
  • 53(TCP 和 UDP):DNS
  • 80(TCP 和 UDP):HTTP
  • 110: POP3
  • 143:IMAP
  • 443(TCP 和 UDP)HTTPS

准备环境

登录到您的 Ubuntu 系统并设置正确的主机名。

sudo hostnamectl set-hostname hosting.computingforgeeks.net

编辑 /etc/hosts 文件并进行相应的映射。

$ sudo vim /etc/hosts
167.235.68.2 hosting.computingforgeeks.net

在您的 DNS 服务器中,配置映射到 DNS 名称的 A 记录

更新和升级现有的软件包。

sudo apt update && sudo apt upgrade -y

如果需要,请重新启动。

[ -f /var/run/reboot-required ] && sudo reboot -f

在 Ubuntu 上安装 Sentora

登录到您的服务器并开始安装 Sentora 和服务器管理面板。让我们首先下载在 Ubuntu 上自动安装 Sentora 的脚本。

wget http://sentora.org/install -O sentora-installer.sh

使用如下所示的 bash 命令启动并执行脚本。

bash sentora-installer.sh

安装过程应立即开始,首先检查是否满足设置要求。

....
############################################################
#  Welcome to the Official Sentora Installer v.2.0.1  #
############################################################

Checking that minimal requirements are ok
Detected : Ubuntu  20.04  x86_64
Ok.

-- Installing wget and dns utils required to manage inputs
Selecting previously unselected package dnsutils.
(Reading database ... 37699 files and directories currently installed.)
Preparing to unpack .../dnsutils_1%3a9.16.48-0ubuntu0.20.04.1_all.deb ...
Unpacking dnsutils (1:9.16.48-0ubuntu0.20.04.1) ...
Setting up dnsutils (1:9.16.48-0ubuntu0.20.04.1) ...
...

提供 Sentora panel 的子域,如果之前设置正确,则只需确认并点击

=== Informations required to build your server ===
The installer requires 2 pieces of information:
 1) the sub-domain that you want to use to access Sentora panel,
   - do not use your main domain (like domain.com)
   - use a sub-domain, e.g panel.domain.com
   - or use the server hostname, e.g server1.domain.com
   - DNS must already be configured and pointing to the server IP
       for this sub-domain
 2) The public IP of the server.

Enter the sub-domain you want to access Sentora panel: hosting.computingforgeeks.net

它将检测您的公共服务器 IP 地址,如果不正确则更新以继续安装。

The public IP of the server is 167.235.68.2. Its local IP is
  For a production server, the PUBLIC IP must be used.
Enter (or confirm) the public IP for this server: 167.235.68.2

它将尝试从提供的主机名到其 IP 地址进行 DNS 解析。如果一切正常,请继续安装 Sentora。

OK: DNS successfully resolves hosting.computingforgeeks.net to 167.235.68.2

All is ok. Do you want to install Sentora now (y/n)? y

接下来,您需要按照安装人员的要求提供联系方式。

# -------------------------------------------------------------------------------

--- Please Enter vaild contact info for the Sentora system admin or owner below:

Enter Full name: Josphat Mutai

Enter admin email: j[email 

Enter Phone Number: +25499999999

Enter Street Address: Nairobi

Enter City, State or Province: Nairobi

Enter Postal code: 00606

Enter Country: Kenya

几秒钟或几分钟后,Sentora 应该可以在 Ubuntu Linux 上启动并运行。

...
Daemon run complete! (13:54 11th Mar 2024 UTC)

-- Installing Logrotate
chattr: Operation not supported while reading flags on /etc/resolv.conf
# -------------------------------------------------------------------------------

--- Updating Admin contact Info...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.

--- Done Updating admin contact info.

# -------------------------------------------------------------------------------

--- Restarting Services
Restarting mysql...
Restarting apache2...
Restarting Postfix...
Restarting Dovecot...
Restarting CRON...
Restarting Bind9/Named...
Restarting Proftpd...
Restarting ATD...

--- Finished Restarting Services....

最后,Sentora 访问详细信息(例如 URL、用户名和密码)将打印在屏幕上。您还将获得重要的 MySQL 数据库用户密码。

########################################################
 Congratulations Sentora has now been installed on your
 server. Please review the log file left in /root/ for
 any errors encountered during installation.

 Login to Sentora at http://hosting.computingforgeeks.net
 Sentora Username  : zadmin
 Sentora Password  : ZBMDckceVJO5zTy2

 MySQL Root Password      : zFrG8OB92CenLuYN
 MySQL Postfix Password   : JZNsisMJBXSeBtEP
 MySQL ProFTPd Password   : 2GOO5egKpl7ZfT8U
 MySQL Roundcube Password : 0aD8wW621y13M5MA
   (theses passwords are saved in /root/passwords.txt)
########################################################

Restart your server now to complete the install (y/n)? y

稍后还可以访问屏幕上打印的密码。内容存储在 root 用户主目录中,并命名为 passwords.txt

$ cat passwords.txt
Server IP address : 167.235.68.2
Panel URL         : http://hosting.computingforgeeks.net
zadmin Password   : B4wyi2w4yHBC2tU3

MySQL Root Password      : VoEJ3BmkLfOszBuG
MySQL Postfix Password   : S7xwwjOeP3mSWtjH
MySQL ProFTPd Password   : WGc7wRgZ8ogYWXW1
MySQL Roundcube Password : PFtCsDhZRVwsfW3y

在 Web 仪表板上访问 Sentora

通过网络浏览器访问您的服务器:http://serverfqdn。输入设置过程后提供的管理员用户名和密码。

Sentora 虚拟主机面板的总体概述。

要为 Sentora 使用的子域应用 Let’s Encrypt SSL 证书,请导航至域管理–> 加密 SSL

选择“创建新域 SSL 证书”下的“让加密”。

从列表中选择域,然后“加密”以获取为该域配置的 SSL 证书。

还将提供正在使用的证书的到期详细信息 (Let’s Encrypt)。

https 上加载 Sentora 页面以确认证书是否有效。

阅读 Sentora 官方文档,更深入地了解其产品和定价。


更新于:2个月前
赞一波!3

文章评论

全部评论