The Debian Experience: Cheat Sheet for CentOS and Fedora users
I’ve just installed a LAMP stack on my Nook Tablet using Debian. However I’ve been using CentOS since 2008 and I’m so used to how things are done there that it was a bit of a culture shock doing relatively simple things “on the other side”. It’s like a country whose language you don’t speak well enough.
Here are a few pointers for how to so these simple things in Debian and Ubuntu, for CentOS and Fedora Users:
While I’m used to yum and it’s super easy search and install options, its counterpart apt is very different. Searching for packages is done with
apt-cache search package
instead of yum list. Likewise, installing a package is done with
apt-get install package
I believe the cache is not created automatically, so from time to time (or before an update/install operation) we need to run
To update all packages (equivalent to yum update), we have to run
There are other front ends available which I have not explored yet. aptitude is for the command line and appears to have a similar simplified syntax to yum. synaptic is for GNOME like environments.
Apache is called httpd on CentOS, but it’s called apache2 on Debian. Its system user does not run as apache:apache, but as www-data:www-data.
The web root directory is not in /var/www/html but instead in /var/www. File ownership should be tweaked to the above user in this directory. SELinux is not enabled by default.
The Apache config file is not in /etc/httpd/httpd.conf but in /etc/apache2/apache2.conf. The content however is the same, except for the system user which is defined in envvars in the same directory.
PHP is not just called php, but instead it’s php5 on Debian. This is true for all derivatives, such as
MySQL is still MySQL in Debian Wheezy, and not MariaDB (yet).
Starting and stopping services on boot
chkconfig does not work on Debian. Instead we can use a script called update-rc.d. Here’s how to enable something at boot:
update-rc.d apache2 defaults
And to disable something:
update-rc.d -f apache2 remove
- – https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu