ubuntu安裝zookeeper和ruby

安裝zookeeper服務node

  1. 下載zookeeper包
  2. wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.12/zookeeper-3.4.12.tar.gz
  3. 解壓拷貝進/usr/local下
  4. sudo cp zoo_sample.cfg zoo.cfg
  5. 修改zoo.cfg配置

 

 

 

  1. 在/var/lib/zookeeper建myid文件。在myid文件中輸入1表示爲server.1。 輸入2則表示server.2
  2. 在/usr/local/ zookeeper-3.4.12/bin下,最好是整個zookeeper目錄賦777權限,在bin目錄下./zkServer.sh start|stop|restart,啓動、中止、重啓等命令
  3. 啓動後,在bin目錄下./zkCli.sh進入zookeeper客戶端,進入後,輸入ls,或者新建create /NewCrawlerTest crawlertest,

或者刪除delete /NewCrawlerTestapache

或者查看 get /NewCrawlerTestruby

 

安裝ruby:ui

  1. Sudo apt-get install ruby ruby-dev
  2. 查看版本號:ruby –v; gem –v

**Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler`rest

        3.sudo gem install bundlerserver

4.blog

出現如上圖錯誤:安裝bundler,執行bundle install –deploymentget

5.執行build代碼bundle exec middleman build –clean,出現以下圖錯誤test

 

解決:安裝nodejs便可,安裝後查看node -v:ejs

5.1 sudo apt-get install nodejs

5.2  sudo apt-get install nodejs-legacy

相關文章
相關標籤/搜索