Category Archives: Ubuntu

Ubuntu Guides, Articles and Discussion

Updating the Kernel on Ubuntu

You can update Ubuntu to the latest kernel very easily using apt-get.
To generate a list of available kernels run…

This will create an extensive list on Ubuntu 14.04 LTS, so I have picked out the latest to give three examples…

Depending on which version you would like to install, run one of these commands…

linux-image-3.19.0-58-generic…

linux-image-4.2.0-35-generic…

linux-image-4.4.0-21-generic…

And reboot your server.

You can then run…

To clean up any old images, it may not find any right away, but you will be reminded at a later date.

Installing OpenDKIM

Follow these steps to install OpenDKIM on Ubuntu and Plesk.
I will use domain.tld (as the primary domain) and example.com as my domains, I have enabled subdomains so mail from the server mail.domain.tld gets signed too as in this case mail.domain.tld is also the Posfix hostname and mailname…

1. First login as root as run…

2. Create the folder structure…

3. Create a key, I’ll use “dkim” as the selector and create 1024bit keys
You will have two files in the folder, dkim.private and dkim.txt, the latter contains the DNS record for you to add in Plesk or at your domains registrar.

4. Now we’ll create the SigningTable and the KeyTable…

The contents should look like…

5. And the KeyTable…

The contents should look like…

You can see the subdomains point to the same key as the domain.

6. Next we have to create the internal hosts file…

and add your IP and host names…

7. Now edit /etc/opendkim.conf

And define these settings…

8. Make sure you create the log directory, and the log file is owned by opendkim:opendkim

9. We now need to define the socket…

And uncomment…

10. And restart opendkim

11. Our last step is too add this milter to our postfix configuration file…

Restart Postfix…

And you should be good.

Bind Fails to Start

If you are running Plesk on a Ubuntu server and Bind fails to start the likely cause is AppArmor not being configured for Plesk’s chrooted environment.
All you have to do is add the path to the usr.sbin.named file.

1. Locate the file…

2. Add the following path to the file…

including the comma.

3. Now restart AppArmor…

4. Now you can start Bind…

I hope that helps some people.

Note: We used the /etc/apparmor.d/local/usr.sbin.named file to make sure our addition is permanent, and the package manager doesn’t over write it.