Virtualmin update Apache, PHP, MySQL and BIND to latest
I’m using Virtualmin which is a UI for managing web servers and such I could get rid of the UI and just configure everything myself but for usability I just use Virtualmin (I also host some clients websites so they need a easy to use interface), with my installation of Virtualmin on a CentOS 5 operating system with bleeding edge package repository enabled I’m left with the following software versions.
This is an ok setup but I want to use the latest stable versions mainly for all the security fixes here is the setup which I now run it was simple to update the current packages retained all settings and data and works fine with Virtualmin.
The only problem which I have found so far after updating was when I tried to run one of my virtual hosts using suexec (it a security feature for apache which allow you to run a virtual host as a specific user) there was an issue with the default configuration the fix was easy and only required me to recompile the suexec from source with some slight modifications to work with Virtualmin.
WARNING / MUST READ
I have performed the following methods 3 times and every time everything has worked correctly and Virtualmin still operates correctly, this warnings here just to tell you I am not responsible if you do something wrong, break your system or anything of the kind.
If you are updating all 4 packages I would do it in this order MySQL, BIND, Apache and PHP this is only due to me normally doing it in this order, I have read somewhere updating PHP then apache can cause some errors but not too sure on this. I would also recommend navigating to your tmp folder.
This is so that all the files we download will automatically be deleted later by the system, now we need to download the files we need for updating from somewhere, you can compile the different versions from source but I will be using precompiled installation files. You can get these from the site below.
RPM –-nodeps and –-force
During the following guide you may need to use the –-nodeps or –-force commands to complete the installation this will normally only be an issue if you already have a older version of the package installed and installing the same package but a different version, you have to make sure you use the two commands in the correct situations or you can break your system. You should always try running the RPM using the following command.
rpm –Uhv filename.rpm
You must install the required dependency as your system is missing it, this can be achieved by going to http://pkgs.org/ searching for the dependency for example apr-util-ldap and downloading the rpm required for your system, then run the rpm installation command for the new downloaded rpm.
rpm –Uhv filename.rpm
Once the installation of all required dependencies is complete (you may try installing one dependency to then find the dependency your trying to install requires another dependency this is normal) you can then try running the rpm installation command again for the main package you wish to install, if you receive a message similar to the one below.
You will receive this message if you are updating some already installed software which is a dependency off another piece of software, in the example above openssh-server and openssh-clients needs openssh version 4.3 installed to run correctly, I received the message above because I was trying to update openssh to version 5.5. In this case I would use the following command.
rpm –Uhv filename.rpm --nodeps
I would then have to download openssh-server version 5.5 and openssh-clients version 5.5 and also update and install any other required dependencies. The –nodeps attribute allows the installation to continue by skipping the dependency check. The –force attribute is used if the installation complains about files already existing from another package, this is caused if you are updating a package you want the new files to replace the old package so adding the –force will force the new installation replacing the old files.