How to setup the server including OS installation, third party software and components installations.
Needed to install Variations:
Perform the following installation steps as root or sudo |
If hostname -i returns the host name, edit /etc/hoststo put the IP and hostname in a separate line entry.
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 129.12.345.67 taishan.dlib.indiana.edu taishan ::1 localhost6.localdomain6 localhost6 |
Create an Network Device for the webserver by creating /etc/sysconfig/network-scripts/ifcfg-eth0:0with this content:
DEVICE=eth0:0 IPADDR=Variations webserver IP address NETMASK=Variations webserver netmask BROADCAST=Variations webserver broadcast address ONBOOT=yes BOOTPROTO=static |
Create a Network Device for the streaming server by creating /etc/sysconfig/network-scripts/ifcfg-eth0:1with this content:
DEVICE=eth0:1 IPADDR=_Darwin streaming IP address NETMASK=Darwin streaming netmask BROADCAST=Darwin streaming broadcast address ONBOOT=yes BOOTPROTO=static |
Variations uses the following ports:
Create /etc/profile.d/java.shwith this content:
export JAVA_HOME=/etc/alternatives/java_sdk export PATH=$JAVA_HOME/bin:$PATH |
Check that your JAVA_HOME location and version matches your installation |
Modify the file $JAVA_HOME/jre/lib/security/java.policy by adding the lines listed below to the grant block. Modify the IP addresses and machine names to those of the machine for your Variations server.These additions are necessary to get the Variations servers to work. For example:
Example IP | Server | Example DNS Name |
---|---|---|
129.79.184.181 | Variations Webserver (device eth0:0) |
|
129.79.184.188 | host machine (device eth0) | Server1.dlib.indiana.edu |
permission java.net.SocketPermission "129.79.184.181:80", "connect,resolve"; permission java.net.SocketPermission "Server1.dlib.indiana.edu", "resolve"; permission java.net.SocketPermission "129.79.184.188:1024-", "connect,accept,resolve"; permission java.util.PropertyPermission "dml.client.url.userguidebase", "read"; permission java.util.PropertyPermission "dml.leaseManager.*", "read"; permission java.util.PropertyPermission "dml.login.loginHandler", "read"; permission java.util.PropertyPermission "user.dir", "read"; permission java.util.PropertyPermission "variations2.dir", "read"; permission java.io.FilePermission "<<ALL FILES>>", "read,execute"; permission java.io.FilePermission "/home/dmlserv/content/-", "read,execute,delete"; permission java.io.FilePermission "/home/dmlserv/log/*", "delete,write"; permission java.io.FilePermission "/home/dmlserv/app/public_html/score-leases/-", "read,execute,delete"; permission java.lang.RuntimePermission "setFactory"; |
Append the following lines to your apache configuration file /etc/httpd/conf/httpd.conf:
# # Variations specific configuration # ScriptAlias /variations/cgi-bin/ "${VARIATIONS_HOME}/app/public_html/cgi-bin/" <Directory "${VARIATIONS_HOME}/app/public_html/cgi-bin"> AllowOverride All Options FollowSymLinks Order allow,deny Allow from all SetEnv VARIATIONS_HOME ${VARIATIONS_HOME} </Directory> Alias /variations/ "${VARIATIONS_HOME}/app/public_html/" <Directory "${VARIATIONS_HOME}/app/public_html"> AllowOverride All Options FollowSymLinks Order allow,deny Allow from all SetEnv VARIATIONS_HOME ${VARIATIONS_HOME} </Directory> |
Set the webserver to listen to the network alias.
In the file /etc/httpd/conf/httpd.conf, change the line:
Listen 80 |
to the line:
|
where your-Variations-webserver-IP-address is the IP you assigned to eth0:0.
Start the server now:
service httpd start
Note that Apache is still listening to :443 on all hosts with this configuration. |
source /etc/profile.d/variations.sh
Variations uses two databases for Metadata and Access Management. Currently Variations is configured to work with MySQL and will require that you set up these databases in the configuration of the Variations server. Linux distributions such as RedHat Enterprise 6 already come with the appropriate version of Mysql. If you are using another Linux distribution you may want to check that it has a compatible version of MySQL or download a more current version. For more information on the Variations database see the Databases page
MySql has internal parameters specifying how long to keep a stale connection before dropping it. For interactive logons this is interactive_timeout and for non-interactive it is wait_timeout. Note that wait_timeout is set from interactive_timeout when the login is interactive. The default setting for these parameters is 8 hours (specified in seconds). After this time, the connection is dropped and cannot be reestablished without restarting the server. To fix this problem set both wait_timeout and interactive_timeout to 24 hours (86,400 seconds) in the MySql configuration file /etc/my.cnf under both the mysqld and mysqld_safesections.
wait_timeout=86400 interactive_timeout=86400 character_set_client=utf8 character_set_server=utf8 default-storage-engine=INNODB |
The default minimum length for words used in fulltext indexes is 4. This means that searches for words less than 4 characters will fail (e.g., "U2" or "Yes"). It is probably a good idea to reset this to 1 in the /etc/my.cnf file under both the mysqld and mysqld_safe sections. Also, MySQL has a default stopword file that excludes certain words from the text index, and it may exclude words that users might reasonably want to search on. Therefore, it may be best to turn this off by setting ft_stopword_file to "". For a list of MySQL default stop words, see http://dev.mysql.com/doc/refman/5.1/en/fulltext-stopwords.html. One can also set ft_stopword_fileto the name of a file that contains a custom list of stop words.
ft_min_word_len=1 ft_stopword_file="" |
Install other needed modules and packages
Note that cpan is an online repository for perl modules and that installing modules from it may occasionally fail due to failed tests. In these situations, you can pass a flag to the cpan command that forces the installation. Your command should then look like |
yum install libxml2-devel
cpan -i XML::LibXML
yum install libxslt-devel
cpan -i XML::LibXSLT
Version 5.5.5 of Darwin Streaming Server is the last version to have a binary build for Linux. Therefore we strongly encourage you to use this version. If you need to install version 6.0.3, then try the instructions here: http://backtogeek.com/2011/09/13/dss-darwin-streaming-server-centos-installer/ |
yum install glibc.i686 libstdc++.i686; ./Install
Darwin Streaming Service is started automatically during the Install.sh script but, if necessary, you can start dss manually by running:
/etc/init.d/dss start
The dss script has five possible actions:
/etc/init.d/dss option
Option | Action |
---|---|
start | Starts the server |
stop | Stops the server |
status | Provides current running status for streaminaadminserver and DarwinStreamingServer |
restart | Does a stop and then a start |
condrestart | If Darwin is running, does a stop and then a start |
reload | Forces Darwin to reread configuration files without disconnecting users |
Configuring Darwin
First, edit /etc/streaming/streamingserver.xmlto bind the streaming server to its assigned IP address:
<PREF NAME="bind_ip_addr" >your streaming IP address</PREF> |
You will need to restart the Darwin Streaming Servers for this change to take effect.
/etc/init.d/dss restart
Point your browser to http://localhost:1220/to access the Darwin management tool.
If you do not have terminal access to this machine and port 1220 is not open, you can try forwarding an X connection through SSH: |
The only settings that need to be changed for Variations are:
If the dmlserv user was created during the first boot process, then also
If the dmlserv user was not created during the first boot process, then
Create /etc/profile.d/variations.sh with this content:
export VARIATIONS_HOME=/home/dmlserv export PATH=$VARIATIONS_HOME/app/bin:$PATH |
Check that your VARIATIONS_HOME matches your install location |
Once VARIATIONS_HOME has been set log out and then back in again and check with echo $VARIATIONS_HOME
. When VARIATIONS_HOME is set properly run the following as root to let SELinux know the proper file contexts for Variations files. Whenever the system performs a relabeling SELinux will use these rules to set the contexts instead of using a default context which would make Variations be blocked by the SELinux policy. You can manually force a relabel using the restorecon command: restorecon -R -v ${VARIATIONS_HOME
}
semanage fcontext -a -t httpd_sys_content_t "${VARIATIONS_HOME}" semanage fcontext -a -t httpd_sys_content_t "${VARIATIONS_HOME}/content(/.*)?" semanage fcontext -a -t httpd_sys_content_t "${VARIATIONS_HOME}/Variations-[^/]*/conf(/.*)?" semanage fcontext -a -t httpd_sys_content_t "${VARIATIONS_HOME}/Variations-[^/]*/data(/.*)?" semanage fcontext -a -t httpd_sys_content_t "${VARIATIONS_HOME}/Variations-[^/]*/public_html(/.*)?" semanage fcontext -a -t httpd_sys_script_exec_t "${VARIATIONS_HOME}/Variations-[^/]*/public_html/cgi-bin(/.*)?" |
You have just finished installing the all of the components needed to install and run the Variations server software. Proceed to the next step and install the Variations Server Software.
Back to the Administrators Guide Home Page