Table of Contents
Activation of root access
For technical reasons, Gandi AI does not allow you to have total access to the management of your server (see: Connecting to your server with Gandi AI). If you need to have root access, you can activate root access at any time by permanently disabling Gandi AI.
This section explains how to activate root access when you are leaving Gandi AI, and will show you the first few tasks that you may wish to perform when you first take over your server.
The activation process
Activation of root access is done from your server's management interface.
To proceed, simply click on “Disable Gandi AI” in the “System Administration” section:
Define a password for root access and validate:
Connecting to your now-expert server
Once you have activated root access to your server, you can only access your server in expert mode. As you had previously used Gandi AI, here is a summary of how you can access your server as root.
The tool that you need to use to access your server as root is the SSH console. Note, however that the default configuration of the SSH service is such that you cannot directly log in as root, you need to first log in as an intermediary system user.
The account name that was created under Gandi AI is 'admin”. This is the account that you must use to connect to your server via SSH. The 'admin' user uses the password that you specified when you activated root access, and you can connect with this user now.
Once you have connected to your server, you can use a command to open a root shell connection to your server.
For more information, see ssh-console.
Updating your server
Since our Gandi AI hosting solution is based on an older Ubuntu version, you may want to update your distribution to a more recent version. You should choose one that is supported by the Ubuntu community.
By default, the servers used to install software packages for Gandi AI are the Gandi mirror servers on this page.
- To update your distribution, it is necessary to modify the
/etc/apt/sources.list
file so that it uses the repositories of your new distribution. Then you will need to launch the appropriate update command for the distribution you are updating to.
Gandi AI uses an older version of Ubuntu, and so the repositories are in the ones called ubuntu-old
. To upgrade, then, it is therefore necessary to use the repositories of a newer version.
To modify the list of sources used for your server, you need to launch the following:
cd /etc/apt && sudo sed -i "s/ubuntu-old/ubuntu/" sources.list && sudo sed -i "s/gutsy/hardy/" sources.list && sudo aptitude update && sudo aptitude dist-upgrade
This command will modify the “sources” file so that it uses the new repositories of the Hardy distribution.
Once your distribution has been updated, you can reboot your server and continue with the upgrade:
cd /etc/apt && sudo sed -i "s/hardy/jaunty/" sources.list && sudo aptitude update && sudo aptitude dist-upgrade
Likewise, to update the system to Ubuntu 9.04 (“Karmic”), once the upgrade has been completed, you need to reboot your system and launch the following command:
cd /etc/apt && sudo sed -i "s/jaunty/karmic/" sources.list && sudo aptitude update && sudo aptitude dist-upgrade
- At this point in your upgrade, it is necessary to perform the kernel upgrade in order to use the Ubuntu 10.04 distribution (“Lucid Lynx”). This distribution requires some special precautions in order to be correctly installed on your Gandi VPS.
- First, you need to update the sources list so that it matches your new distribution:
cd /etc/apt && sudo sed -i "s/karmic/lucid/" sources.list && sudo aptitude update && sudo aptitude dist-upgrade
- Then, and before you reboot, you need to add the following line to the
/etc/fstab
file in order to mount the peripherals:
sudo echo "dev /dev tmpfs rw 0 0" >> /etc/fstab
- We suggest you make other modifications as well:
- Deactivate the processor frequency manager:
update-rc.d -f ondemand remove
- Comment out the entry that corresponds to
xconsole
in/etc/rsyslog.d/50-default.conf
- Delete (or move) the following files:
/etc/init/hwclock*conf
/etc/init/plymouth*conf
/etc/init/console-setup*conf
/etc/init/ureadahead*conf
Note: If you move the files, do not leave them in a subdirectory of /etc/init/
otherwise they will be run.
- Finally, you may change the version of your kernel, so that you are using 2.6.27 and install the modules that are required for it after rebooting.
Updating your server (by creating a new VPS directly)
Your server is out of date: the operating system is too old and the packages are obsolete. You want to update your system.
Rather than updating with aptitude
or apt-get dist-upgrade
which can lead to time-consuming problems (especially if the version change is too large), we recommend creating a new virtual server in parallel to the old one.
Here is a migration example:
- Lower the TTL of the domain affected by the migration. This will allow you to change the DNS entry to reflect the IP address of the new server at the right moment.
- List the packages installed on your current server:
dpkg -l | awk '{ print $2 }' > malistpackage.txt
, then copy it to the new server, - Reinstall the list of packages as desired
- Copy whatever configuration files you need onto the new server,
- Copy your application data,
- Verify that the services start properly and that everything works as expected,
- If all is running smoothly, change the DNS entry to point to the new server,
- If a problem appears, you can temporarily switch back to the old server at the DNS level for the time it takes to fix the problem
- If everything is still ok after moving into production, you can delete the old server.
The advantages of this method:
- There is no service interruption during th emigration (only a few minutes during the DNS change) whereas a failed update could result in hours of downtime.
- During the migration, you have two parallel servers. This allows you to rollback if something goes wrong.
- The cost of running a server for only a few hours is very low, and you will receive a prorated refund once you've released the extra resources.