摘要:
chown -R oracle:oinstall /opt/databasechmod -R 755 /opt/database su - oracle <<!/opt/database/runInstaller -silent -responseFile /home/oracle/enterpri 阅读全文
摘要:
#!/bin/bash os_user= os_password= hosts=' '#多个ip用空格分隔 id $os_user >/dev/null || exit 1 #获取用户家目录 user_home=$(grep -w $os_user /etc/passwd |cut -d : -f 6) # 生成ssh从stdin读取免密的脚本 cat > /tmp/pass /de... 阅读全文
摘要:
安装sdk import os import zipfile import commands cmd='cd {};cd ksc-sdk-python-master;{} setup.py install'.format(dst_dir,python_path) print cmd res=commands.getstatusoutput(cmd) if res[0]: print re... 阅读全文
摘要:
# coding=utf8 import json import sys from concurrent.futures import ThreadPoolExecutor def patrol(input_keys): host = input_keys['host'] username = input_keys['username'] password = in... 阅读全文
摘要:
# coding: UTF-8 import os import time from concurrent import futures HEADERS = { 'Content-Type': 'application/json', 'Accept': 'application/json', } def connect(host, username, password, *... 阅读全文
摘要:
#coding=utf8 import json import re import requests class ExecError(Exception): pass class ServerAction(object): def __init__(self,openstack_auth,vm_info=None,volume_info=None): #ope... 阅读全文
摘要:
echo "nameserver 8.8.8.8">>/etc/resolv.conf mkdir -p /tmp/bak/ mv -f /etc/yum.repos.d/* /tmp/bak/ cat >/etc/yum.repos.d/CentOS6.repo <<EOF # CentOS-Base.repo # # The mirror system uses the connecting... 阅读全文
摘要:
#coding = utf8 import shutil import sys import os import subprocess proxy_path = sys.executable.split('embedded')[0] cache_dir = os.path.normpath(os.path.join(proxy_path, 'scripts', 'script')) conf_... 阅读全文
摘要:
删除云服务器# coding: utf8 import json import re import requests import sys class ExecError(Exception): pass class ServerAction(object): def __init__(self, openstack_auth, user, password, proje... 阅读全文
摘要:
#coding=utf8 import paramiko import sys import time import os import re class DoError(Exception): pass class DoSsh(object): def __init__(self,host=None, username=None, password=None, port... 阅读全文
摘要:
connect('user', 'password', 't3://xx.xx.xx.xx:7001') def report_format(code, name, result, alert=0, children=None): _report_ = {'code': code, 'name': name, 'result': result, 'alert': alert} ... 阅读全文