Blog

I find myself on a regular basis looking for various debconf variables to set before installing packages on Ubuntu. This is typically to not have to type in the answers on the various configuration screens or because I want to script an install of some package. If the package has never been installed before on that specific server then the debconf variables will not display. You can always login to another server where the package is installed to see the variables but I am going to start posting information for common packages here so others can easily find them when searching.

If you have used the debconf-set-selections command that I mentioned in a previous article there will likely be more questions that come up over time such as how to view variables that have been set for specific packages or how to flush the debconf database. Below I show a couple example that explain how to view variables in the debconf database and also how to remove those variables from the database.

If you need to complete an unattended installation or scripted install of MySQL On Ubuntu Linux you can do so easily by setting the necessary variable with debconf-set-selections. Typically when you install MySQL on Ubuntu it will pop up a window and ask for you to enter a password even when you have specified -y with apt-get install. Below are the commands necessary to set the password variable which then allow you to automatically install MySQL on Ubuntu.

In the past I used CentOS Linux the open source RedHat Enterprise Linux clone but these days I find myself using Ubuntu Linux more and more often because so many more packages that clients want installed are more up to date. One command I used to use on CentOS all the time was the yum whatprovides command which would allow me to search for specific applications, scripts, libraries, etc. to figure out what packages I needed to install. The command that is similar on Ubuntu is apt-file which does not come installed by default. Below I show the output of an example yum whatprovides command on CentOS Linux followed by what needs to be done to use apt-file on Ubuntu Linux.

Changing the default text editor to vi on Ubuntu is fairly easy however it may be tricky depending on how it has been set since there are numerous ways. In BackTrack Linux for instance the default editor is set using select-editor so if you follow another Ubuntu Linux howto it may tell you to modify the default editor using update-alternatives. Below I describe setting the default text editor using both of the mentioned methods and note a couple other locations where it can be set.