1 Star 1 Fork 23

涩女郎/Auto_Install_console

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
java.py 978 Bytes
一键复制 编辑 原始数据 按行查看 历史
awakenjoys 提交于 2014-03-04 18:33 . test
# -*- coding:utf8 -*-
from core import *
#----------------------------------------------------------------------------------------
#Java安装
def Install_Java(server, port, username, password, start_area, end_area):
global softs_path
cmds = []
cmd = "mkdir -p /data/kuen_ops"
cmds.append(cmd)
cmd = "mkdir -p /usr/local/services"
cmds.append(cmd)
print execute(server, port, username, password, cmds)
localfile = softs_path + "/jdk-7u40-linux-x64.gz"
remotefile = "/data/kuen_ops/jdk-7u40-linux-x64.gz" #create it
print localfile, remotefile
print upload(server, port, username, password, localfile, remotefile)
cmd_tar = "tar -xvf /data/kuen_ops/jdk-7u40-linux-x64.gz -C /usr/local/services | tail -n 10"
cmds = []
cmds.append(cmd_tar)
print execute(server, port, username, password, cmds)
#上传JAVA的环境变量文件
genconfigfile("/tmp/profile", "basic/profile.tpl")
return upload(server, port, username, password, "/tmp/profile", "/etc/profile")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/showmsg/Auto_Install_console.git
git@gitee.com:showmsg/Auto_Install_console.git
showmsg
Auto_Install_console
Auto_Install_console
master

搜索帮助