[ad_1]
在基于 Debian 的系统(如 Ubuntu 和 Mint)上安装软件有多种方法。 像这样的工具 易于, apt-get, 资质 和/或 突触 通常用于将单个应用程序安装到这些操作系统的桌面版本中。 或者,Tasksel 是一个命令行应用程序,用于将一组“组”相关包安装到服务器上。 默认情况下,Tasksel 不会安装在包含上述软件包管理器的“nix”版本的桌面版本上,但它会安装在更高版本的 Debian 和 Ubuntu 服务器版本上。
Tasksel 是如何工作的?
Tasksel 使用 元包 将软件应用程序和依赖项的“虚拟组”拉到一起,以安装由配置定义的软件包(或 .配置文件) 文件。 元包本身不包含实际的应用程序,它们只是引用一个 包组. 在这种情况下,这是对软件安装的引用 ubuntu 服务器.
重要提示:如果元包中的一个或多个基础依赖项被删除,元包依赖项列表中的所有其他包仍将安装在系统上。
让我们开始!
最初,我们要确保我们的 Ubuntu 服务器是最新的最新软件:
[email protected]:~# apt-get update
Get:1 https://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:2 https://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 https://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 https://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 323 kB in 0s (1,019 kB/s)
Reading package lists... Done
Tasksel 已经安装了吗?
要验证是否已安装 Tasksel,请运行:
[email protected]:~# which tasksel
/usr/bin/tasksel
安装任务
如果未安装 Tasksel,请从命令行安装它:
[email protected]:~# apt-get install tasksel
错误运行Tasksel?
安装后,如果您偶然收到类似于以下内容的错误:
[email protected]:~# tasksel
只需运行:
tasksel: apt-get failed (100)
[email protected]:~# dpkg --configure -a
那应该更正该错误消息。
我可以使用 Tasksel 安装什么?
要查看可安装的所有软件包的列表,请使用“–列表任务” 使用 Tasksel 命令标记:
[email protected]:~# tasksel --list-tasks
u manual Manual package selection
u kubuntu-live Kubuntu live CD
u lubuntu-live Lubuntu live CD
u ubuntu-gnome-live Ubuntu GNOME live CD
u ubuntu-live Ubuntu live CD
u ubuntu-mate-live Ubuntu MATE Live CD
u ubuntustudio-dvd-live Ubuntu Studio live DVD
u ubuntustudio-live Ubuntu Studio live CD
u xubuntu-live Xubuntu live CD
u cloud-image Ubuntu Cloud Image (instance)
u dns-server DNS server
u edubuntu-desktop-gnome Edubuntu desktop
u kubuntu-desktop Kubuntu desktop
u kubuntu-full Kubuntu full
u lamp-server LAMP server
u lubuntu-core Lubuntu minimal installation
u lubuntu-desktop Lubuntu Desktop
u mail-server Mail server
u mythbuntu-backend-master Mythbuntu master backend
u mythbuntu-backend-slave Mythbuntu slave backend
u mythbuntu-desktop Mythbuntu additional roles
u mythbuntu-frontend Mythbuntu frontend
u postgresql-server PostgreSQL database
u samba-server Samba file server
u tomcat-server Tomcat Java server
u ubuntu-desktop Ubuntu desktop
u ubuntu-gnome-desktop Ubuntu GNOME desktop
u ubuntu-mate-cloudtop Ubuntu MATE cloudtop
u ubuntu-mate-core Ubuntu MATE minimal installation
u ubuntu-mate-desktop Ubuntu MATE desktop
u ubuntu-usb Ubuntu desktop USB
u ubuntustudio-audio Audio recording and editing suite
u ubuntustudio-desktop Ubuntu Studio desktop
u ubuntustudio-desktop-core Ubuntu Studio minimal DE installation
u ubuntustudio-font-meta Large selection of font packages
u ubuntustudio-graphics 2D/3D creation and editing suite
u ubuntustudio-photography Photograph touchup and editing suite
u ubuntustudio-publishing Publishing applications
u ubuntustudio-video Video creation and editing suite
u virt-host Virtual Machine host
u xubuntu-core Xubuntu minimal installation
u xubuntu-desktop Xubuntu desktop
i openssh-server OpenSSH server
i server Basic Ubuntu server
现在,让我们继续安装 LAMP 堆栈!
什么是 LAMP 堆栈?
LAMP 堆栈是运行用于托管网站的最稳定且经过时间考验的服务器平台之一的基础。 LAMP 是 Linux 的缩写, Apache, MySQL 和 PHP 软件堆栈。
- Linux:操作系统
- Apache: 网络服务器软件
- MySQL:数据库服务器软件
- PHP:网站编码的编程语言
Tasksel 无需单独安装这些软件包,而是提供了一种方便的方法来快速启动和运行 LAMP 堆栈。
如何使用 Tasksel 安装 LAMP 服务器?
要安装 LAMP 服务器,请通过 SSH 连接到新的 Ubuntu 16.04 服务器并打开终端。 在终端提示符下,输入以下命令:
[email protected]:~# tasksel
笔记 如果您出错或不小心选择了错误的软件包,只需点击“逃脱”键并重新启动进程!
这将打开 软件选择 您可以在其中选择要安装的软件组的菜单。 在这种情况下,我们将安装 LAMP。
只需使用键盘上的箭头键向下滚动菜单,直到看到 灯服务器 选项:
通过点击键盘上的空格键选择此组。 接下来,点击“tab”键并单击““ 按钮。
接下来,Tasksel 将开始安装服务器的软件。
在安装过程的中点,您将被要求提供两次 MySQL 密码。 (确保您使用安全密码!!!)
再次添加相同的密码。 接下来,单击“行‘ 按钮继续安装。
之后,安装将继续运行…
注意 这就是以这种方式安装 LAMP 时您真正需要做的所有事情!
全部完成?
当安装达到 100% 时,它会让你回到 bash 迅速的。 您可以通过运行以下命令来验证 Tasksel 是否成功安装了 LAMP 堆栈:
[email protected]:~# tasksel --list-tasks |grep "lamp-server"
i lamp-server LAMP server
核实 Apache 已安装
为了验证 Apache 已安装,只需打开浏览器窗口并输入服务器的 IP 地址(例如:https://209.59.180.244/)。 您应该会看到类似于以下内容的页面:
验证 PHP 是否已安装
要获取有关安装的更多详细信息,让我们创建一个 phpinfo.php 页。
[email protected]:~# touch /var/www/html/phpinfo.php
现在,使用“我们“ 命令。
[email protected]:~# vi /var/www/html/phpinfo.php
接下来,将这一小段代码添加到 phpinfo.php 文件中。 单击“插入”按钮编辑文件,然后将其粘贴到文件中。
<?php
将代码添加到文件后,使用“:wq“ 命令。
// Show all information. This page defaults to INFO_ALL
phpinfo();
?>
现在,打开浏览器并输入服务器的 IP 地址,然后输入 phpinfo.php 像这样的页面:https://209.59.180.244/phpinfo.php
您应该会看到类似于以下内容的 PHP 页面:
轻松安装其他服务
如果需要,您可以使用以下 Tasksel 命令安装其他多种服务,例如 Tomcat、邮件服务器、OpenSSH 或 DNS 服务器:
[email protected]:~# tasksel install tomcat
[email protected]:~# tasksel install mail-server
[email protected]:~# tasksel install dns-server
[email protected]:~# tasksel install openssh-server
总之,Tasksel 是一个易于使用的组包安装程序,具有令人愉悦的界面,可帮助用户在其专用 Debian 服务器或基于 Ubuntu 的私有云服务器上安装多个程序。
我们能帮你什么吗?
感谢您花时间阅读使用 Tasksel 的好处。 我们的支持团队充满了才华横溢的系统管理员,他们对本文讨论的私有云托管技术有深入的了解。 如果您不确定上述任何步骤,我们只是一个电话, 聊天 或提供更多信息。 让我们知道您的想法!
[ad_2]