{{Article summary text|This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.}}

+

{{Related|Comprehensive Server Guide}}

−

{{Article summary heading|Related}}

+

{{Related articles end}}

−

{{Article summary wiki|Comprehensive Server Guide}}

+

−

{{Article summary end}}

+

From [[Wikipedia:Virtual private server]]:

From [[Wikipedia:Virtual private server]]:

:''Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.''

:''Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.''

+

+

This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.

+

+

{{Warning|1=[https://bbs.archlinux.org/viewtopic.php?id=176171 It appears] that systemd does not support Linux 2.6.32 since systemd-205. Since many container-based virtualization environments rely on older kernels (the latest OpenVZ runs on a modified RHEL6-2.6.32 for example), it may be impossible to keep an Arch Linux install up to date. Most of the instructions regarding OpenVZ on this page were written for systemd-204 and earlier.}}

==Providers that offer Arch Linux==

==Providers that offer Arch Linux==

{{Warning|We cannot vouch for the honesty or quality of any provider. Please conduct due diligence before ordering.}}

{{Warning|We cannot vouch for the honesty or quality of any provider. Please conduct due diligence before ordering.}}

−

{{Note|This list is for providers with a convenient Arch Linux image. Using Arch on other providers is probably possible, but would require loading custom ISOs or disk images or [[Installation Chroot|installing under chroot]].}}

+

{{Note|This list is for providers with a convenient Arch Linux image. Using Arch on other providers is probably possible, but would require loading custom ISOs or disk images or [[Installation guide|installing under chroot]].}}

| [http://afterburst.com/ Afterburst] || 2012.12.01 || OpenVZ || Miami, US-FL; Nuremberg, DE || Formerly FanaticalVPS, kernel version depends on what node your VPS is on, the ones in Miami are fine (2.6.32-042stab072.10) but some of the ones in Germany require a [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|custom glibc]].

| [http://afterburst.com/ Afterburst] || 2012.12.01 || OpenVZ || Miami, US-FL; Nuremberg, DE || Formerly FanaticalVPS, kernel version depends on what node your VPS is on, the ones in Miami are fine (2.6.32-042stab072.10) but some of the ones in Germany require a [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|custom glibc]].

These instructions assume you have a 2010.05 image from your VPS provider and you would like to get it updated. The biggest work involves preparing {{ic|/lib}} for the symlink upgrade ({{pkg|glibc}} 2.16, and later {{pkg|filesystem}} 2013.01).

−

These instructions you have a 2010.05 image from your VPS provider and you'd like to get it up to scratch. The biggest work involves preparing /lib for the symlink upgrade (glibc 2.16, and later filesystem 2013.01).

+

−

+

−

{{Warning|If you are on a older kernel than 2.6.32, please refer [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|further down the page]] to get the glibc-vps repo working (just add the repo and you can follow these steps).}}

+

−

To start, grab the latest busybox from http://busybox.net/downloads/binaries/latest/. This allows you to force glibc (losing /lib temporarily) without losing your OS (busybox comes with its own GNU tools which are statically linked).

+

{{Warning|If you are on a older kernel than 2.6.32, please refer [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|further down the page]] to get the ''glibc-vps'' repository working (just add the repository and you can follow these steps).}}

−

{{bc|wget http://busybox.net/downloads/binaries/latest/busybox-i686

+

To start, grab the latest BusyBox from http://busybox.net/downloads/binaries/latest/. This allows you to force glibc (losing {{ic|/lib}} temporarily) without losing your OS (BusyBox comes with its own GNU tools which are statically linked).

−

chmod +x busybox-i686}}

+

# wget http://busybox.net/downloads/binaries/latest/busybox-i686

+

# chmod +x busybox-i686

−

First off you can get a list of packages that own files in /lib with the following command:

+

First, you can get a list of packages that own files in {{ic|/lib}} with the following command:

You may run into some issues with krb5 and heimdal, as krb5 no longer provides+conflicts+replaces heimdal (https://projects.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/krb5&id=f5e6d77fd14ced15ebf5b6a78a7c76e0db0625f7). The old openssh depends on heimdal (and the new openssh depends on krb5), so force install krb5, then upgrade openssh, then remove heimdal and reinstall krb5.

You may run into some issues with krb5 and heimdal, as krb5 no longer provides+conflicts+replaces heimdal (https://projects.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/krb5&id=f5e6d77fd14ced15ebf5b6a78a7c76e0db0625f7). The old openssh depends on heimdal (and the new openssh depends on krb5), so force install krb5, then upgrade openssh, then remove heimdal and reinstall krb5.

+

# pacman -S --force krb5

+

# pacman -S openssh openssl

+

# pacman -R heimdal

+

# pacman -S krb5

−

{{bc|pacman -S --force krb5

+

Fix {{pkg|syslog-ng}}. Set the src to {{ic|unix-dgram("/dev/log")}} and add {{ic|--no-caps}} to both check and run args in {{ic|/etc/conf.d/syslog-ng}}.

−

pacman -S openssh openssl

+

−

pacman -R heimdal

+

−

pacman -S krb5}}

+

−

+

−

Fix syslog-ng (set the src to unix-dgram("/dev/log") and add --no-caps to both check and run args in /etc/conf.d/syslog-ng).

+

−

+

−

Make sure your rc.conf isn't messed up with broken network definitions, or else be sure serial access works on your VPS before you reboot.

+

+

Make sure your {{ic|/etc/rc.conf}} is not messed up with broken network definitions, or else be sure serial access works on your VPS before you reboot.

====Moving your VPS from network configuration in rc.conf to netcfg (tested with OpenVZ)====

====Moving your VPS from network configuration in rc.conf to netcfg (tested with OpenVZ)====

There are three components that need to be enabled in systemd when using a VPS based on OpenStack/Xen, such as Rackspace NextGen Cloud. The current version of {{Pkg|xe-guest-utilities}} contains two of these: xe-linux-distribution and xe-daemon.

−

There are three components that need to be enabled in systemd when using a VPS based on Openstack/Xen, such as Rackspace NextGen Cloud. The current version of {{Pkg|xe-guest-utilities}} contains two of these, xe-linux-distribution and xe-daemon.

+

You will need to create a custom service file for the OpenStack nova-agent, as the current version 0.0.1.37 only comes with a sysvinit start-up script.

−

You will need to create a custom service file for the Openstack nova-agent, as the current version 0.0.1.37 only comes with a sysvinit startup script.

+

{{hc|1=/etc/systemd/system/nova-agent.service|2=

−

+

[Unit]

−

/etc/systemd/system/nova-agent.service

+

−

+

−

{{bc|1=[Unit]

+

Description=nova-agent service

Description=nova-agent service

After=xe-daemon.service

After=xe-daemon.service

Line 310:

Line 311:

[Install]

[Install]

WantedBy=multi-user.target}}

WantedBy=multi-user.target}}

−

Once these steps are done you can continue with converting the server from sysvinit to systemd.

+

Once these steps are done, you can continue with converting the server from sysvinit to systemd.

7) Before rebooting, you need to [[pacman|install]] the {{Pkg|makedev}} package by running {{ic|pacman -S makedev}}.

+

7) Before rebooting, you need to [[pacman|install]] the {{Pkg|makedev}} package from the [[Official repositories|official repositories]] by running {{ic|pacman -S makedev}}.

8) Add MAKEDEV to {{ic|/etc/rc.local}}:

8) Add MAKEDEV to {{ic|/etc/rc.local}}:

+

/usr/sbin/MAKEDEV tty

+

/usr/sbin/MAKEDEV pty

−

{{bc|/usr/sbin/MAKEDEV tty

+

9) Edit {{ic|/etc/inittab}}, comment out the following lines; otherwise, you will see errors in {{ic|/var/log/errors.log}}):

−

/usr/sbin/MAKEDEV pty}}

