host

DRF: 读写分离 配置

谁说胖子不能爱 提交于 2020-03-13 19:26:48
读写分离配置 参考 测试 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'HOST': '127.0.0.1', 'PORT': 3306, # 主 'USER': 'root', # 主数据库用户名 'PASSWORD': 'password', # 主数据库密码 'NAME': 'database_name' # 主数据库名字 }, 'slave': { 'ENGINE': 'django.db.backends.mysql', 'HOST': '127.0.0.1', 'PORT': 8306, #从 'USER': 'root', # 从数据库用户名 'PASSWORD': 'password', # 从数据库密码 'NAME': 'database_name' # 从数据库名字 }, } 来源: oschina 链接: https://my.oschina.net/tplinuxhyh/blog/3193577

hadoop 3.0.0 安装配置

会有一股神秘感。 提交于 2020-03-13 14:58:30
环境描述 根据需求,部署hadoop-3.0.0基础功能架构,以三节点为安装环境,操作系统CentOS 7 x64; openstack创建三台虚拟机,开始部署; IP地址 主机名 10.10.204.31 master 10.10.204.32 node1 10.10.204.33 node2 功能节点规划 master node1 node2 NameNode DataNode DataNode DataNode HQuorumPeer NodeManager NodeManager ResourceManager SecondaryNameNode HMaster 三节点执行初始化操作; 1.更新系统环境; yum clean all && yum makecache fast && yum update -y && yum install -y wget vim net-tools git ftp zip unzip 2.根据规划修改主机名; hostnamectl set-hostname master hostnamectl set-hostname node1 hostnamectl set-hostname node2 3.添加hosts解析; vim /etc/hosts 10.10.204.31 master 10.10.204.32 node1 10.10

在centos7(EL7.3 即 kernel-3.10.0-514.X )上安装BCM4312无线网卡驱动要注意的问题

北城以北 提交于 2020-03-13 14:56:49
broadcom bcm4312为比较老的无线网卡了,在centos7.7上默认是驱动不起来的。需要手动编译安装。按照centos官方的说法很多网卡都需要重新编译驱动后才能正常运行。包括: Broadcom Corporation BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227 and BCM43228 Based Wireless NICs 在安装过程中参考了几位大神的文章(文章链接附后)在执行make过程遇到各种个这样的问题,就是执行不下去,总结起来有两点:一是大神门的文章没有细看,二是,官方补丁更新、步骤也有所更新,三是,基于针对报错选择方案。 以下过程结合了几位大神文章和官方文档,写下来供后来的同道中人参考。 1.识别网卡的型号 执行lspci | grep '802' 官方: [user@host ~]$ /sbin/lspci | grep Broadcom 0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01) 2.确认kernel-headers kernel-devel gcc是否已经安装 rpm -qa kernel-headers kernel-devel gcc

python实现批量远程执行命令及批量上传下载文件

拟墨画扇 提交于 2020-03-13 11:15:23
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/1/22 23:18 # @Author : xuxuedong # @Site : # @File : sys.py # @Software: PyCharm import os, sys,platform #for linux # if platform.system() == "windows": # Base_DIR = '\\'.join(os.path.abspath(os.path.dirname(__file__)).split('\\')[:-1]) # print(Base_DIR) # else: # Base_DIR = '/'.join(os.path.abspath(os.path.dirname(__file__)).split('/')[:-1]) BASE_DIR =os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) print(BASE_DIR) sys.path.append(BASE_DIR) from salt.core import Handler if __name__ == '__main__': print

ssh命令详解3

为君一笑 提交于 2020-03-12 22:35:46
SSH 的详细使用方法如下: ssh [-l login_name] [hostname | user@hostname] [command] ssh [-afgknqtvxCPX246] [-c blowfish | 3des] [-e escape_char] [-i identity_file] [-l login_name] [-o option] [-p port] [-L port:host:hostport] [-R port:host:hostport] [hostname | user@hostname] [command] sshd 为执行 ssh 的 daemon,在读者使用 ssh 之前必须去激活 sshd,在此建议把它加在 /etc/init/rc.local 中,在每次开机时激活。 在执行 sshd 之前可以指定它的 port,例如:sshd –p 999 若有安装 SSL,可以指定 SSL 的 port 443,例如:sshd –p 443 这样就可以经过 SSL 及 SSH 双重的保护,但必须去指明使用的 port ssh –l user –p 443 mouse.oit.edu.tw 才行,若不指明则仍然使用预设的port 22 ssh 选项: -l login_name 指定登入于远程机器上的使用者,若没加这个选项,而直接打 ssh lost

