Difference between revisions of "Installing CSS"

From GlueXWiki
Jump to: navigation, search
(Compiling CSS Basic with SVN repository enabled)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
These are some notes on installing CSS on my personal notebook running Ubuntu 10.04 LTS. From what I noticed installing on other distros of Linux should not be very  different, but the directory name may vary. 
+
<br/>
 +
== Intro ==
  
 +
* These are some notes on installing CSS on my personal notebook running 32-bit Ubuntu 10.04 LTS. Installing on other distros of Linux should not be very  different, but the directory name may vary.
 +
* There are more than version of CSS suite which can be downloaded. Some of them configured in pretty sophisticated ways requiring different packages.
 +
* The simplest way to run CSS is to download either CSS Basic EPICS,  CSS Office from SNS,  or CSS Island from DESY. These three versions easily connect to the EPICS PVs served through channel access. I also tried CSS NSLS2, and it connects to CA as well.
 +
* SNS Control room only provides source, and I did not want to get into building it. CSS DESY version did not work, it would start a small second screen and never went forward.
 +
* Since CSS is eclipse-based, you need to install <i>eclipse-sdk</i> package. You may also have to install <i>java-1.6.0-sun</i> package.
  
 +
<br/>
  
== Installing LDAP ==
+
== CSS Basic EPICS Binary Installation ==  
  
I followed the instruction from the various web sites, mainly from http://ubuntuforums.org/showthread.php?p=8161118 and http://ubuntuforums.org/showthread.php?t=1054966. I set the LDAP password directly modifying <i>/etc/ldap/slapd.d/cn=config/olcDatabase={0}config.ldif</i> file setting <b>olcRootPW: </b> key. I had a hard time figuring out how to change the LDAP password or access config database without password.  
+
* Download the zip-file of the binaries from http://ics-web.sns.ornl.gov/css/products.html, copy it to the desired directory ( I copied to  /usr/local/epics/extensions/) and unzip it.
 +
* Go into the new directory and run the <i>css</i> executable.
 +
* In <b>CSS->Preferences->CSS Core->EPICS</b> configure CA address list, and restart CSS. After this CSS will connect to PVs served over CAs.
 +
* To use the Hall D share Workspace area one would need to take the following steps:
 +
# Start CSS
 +
# in the Navigator window do RightClick->NewProject, and select <b>General->Project->Next</b> and call a new project Hall-D and click <b>Finish</b>.
 +
# In the Navigator window <b>RightClick->Hall-D->Other</b>, select <b>General->Folder->Next</b>. Then click on <b>Advanced</b> button where check  the <b>Link to alternate location (Linked Folder</b> radio-button. Then click on the <b>Browse</b> button and select the directory to use as shared workspace (<i>/group/halld/Online/controls/epics/css/Default</i>), and click on <b>Finish</b> button. In  a couple of seconds the Dafault Hall D CSS projects will show up in the Navigator under <b>Hall-D->Default</b> .
 +
 
 +
== CSS Island Binary Installation==
 +
 
 +
* Download the zip-file from http://css.desy.de/content/e413/e2597/index_eng.html, copy it to the desired directory and unzip it.
 +
* Go into the new directory and run the <i>cssIskand</i> executable.
 +
* In CSS->Preferences->CSS Core->EPICS configure CA address list, and restart CSS. After this CSS will connect to PVs served over CAs.
 +
 
 +
== Compiling CSS Basic with SVN repository enabled ==
 +
* Download the zip-file with the SNS source snapshot from http://ics-web.sns.ornl.gov/css/products.html, copy it to the desired directory ( I copied to /home/hovanes/CSS/source) and unzip it, name it appropriately.
 +
* Install Eclipse RCP from [Eclipse website http://www.eclipse.org/downloads/].
 +
*: Do not try to use the Eclipse installation that came with Linux, even if it includes RCP.
 +
*: Make sure you are using the same Eclipse version that the version of the SNS CSS you are drying to recompile yourself. They should match, otherwise there might be problems compiling the code.
 +
* Install Subversive plugins into Eclipse.
 +
*: Note that while installing the eclipse plugins, one may need to assign the right proxy if behind JLab firewall. It is in <i>Windows->Properties->General->NetworkConnections</i>, select "Manual" provider and in the HTTP schema add <b>jprox</b> as host and <b>8082</b> as the port number.
 +
* Open Eclipse RCP and import the source code of the SNS into the workspace. Wait for the workspace to get built.
 +
* Open <i>/org.csstudio.basic.epics.product/CSS.product</i> product file in the package list, go to the <b>Dependencies</b> tab and add the follwing features.
 +
<pre>
 +
org.eclipse.team.svn
 +
org.polarion.eclipse.team.svn.connector
 +
org.polarion.eclipse.team.svn.connector.javahl16
 +
org.csstudio.sns.feature.repository.cvs
 +
org.eclipse.cvs
 +
org.csstudio.trends.databrowser2.feature
 +
</pre>
 +
: Some of these features may not be necessary for the SVN plugin, but they wold not hurt either.
 +
* Go back to the <b>Overview</b> tab, synchronize, try to launch Eclipse application. If successful, build the code using the export wizard.
 +
*: While exporting uncheck "Generate metadata repository" option.
 +
*: You will need to specify the destination directory and the root directory. The product file with be called tha same way as the root directory.
 +
 
 +
== Compiling CSS Basic with BEAST enabled and dummy authorization ==
 +
* Make sure you completed steps in [[Installing_CSS#Compiling_CSS_Basic_with_SVN_repository_enabled]].
 +
* Go to <b>SVN Repository Exploration</b> perspective and add repository location <i>https://halldsvn.jlab.org/repos/trunk/controls/css/src/</i>.
 +
* Check out <i>org.csstudio.sns.feature.jlabcore</i> feature from the Hall D repository into the workspace.
 +
* Go back to the <b>Plugin Development</b> perspective and into the <b>Overview</b> tab of the <i>org.csstudio.sns.feature.jlabcore.feature.xml</i> file. The synchronize and export the plugin feature.
 +
* In the dependencies of <i>org.csstudio.basic.epics.product/CSS.product</i> add <i>org.csstudio.sns.feature.jlabcore</i> and <i>org.csstudio.alarm.beast.ui.feature</i>.
 +
* Synchronize and launch and Eclipse application. If succesfull, export the application using the Export Wizard.
 +
* Launch the newly build executable. To be able to use the dummy authorization, go to <i>Edit->Preferences->CSS Core->JAAS Authentication</i>, select <b>File</b> login configuration source, and change the configuration file entry to <b>Dummy</b>.
 +
* Restart CSS.
 +
<br/>
 +
 
 +
== Some other packages that are not needed for a simple configuration ==
 +
 
 +
These are items that we may need to install for a more complete and sophisticate setup with ChannelFinder etc. These were not needed in order to simply start CSS and to connect to ChannelAccess.
 +
 
 +
=== Installing MySQL ===
 +
 
 +
* Install <i>mysql-server</i> package from the distribution repository.
 +
* If there is a need to reset the MySQL root password, do as follows:
 +
<pre>
 +
sudo /etc/init.d/mysql stop
 +
sudo mysqld --skip-grant-tables &
 +
mysql -u root mysql
 +
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
 +
</pre>
 +
* After changing the MySQL password restart MySQL server
 +
 
 +
=== Installing LDAP ===
 +
 
 +
I followed the instruction from the various web sites, mainly from http://ubuntuforums.org/showthread.php?p=8161118,  https://lists.ubuntu.com/archives/ubuntu-server/2009-August/003182.html and http://ubuntuforums.org/showthread.php?t=1054966. I set the LDAP password directly modifying <i>/etc/ldap/slapd.d/cn=config/olcDatabase={0}config.ldif</i> file setting <b>olcRootPW: </b> key. I had a hard time figuring out how to change the LDAP password or access config database without password.  
 
* Install LDAP server <pre>sudo apt-get install slapd ldap-utils</pre>
 
* Install LDAP server <pre>sudo apt-get install slapd ldap-utils</pre>
 
* Run the following command to add all the LDAP schemas in the slapd package to your cn=config (by default only core is added):<pre>ls /etc/ldap/schema/*.ldif | xargs -I {} sudo ldapadd -Y EXTERNAL -H ldapi:/// -f {}</pre>
 
* Run the following command to add all the LDAP schemas in the slapd package to your cn=config (by default only core is added):<pre>ls /etc/ldap/schema/*.ldif | xargs -I {} sudo ldapadd -Y EXTERNAL -H ldapi:/// -f {}</pre>
* Create a database the LDAP server. Note that Karmic uses the EXTERNAL SASL binding to communicate with the LDAP server. There is no admin user or password here: <pre>sudo ldapadd -Y EXTERNAL -H ldapi:/// -f db.ldif</pre>
+
* As an example create a database the LDAP server. Note that Karmic uses the EXTERNAL SASL binding to communicate with the LDAP server. There is no admin user or password here: <pre>sudo ldapadd -Y EXTERNAL -H ldapi:/// -f db.ldif</pre>
 
* Add people to database we just created. Since we have created our own access control lists for the dc=home,dc=local database, we must change the binding method (i.e. auth with the admin user and password). Add the data for the directory via the following command: <pre>sudo ldapadd -x -D cn=admin,dc=home,dc=local -w admin -f people.ldif</pre>
 
* Add people to database we just created. Since we have created our own access control lists for the dc=home,dc=local database, we must change the binding method (i.e. auth with the admin user and password). Add the data for the directory via the following command: <pre>sudo ldapadd -x -D cn=admin,dc=home,dc=local -w admin -f people.ldif</pre>
 
* Check to see if you can read the database: <pre>ldapsearch -x -b dc=home,dc=local</pre>
 
* Check to see if you can read the database: <pre>ldapsearch -x -b dc=home,dc=local</pre>
  
 
+
=== Installing GlassFish ===
 
+
== Installing GlassFish ==
+
  
 
* Follow the instructions from http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu to download install GlassFish on Ubuntu.
 
* Follow the instructions from http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu to download install GlassFish on Ubuntu.
Line 20: Line 90:
 
* I also did not uninstall openjdk, although I did have sun-java6 as well.
 
* I also did not uninstall openjdk, although I did have sun-java6 as well.
  
 
+
=== Installing ChannelFinder ===
 
+
 
+
== Installing ChannelFinder ==
+
  
 
* Download ChannelFinder from http://channelfinder.sourceforge.net/ChannelFinder/download.html
 
* Download ChannelFinder from http://channelfinder.sourceforge.net/ChannelFinder/download.html

Latest revision as of 11:19, 18 June 2013


Intro

  • These are some notes on installing CSS on my personal notebook running 32-bit Ubuntu 10.04 LTS. Installing on other distros of Linux should not be very different, but the directory name may vary.
  • There are more than version of CSS suite which can be downloaded. Some of them configured in pretty sophisticated ways requiring different packages.
  • The simplest way to run CSS is to download either CSS Basic EPICS, CSS Office from SNS, or CSS Island from DESY. These three versions easily connect to the EPICS PVs served through channel access. I also tried CSS NSLS2, and it connects to CA as well.
  • SNS Control room only provides source, and I did not want to get into building it. CSS DESY version did not work, it would start a small second screen and never went forward.
  • Since CSS is eclipse-based, you need to install eclipse-sdk package. You may also have to install java-1.6.0-sun package.


CSS Basic EPICS Binary Installation

  • Download the zip-file of the binaries from http://ics-web.sns.ornl.gov/css/products.html, copy it to the desired directory ( I copied to /usr/local/epics/extensions/) and unzip it.
  • Go into the new directory and run the css executable.
  • In CSS->Preferences->CSS Core->EPICS configure CA address list, and restart CSS. After this CSS will connect to PVs served over CAs.
  • To use the Hall D share Workspace area one would need to take the following steps:
  1. Start CSS
  2. in the Navigator window do RightClick->NewProject, and select General->Project->Next and call a new project Hall-D and click Finish.
  3. In the Navigator window RightClick->Hall-D->Other, select General->Folder->Next. Then click on Advanced button where check the Link to alternate location (Linked Folder radio-button. Then click on the Browse button and select the directory to use as shared workspace (/group/halld/Online/controls/epics/css/Default), and click on Finish button. In a couple of seconds the Dafault Hall D CSS projects will show up in the Navigator under Hall-D->Default .

CSS Island Binary Installation

  • Download the zip-file from http://css.desy.de/content/e413/e2597/index_eng.html, copy it to the desired directory and unzip it.
  • Go into the new directory and run the cssIskand executable.
  • In CSS->Preferences->CSS Core->EPICS configure CA address list, and restart CSS. After this CSS will connect to PVs served over CAs.

Compiling CSS Basic with SVN repository enabled

  • Download the zip-file with the SNS source snapshot from http://ics-web.sns.ornl.gov/css/products.html, copy it to the desired directory ( I copied to /home/hovanes/CSS/source) and unzip it, name it appropriately.
  • Install Eclipse RCP from [Eclipse website http://www.eclipse.org/downloads/].
    Do not try to use the Eclipse installation that came with Linux, even if it includes RCP.
    Make sure you are using the same Eclipse version that the version of the SNS CSS you are drying to recompile yourself. They should match, otherwise there might be problems compiling the code.
  • Install Subversive plugins into Eclipse.
    Note that while installing the eclipse plugins, one may need to assign the right proxy if behind JLab firewall. It is in Windows->Properties->General->NetworkConnections, select "Manual" provider and in the HTTP schema add jprox as host and 8082 as the port number.
  • Open Eclipse RCP and import the source code of the SNS into the workspace. Wait for the workspace to get built.
  • Open /org.csstudio.basic.epics.product/CSS.product product file in the package list, go to the Dependencies tab and add the follwing features.
org.eclipse.team.svn
org.polarion.eclipse.team.svn.connector
org.polarion.eclipse.team.svn.connector.javahl16
org.csstudio.sns.feature.repository.cvs
org.eclipse.cvs
org.csstudio.trends.databrowser2.feature
Some of these features may not be necessary for the SVN plugin, but they wold not hurt either.
  • Go back to the Overview tab, synchronize, try to launch Eclipse application. If successful, build the code using the export wizard.
    While exporting uncheck "Generate metadata repository" option.
    You will need to specify the destination directory and the root directory. The product file with be called tha same way as the root directory.

Compiling CSS Basic with BEAST enabled and dummy authorization

  • Make sure you completed steps in Installing_CSS#Compiling_CSS_Basic_with_SVN_repository_enabled.
  • Go to SVN Repository Exploration perspective and add repository location https://halldsvn.jlab.org/repos/trunk/controls/css/src/.
  • Check out org.csstudio.sns.feature.jlabcore feature from the Hall D repository into the workspace.
  • Go back to the Plugin Development perspective and into the Overview tab of the org.csstudio.sns.feature.jlabcore.feature.xml file. The synchronize and export the plugin feature.
  • In the dependencies of org.csstudio.basic.epics.product/CSS.product add org.csstudio.sns.feature.jlabcore and org.csstudio.alarm.beast.ui.feature.
  • Synchronize and launch and Eclipse application. If succesfull, export the application using the Export Wizard.
  • Launch the newly build executable. To be able to use the dummy authorization, go to Edit->Preferences->CSS Core->JAAS Authentication, select File login configuration source, and change the configuration file entry to Dummy.
  • Restart CSS.


Some other packages that are not needed for a simple configuration

These are items that we may need to install for a more complete and sophisticate setup with ChannelFinder etc. These were not needed in order to simply start CSS and to connect to ChannelAccess.

Installing MySQL

  • Install mysql-server package from the distribution repository.
  • If there is a need to reset the MySQL root password, do as follows:
sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
  • After changing the MySQL password restart MySQL server

Installing LDAP

I followed the instruction from the various web sites, mainly from http://ubuntuforums.org/showthread.php?p=8161118, https://lists.ubuntu.com/archives/ubuntu-server/2009-August/003182.html and http://ubuntuforums.org/showthread.php?t=1054966. I set the LDAP password directly modifying /etc/ldap/slapd.d/cn=config/olcDatabase={0}config.ldif file setting olcRootPW: key. I had a hard time figuring out how to change the LDAP password or access config database without password.

  • Install LDAP server
    sudo apt-get install slapd ldap-utils
  • Run the following command to add all the LDAP schemas in the slapd package to your cn=config (by default only core is added):
    ls /etc/ldap/schema/*.ldif | xargs -I {} sudo ldapadd -Y EXTERNAL -H ldapi:/// -f {}
  • As an example create a database the LDAP server. Note that Karmic uses the EXTERNAL SASL binding to communicate with the LDAP server. There is no admin user or password here:
    sudo ldapadd -Y EXTERNAL -H ldapi:/// -f db.ldif
  • Add people to database we just created. Since we have created our own access control lists for the dc=home,dc=local database, we must change the binding method (i.e. auth with the admin user and password). Add the data for the directory via the following command:
    sudo ldapadd -x -D cn=admin,dc=home,dc=local -w admin -f people.ldif
  • Check to see if you can read the database:
    ldapsearch -x -b dc=home,dc=local

Installing GlassFish

  • Follow the instructions from http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu to download install GlassFish on Ubuntu.
  • I skipped the part on security part dealing with iptables, probably it can be configured later. You will be able to start (and stop) GlassFish using
    /home/glassfish/bin/asadmin start-domain domain1
  • I also did not uninstall openjdk, although I did have sun-java6 as well.

Installing ChannelFinder