代码拉取完成,页面将自动刷新
# -*- 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")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。