selenium-grid-init
所属分类:前端开发
开发工具:Shell
文件大小:5KB
下载次数:0
上传日期:2016-02-01 11:45:04
上 传 者:
sh-1993
说明: 一对简单的init脚本,用于将Selenium Grid作为中心或节点服务器实例运行。
(A pair of simple init scripts to run Selenium Grid as Hub or Node server instances.)
文件列表:
LICENSE (555, 2014-10-07)
conf.d (0, 2014-10-07)
conf.d\hub.json (557, 2014-10-07)
conf.d\node.json (606, 2014-10-07)
default (0, 2014-10-07)
default\selenium (884, 2014-10-07)
init.d (0, 2014-10-07)
init.d\selenium (1439, 2014-10-07)
init.d\selenium-hub (481, 2014-10-07)
init.d\selenium-node (482, 2014-10-07)
# Selenium Grid Init Scripts
A pair of simple init scripts to run Selenium Grid as Hub or Node server instances.
You can find [another similar project](https://github.com/feniix/selenium-grid-startup) that predates this one and provides a more complicated init script.
I needed to implement the scripts and arrange the files in a different way, hence this mini-project emerged.
Default configuration defines standard locations for hub and node configs, logs and pid files.
The daemon runs under `selenium` user.
The service configuration can be changed in `/etc/default/selenium`.
To run Selenium server a JRE must be installed:
either `openjdk-7-jre`
or [`oracle-java7-jre`](http://webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html).
This setup was tested on Ubuntu 12.04 and 13.10 with JRE7.
## Installation
Create the user and necessary directories:
```bash
useradd -r -b /opt -s /usr/sbin/nologin selenium
mkdir /opt/selenium
mkdir /var/log/selenium
mkdir /var/run/selenium
chown selenium:selenium /var/run/selenium /var/run/selenium
```
Download Selenium Server jar file:
```bash
SELENIUM_VERSION="2.35.0"
cd /opt/selenium/
wget https://selenium.googlecode.com/files/selenium-server-standalone-$SELENIUM_VERSION.jar
ln -sfn selenium-server-standalone-$SELENIUM_VERSION.jar server-standalone.jar
```
Clone the repository and create necessary symlinks (or copy the files):
```bash
git clone https://github.com/esycat/selenium-grid-init.git /var/lib/selenium
ln -s /var/lib/selenium/conf.d/ /etc/selenium
ln -s /var/lib/selenium/init.d/* /etc/init.d/
ln -s /var/lib/selenium/default/* /etc/default/
```
To start and stop Selenium Hub and/or Node daemons:
```bash
service selenium-hub start
service selenium-node start
```
To setup the service to run automatically on server bootup:
```bash
sudo update-rc.d selenium-hub defaults
```
近期下载者:
相关文件:
收藏者: