一、基础配置1、配置主机名[root@ecs-cd34~]hostnamectlset-hostnamenode1[root@ecs-cd34~]execbash#主机名生效2、配置hosts解析(根据自己的服务器id修改)cat>>/etc/hosts/etc/docker/daemon.json<
SpringBoot+Kafka+ELK 完成海量日志收集(超详细)
2401_83703797
程序员springbootkafkaelk
SpringBoot项目准备引入log4j2替换SpringBoot默认log,demo项目结构如下:pomIndexController测试Controller,用以打印日志进行调试InputMDC用以获取log中的[%X{hostName}]、[%X{ip}]、[%X{applicationName}]三个字段值NetUtil启动项目,访问/index和/ero接口,可以看到项目中生成了app
【redis】redis shell 详解
戒掉贪嗔痴(薛双奇)
数据库运维-Redisredisbootstrap数据库
1.redisshellredis提供了redis-cli,redis-server,redis-benchmark等shell工具。redis-cli的命令[root@oracle1redis6379]#redis-cli--helpredis-cli4.0.11Usage:redis-cli[OPTIONS][cmd[arg[arg...]]]-hServerhostname(default:
k8s安装test
qBeautifulBoy
kubernetes容器云原生
k8s集群部署准备工作三台centos7虚拟机(内存每个节点4G)[root@master~]#cat/etc/redhat-releaseCentOSLinuxrelease7.9.2009(Core)三个机器分别设置主机名hostnamectlset-hostnamemasterhostnamectlset-hostnamenode1hostnamectlset-hostnamenode2三台
使用Ansible-playbook 自建CA,并签发客户端IP证书
运维小弟| srebro.cn
运维ansible网络ssl
使用Ansible-playbook自建CA,并签发客户端IP证书需求使用Ansible-playbook来签发客户端IP证书签发单个IP地址,比如脚本中使用{{inventory_hostname}}来获取主机的IP地址作为证书签发地址----name:GenerateandsignclientIPcertificatehosts:nginxbecome:truevars:#CAsettings
1 - Linux网络设置
活老鬼
Linux网络服务linux网络服务器
目录一、查看网络配置1.ifconfig命令-查看网络接口信息2.hostname命令-查看主机名称3.route命令-查看路由表条目二、查看网络连接情况1.nestat命令2.ss命令3.netstat命令与ss命令的区别4.lsof命令(ListOpenFiles)-列出系统中打开的文件的命令行工具三、测试网络连接1.ping命令-测试网络连通性2.traceroute-跟踪数据包的路由途径3
5 种最常见的 DNS 故障诊断及问题处理方法
开源Linux
网络linuxjava分布式centos
1DNS基础知识互联网基于TCP/IP协议。为了方便管理网络内的主机,整个互联网分为若干个域(domain),每个域又可以再分为若干个子域,例如,.com,.org,.edu都是顶级域,而google.com是.com下面的子域。网络中的任意一台主机(host)都会属于某个域,并且有自己的名字,称为主机名(hostname)。例如example.com就是.com域中一台主机名为example.c
【Linux命令手册】速查、备忘录
Uncle 城
linux服务器运维计算机网络网络centos网络协议
系统信息和性能查看常⽤命令作⽤uname-a查看内核/OS/CPU信息uname-r查看内核版本uname-m查看处理器架构arch查看处理器架构hostname查看计算机名who显示当前登录系统的⽤户whoami显示登录时的⽤户名whoami显示当前⽤户名cat/proc/version查看linux版本信息cat/proc/cpuinfo查看CPU信息cat/proc/interrupts查看
如何查看docker run启动参数命令
DN金猿
dockerdockernginxlinux
前言有时候我们可能不想再去一个一个查某个docker服务的运行参数,下面介绍的可以直接查看docker中的运行参数dockerrun\--name=nginx105\--hostname=74d35e8f150c\--env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\--env=NGINX_VERSION=1
CentOS8-Stream Yum下载报错
企鹅郁金香
笔记linuxCentOS-Stream8yum安装
CentOS8-StreamYum下载报错报错信息如下CentOSLinux8-AppStream0.0B/s|0BErrorsduringdownloadingmetadataforrepository'appstream':-Curlerror(6):Couldn'tresolvehostnameforhttp://mirrorlist.centos.org/?release=8&arch=x
远程控制中如何修改Linux系统名 移动文件 进入vim修改文件内容
蛋挞小丸子
linux
1.打开Linux系统的命令端口。vim输入hostname查看系统名称2.短暂修改系统名称。输入hostname(名称)然后退出系统输入exit重新登录linux系统再次输入hostname即可查看修改的系统名称3.永久修改系统名称。输入hostnamectlset-hostname(想要的系统名称)重启系统后仍是修改后的名称4.输入hostnamectlstatus查看系统名称如何创建文档和内
修改系统主机名
Yana.com
Linux系统运维linux
方法一:hostnamectlset-hostname命令用于设置主机名。使用方法为:hostnamectlset-hostname[new_hostname]。例如,要将主机名更改为"mycomputer",可以使用命令hostnamectlset-hostnamemycomputer。执行bash可以立即生效hostnamectlset-hostname命令会自动更新/etc/hostname
Linux网络设置
Amrian_robot
linux网络运维
目录一、查看网络配置1.查看网络接口信息ifconfig1.1查看所以活动的网络接口信息1.2查看指定网络接口信息2.查看主机名称hostname2.1hostname命令2.2永久设置主机名3.查看路由表条目route3.1route命令二、查看网络连接情况1.查看网络连接情况netstat(即端口扫描)2.获取socket统计信息——ss2.1ss命令概述2.2ss选项2.3netstat命令
Openstack 与 Ceph集群搭建(下): Openstack部署
范枝洲
系统运维openstackceph
文章目录文章参考部署节点准备1.修改Host文件与hostname名称2.安装NTP软件3.网卡配置信息4.开启Docker共享挂载5.安装python虚拟环境6.安装kolla-ansible7.加载AnsiblegalaxyrequirementsOpenstack安装前预配置1.配置密码2.配置multinode文件3.修改全局配置文件Openstack正式安装1.启动bootstrap-s
初识liunx系统
这么牛逼的代码我写的
c语言
进行嵌入式开发,依赖的是linux(Linuxisnotunix)系统,主要以终端指令为主linux也有图形化界面,由于嵌入式编程一般只将程序移植到开发板中,无需图形化界课程前期,需要一直使用linux系统,做到从windows向linux的转换放大终端ctrlshift+缩小终端ctrl-清屏ctrlL历史命令上下箭头用户名:hqwhoami主机名:Ubuntuhostname:$中间位置当前路
vagrant 创建虚拟机
灰色人生qwer
vagrant运维
创建一个名为“Vagrantfile”的文件,修改如下内容:Vagrant.configure("2")do|config|(1..3).eachdo|i|config.vm.define"k8s-node#{i}"do|node|#设置虚拟机的Boxnode.vm.box="centos/7"#设置虚拟机的主机名node.vm.hostname="k8s-node#{i}"#设置虚拟机的IPno
sqllite连接远程mysql_sqlite数据库如何远程连接?
weixin_39747341
sqlite数据库如何远程连接代码如下:QSqlDatabasedb=QSqlDatabase::addDatabase("QSQLITE");db.setHostName("192.168.1.160");//设置你网络服务器的IPdb.setDatabaseName("/share/personnel.db");//share共享目录下的数据库名db.setUserName("PersionS
ubuntu22.04使用kubeadm部署k8s集群
闫利朋
kubernetes实践之路kubernetes容器云原生ubuntu
使用kubeadm部署一个k8s集群,1个master+2个worker节点1.环境信息操作系统:ubuntu22.04内存:16GBCPU:4网络:能够互访,能够访问互联网hostnameip备注node0110.121.218.50masternode0210.121.218.49workernode0310.121.218.48worker2.准备工作基础配置:#时间同步sudoapt-yi
Hadoop:HA模式配置与实现
家道消乏
Hadoop基础hadoop大数据hdfs
写的不到位的地方,欢迎评论指出不足之处一、检查系统环境1、HostName、Hosts、JDK、SSH、网络、防火墙、数据源二、集群角色分配表注:这只是实例服务器NameNodeNameNodeZookepperFailoverControllerDataNodeZookepperJournalNodeOneyes(NN2和其它节点免密)yesyesTwoyes(NN1和其它节点免密)yesyes
如何查看Squid的DNS缓存
pcj_888
squidsquid
使用squidclientmgr:ipcache命令查看Squid的DNS缓存记录如果squid端口不是3128,需要指定端口号,squidclient-p{port}mgr:ipcache#squidclientmgr:ipcache...IPCacheStatistics:...IPCacheContents:HostnameFlglstrefTTLN(b)www.trendmicro.com
python操作服务器
Enougme
python
一:使用paramiko进行SSH连接首先确保已安装paramiko库:pipinstallparamiko代码示例在这里插入代码片importparamikohostname='hostname'username='user'password='passwd'client=paramiko.SSHClient()client.set_missing_host_key_policy(paramik
mysql_主从复制
打败404
mysql数据库linux
1.初始化配置1.关闭防火墙、Selinux2.修改主机名主[root@192~]#hostnamectlset-hostnamemaster从[root@192~]#hostnamectlset-hostnameslave13.配置本地解析都可配置[root@masteretc]#vim/etc/hosts192.168.29.129mysql-master192.168.29.142mysql
linux 修改hostname
岳来
linux&shelllinux运维服务器hostnamehost
在Linux系统中修改主机名(hostname)要遵循以下几步全面的操作流程:1.临时修改主机名你可以立即但临时地更改主机名,这个更改在重启后不会保留。执行以下命令:hostname新主机名例如:hostnamemynewhostname2.永久修改主机名(针对当前用户会话)编辑/etc/hostname文件,将文件中原来的主机名替换为新的主机名。这一步是永久修改主机名的核心步骤。使用文本编辑器,
怎么样才能成为专业的程序员?
cocos2d-x小菜
编程PHP
如何要想成为一名专业的程序员?仅仅会写代码是不够的。从团队合作去解决问题到版本控制,你还得具备其他关键技能的工具包。当我们询问相关的专业开发人员,那些必备的关键技能都是什么的时候,下面是我们了解到的情况。
关于如何学习代码,各种声音很多,然后很多人就被误导为成为专业开发人员懂得一门编程语言就够了?!呵呵,就像其他工作一样,光会一个技能那是远远不够的。如果你想要成为
java web开发 高并发处理
BreakingBad
javaWeb并发开发处理高
java处理高并发高负载类网站中数据库的设计方法(java教程,java处理大量数据,java高负载数据) 一:高并发高负载类网站关注点之数据库 没错,首先是数据库,这是大多数应用所面临的首个SPOF。尤其是Web2.0的应用,数据库的响应是首先要解决的。 一般来说MySQL是最常用的,可能最初是一个mysql主机,当数据增加到100万以上,那么,MySQL的效能急剧下降。常用的优化措施是M-S(
mysql批量更新
ekian
mysql
mysql更新优化:
一版的更新的话都是采用update set的方式,但是如果需要批量更新的话,只能for循环的执行更新。或者采用executeBatch的方式,执行更新。无论哪种方式,性能都不见得多好。
三千多条的更新,需要3分多钟。
查询了批量更新的优化,有说replace into的方式,即:
replace into tableName(id,status) values
微软BI(3)
18289753290
微软BI SSIS
1)
Q:该列违反了完整性约束错误;已获得 OLE DB 记录。源:“Microsoft SQL Server Native Client 11.0” Hresult: 0x80004005 说明:“不能将值 NULL 插入列 'FZCHID',表 'JRB_EnterpriseCredit.dbo.QYFZCH';列不允许有 Null 值。INSERT 失败。”。
A:一般这类问题的存在是
Java中的List
g21121
java
List是一个有序的 collection(也称为序列)。此接口的用户可以对列表中每个元素的插入位置进行精确地控制。用户可以根据元素的整数索引(在列表中的位置)访问元素,并搜索列表中的元素。
与 set 不同,列表通常允许重复
读书笔记
永夜-极光
读书笔记
1. K是一家加工厂,需要采购原材料,有A,B,C,D 4家供应商,其中A给出的价格最低,性价比最高,那么假如你是这家企业的采购经理,你会如何决策?
传统决策: A:100%订单 B,C,D:0%
&nbs
centos 安装 Codeblocks
随便小屋
codeblocks
1.安装gcc,需要c和c++两部分,默认安装下,CentOS不安装编译器的,在终端输入以下命令即可yum install gccyum install gcc-c++
2.安装gtk2-devel,因为默认已经安装了正式产品需要的支持库,但是没有安装开发所需要的文档.yum install gtk2*
3. 安装wxGTK
yum search w
23种设计模式的形象比喻
aijuans
设计模式
1、ABSTRACT FACTORY—追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了。麦当劳和肯德基就是生产鸡翅的Factory 工厂模式:客户类和工厂类分开。消费者任何时候需要某种产品,只需向工厂请求即可。消费者无须修改就可以接纳新产品。缺点是当产品修改时,工厂类也要做相应的修改。如:
开发管理 CheckLists
aoyouzi
开发管理 CheckLists
开发管理 CheckLists(23) -使项目组度过完整的生命周期
开发管理 CheckLists(22) -组织项目资源
开发管理 CheckLists(21) -控制项目的范围开发管理 CheckLists(20) -项目利益相关者责任开发管理 CheckLists(19) -选择合适的团队成员开发管理 CheckLists(18) -敏捷开发 Scrum Master 工作开发管理 C
js实现切换
百合不是茶
JavaScript栏目切换
js主要功能之一就是实现页面的特效,窗体的切换可以减少页面的大小,被门户网站大量应用思路:
1,先将要显示的设置为display:bisible 否则设为none
2,设置栏目的id ,js获取栏目的id,如果id为Null就设置为显示
3,判断js获取的id名字;再设置是否显示
代码实现:
html代码:
<di
周鸿祎在360新员工入职培训上的讲话
bijian1013
感悟项目管理人生职场
这篇文章也是最近偶尔看到的,考虑到原博客发布者可能将其删除等原因,也更方便个人查找,特将原文拷贝再发布的。“学东西是为自己的,不要整天以混的姿态来跟公司博弈,就算是混,我觉得你要是能在混的时间里,收获一些别的有利于人生发展的东西,也是不错的,看你怎么把握了”,看了之后,对这句话记忆犹新。 &
前端Web开发的页面效果
Bill_chen
htmlWebMicrosoft
1.IE6下png图片的透明显示:
<img src="图片地址" border="0" style="Filter.Alpha(Opacity)=数值(100),style=数值(3)"/>
或在<head></head>间加一段JS代码让透明png图片正常显示。
2.<li>标
【JVM五】老年代垃圾回收:并发标记清理GC(CMS GC)
bit1129
垃圾回收
CMS概述
并发标记清理垃圾回收(Concurrent Mark and Sweep GC)算法的主要目标是在GC过程中,减少暂停用户线程的次数以及在不得不暂停用户线程的请夸功能,尽可能短的暂停用户线程的时间。这对于交互式应用,比如web应用来说,是非常重要的。
CMS垃圾回收针对新生代和老年代采用不同的策略。相比同吞吐量垃圾回收,它要复杂的多。吞吐量垃圾回收在执
Struts2技术总结
白糖_
struts2
必备jar文件
早在struts2.0.*的时候,struts2的必备jar包需要如下几个:
commons-logging-*.jar Apache旗下commons项目的log日志包
freemarker-*.jar  
Jquery easyui layout应用注意事项
bozch
jquery浏览器easyuilayout
在jquery easyui中提供了easyui-layout布局,他的布局比较局限,类似java中GUI的border布局。下面对其使用注意事项作简要介绍:
如果在现有的工程中前台界面均应用了jquery easyui,那么在布局的时候最好应用jquery eaysui的layout布局,否则在表单页面(编辑、查看、添加等等)在不同的浏览器会出
java-拷贝特殊链表:有一个特殊的链表,其中每个节点不但有指向下一个节点的指针pNext,还有一个指向链表中任意节点的指针pRand,如何拷贝这个特殊链表?
bylijinnan
java
public class CopySpecialLinkedList {
/**
* 题目:有一个特殊的链表,其中每个节点不但有指向下一个节点的指针pNext,还有一个指向链表中任意节点的指针pRand,如何拷贝这个特殊链表?
拷贝pNext指针非常容易,所以题目的难点是如何拷贝pRand指针。
假设原来链表为A1 -> A2 ->... -> An,新拷贝
color
Chen.H
JavaScripthtmlcss
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD>&nbs
[信息与战争]移动通讯与网络
comsci
网络
两个坚持:手机的电池必须可以取下来
光纤不能够入户,只能够到楼宇
建议大家找这本书看看:<&
oracle flashback query(闪回查询)
daizj
oracleflashback queryflashback table
在Oracle 10g中,Flash back家族分为以下成员:
Flashback Database
Flashback Drop
Flashback Table
Flashback Query(分Flashback Query,Flashback Version Query,Flashback Transaction Query)
下面介绍一下Flashback Drop 和Flas
zeus持久层DAO单元测试
deng520159
单元测试
zeus代码测试正紧张进行中,但由于工作比较忙,但速度比较慢.现在已经完成读写分离单元测试了,现在把几种情况单元测试的例子发出来,希望有人能进出意见,让它走下去.
本文是zeus的dao单元测试:
1.单元测试直接上代码
package com.dengliang.zeus.webdemo.test;
import org.junit.Test;
import o
C语言学习三printf函数和scanf函数学习
dcj3sjt126com
cprintfscanflanguage
printf函数
/*
2013年3月10日20:42:32
地点:北京潘家园
功能:
目的:
测试%x %X %#x %#X的用法
*/
# include <stdio.h>
int main(void)
{
printf("哈哈!\n"); // \n表示换行
int i = 10;
printf
那你为什么小时候不好好读书?
dcj3sjt126com
life
dady, 我今天捡到了十块钱, 不过我还给那个人了
good girl! 那个人有没有和你讲thank you啊
没有啦....他拉我的耳朵我才把钱还给他的, 他哪里会和我讲thank you
爸爸, 如果地上有一张5块一张10块你拿哪一张呢....
当然是拿十块的咯...
爸爸你很笨的, 你不会两张都拿
爸爸为什么上个月那个人来跟你讨钱, 你告诉他没
iptables开放端口
Fanyucai
linuxiptables端口
1,找到配置文件
vi /etc/sysconfig/iptables
2,添加端口开放,增加一行,开放18081端口
-A INPUT -m state --state NEW -m tcp -p tcp --dport 18081 -j ACCEPT
3,保存
ESC
:wq!
4,重启服务
service iptables
Ehcache(05)——缓存的查询
234390216
排序ehcache统计query
缓存的查询
目录
1. 使Cache可查询
1.1 基于Xml配置
1.2 基于代码的配置
2 指定可搜索的属性
2.1 可查询属性类型
2.2 &
通过hashset找到数组中重复的元素
jackyrong
hashset
如何在hashset中快速找到重复的元素呢?方法很多,下面是其中一个办法:
int[] array = {1,1,2,3,4,5,6,7,8,8};
Set<Integer> set = new HashSet<Integer>();
for(int i = 0
使用ajax和window.history.pushState无刷新改变页面内容和地址栏URL
lanrikey
history
后退时关闭当前页面
<script type="text/javascript">
jQuery(document).ready(function ($) {
if (window.history && window.history.pushState) {
应用程序的通信成本
netkiller.github.com
虚拟机应用服务器陈景峰netkillerneo
应用程序的通信成本
什么是通信
一个程序中两个以上功能相互传递信号或数据叫做通信。
什么是成本
这是是指时间成本与空间成本。 时间就是传递数据所花费的时间。空间是指传递过程耗费容量大小。
都有哪些通信方式
全局变量
线程间通信
共享内存
共享文件
管道
Socket
硬件(串口,USB) 等等
全局变量
全局变量是成本最低通信方法,通过设置
一维数组与二维数组的声明与定义
恋洁e生
二维数组一维数组定义声明初始化
/** * */ package test20111005; /** * @author FlyingFire * @date:2011-11-18 上午04:33:36 * @author :代码整理 * @introduce :一维数组与二维数组的初始化 *summary: */ public c
Spring Mybatis独立事务配置
toknowme
mybatis
在项目中有很多地方会使用到独立事务,下面以获取主键为例
(1)修改配置文件spring-mybatis.xml <!-- 开启事务支持 --> <tx:annotation-driven transaction-manager="transactionManager" /> &n
更新Anadroid SDK Tooks之后,Eclipse提示No update were found
xp9802
eclipse
使用Android SDK Manager 更新了Anadroid SDK Tooks 之后,
打开eclipse提示 This Android SDK requires Android Developer Toolkit version 23.0.0 or above, 点击Check for Updates
检测一会后提示 No update were found