首页 > 代码库 > rundeck安装和部署
rundeck安装和部署
网上搜rundeck,安装部署寥寥无几,有的也是copy来copy去真的没意思啊,还不如看官方文档快得多。
所以我把自己部署的整理下:
特别要注意的地方:由于我用的是jdk1.8 所以迟迟不成功,看官方解释:
If you get an error message that resembles the one below, you probably are using an unsupported Java version.
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
所以一定要看官网文档用java的哪个版本
我采用 launcher方法安装过程如下:
Installing with Launcher
Use the launcher as an alternative to a system package:
Download the launcher jar file.
Define RDECK_BASE environment variable to the location of the install
export RDECK_BASE=$HOME/rundeck; # or where you like it
Create the directory for the installation.
mkdir -p $RDECK_BASE
Copy the launcher jar to the installation directory.
cp rundeck-launcher-2.0.0.jar $RDECK_BASE
Change directory and run the jar.
cd $RDECK_BASE
java -jar rundeck-launcher-2.0.0.jarWait for the Started message.
2010-11-19 13:35:51.127::INFO: Started SocketConnector@0.0.0.0:4440
Update your shell environment
PATH=$PATH:$RDECK_BASE/tools/bin
MANPATH=$MANPATH:$RDECK_BASE/docs/man
If you get an error message that resembles the one below, you probably are using an unsupported Java version.
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
See the startup and shutdown section for instructions on using the rundeckd
shell tool to manage the rundeck launcher process.
Launcher Options
The launcher jar can take a number of options to specify how the server should start. If you execute with a "-h" you will see the usage information:
java -jar rundeck-launcher-2.1.0.jar -h
usage: java [JAVA_OPTIONS] -jar rundeck-launcher.jar [-c PATH] [-d] [--installonly] [-s PATH] [-b PATH] [-p PATH] [-h] [-x PATH] [--skipinstall] [--serverdir PATH] [--datadir PATH] Run the rundeck server, installing the necessary components if they do not exist. --skipinstall Skip the extraction of the utilities from the launcher. --installonly Perform installation only and do not start the server. -b,--basedir <PATH> The basedir -c,--configdir <PATH> The location of the configuration. -d Show debug information -h,--help Display this message. -p,--projectdir <PATH> The location of Rundeck‘s project data. -s,--sbindir <PATH> The install directory for the tools used by administrators. -x,--bindir <PATH> The install directory for the tools used by users.
These options can be used to customize the directories used by the launcher. By default all the directories are organized by convention within the current working directory where the launcher jar is located.
System Properties
You can also customize the launcher behavior by using some java system properties.
Specify these properties using the normal -Dproperty=value
commandline options to the java
command:
server.http.port
The HTTP port to use for the server, default "4440"server.https.port
The HTTPS port to use or the server, default "4443"server.http.host
Address/hostname to listen on, default is all addresses "0.0.0.0"server.hostname
Hostname to use for the server, default is the system hostnameserver.web.context
Web context path to use, such as "/rundeck". Default is "/".rdeck.base
Rundeck Basedir to use, default is the directory containing the launcher jarserver.datastore.path
Path to server datastore dirdefault.user.name
Username for default user account to createdefault.user.password
Password for default user account to createrundeck.jaaslogin
"true/false" - if true, enable JAAS login. If false, use the realm.properties file for login information.loginmodule.name
Custom JAAS loginmodule name to useloginmodule.conf.name
Name of a custom JAAS config file, located in the server‘s config dir.rundeck.config.name
Name of a custom rundeck config file, located in the server‘s config dir.rundeck.ssl.config
Path to the SSL config properties file to enable SSL. If not set, SSL is not enabled.
For more information about using SSL, see Configuring Rundeck for SSL.
First-Time Setup
Logins
Rundeck supports a number of user directory configurations. By default, the installation uses a file based directory, but connectivity to LDAP is also available. See Administration - Authentication.
The Rundeck installation process will have defined a set of temporary logins useful during the getting started phase.
user
: Has access to run commands and jobs but unable to modify job definitions. Password: "user"admin
: Belongs to the "admin" group and is automatically granted the "admin" and "user" role privileges. Password: "admin"
Group membership
If you installed Rundeck using the RPM installation method, it will have created a unix group called "rundeck".
$ groups rundeck rundeck : rundeck
It also made several log files writable to members of the "rundeck" group.
$ ls -l /var/log/rundeck/command.log
-rw-rw-r-- 1 rundeck rundeck 588 Dec 2 11:24 /var/log/rundeck/command.log
If you want to use the Rundeck shell tools, be sure to add that group to the necessary user accounts.
Rundeck shell tool users that do not belong to group, rundeck, will get error messages like so:
$ rd-jobs
log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /var/log/rundeck/command.log (Permission denied)
Consult the usermod command to modify a user account.
到此安装完毕:
官方地址如下:http://rundeck.org/docs/administration/index.html
rundeck安装和部署