I’ve lost count of the number of times that I have installed Ubuntu Server on my VMware vSphere box – so I finally looked in to performing an unattended install.
I could have setup DHCP and TFTP servers and done PXE boot from images over the network – but I wanted to work on something quicker than that (and I don’t have that much spare RAM on my vSphere box as it is).
So I settled on re-mastering an Ubuntu Server .iso image. The result is an unattended install, except for the initial boot screen (where I need to select a minimal virtual machine installation anyway).
The following steps were performed on Ubuntu Desktop.
The -r switch copies directories recursively and -T specifies no (singular) target directory.
Now we have a copy of our Ubuntu .iso to work on in /opt/serveriso – but we need to make these files writable:
sudo chmod -R 777 /opt/serveriso/
With this preparation done we can start customizing things.
If we look at the isolinux/langlist file we see all the supported languages listed that Ubuntu supports (in an abbreviated format):
I am only interested in an English install so I am going to overwrite the contents of isolinux/langlist with the single abbreviation for English, which is “en”.
echo en >isolinux/langlist
This stops the language selection menu from appearing during installation.
The next step of the process is to create a kickstart file – this will provide the server install with the answers to the various questions asked during installation, such as timezone, username, password, partition structure and so on.
Install Kickstart Configurator:
sudo apt-get install system-config-kickstart
Click the Dash button and type kickstart and then click on the kickstart application.
Obviously you should customize your settings as you see fit – I have provided mine for reference.
Click File, Save File and save the kickstart file ks.cfg to /opt/serveriso.
While using the Kickstart Configurator you may have noticed that the Package Selection screen did not work. Fortunately we can manually edit the ks.cfg file so that the packages that we want are installed during Ubuntu Server installation.
At the end of ks.cfg add %packages and then list the packages that you want installed. I chose to install nano, openssh-server and open-vm-tools:
sudo tar xvzf vimp.framework-2.5.4-r19900-community.tar.gz
sudo rm stAuthProvider.php
Next we need to run the data/sql/updates.sql file from the ViMP tarball – make sure that you extract the tarball on your computer so that you can import it to your server.
Note: there are other .sql files in the sql folder but they are only used if you have modules installed etc.
Updates.sql can be run from the command line but I found it easier to use phpmyadmin – which can be installed as follows:
sudo apt-get install phpmyadmin
I selected Apache2 as the webserver to reconfigure and then selected No to configure a database for phpmyadmin. Open a browser and open phpmyadmin on your ViMP server: http:\\<server-ip>\phpmyadmin. Log in with root and your mysql password.
Select the showvid database in the left hand panel and then click the import tab. Click the Browse button and select updates.sql in the data/sql folder. Then click the Go button.
Finally change directory to /var/www/showvid/data and rebuild the ViMP installation:
sudo ./symfony rebuild
sudo ./symfony i18:import
I did get an error when I imported updates.sql but ViMP did successfully upgrade.
This post has been in my drafts folder for about a year as I had an unresolved issue trying to upgrade to ViMP version 2.2x. I finally had time to look at it again today and everything went smoothly – and I can’t remember what I did differently when it was not working. Note that I do not have any modules installed in ViMP and so I am not covering how to upgrade them (see here).
For clarification my system variables are as follows (obviously you may need to change them if yours are different):