How to disable Let’s Encrypt for the hostname

If you want to replace the certificate for your hostname with a custom certificate but you had enabled Let’s Encrypt, you will need to disable Let’s Encrypt for the hostname first. The following command let’s DirectAdmin know that it does not need to renew the Let’s Encrypt certificate. This is required as DirectAdmin will renew the certificate +/- 60 days after the last renewal, even when the Let’s Encrypt certificate is not installed.

rm -rf /usr/local/directadmin/data/users/user_name/domains/domain_name.lt.san_config
rm -rf /usr/local/directadmin/data/users/user_name/domains/domain_name.lt.cert.creation_time

Proxmox: Shrinking disk of an LVM backed container

LVM, or Logical Volume Management, is a storage device management technology that gives users the power to pool and abstract the physical layout of component storage devices for easier and flexible administration. Utilizing the device mapper Linux kernel framework, the current iteration, LVM2, can be used to gather existing storage devices into groups and allocate logical units from the combined space as needed.
Continue reading “Proxmox: Shrinking disk of an LVM backed container”

Proxmox VE 5.4 fix updates / upgrades

Proxmox VE 5.4 has been released, this version is based on Debian 9. (Linux Kernel 4.15) It includes allot of new features, but sadly updates are still pointing to the enterprise repository for updates. This results in ugly error message when trying

apt-get update

such as:

root@server2:~# apt-get update
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://ftp.debian.org/debian stretch InRelease     
Hit:3 http://ftp.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.debian.org/debian stretch Release 
Ign:5 https://enterprise.proxmox.com/debian/pve stretch InRelease
Ign:6 https://enterprise.proxmox.com/debian/pve stretch Release
Ign:7 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
Ign:8 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Ign:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Ign:7 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
Ign:8 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Ign:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Ign:7 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
Ign:8 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Ign:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Ign:7 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
Ign:8 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Ign:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Ign:7 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
Ign:8 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Ign:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Err:7 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
  401  Unauthorized
Ign:8 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Ign:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Reading package lists... Done
W: The repository 'https://enterprise.proxmox.com/debian/pve stretch Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/stretch/pve-enterprise/binary-amd64/Packages  401  Unauthorized
E: Some index files failed to download. They have been ignored, or old ones used instead.

To fix this, its similar to V3.X and V4.X. We need to add one repository:

nano /etc/apt/sources.list

add:

deb http://download.proxmox.com/debian stretch pve-no-subscription

Then disable or remove

rm -f /etc/apt/sources.list.d/pve-enterprise.list

(for disable add a # in front of the first line starting with deb)

Now you can run those updates take note only

apt-get update

and

apt-get dist-upgrade

are supported by Proxmox!

ERROR: version of exim_conf_46 not found in versions.txt!

Hi,
I get the following error when running

cd /usr/local/directadmin/custombuild
./build clean
./build update
./build versions
./build update_versions

Try to execute these commands and the problem should be resolved.

cd /usr/local/directadmin/custombuild
./build update
./build set exim yes
./build set eximconf yes
./build set eximconf_release 4.5
./build set spamassassin yes
./build update
./build exim
./build exim_conf

Security & bug fix releases PHP 5.6.37, 7.0.31, 7.1.20, 7.2.8

The PHP development team announces the immediate availability of PHP 5.6.37. This is a security release. Several security bugs have been fixed in this release. All PHP 5.6 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.0.31. This is a security release. Several security bugs have been fixed in this release. All PHP 7.0 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.1.20. This is a security release. Several security bugs have been fixed in this release. All PHP 7.1 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.2.8. This is a security release which also contains several minor bug fixes.
All PHP 7.2 users are encouraged to upgrade to this version.

How to migrate from PHP 7.0 to PHP 7.2 – Ubuntu & Debian

How to migrate from PHP 7.0 to PHP 7.2 in five minutes.

1. Add PPA ondrej/php

We use Ondřej Surý’s awesome PHP PPA. It already has PHP 7.2, so we’ll add the PPA and update the package information.

Ubuntu

add-apt-repository ppa:ondrej/php
apt-get update

Debian

apt install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
apt-get update

2. Current PHP packages

This only applies if you are upgrading from a previous version. Note down the current PHP packages you have, so we can reinstall them for PHP 7.2.

dpkg -l | grep php | tee packages.txt

This will save your current packages to packages.txt file in your working directory.

3. Install PHP 7.2

apt-get install php7.2 php7.2-common php7.2-cli php7.2-fpm

This will install the bare basic packages you’d need to get started with PHP 7.2. Note that php7.2-fpm package is used for your web server integration. If you are using Apache with prefork MPM (type apachectl -V to see the MPM used), you’d need to install libapache2-mod-php7.2 instead of php7.2-fpm.

4. Install additional modules

Take a look at the packages.txt file we created at step 2, and install the additional PHP packages. Your packages.txt file will show packages such as php7.0-mbstring, and you need to install their PHP 7.2 counterpart (php7.2-mbstring for example).

You can generate a command that can be run later using this line.

apt-get install $(cat packages.txt | awk '{ apt-get install gsub("7.0", "7.2", $2); print $2 }' | tr '\n' ' ' | sed 's/php7.2-mcrypt //g')

5. Web server configuration

Apache with php-fpm

Before we remove the old PHP packages, make sure that your web server correctly uses the PHP 7.2 sockets/modules. If you installed php7.2-fpm above, and using Apache, a2enconf php7.2-fpm will make Apache use PHP 7.2 FPM. Type a2disconf php7.0-fpm to disable existing FPM configurations.

Apache with mod_php

You can disable the current PHP integration with a2dismod php7.0 (or your current version) and enable new PHP 7.2 module with a2enmod php7.2.

6. Remove old versions

If everything is working well (check your phpinfo() and php -i), you can remove the old packages:

apt-get purge php7.0*

Of course, change php7.0 with all old versions you no longer need.

Enjoy your shiny new PHP 7.2!