Configuring DSpace Server from a VMWare OVF Template
I have been doing a lot with VMWare vSphere Client
This is a Quik-N-Dirty how-to on configuring a DSpace Server. Most companies are not going to use a series of DSpace servers, however it is with hope that this will be useful to somebody that I am publishing this document.
I am publishing other documents about the general open-source DSpace project at http://sourcefreedom.com, however this article is mostly about leveraging VMWare to deploy DSpace servers.
If you have done a couple of these, you can probably set up a DSpace server on Ubuntu in something between 6 and 10 hours. In this estimate I am taking into account that you are probably going to be doing some major or minor customization to make the server work for you.
The biggest savings of time in cloning and deploying copies of the same server is that you are saving time installing the pieces you will always want – in my case, that means a backup service client, Ubuntu 10.04 with all the standard repositories active as well as backports, universe and multiverse. None of this is particularly herculean, however it comes out badly when you forget to add something. You can also set up the virtual hardware to be stronger or weaker in vSphere client. Your basic stand-alone DSpace server could have as many as eight processor cores, and up to 16GB of RAM. They don’t all need that much, but it can be changed on the fly in a matter of minutes, rather than days to buy a new piece of server hardware.
- In the vSphere client choose File ? Deploy OVF Template
- In the dialog that opens, choose the Template file you want
- Our Templates are in a set of folders on a network drive:
- This makes it possible for any SysAd in the organization to get to them
- To do this task, you will have to have exported an OVF Template of yourDSPACE server at some point in the past. That is a simple job:
- Shut down the server you want to clone,
- File ? Export OVF Template
- Make sure your computer screensaver and power-savers are off (you don’t want your computer going to sleep during this next step, as you will have to do the whole thing over again).
- Find something useful to do for about 5 hours
Once you have the template, you can bank those 5 hours forever, or at least until you upgrade your server software.
- Choose the DSPACE-TEST-01-standalone-dspace-server template
- open the .ovf file and it will install a new instance of the server.
- Take a 2-hour walk, or work on something else.
- lyrasis@DSPACE-TEST-01:~$ sudo -i
[sudo] password for lyrasis:
- root@DSPACE-TEST-01:~# ifconfig -a
# Find out what ethernet interface is automatically rising.
# In this case – eth2. Not that there is no IP address
eth2 Link encap:Ethernet HWaddr 00:0c:29:db:52:93
inet6 addr: fe80::20c:29ff:fedb:5293/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:2880 (2.8 KB) TX bytes:2178 (2.1 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:1168 (1.1 KB) TX bytes:1168 (1.1 KB)
- root@DSPACE-TEST-01:~# vi /etc/hosts
# Change hostname to new hostname
# Change IP address from the Template’s IP
- root@DSPACE-TEST-01:~# vi /etc/hostname
# Change hostname to new hostname
- root@DSPACE-TEST-01:~# vi /etc/resolv.conf
# Check your DNS nameservers (not necessary if you are putting the machine in the same domain
# the template was made in).
- root@DSPACE-TEST-01:~# vi /etc/network/interfaces
# Change the interface name to the one you discovered doing ifconfig -a and
# Change the IP address to the new IP address
- root@DSPACE-TEST-01:~# vi /dspace/config/dspace.cfg
# Change hostname to either the public IP address, or to the Fully Qualified Domain Name (FQDN)
- root@DSPACE-TEST-01:~# vi /etc/postgresql/9.0/main/postgresql.conf
# the listening address had to be set to “*” to install DSpace
# You may want to change the listen address from “*” to “your_IP_address_for_connection”
- root@DSPACE-TEST-01:~# vi /etc/postgresql/9.0/main/pg_hba.conf
# Adjust the hosts allowed to connect to your PostgreSQL server.
- # If you are starting from a stocked DSpace instance, you may have to drop the database content
- root@LTS-DSPACE-02:~# shutdown -r now
# This is the simplest way I have found to get everything working in tandem – Restart the system.
- root@LTS-DSPACE-02:~# /etc/init.d/postgresql restart
Restarting PostgreSQL 9.0 database server
The PostgreSQL server failed to start. Please check the log output:
# If the issue that follows is:
# 2011-08-22 09:25:59 EDT FATAL: could not create shared memory segment: Invalid argument
# 2011-08-22 09:25:59 EDT DETAIL: Failed system call was
# shmget(key=5432001, size=1110401024, 03600).
# the fix is to make ths kernel.shmmax larger, for instance:
- root@LTS-DSPACE-02:~# sysctl -w kernel.shmmax=1310401024
kernel.shmmax = 1310401024
- # To add a new administrative user to your new dspace:
- root@LTS-DSPACE-02:/dspace/bin# su – tomcat6
- root@LTS-DSPACE-02:/dspace/bin# ./dspace create-administrator
Creating an initial administrator account
E-mail address: firstname.lastname@example.org
First name: Support
Last name: Engineers
WARNING: Password will appear on-screen.
Again to confirm: CheapLinuxTricks
Is the above data correct? (y or n): y
Administrator account created
Now you should be able to log into your web service
Book Mark it-> del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Netscape | Yahoo | BlinkList