How Does Tasksel Work?
Tasksel uses meta-packages to pull a ‘virtual group’ of software apps and dependencies together to install a software bundle defined by a configuration (or .cfg) file. Metapackages themselves do not contain the actual applications, they simply reference a group of packages. In this case, this is a reference to a software install for a ubuntu-server.Important:
If one or more of the underlying dependencies in the metapackage is removed, all the other packages that were in the metapackages dependencies list will still be installed on the system.
Let’s Begin!
Initially, we want to make sure our Ubuntu server is up to date with the latest software:root@test:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 323 kB in 0s (1,019 kB/s)
Reading package lists... Done
Is Tasksel Already Installed?
To verify if Tasksel is already installed, run:root@test:~# which tasksel
/usr/bin/tasksel
Install Tasksel
If Tasksel is not installed, install it from the command-line:root@test:~# apt-get install tasksel
Error Running Tasksel?
After installing, if by chance you get an error similar to:root@test:~# tasksel
tasksel: apt-get failed (100)
Simply run:
root@test:~# dpkg --configure -a
That should correct that error message.
What Can I Install With Tasksel?
To see a list of all the packages available to install, use the “–list-tasks” flag with the Tasksel command:root@test:~# 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
Now, let’s move on to installing the LAMP stack!
What Is The LAMP Stack?
The LAMP stack is the basis for running one of the most stable and time-tested server platforms for hosting websites. LAMP is an acronym for the Linux, Apache, MySQL and PHP software stack.- Linux: The operating system
- Apache: The web server software
- MySQL: The database server software
- PHP: The programming language the sites are coded in
How Do I Install A LAMP Server Using Tasksel?
To install a LAMP server, SSH into your new Ubuntu 16.04 server and open the terminal. At the terminals prompt, enter the following command:root@test2:~# tasksel
Note
If you make an error or accidentally select the wrong software package, simply hit the “escape” key and restart the process!




Note
That’s really all you need to do when installing LAMP this way!
All Finished?
When the installation reaches 100%, it will drop you back to the bash prompt. You can verify that Tasksel installed the LAMP stack successfully by running the following command:root@test:~# tasksel --list-tasks |grep "lamp-server"
i lamp-server LAMP server
Verify Apache is Installed
To verify that Apache was installed, simply open a browser window and type in the IP address of the server (Example: http://209.59.180.244/ ). You should see a page similar to this:
Verify PHP is Installed
To get further details about the installation, let’s create a phpinfo.php page.root@test:~# touch /var/www/html/phpinfo.php
Now, open the file using the “vi” command.
root@test:~# vi /var/www/html/phpinfo.php
Next, add this small snippet of code to the phpinfo.php file. Click the ‘insert’ button to edit the file then paste it into the file.
<?php
// Show all information. This page defaults to INFO_ALL
phpinfo();
?>
Once the code has been added to the file, save the file using the “:wq” command.
Now, open your browser and type in the IP address of the server, followed by the phpinfo.php page like so: http://209.59.180.244/phpinfo.php
You should see a PHP page similar to the following:
Install Other Services With Ease
If needed, you can install other multiple services like Tomcat, mail server, OpenSSH or a DNS server by using these Tasksel commands:root@test2:~# tasksel install tomcat
root@test2:~# tasksel install mail-server
root@test2:~# tasksel install dns-server
root@test2:~# tasksel install openssh-server
In conclusion, Tasksel is an easy-to-use group package installer with a pleasing interface to assist users in installing multiple programs on their Dedicated Debian server or an Ubuntu-based private cloud servers.