#!/bin/bash

user=root
host=bdcv29
#安装rundeck,使用root用户
scp rundeck-launcher-2.6.9.jar $host:/home/$user;
ssh -t -p 22 $host "
sudo su
cd /opt
mkdir /opt/rundeck
cp -r /home/$user/rundeck-launcher-2.6.9.jar /opt/rundeck
chown -R root:root /opt/rundeck
java -XX:MaxPermSize=256m -Xmx1024m -jar /opt/rundeck/rundeck-launcher-2.6.9.jar
#sudo sh -c 'echo "export RDECK_BASE=/opt/rundeck" /etc/profile '
echo "export RDECK_BASE=/opt/rundeck" >> /etc/profile
source /etc/profile
sh /opt/rundeck/server/sbin/rundeckd restart

"

 

posted on 2017-04-10 19:47  流浪在伯纳乌  阅读(271)  评论(0编辑  收藏  举报