Ubuntu Server 16.04 on RamNode KVM VPSes: A How-To Guide Using the ISOs

 RamNode, RamNode KVM VPS, Ubuntu  Comments Off on Ubuntu Server 16.04 on RamNode KVM VPSes: A How-To Guide Using the ISOs
Apr 262016
 

This is a guide to make RamNode KVM VPSes run Ubuntu 16.04 Server, by manually setting it up via the Ubuntu Server 16.04 ISO.

  1. PREREQUISITES:
    • A new RamNode KVM VPS (or one you don’t mind losing all the data on).
    • Knowledge of Linux
    • Access to VPSCP (Solus)
  2. Start by setting up the VPS with a pre-made image (14.04 Minimal works).
  3. Login to the VPS, get the /etc/network/interfaces information and store it in a different file not on the server, for a reference of settings. We will re-implement this later, or rather, we’ll be using this later if the configuration fails, or to know what data needs to be provided for the system to work.
  4. Login to VPSCP.
  5. Go to your VPS settings, open the settings for your VM, and under the CDRom tab select the “Ubuntu 16.04 Server x86_64” item, and hit “Mount”.
  6. Under the “Settings” tab on the VPSCP for the VM, make sure Boot Order is set to “(1) CDROM (2) Hard Disk”
  7. Either use VPSCP to shut down the VPS, or login via SSH and then shut down the VPS.
  8. Click “Boot”. The VPS will now boot, and boot from the CDROM image.
  9. In the VPSCP, click the “VNC” button for your VPS. You can use the HTML5 VNC client or use an actual VNC client to connect to the connection information available on the VNC Viewer page.
  10. Once VNC is up, select your language from the CDROM prompt, then select “Install Ubuntu” on the screen that remains.
  11. Follow the screen prompts, providing the relevant information requested by the system. When it gets to the option for partitioning, and says “reuse partitions” or “Erase disk”, select the “Erase Disk” option that says to use LVM.
  12. Go through the rest of the prompts, and select the software features you want to install. Once it’s installed, the VPS will reboot. Close the VNC connection.
  13. Go back to VPSCP, and click “Shutdown” on the VPS control panel. The VPS will not boot when you select “Boot from first hard disk” from the CDROM menu.
  14. Under “Settings”, change your “Boot Order” to “(1) Hard Disk (2) CDROM” or to “Hard disk only”.
  15. Before we start the VPS, we need to reconfigure the networking – this will install the Solus network configuration to get the networking up and working. Note that this configuration will need to be edited.
  16. Once the “Reconfigure Networking” step is completed, and your VPS boots, connect once again to the VNC. Login to the server, using the credentials you set up during the installation steps via the ISO. Note that this VPS will not have working networking at this step – you must UPDATE the configuration to adapt for the Predictable Network Interface Naming, which Solus does not yet support in its network auto-configuration
  17. Run the following command, and take a note as to what network interface name(s) come up other than lo (it may show up as ens3 or similar):
    ifconfig -a
  18. We now need to edit /etc/network/interfaces. Wherever eth0 shows up in the interfaces file, replace it with the interface name you gathered from step 16.
  19. Once your VPS reboots, we have to test its connectivity to the Internet.
    1. If you selected “OpenSSH server” or “SSH Server” during the installation steps, then you can attempt to directly SSH to your server, specifying the user you configured, and the IP address, for the connection details.
    2. If you did not select to install an SSH server, then connect to the server via the VNC, and login with the credentials you specified during installation.
  20. Once on the server, make sure you get ping replies for both of these commands.
    ping 8.8.8.8
    ping6 2001:4860:4860::8888
  21. If you received ping replies from the above commands, you have successfully redone the network configuration on the server, and everything is all ready for you to begin using your Ubuntu 16.04 VPS on RamNode! If not, verify the network settings put in place by Solus match the network settings you should be using.
Apr 122016
 

Hello again! NGINX 1.9.14 is now available in Ubuntu Xenial. There’s quite a few things we should make known to everyone who uses nginx in Ubuntu, with php5-fpm currently!


HTTP/2 is now enabled

Yes, HTTP/2 is now enabled for nginx-core, nginx-full, and nginx-extras in Ubuntu Xenial. Add http2 to your SSL listener line in your server blocks, and HTTP/2 will be enabled for that port and site.

For HTTP/2 on non-Xenial Ubuntu releases, you can use the Mainline PPA for Wily and later. Anything before Wily does not have full HTTP/2 support, and very likely will not be usable to get HTTP/2 working as intended.


Ubuntu Xenial ships php7.0-fpm, and not php5-fpm, and this will break existing site configurations

The Ubuntu Xenial packages for nginx have already been updated for this change, pointing to php7.0-fpm instead of php5-fpm.

However, users who have existing site configurations will not benefit from these changes. They must manually apply the changes.

Effectively, this is what a default setup uses to interface with the default php5-fpm setup on Ubuntu versions before Xenial, passing all PHP processing to the php5-fpm backend. This is from the default configuration file, but it’s still similar for all PHP passing:

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
    
        # With php5-cgi alone:
        #fastcgi_pass 127.0.0.1:9000;
        # With php5-fpm:
        fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

In Ubuntu Xenial, the TCP listener for php7.0-cgi will be unchanged, however for php7.0-fpm, it will be necessary to update the configuration to look like this for existing site configurations:

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
    
        # With php7.0-cgi alone:
        #fastcgi_pass 127.0.0.1:9000;
        # With php7.0-fpm:
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

This will prevent HTTP 502 Bad Gateway errors, and will use the updated php7.0-fpm instead of the php5-fpm packages.

(If for some reason you still want to have php5-fpm under Xenial, you will not be able to get support from Ubuntu for this; you will need to use a PPA. I explain this on a different post on my blog.)

Ubuntu Xenial: Adding php5.6 to Xenial

 Uncategorized  Comments Off on Ubuntu Xenial: Adding php5.6 to Xenial
Apr 122016
 

Ubuntu Xenial will not ship php5 at all.

The only way to get continued php5 access is to use a PPA, specifically Ondřej Surý’s PPA for co-installable php5 and php7.0. However, this is not supported by the Ubuntu Server Team or the Ubuntu Security Team, and you accept the risks therein of using PPAs for getting php5.

The packages are *not* named php5 but are instead named php5.6.

So, to add php5.6-fpm to Xenial, you would do something like this to add the PPA, update, and then also install php5.6-fpm and dependencies:

sudo apt-get install python-software-properties
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6-fpm

(Note that I have not tested this; this is, however, supposedly usable based on user experience data gathered on Ask Ubuntu by myself.)

This should be a similar process for any of the other php5.6 packages you would need. However, you do NOT need to re-add the PPA if it’s already on your system.