ITeye博客

linux

共 2 篇文章

linux 用户环境变量设置

远程命令执行 报错 : /usr/bin/ssh admin@ip /bin/sh /export/home/tomcat/domains/qone.jd.com/server1/bin/stop.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program 原因远程主机没有对 admin 用户设置环境变量 用户环境变量配置文件地址 : /home/admin/.…

2015-11-03 10:22 · linux

重启 shell脚本

参考 :http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=3602889&page=2 平时在做系统部署时候经常用到重启APP或web 的sh 脚本,但今天写了个脚本如下 : pidlist=`ps -ef|grep jenkins | grep -v "grep"|awk '{print $2}'` echo "jenkins ProcessID List :$pidlist" if [ "$pidlist" = "" ] then echo "no jenkins alive" else for pid in ${pidlist}…

2014-05-26 12:47 · linux · Linux