bin

Ubuntu简单安装Kafka

一个人想着一个人 提交于 2019-12-05 17:42:26
1.安装jdk: sudo apt-get install openjdk-8-jdk 2.获取kafka安装包: wget http://mirror.bit.edu.cn/apache/kafka/2.3.1/kafka_2.11-2.3.1.tgz 3.解压安装包: tar -zxvf kafka_2.11-2.3.1.tgz 4.重命名: mv kafka_2.11-2.3.1 kafka 5.设置环境变量: vim /etc/profile export KAFKA_HOME=/opt/kafka export PATH=$PATH:$KAFKA_HOME/bin 6.使环境变量生效: source /etc/profile 7.先启动ZooKeeper服务: bin/zookeeper-server-start.sh config/zookeeper.properties 8.启动kafka服务: bin/kafka-server-start.sh config/server.properties 9.创建一个名为"topTest"的topic: bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic topTest 10

Jmeter分布式测试中常见问题及注意事项

≯℡__Kan透↙ 提交于 2019-12-05 16:37:20
Jmeter进行分布式测试时需要特别注意的: 1)如果使用csv进行参数化,需要把参数文件在每台slave上拷贝一份,最好都放置在bin目录下,因为Jmeter会直接从bin目录下查找; 2)slave机器执行脚本时,若断言执行成功则在master机器上是看不到请求响应数据的,只有在断言出错时才可键slave的返回; 3)若要使用Jmeter分布式进行测试,TCP取样器中“TCPClient classname”该栏必须填写对应的协议; 4)以十六进发送tcp数据包时,TCP取样器中“End of line(EOL) byte value”必须填写数据包的结束符,否则jmeter会一直等待,无响应。 Jmeter分布式测试常见问题: 问题1 :在master上运行jmeter-server.bat时,出现“Exception creating connection to:192.16.*.*;nested exception is:java.io.FileNotFoundException:rmi_keystore.jks(系统找不到指定的文件)”错误 解决方案 :修改apache-jmeter/bin/jmeter.properties 参数:server.rmi.ssl.disable=true 备注:将master和slave机器上的jmeter.properties文件

Jmeter分布式压测实现过程

可紊 提交于 2019-12-05 16:37:08
Jemter分布式压测 jmeter分布式压测前提条件 1.关闭防火墙 2.所有的客户端都在同一个子网内 3.server也必须在同一子网内如果使用192.x.x.x或者10.x.x.x这样的IP地址,如果server没有使用192或者10这样的IP地址,(server同client不在同一子网内)将不会有任何问题 4.确保Jmeter可以访问到server 5.确保各系统的Jmeter版本保持一致,不同版本的Jmeter将不能很好的工作 server:远程执行机 client:控制机. Windows作为Controller,Linux作为Jmeter-Slave 如果是HTTPS与控制机通信,需要有控制机上生成的rmi_keystore.jks证书文件,如果采用HTTP方式,则直接在配置文件中将server.rmi.ssl.disable置为true即可。这里使用HTTPS的方式通信。 GUI界面(windows)最为控制级,然后由这台控制机发送本地脚本到远程的每台执行机上,然后本地控制机收集远程执行机的执行结果 。 controller(windows)配置步骤 第一步:Controller上配置好jdk和jmeter(jmeter解压就行) 第二步:修改jemter属性文件:jmeter.properties。远程执行机ip(10.0.74.180:10999)

Git服务器配置

随声附和 提交于 2019-12-05 16:19:49
以 Linux centos6.5 为服务器 服务端: 查看 git 版本,没有 git 先安装 git [tony@localhost home]$ git --version git version 2.3.0 服务器端创建 git 用户,用来管理 Git 服务,并为 git 用户设置密码 [tony@localhost home]$ id git id: git: No such user [tony@localhost home]$ useradd git bash: /usr/sbin/useradd: Permission denied 权限不够切换到 root 用户 [tony@localhost home]$ su Password: [root@localhost home]# id git id: git: No such user [root@localhost home]# useradd git [root@localhost home]# passwd git Changing password for user git. New password: BAD PASSWORD: it is too simplistic/systematic BAD PASSWORD: is too simple Retype new password: passwd:

Kafka常用shell命令

萝らか妹 提交于 2019-12-05 15:42:48
2.2 KAFKA命令行操作 1)查看当前服务器中的所有topic [qingfeng@hadoop102 kafka]$ bin/kafka-topics.sh --zookeeper hadoop102:2181 --list 2)创建topic [qingfeng@hadoop102 kafka]$ bin/kafka-topics.sh --zookeeper hadoop102:2181 --create --replication-factor 3 --partitions 1 --topic first 选项说明: --topic 定义topic名 --replication-factor 定义副本数 --partitions 定义分区数 3)删除topic [qingfeng@hadoop102 kafka]$ bin/kafka-topics.sh --zookeeper hadoop102:2181 --delete --topic first 需要server.properties中设置delete.topic.enable=true否则只是标记删除。 4)生产消息 [qingfeng@hadoop102 kafka]$ bin/kafka-console-producer.sh \ --broker-list hadoop102:9092 --topic

3.文件操作

爱⌒轻易说出口 提交于 2019-12-05 15:18:40
3.文件操作 让前端觉得如获神器的不是NodeJS能做网络编程,而是NodeJS能够操作文件。小至文件查找,大至代码编译,几乎没有一个前端工具不操作文件。换个角度讲,几乎也只需要一些数据处理逻辑,再加上一些文件操作,就能够编写出大多数前端工具。本章将介绍与之相关的NodeJS内置模块。 开门红 NodeJS提供了基本的文件操作API,但是像文件拷贝这种高级功能就没有提供,因此我们先拿文件拷贝程序练手。与 copy 命令类似,我们的程序需要能接受源文件路径与目标文件路径两个参数。 小文件拷贝 我们使用NodeJS内置的 fs 模块简单实现这个程序如下。 var fs = require('fs'); function copy(src, dst) { fs.writeFileSync(dst, fs.readFileSync(src)); } function main(argv) { copy(argv[0], argv[1]); } main(process.argv.slice(2)); 以上程序使用 fs.readFileSync 从源路径读取文件内容,并使用 fs.writeFileSync 将文件内容写入目标路径。 豆知识: process 是一个全局变量,可通过 process.argv 获得命令行参数。由于 argv[0] 固定等于NodeJS执行程序的绝对路径,

服务器安装python3环境

折月煮酒 提交于 2019-12-05 14:54:24
服务器安装python3环境 先安装相关包 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make 下载python源码包 wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz 解压源码包 tar xf Python-3.6.8.tar.xz -C /usr/local/src/ 新建python3存放目录 mkdir /usr/local/python3 安装python3 进入解压目录,指定安装目录,安装python3 cd /usr/local/src/Python-3.6.2./configure --prefix=/usr/local/python3makemake install 创建软连接 ln -s /usr/local/python3/bin/python3 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 如果遇到bug # ln: failed to create symbolic link '/usr/bin/python3': File

What is the difference between the apk file in the bin folder and the apk file created through the Export option in Eclipse?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 14:16:08
What is the difference between the apk file in the bin folder and the apk file created through the Export option in Eclipse? For debugging purposes, can I directly use the file in the bin folder? Or is it recommended to always "export" the apk file? Apk in bin folder is signed with a dummy key used for debugging (Debug Key). Using the export tool, you specify your own unique key (password protected) to identify your Apps. So, for testing and debuging, you can directly use the one in bin folder. But, for publishing, you must use your own key (via the export tool). When you export using the tool

npm package.json bin won't work on Windows

我与影子孤独终老i 提交于 2019-12-05 12:30:56
问题 I am trying to start my cli tool via the package.json bin property. I have the following: ... "name": "mycli", "bin": "./bin/mycli", ... When I open the cmd in the package path and type: "mycli" it says that the command is not recognized. Should I run an npm command? or use the scripts property? am I trying to access the bin property incorrectly? 回答1: Try to specify the name of your cli tool in the bin property, like: "bin": { "mycli": "./bin/mycli" // or "/bin/mycli.js" if it's a .js file }

centos 6.6 通过 yum 升级gcc到4.7/4.8

ぃ、小莉子 提交于 2019-12-05 12:14:59
别傻了,还通过源码去安装,很费时间的,而且安装完你还要去考虑本地的gcc版本问题,这里给大家提供一个很简答的方法. 第一部分:升级到4.7 cd /etc/yum.repos.d wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++ 这个将安装的文件放在了 /opt/centos/devtoolset-1.1 如果想要编辑器去处理的话,这样操作 export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++ 如果你想要gcc替换本地的,当然不是真的去替换,只要把他放在我们的/usrlocal/bin下面就好了,不必去管系统自带的【/usr/bin】。 ln -s /opt/rh/devtoolset-1.1/root/usr/bin/* /usr/local/bin/