Categories
Tutorial

Change DirectAdmin user /home location

Say, you have added another drive (or slab) to your server (or vps) and want to create your user home directories to that location instead of /home

To achieve that, first mount your new drive (or slab) as /home2

Then go to /etc/defaut/useradd and set HOME=/home to HOME=/home2.

Categories
Tutorial

How to add swap on CentOS 7

If your vps does not come with swap, you can easily add swap to centos 7 following this guide: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7

Categories
Solution

Disable mod_pagespeed for a single user

If you need to disable mod_pagespeed for a single user or domain, you can do so simply by adding the following to .htaccess

<IfModule pagespeed_module>
    ModPagespeed off
</IfModule>

Works with cpanel, directadmin, centos, ubuntu, apache… anything!

Categories
Solution

Invalid configuration value: failovermethod=priority – Oracle Cloud

On a CentOS installation over Oracle Cloud, when running dnf or yum, you may get the error:

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; Configuration: OptionBinding with id "failovermethod" does not exist

To solve the issue, using the command line tool sed, we first start off by making a backup of the repository files:

sudo sed -iBAK '/^failovermethod=/d' /etc/yum.repos.d/*.repo

Then we use the sed command again to remove the problematic parameter in the repository files:

sudo sed '/^failovermethod=/d' /etc/yum.repos.d/*.repo

Once you have done it, you can run dnf to check whether the error appears again:

dnf upgrade

Source: https://communicode.io/how-to-fix-failovermethod-error-fedora/

Categories
Solution

Failed loading plugin “osmsplugin”: No module named ‘librepo’ – Oracle Cloud

On a CentOS installation over Oracle Cloud, when running yum or dnf, you may get the error: Failed loading plugin “osmsplugin”: No module named ‘librepo’

To fix this error install the python3-librepo package with:
sudo dnf install python3-librepo