The authenticity of host '172.16.33.53 (172.16.33.53)' can't be established的问题(日志六)

落花浮王杯 提交于 2020-03-12 19:59:01
用ssh登录一个机器(换过ip地址)会出现如下错误 weiguohui@weiguohui1-virtual-machine:~/.ssh$ ssh 172.16.33.53 The authenticity of host '172.16.33.53 (172.16.33.53)' can't be established. ECDSA key fingerprint is 28:17:f7:c3:58:54:fb:6e:dd:b9:61:61:c4:8a:45:0f. Are you sure you want to continue connecting (yes/no)? Host key verification failed. 导致我的secondenamenode 和datanode 无法启动,最后通过查资料解决,是解决的方法为: weiguohui@weiguohui1-virtual-machine:~/.ssh$ ssh -o StrictHostKeyChecking=no 172.16.33.53 然后再ssh 登录就不会报错了 来源: https://www.cnblogs.com/beigongfengchen/p/5464669.html

The authenticity of host 'github.com (192.30.253.113)' can't be established.

妖精的绣舞 提交于 2020-03-12 19:58:47
  在初始化git之后(git init),同时在github建立好仓库之后,本地也新增了ssh kye(ssh-keygen -t rsa -C ‘mail address’),同时也在本地新增了远程仓库(git remote add origin github地址), 但是在git push的时候出现错误    The authenticity of host 'github.com (192.30.255.112)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? 这里你直接回车的话会出现验证失败 Host key verification failed. fatal: Could not read from remote repository. 验证失败。谷歌了一下,原来是本地少了 know_host文件,只要在刚刚那个位置输入yes就可以了,而不是回车(回车惯了) 来源: https://www.cnblogs.com/wu-song/p/7985594.html

ssh登录The authenticity of host localhost can't be established.错误

怎甘沉沦 提交于 2020-03-12 19:58:16
用ssh登录出现如下错误 [hadoop@Master .ssh]$ ssh localhost The authenticity of host 'localhost (::1)' can't be established. RSA key fingerprint is 4d:ba:1c:b8:75:eb:6f:a2:60:56:b1:71:ee:cc:02:2c. Are you sure you want to continue connecting (yes/no)? Host key verification failed. [hadoop@Master .ssh]$ ssh localhost The authenticity of host 'localhost (::1)' can't be established. RSA key fingerprint is 4d:ba:1c:b8:75:eb:6f:a2:60:56:b1:71:ee:cc:02:2c. Are you sure you want to continue connecting (yes/no)? Host key verification failed. 解决方式: [hadoop@Master .ssh]$ ssh -o StrictHostKeyChecking=no localhost

JumpServer本地部署

二次信任 提交于 2020-03-12 01:50:44
CentOS 7.7部署Jumpserver 系统: CentOS 7 IP: 172.16.75.1 目录: /opt 数据库: mariadb 代理: nginx 1.开始安装 防火墙 与 selinux 设置说明, 如果已经关闭了 防火墙 和 Selinux 的用户请跳过设置 systemctl stop firewalld setenfore 0 sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config yum update -y #安装依赖包 yum -y install wget gcc epel-release git 安装 Redis, JumpServer 使用 Redis 做 cache 和 celery broke yum -y install redis systemctl enable redis systemctl start redis 安装mysql5.7 wget -nc http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm rpm -ivh mysql-community-release-el6-5.noarch.rpm yum -y install mysql-community

Android Usb Host Problem with Samsung Galaxy 10.1 Tablet

孤人 提交于 2020-03-11 13:14:43
问题 I am attempting to leverage the USB host capability on the Samsung Galaxy Tablet. I purchased the attachment dongle from samsung (http://www.samsung.com/us/mobile/galaxy-tab-accessories/EPL-1PL0BEGSTA). When I first connected a usb device via this dongle, I had a high power error from the Galaxy Tablet -- FYI use an externally powered USB hub and you can bipass this. Now that the device itself is acknowledging the existance of a USB peripheral when I attach it, I attempted to use Android's