Trust Your Technolust

Year: 2020

Ubuntu 18.04 OVH VPS IPv6 Setup

With IPv4 addresses nearly exhausted everywhere the world could really use some more IPv6 adoption so here’s a handy guide for getting IPv6 to work on your OVH Ubuntu VPS’s, although this guide should work equally well on any VPS/Dedicated server host.

At the time of writing this there seems to be a bug in netplan which stops IPv6 working properly when using the official instructions from OVH, this can be fixed by bypassing netplan and doing the configuration straight from systemd-networkd

Open a new file

nano /etc/systemd/network/10-ens3.network

Edit in the required config lines, making sure that you name your network interface correctly.

[Match]

Name=ens3

[Network]

DHCP=ipv4

Gateway=Your IPv6 Gateway Address Here

DNS=2620:119:35::35

[Address]

Address=Your IPv6 Address Here/128

[Route]

Destination=Your IPv6 Gateway Address Here

Scope=link

After you’ve written out the configuration you have two choices for making sure the changes are applied

Either reboot your server entirely

reboot

Or restart the systemd network daemon to apply the change, this is faster of course, but may cause networking to drop for a few seconds.

systemctl restart systemd-networkd

 

Installing phpiredis on cPanel and CloudLinux

You may already be familiar with this message if customers have contacted you previously about messages from their Laravel installs

predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)

For anyone that uses Laravel you’re probably using the Redis for caching, but for optimal performance Laravel recommends the use of the phpiredis extension from github.com/nrk/phpiredis, which isn’t available on cPanel servers with CloudLinux, so here’s a way to install it so all your customers can benefit.

We’ll install it for PHP 7.3 on our CloudLinux server but the same process applies for all versions of the PHP Selector on CloudLinux.

First clone the Git repository of the extension, at the time of writing this extension isn’t on the PHP PECL website so we’ll have to get it from GitHub instead.

git clone https://github.com/nrk/phpiredis.git

Change directory to the extension folder.

cd phpiredis/

Run phpize on the source.

/opt/alt/php80/usr/bin/phpize

Configure the extension source.

./configure –with-php-config=/opt/alt/php80/usr/bin/php-config

Compile the extension.

make

Install the extension files.

make install

Create a new file for the extension information.

nano /opt/alt/php80//etc/php.d.all/phpiredis.ini

Add the following to the file so PHP Selector can enable it.

; Enable phpiredis extension module

extension=phpiredis.so

Rebuild Cage FS, to include the new extension.

cagefsctl –rebuild-alt-php-ini

Restart Apache to pick up your new extensions.

service httpd restart

At this point you can enable it for all your customers in WHM by going to the CloudLinux LVE Manager in WHM and enabling it for the 7.3 PHP version in the Selector tab, or allow your customers to select whether they want to use it in their cPanel account.

© 2024 TL;DR Tips

Theme by Anders NorénUp ↑