Share » Learn » eZ Publish » Running eZ Publish daemons in shared...

Running eZ Publish daemons in shared virtual hosting environment

Wednesday 16 March 2011 3:51:46 am

  • Currently 4 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Step by step

To setup the Solr and OpenOffice conversion server as daemons follow these step by step instructions.

 

Install pre-requisites

Install the usual pre-quisites for Solr and OpenOffice conversion daemons that are described in their respective documentations.

Note: There's a way for setting up and running OpenOffice and our OpenOffice conversion server without installing an XWindows Server on the server. It's described later in the "Tweaks" section of this tutorial.

 

Create a user for starting daemons and Install OpenOffice conversion macro

Create a new user with a shell access (let's call it ezdaemon), or ask your server admin to do it.

Install the needed conversion macro for ezdaemon user. The instructions for installation of the macro can be found here: http://doc.ez.no/Extensions/ODF-Import-Export/eZODF-extension

Note: If you didn't install an XWindows Server you can still install the conversion macro using the OpenOffice shared user install. This install requires root acces so you should ask your server administrator to do it. The documentation can be found here:

http://wiki.services.openoffice.org/wiki/Documentation/Administration_Guide/Using_Package_Manager (section: "To Add an Extension for All Users ")

 

Extract the eZP installation and set file permissions

In the home folder of ezdaemon user unpack the eZP installation to the “ezpublish” subfolder. You don't have to run the web based eZP setup wizard, we only need this to get the servers in ezfind and ezodf extensions.

Note that the versions of this two extensions unpacked here must match (or be compatible with) the versions of the same extensions used in all of your eZP installations.

In order for the Solr server to work you should give the “nobody” user read and write permissions to the folder “extension/ezfind/java/solr/data” (and its subfolders) inside the extracted “ezpublish” folder. It's needed because this is the place where the Solr server will write its index files.

Note: In a normal situation when we are not in shared virtual hosting environment, and we have root access, the solr data folder should be moved to a global system location. However in our case leaving it in this “dummy” eZP installation is a better solution because you can change the configuration files and upgrade the ezfind extension without having to bug the system administrator.

 

Create the startup scripts

Create the scripts for starting the daemons as the user your web server is running as. Let's say it is "nobody" user. I have started from the RHEL script that comes with the ezfind extension, and modified it to suit this specific needs. I've attached the full scripts along with this tutorial.

 

Install the scripts as daemons

Ask your server admin to install your scripts as daemons. If running RHEL or similar OS, just put the scripts in the "/etc/init.d/" folder.
Also, ask the server admin to give the user ezdaemon sudo privileges for this two scripts.

 

Run the daemons

Run the daemons using the startup script. For example like this:

sudo /etc/init.d/ezodf start
sudo /etc/init.d/solr start
 

Prior to running them make sure that the needed ports are open on the server (the ports are described in the docs for both servers).

 

Setup the extensions

Setup the ezfind and ezodf extensions in your eZP installations as described in the docs. Once the daemons started and working it should not take more than 5-10 minutes to set it up for each eZP installation.

 
36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)