How to a2ensite and a2dissite?

a2ensite etc. are commands available in Debian-based systems and that are not available in RH-based distributions. What they do is to manage symbolic links from configuration file parts in /etc/apache2/sites-available and mods-available to /etc/apache2/sites-enabled and so on. E.g. if you have a vhost defined in a config file /etc/apache2/sites-avaible/example.com, a2ensite example.com would create a symlink … Read more

Linux: How to pass parameters to `service foo start` (at command line)?

In RHEL you have /etc/sysconfig folder. Here you define startup parameters. And in your startup script you include something like: if [ -f /etc/sysconfig/$prog ] ; then . /etc/sysconfig/$prog fi Check existing services for examples. For development you can put your startup parameters in an exported variable (for example in .bashrc) which you can manually … Read more

Exclude a specific repo from YUM Update

Try the disable repo switch: –disablerepo=REPONAME UPDATE To find all repositories currently “known” (enabled and disabled): yum repolist all Then to find which repository is giving you grief for the above package, try: yum list php53-mcrypt-5.3.3-4.ius.el5.x86_64 –showduplicates This will then show which of your repositories provide the above package (you’ll see “installed” on the list … Read more

How to free up space on RHEL6 /boot safely?

Following command will remove ALL kernel versions, except for the one that you’re currently running: sudo yum remove `rpm -q kernel | grep -v ‘uname -r’` and for going forward, per ⁠7.4. Configuring Yum and Yum Repositories: ⁠installonly_limit=value …where value is an integer representing the maximum number of versions that can be installed simultaneously for … Read more