+

#c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux

+

#c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux

+

#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux

+

#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux

+

#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux

+

#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

−

9) Edit {{ic|/etc/inittab}}, comment out the following lines (otherwise you will see errors in {{ic|/var/log/errors.log}}):

+

10) To enable use of the {{ic|hostname}} command, [[pacman|install]] the package {{Pkg|inetutils}} from the [[Official repositories|official repositories]].

−

{{bc|#c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux

+

11) Remove disabling of the SysRq key and setup of core dump pattern because this is blocked by OpenVZ and causes errors.

−

#c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux

+

−

#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux

+

−

#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux

+

−

#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux

+

−

#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux}}

+

−

10) To enable the use of the {{ic|hostname}} command, [[pacman|install]] the package {{Pkg|inetutils}} from the [[Official Repositories|official repositories]].

+

Because sysctl does not use {{ic|/etc/sysctl.conf}} any more[https://www.archlinux.org/news/deprecation-of-etcsysctlconf/], you must transfer all settings to {{ic|/etc/sysctl.d/99-sysctl.conf}} (or any other file in {{ic|/etc/sysctl.d/}}; however, do not transfer the following line:

+

{{bc|1=kernel.sysrq = 0}}

−

11) Remove disabling of SysRq key and setup of core dump pattern since this is blocked by OpenVZ and causes errors

