This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //卸载docker | |
| sudo docker -v | |
| sudo apt-get remove docker | |
| sudo apt-get remove --auto-remove docker | |
| sudo apt-get remove --purge lxc-docker | |
| sudo apt-get autoremove --purge | |
| //如果上面方法不行,可使用 | |
| sudo apt-get remove docker* | |
| sudo apt-get autoremove |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 批量删除已退出的容器 | |
| ```shell | |
| docker rm -f $(docker ps -a | grep Exit | awk '{ print $1 }') | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz | |
| tar -zxvf rarlinux-3.8.0.tar.gz | |
| cd rar | |
| su root | |
| make | |
| make install | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 获取ZooKeeper安装包 | |
| ``` | |
| 下载地址:http://apache.dataguru.cn/zookeeper | |
| 选择一个稳定版本进行下载,我这里下载的是zookeeper-3.4.6版本。 | |
| wget http://mirrors.sonic.net/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz | |
| ``` | |
| ZooKeeper伪分布式集群安装 | |
| 伪分布式集群:在一台Server中,启动多个ZooKeeper的实例。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 载kafka官网编译好的二进制文件 | |
| wget http://apache.fayea.com/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz | |
| tar -xzvf kafka_2.10-0.8.2.1.tgz | |
| cd kafka_2.10-0.8.2.1 | |
| 启动zookeeper | |
| bin/zookeeper-server-start.sh config/zookeeper.properties | |
| 启动kafka server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 从这里下载scala | |
| http://www.scala-lang.org/download/2.10.4.html | |
| #解压到安装目录,这里我选择安装在/opt下 | |
| sudo tar -zxvf scala-2.10.4.tgz | |
| #配置环境变量 | |
| sudo vim /etc/profile | |
| #setting scala | |
| export SCALA_HOME=/opt/scala-2.10.4 | |
| export PATH=${SCALA_HOME}/bin:$PATH | |
| source /etc/profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # 免翻墙安装Go tools | |
| branch="release-branch.go1.4" | |
| mkdir -p $GOPATH/src/golang.org/x | |
| git clone -b $branch git@github.com:golang/tools.git $GOPATH/src/golang.org/x/tools | |
| git clone git@github.com:golang/net.git $GOPATH/src/golang.org/x/net | |
| cd $GOPATH | |
| go install golang.org/x/tools/cmd/goimports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git fetch origin branchname:branchname | |
| 可以把远程某各分支拉去到本地的branchname下,如果没有branchname,则会在本地新建branchname | |
| git checkout origin/remoteName -b localName | |
| 获取远程分支remoteName 到本地新分支localName,并跳到localName分支 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package dao | |
| import ( | |
| "gopkg.in/mgo.v2/bson" | |
| "time" | |
| "gopkg.in/mgo.v2" | |
| "strings" | |
| "log" | |
| ) |
OlderNewer