Some basic Redhat/Fedora/CentOs commands for Debian/Ubuntu users

Submitted by Micheas on Fri, 02/10/2012 - 14:03

So you have only used Debian or Ubuntu as your lamp server and now you have your first RedHat based server.

Here is a quick Debian to Redhat translation of commands that you will probably run into hosting Drupal.

(This guide assumes you are using sudo to get root access. It is common for Redhat based Linux distributions to use su instead of sudo.)

Debian: sudo is normally installed by default.
Redhat: First use su to get root access. Second run: yum install sudo Third: edit sudoers with visudo just as you would with Debian.

Debian: apt-get
Redhat: yum

Debian: sudo /etc/init.d/apache2 start
Redhat: sudo service httpd start

Debian: sudo /etc/init.d/varnish start
Redhat: sudo service varnish start

Debian: sudo /etc/init.d/mysql start
Redhat: sudo service mysqld start

Debian: sudo apt-get install drush
Redhat:
sudo pear channel-discover pear.drush.org
sudo pear install drush/drush

Start mysql server at boot:
Debian: works by default
Redhat: sudo chkconfig --level 2345 mysqld on
Redhat: sudo chkconfig --level 2345 httpd on
Redhat: sudo chkconfig --level 2345 varnish on (if running varnish)

Php.ini location:
Debian: /etc/php5/apache/php.ini, /etc/php5/cli/php.ini, /etc/php5/cgi/php.ini
Redhat: /etc/php.ini

Mysql configuration
Debian: /etc/mysql/my.cnf
Redhat: /etc/my.cnf