[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

¡Esta es una revisión vieja del documento!


En proceso de traducción. Victor

Instale Slackware en un CloudVPS por ArubaCloud

ArubaCloud ofrece excelentes servicios de VPS de bajo costo, desde 1 € / mes/ (al menos cuando se creó este artículo, febrero de 2018, consulte las limitaciones de ArubaCloud) . Este artículo hace referencia a la instalación de Slackware en CloudVPS servicio de alojamiento, que se basa en el hipervisor de virtualización VMware y utiliza varias plantillas de sistema operativo, y Slackware no se encuentra entre ellas. Como servicio de bajo costo, la instalación personalizada del sistema operativo y la administración con VMware Client no están disponibles. Puede solicitar una prueba gratuita aquí.

Esta guía no cubre Cloud Pro u otros servicios de ArubaCloud , ya que estos servicios pueden ofrecer herramientas adicionales que hacen que esta guía sea innecesaria. Alternativamente, esta guía puede usarse para otros servicios similares.

Requisitos previos

Suponiendo que desea un servidor Slackware alojado en ArubaCloud, esto es lo que necesita:

  • Cuenta ArubaCloud
  • Crédito suficiente para crear el CloudVPS que deseas.
  • un espacio de alojamiento FTP con varios GB de espacio disponible y velocidad razonable.
  • VMware Player en su computadora y al menos tanto espacio libre como el disco duro virtual de CloudVPS

Inicialización

Una vez que obtenga su cupón de prueba gratuito o haya adquirido un crédito, puede seguir la interfaz web de ArubaCloud para crear el CloudVPS de su elección. Con el cupón de prueba gratuito puede obtener 2 meses de prueba gratuita para CloudVPS Small ( 1xCPU, 1GB RAM, 1xETH, 20GB HDD, 2 TB de tráfico/mes ).

  1. Cargar crédito en su cuenta (vale de prueba gratuito o crédito de compra)
  2. crear VPS basado en una plantilla de sistema operativo predefinida

Esta guía se ha escrito utilizando una plantilla Ubuntu Server 14.04 LTS 64bit .

Recopilación de información

Tener el VPS en funcionamiento y, luego de recibir sus credenciales de acceso, primero escriba información clave:

  • HDD tamaño y diseño
  • IP pública (del VPS), incluida la máscara de red, la puerta de enlace

Preparaciones

Inicie sesión en el CloudVPS utilizando SSH.

Mostrar IP y máscara de red (escribirlo):

ip addr list

Mostrar puerta de enlace predeterminada (escribirlo):

ip route list

Mostrar los servidores de nombres (escribirlo):

cat /etc/resolv.conf

Mostrar diseño del disco (anote el tamaño total del disco en bloques):

fdisk -l /dev/sda

Instala el paquete ncftp :

apt-get install ncftp

Optimice el disco sobrescribiendo todo el espacio libre con ceros (ayuda con la compresión):

dd if=/dev/zero of=/ZERO bs=1M; rm /ZERO

Exportar una imagen del servidor creado por Aruba

Este paso es opcional. Le familiarizará con la operación de transferencia, pondrá a prueba su conexión y el almacenamiento de la cuenta FTP, pero no es obligatorio.

Realízalo si quieres jugar en casa con el servidor generado por Aruba.

Aruba tiene instalaciones de sistema operativo predefinidas como plantillas, y dicha plantilla se implementa en su VPS al crearse. Se personaliza con la dirección IP, el nombre de host y se le proporciona una contraseña generada automáticamente.

Asegúrese de tener suficiente espacio libre en su cuenta FTP. Esto tomará varios GB de datos.

cat /dev/sda | bzip2 | ncftpput -u USERNAME -p PASSWORD -c FTP_SERVER_ADDRESS /path/to/aruba_image_file.bz2
Esto puede llevar un tiempo, incluso horas, dependiendo del ancho de banda disponible entre el centro de datos de Aruba y su servidor FTP.

Es un truco bastante sucio, pero funciona. La plantilla solo contiene una instalación básica con servicios mínimos en ejecución. Puede verificar y ver si hay algún daemon de fondo que pueda escribir mucho en el disco y detenerlo, pero aparte de algunas entradas de registro, no hay nada que valga la pena mencionar.

¡Asegúrese de que el proceso finalice sin errores antes de continuar!

Puede usar esta imagen para realizar pruebas en su VMware Player local, y también como prueba para la transferencia de FTP. Necesita un Live CD de Linux o una máquina virtual en ejecución con un Linux instalado que incluya el paquete ncftp y una unidad de disco duro virtual separada para llenar con la imagen.

Slackware virtual machine

Create your own, local, virtual machine with VMware Player.

  • Start Vmware Player
  • Create new virtual machine
  • “I will install the operating system later”
  • Choose “Linux” and “Other Linux 3/4.x 64bit”
  • Name it (ie. aruba_slack)
  • Maximum disk size: same as VPS HDD size (in GB); store as single file
  • proceed to finish.

Modify the virtual machine you just created as follows:

  • Memory = 1GB
  • Processors = 1 core
  • CD/DVD = use ISO image (select slackware64-14.2-install-dvd.iso locally), connected at power-on
  • Network adapter = NAT, connected at power-on
  • Sound card = REMOVE
  • Printer = REMOVE

Start the virtual machine.

  • Enter the console (click in the VM display area)
  • Proceed to install Slackware as you would on a physical server with the same characteristics of your cloud server. There are no exotic hardware or settings.
For example, you could use a single partition for both system and data, and a small partition (ie. 1-4GB) for swap. Or you could use about a partition for the system, a partition for swap, a partition for data. Your choice.
For a server installation you might want to skip KDE, T, TCL, X, XAP, XFCE package series
After you finish your installation I strongly recommend you add your SSH public key for the root user for remote access. Follow this How to use SSH keys to connect without a password. Either use the Virtual Machine's console, or ssh from your local machine to do it. Note: you may want to temporarily allow root login via SSH into the Virtual Machine, but remember to restore the default config afterwards.
You are running locally, with the machine behind a NAT router (done by VMware Player) with regards to the internet. You have connectivity, but it is different then the one you'll have at Aruba.

During the configuration phase, assign the proper hostname, but set it to obtain IP address via DHCP.

After the first start of your fresh Slackware installation, you should set up slackpkg and perform an update.

I'll leave additional software for later, to minimize the data transfer.

Exporting Slackware VM image

Make sure you have enough free space in your FTP account. This will take up several GB of data.

In your Slackware virtual machine:

  • Stop all unneccesary services (inetd,sendmail,saslauthd,ntpd,httpd,sshd,syslog, etc)
  • Optimize disk by overwriting all free space with zeros (helps with compression, the resulting image, as described here will be about 1.5GB):
dd if=/dev/zero of=/ZERO bs=1M; rm /ZERO
  • Export disk image
cat /dev/sda | bzip2 | ncftpput -u USERNAME -p PASSWORD -c FTP_SERVER_ADDRESS /path/to/aruba_slack_image_file.bz2
This may take a while, even hours, depending on the available bandwidth between your computer and the FTP server.

It is a rather dirty trick, but it works.

Make sure the process finishes without error before proceeding!

Importing Slackware VM image into ArubaCloud

With the above step completed without error, you can proceed to inject the image into the ArubaCloud VPS.

  • Log in to your ArubaCloud Control Panel.
  • Go to “Cloud servers” → Management
  • If your VPS is turned off, turn it on and wait until startup is completed (see progress indicator)
  • Under “Actions”, select “Manage → Sign in”
  • Open the recovery console. You'll get to see your server's console.
  • log in to your server, as root
  • ALTERNATELY you could ssh into it. Also use this method if you encounter problems with recovery console key-mappings.
  • check running processes and stop any unnecessary daemons (cron, acpid, atd, fail2ban, rsyslog, open-vm-tools)
  • you must also disable swap memory.
  • run the following command:
ncftpget -u USERNAME -p PASSWORD -c FTP_SERVER_ADDRESS /path/to/aruba_slack_image_file.bz2 | bzip2 -d > /dev/sda
This may take a while, even hours, depending on the available bandwidth between Aruba's datacenter and your FTP server. At the end of the transfer, ncftpget will report the number of bytes transfered and speed. Make sure “bytes transfered” is exactly equal to the size of the compressed image (see your FTP account). You may get a “Segmentation fault” after the end of the transfer. This is acceptable and expactable.
Make sure the process finishes without error before proceeding!

IMMEDIATELY after it finished successfully:

  • Go to “Cloud servers” → Management
  • Under “Actions”, select “Manage → Force switch off”
Very important: just “switch off” will try to perform a normal shutdown procedure, which won't work properly and might even damage the disk data you injected.

Start your Slackware ArubaCloud server:

  • Go to “Cloud servers” → Management
  • Under “Actions”, select “Manage → Switch on”
  • wait for it to start
  • Under “Actions”, select “Manage → Sign in”
  • Open the recovery console. You'll get to see your server's console.
  • log in to your server, as root
  • run netconfig to set up the network according to ArubaCloud IP settings (your wrote them down earlier)
  • just to make sure everything works properly, reboot your machine.
  • restart the recovery console after reboot
  • check that everything is ok
  • check that you can log in remotely
Slackware default configuration won't allow remote root login without SSH key, so take the appropriate steps to ensure your remote access.

Now you have a running Slackware64-14.2 in an ArubaClould VPS.

Additional configuration

Since it runs under VMware hypervisor, it is useful to have the VMware-tools installed. I recommend you install the open-source version from Slackbuilds: open-vm-tools.

After your install the package and start the tools, you can verify that it works properly by:

  • Go to “Cloud servers” → Management
  • Under “Actions”, select “Manage → Switch off”

This is the normal shutdown procedure initiated at the request of the hypervisor, received by open-vm-tools and performed in the guest OS to obtain a clean system shutdown.

The “Force switch off” is equivalent to pressing the power button on a physical computer.

Enjoy your Slackware VPS!

References

Sources

 es:howtos:slackware_admin:slackware-arubacloud ()
Esta traducción es más antigua que la página original y podría estar obsoleta. Ver lo que ha cambiado.