Socat

6.RabbitMQ Linux安装

心已入冬 提交于 2020-04-27 21:47:29
RabbitMQ在Linux上安装,需要很多依赖库,如何不能解决依赖库德版本问题,可能会比较麻烦,最好结合Yum进行安装,我这里使用的Linux环境是64位CentOS6.2 ,使用Yum源是阿里云的 CentOS 6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 还单独下载了RabbitMQ安装RPM包 按照如下步骤进行安装: 1、删除或备份原来的Yum源 #cd /etc/yum.repo.d/ #rm -rf *.repo 2、下载阿里云Yum源 #wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 3、升级OpenSSL #yum install openssl 4、上传RabbitMQ安装RPM包 5、安装socat-1.7.2.4-1.el6.rf.x86_64.rpm #yum install socat-1.7.2.4-1.el6.rf.x86_64.rpm 6、安装erlang-17.4-1.el6.x86_64.rpm #yum install erlang-17.4-1.el6.x86_64.rpm 7

centos下安装rabbitmq

廉价感情. 提交于 2020-04-27 21:08:25
一.安装erlang 先新建rabbitmq文件夹 cd /usr/local/src/ mkdir rabbitmq cd rabbitmq //下载rpm,如果下载速度慢可以本地下载上传Linux中也可 wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_21.2.2-1~centos~7_amd64.rpm //导入公钥 rpm –import http://packages.erlang-solutions.com/rpm/erlang_solutions.asc //安装自动更新依赖(不建议使用rpm安装) yum install esl-erlang_21.2.2-1~centos~7_amd64.rpm //验证是否安装成功 erl 二.安装rabbitmq //下载rabbitmq wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.9/rabbitmq-server-3.7.9-1.el7.noarch.rpm //导入RabbitMQ signing key.Before the Yum repository can be used,

获取Windows批处理脚本(.bat)中传递的参数列表

让人想犯罪 __ 提交于 2020-02-28 07:31:06
我想找到Windows批处理副本,它与Bash的 $@ 对应,其中包含传递给脚本的所有参数的列表。 还是我不得不去 shift ? #1楼 检索脚本中所有参数的方法如下: @ECHO off ECHO The %~nx0 script args are... for %%I IN (%*) DO ECHO %%I pause #2楼 这是获取args并将其设置为env vars的一种相当简单的方法。 在此示例中,我仅将它们称为键和值。 将以下代码示例另存为“ args.bat”。 然后从命令行调用您保存的批处理文件。 例如:arg.bat --x 90 --y 120 我提供了一些echo命令来逐步引导您完成此过程。 但是最终结果是--x的值为90,而--y的值为120(也就是说,如果您按照上面指定的示例运行;-))。 然后,您可以使用“如果已定义”条件语句来确定是否运行代码块。 因此,可以说运行:“ arg.bat --x hello-world”,然后可以使用语句“ IF DEFINED –x echo%-x%”,结果将为“ hello-world”。 如果运行批处理,应该更有意义。 @setlocal enableextensions enabledelayedexpansion @ECHO off ECHO. ECHO ::::::::::::::::::::::::::

Linux centos7安装RabbitMQ

試著忘記壹切 提交于 2020-02-27 06:29:00
一、安装思路 1. 安装erlang 2. 安装socat 3. 安装rabbitmq 4. 相关配置 说明: 由于RabbitMQ是基于Erlang语言开发, 所以在安装RabbitMQ之前, 需要先安装Erlang rabbitmq需要socat依赖, 所以需要先安装socat 二、具体步骤 1. 安装erlang 下载: wget http://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm 安装: rpm -ivh erlang-18.3-1.el7.centos.x86_64.rpm 2. 安装socat 下载: wget http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm 安装: rpm -ivh socat-1.7.3.2-5.el7.lux.x86_64.rpm 3. 安装rabbitmq 下载: wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm 安装: rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm

Pyserial does not play well with virtual port

放肆的年华 提交于 2019-12-31 22:48:11
问题 Motivation I want to start leraning how to use the python library Pyserial. It seems like a really nice library that works for a lot of people. I want to use it for an upcoming project in which I have to automate serial communications. Environment I'm running Ubuntu 15.04. I'm using Python 2.7. Setting up virtual ports I don't currently have a device that I can communicate with over a serial port. I'm using the socat application to create two virtual ports that are connected to each other

Opening a virtual serial port created by SOCAT with Qt

浪尽此生 提交于 2019-12-23 09:29:12
问题 I'm developping a Qt5 application on MacOS. I would like to test my application serial port communication. I'd like to use socat but I'm unable to open the port created with socat: QSerialPortInfo::availablePorts() lists only the /dev/cu-XXXXXX ports... 回答1: Socat port creation example: socat pty,link=/dev/mytty,raw tcp:192.168.254.254:2001& After this you get your pseudo port /dev/mytty Now you can reference this port via QSerialPort serial = new QSerialPort("/dev/mytty"); 回答2: You might be

Redirect process stdin and stdout to netcat

柔情痞子 提交于 2019-12-21 06:28:14
问题 I have an embedded linux application with a simple interactive command line interface. I'd like to access the command line from telnet (or network, in general). However, the process should be started when the board turns on, and in a unique instance. So, the following netcat command is not an option: nc -l -p 4000 -e myapp I can do nc -l -p 4000 | myapp to send remote commands to myapp, but this way I can't see myapp output. Is there any way to redirect both stdin and stdout to netcat ?

Why is “fork” needed by socat when connecting to a web server?

房东的猫 提交于 2019-12-20 10:29:15
问题 I am trying to understand tcp connections between a browser and a web server. I have a web server running on my local machine, and can browse to it just fine, as expected, using localhost:3000 or 127.0.0.1:3000. (I am running "rails s"and WEBrick.) I wanted to put a software intermediary between the browser and the web server, and so began experimenting with socat. The following works just fine: socat TCP-LISTEN:8080,fork TCP:localhost:3000 I can browse to localhost:8080 and things work as

socat: tunnel IP through TTY

落花浮王杯 提交于 2019-12-17 22:11:49
问题 Is it possible to get an bidirectional IP-tunnel over ttyS0-like serial (modem) devices with the socat utility? I tried to use TUN option but still can't get the result. Any suggestions are welcome :) Update: PC1: socat /dev/ttyUSB0,raw,echo=0,b57600,clocal TUN:192.168.1.1/24,up PC2: socat /dev/ttyUSB0,raw,echo=0,b57600,clocal TUN:192.168.1.2/24,up After that, I have seen tun0 interfaces with proper addresses on both ends but I can't ping one from other. Instead of that, when I send data with

Socat terminates after connection close

拈花ヽ惹草 提交于 2019-12-12 07:35:51
问题 This comand (serial port redirector) accepts a single connection on TCP:11313 : socat PTY,link=/dev/ttyV1,echo=0,raw,unlink-close=0 TCP-LISTEN:11313,forever,reuseaddr However when the connection is lost, the above socat process is killed and the client is not able to connect. I can solve this by adding fork option at the end of the above command. But then multiple clients will be able to connect. But I want to accept only one connection. Any ideas how to achieve this? 回答1: You can limit the