ITeye博客

hongtoushizi

hongtoushizi · 共 428 篇文章

git项目的remote地址替换

This week I'll show you how you can move a full Git repository from one remote server to another. The steps I'm using even allow you to choose which branches and tags to include. Let’s call the original repository ORI and the new one NEW, here are the steps I took to copy everything from ORI to NEW…

2018-04-13 14:44 · git · 评论(0)

git 误删分支恢复方法

首先用以下步骤创建一个新分支,修改一些文件后删除,以便进行恢复。 1.创建分支 abc git branch abc 1 1 2.查看分支列表 git branch -a abc * develop remotes/origin-dev/develop 1 2 3 4 1 2 3 4 3.切换到abc分支,随便修改一下东西后 commit 切换分支 git checkout abc Switched to branch 'abc' 创建一个文件 echo 'abc' > test.txt commit git add . git commit -m 'add test.txt' [abc 3…

2017-04-13 16:02 · git · 评论(0)

git tag — 标签相关操作

标签可以针对某一时间点的版本做标记,常用于版本发布。 列出标签 $ Git tag # 在控制台打印出当前仓库的所有标签 $ git tag -l ‘v0.1.*’ # 搜索符合模式的标签 打标签 git标签分为两种类型:轻量标签和附注标签。轻量标签是指向提交对象的引用,附注标签则是仓库中的一个独立对象。建议使用附注标签。 # 创建轻量标签 $ git tag v0.1.2-light # 创建附注标签 $ git tag -a v0.1.2 -m “0.1.2版本” 创建轻量标签不需要传递参数,直接指定标签名称即可。 创建附注标签时,参数a即annotated的缩写,指定标签类型,后附标签…

2017-04-11 17:11 · git · 评论(0)

Install Elasticsearch 5.0 on RHEL / CentOS

Install Elasticsearch 5.x On RHEL / CentOS using Elasticsearch Repository Install Public Signing Key: rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch Create new repo in your /etc/yum.repos.d/ directory. For example I have created elasticsearch.repo here. /etc/yum.repos.d/elasticsear…

2017-03-20 18:36 · elasticSearch · 评论(0)

ElasticSearch 5.2.2 安装问题记录

转载自: http://www.itdadao.com/articles/c15a1228740p0.html 1、启动 elasticsearch 如出现异常 can not run elasticsearch as root 解决方法:创建elasticsearch 账户,修改文件夹 文件 所属用户 组 2、启动异常:ERROR: bootstrap checks failed system call filters failed to install; check the logs and fix your configuration or disable system call fi…

2017-03-20 18:33 · elasticSearch · elk · 评论(0)

supervisor部署及对管理elk的配置

1: Supervisor安装 1.1: yum -y install python-setuptools #安装easy_install 这个命令的软件包 1.2: easy_install supervisor #安装supervisor 生成配置文件 echo_supervisord_conf > /etc/supervisord.conf 2: 设置开机启动 sudo vi /etc/rc.d/init.d/supervisord 编辑内容如下: #!/bin/bash # # supervisord This scripts turns supervisord on # # Aut…

2017-02-23 17:44 · elk · supervisor · 评论(0)

elasticsearch (exit status 1; not expected)

在尝试用supervisord管理elk的时候,elasticsearch一直报如下错误: INFO exited: elasticsearch (exit status 1; not expected) INFO gave up: elasticsearch entered FATAL state, too many start retries too quickly 查找资料解决方案如下: 修改前的: [program:elasticsearch] ;;command=/usr/share/elasticsearch/bin/elasticsearch ;startsecs=0 ;num…

2017-02-23 16:43 · elasticSearch · elk · 评论(0)

centos6安装git2.x

安装 repo package: yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm 安装 Git 2.x: yum install git 确定是否安装成功 git --version 摘选自: http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x

2017-02-21 21:32 · git · 评论(0)

mqtt资料收集链接

1: https://www.cloudmqtt.com/docs-api.html 2: https://github.com/bluerhinos/phpMQTT 3: https://blog.risingstack.com/getting-started-with-nodejs-and-mqtt/ 4: https://github.com/saikath/Mqtt-Example-using-javascript-nodejs 5: https://github.com/mqttjs/MQTT.js 6: https://www.cloudmqtt.com/docs-php.html

2016-12-13 10:30 · mqtt · 评论(0)

Install mosquitto on mac os x

转载: http://www.xappsoftware.com/wordpress/2014/10/30/install-mosquitto-on-mac-os-x/ Install mosquitto on mac os x BY GG1 · OCTOBER 30, 2014 Mosquitto is a BSD licensed message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. Mosquitto is a lightweight broker and it…

2016-12-13 10:16 · mqtt · 评论(0)

php7和mysql5.7的升级历程

第一步: brew install php71 --with=apache brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php brew unlink php56 brew install php71 —with=apache 第二步: If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, ~/.zshrc, ~/.profile or …

2016-11-09 17:48 · php · mysql · 评论(0)

macOS 10.12 Sierra Apache Setup: Multiple PHP Versions

转载自: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions

2016-11-09 17:31 · php · mysql · apache · 评论(0)

php实现的thrift socket server

转载自: http://www.ooso.net/archives/537 这些天用php写了个thrift的socket server,因为原来thrift的源码里php部分只有基于apache的服务器端代码,再加上前些日子看到 php 也能直接使用libevent构建web服务器,所以才会想到写这个玩玩。 php-thrift-server源码 代码直接从apache的thrift项目clone过来,托管在github上: http://github.com/volca/thrift 新增或改动的代码如下: lib/php/`-- src |-- server | |-- TNonblo…

2016-10-28 00:41 · thrift · 评论(0)

CENTOS7下安装GRPC FOR CPP

转载: http://dreamlikes.cn/archives/555 gRPC 是一个高性能、开源和通用的 RPC 框架,面向移动和 HTTP/2 设计。目前提供 C、Java 和 Go 语言版本,分别是:grpc, grpc-java, grpc-go. 其中 C 版本支持 C, C++, Node.js, Python, Ruby, Objective-C, PHP 和 C#。 gRPC 基于 HTTP/2 标准设计,带来诸如双向流、流控、头部压缩、单 TCP 连接上的多复用请求等特。这些特性使得其在移动设备上表现更好,更省电和节省空间占用。 官方网站: http://www.gr…

2016-10-25 10:58 · grpc · 评论(0)

细说socket

转载自: https://www.zybuluo.com/phper/note/47110 老实讲,到目前为止,我对socket一无所知,真的。我就现学现卖用过nodejs平台的socket.io搭建过一套高可用实时性的网页聊天系统,其他,就真的只是听过它。 今天就来仔仔细细的学一下,socket是什么?它能干什么? 什么是socket socket,我们先仅仅看这个英文单词的中文翻译,它翻译成: "孔"或者"插座" ,擦,能不能稍微取个高雅点的名字!怎么会是这个东西呢?这个留在后面,卖个关子,你会发现真的它就是个 插座 。 既然socket就是插座,一般插座是长这样的: 我们从图片中可以看…

2016-10-20 13:38 · socket · 评论(0)