+

Edit {{ic|/usr/lib/sysctl.d/coredump.conf}} and comment out the following line:

−

+

−

Edit {{ic|/etc/sysctl.conf}}, comment out the following line:

+

−

{{bc|1=#kernel.sysrq = 0}}

+

−

+

−

Edit {{ic|/usr/lib/sysctl.d/coredump.conf}}, comment out the following line:

Revision as of 16:47, 16 March 2014

Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.

This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.

Warning: It appears that systemd does not support Linux 2.6.32 since systemd-205. Since many container-based virtualization environments rely on older kernels (the latest OpenVZ runs on a modified RHEL6-2.6.32 for example), it may be impossible to keep an Arch Linux install up to date. Most of the instructions regarding OpenVZ on this page were written for systemd-204 and earlier.

Providers that offer Arch Linux

Warning: We cannot vouch for the honesty or quality of any provider. Please conduct due diligence before ordering.

Note: This list is for providers with a convenient Arch Linux image. Using Arch on other providers is probably possible, but would require loading custom ISOs or disk images or installing under chroot.

Arch available as a selection upon reinstall. Very old (2.6.18-308) kernel - See OpenVZ troubleshooting. Limited information available before purchase. Cannot verify Arch Linux version without purchase.

Installation

KVM

OpenVZ

Updating a 2010.05 installation image

These instructions assume you have a 2010.05 image from your VPS provider and you would like to get it updated. The biggest work involves preparing /lib for the symlink upgrade (glibc 2.16, and later filesystem 2013.01).

Warning: If you are on a older kernel than 2.6.32, please refer further down the page to get the glibc-vps repository working (just add the repository and you can follow these steps).

To start, grab the latest BusyBox from http://busybox.net/downloads/binaries/latest/. This allows you to force glibc (losing /lib temporarily) without losing your OS (BusyBox comes with its own GNU tools which are statically linked).

Note: It is recommended to choose a .service file name that is different from the name of the daemon, because systemd might try to call the LEGACY scripts with the old name.

Enable this service:

systemctl enable newvzquota.service

Remove vzquota from the DAEMONS array in /etc/rc.conf

Repeat this step to remove all daemons from /etc/rc.conf.

7) Removing /etc/rc.local and /etc/rc.local.shutdown

Write custom .service files to replace functionality in /etc/rc.local and /etc/rc.local.shutdown. You can take a look at /usr/lib/systemd/system/rc-local.service and /usr/lib/systemd/system/rc-local-shutdown.service for inspiration.

Converting OpenStack and Xen components to systemd

There are three components that need to be enabled in systemd when using a VPS based on OpenStack/Xen, such as Rackspace NextGen Cloud. The current version of xe-guest-utilities contains two of these: xe-linux-distribution and xe-daemon.

You will need to create a custom service file for the OpenStack nova-agent, as the current version 0.0.1.37 only comes with a sysvinit start-up script.

11) Remove disabling of the SysRq key and setup of core dump pattern because this is blocked by OpenVZ and causes errors.

Because sysctl does not use /etc/sysctl.conf any more[1], you must transfer all settings to /etc/sysctl.d/99-sysctl.conf (or any other file in /etc/sysctl.d/; however, do not transfer the following line:

kernel.sysrq = 0

Edit /usr/lib/sysctl.d/coredump.conf and comment out the following line: