亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

公司內部導航go搭建

發布時間:2020-06-16 10:53:05 來源:網絡 閱讀:815 作者:deng304749970 欄目:編程語言

公司內部導航go搭建

一,go介紹,
Sinatra URL shortener.


Go is a super simple Sinatra URL shortener for use behind the firewall.


Most companies soon start to build up a fair number of internal URLs, and it can often be tricky remembering these all. This especially difficult when somebody new joins the company.


Go is a simple solution to this problem. Once installed you could point http://go/wiki, for example, to your company's internal wiki.


Features:


Shortens URLs


OpenSearch integration & autocomplete


Navigate to 'go' to create/remove shortcuts


Dynamic parameter substitution


Hit counts


Open source


二,安裝準備


[root@mango ~]#yum install git
[root@mango ~]#yum install rubygems ruby-devel sqlite-devel
[root@mango ~]#gem install bundle bundler


[root@mango ~]# git clone https://github.com/maccman/go.git
[root@mango ~]#cd go


[root@mango go]# bundle install


The source :rubygems is deprecated because HTTP requests are insecure.


Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.


Fetching gem metadata from http://rubygems.org/..........


Fetching gem metadata from http://rubygems.org/..


Installing daemons (1.1.8)


Using erubis (2.7.0)


Installing eventmachine (0.12.10)



Installing rack (1.4.1)


Installing rack-protection (1.2.0)


Installing sequel (3.35.0)


Installing tilt (1.3.3)


Installing sinatra (1.3.2)


Using sinatra-sequel (0.9.0)


Using sqlite3 (1.3.6)


Installing thin (1.3.1)


Using bundler (1.3.5)


Your bundle is complete!


Use `bundle show [gemname]` to see where a bundled gem is installed.


[root@mango go]# gem list 查看gem下軟件包有哪些



*** LOCAL GEMS ***



bundle (0.0.1)


bundler (1.3.5)


daemons (1.1.9, 1.1.8)


erubis (2.7.0)


eventmachine (1.0.3, 0.12.10)


rack (1.5.2, 1.4.1)


rack-protection (1.5.0, 1.2.0)


sequel (4.2.0, 3.35.0)


sinatra (1.4.3, 1.3.2)


sinatra-sequel (0.9.0)


sqlite3 (1.3.6)


thin (1.5.1, 1.3.1)


tilt (1.4.1, 1.3.3)


把多余的卸載


[root@mango go]# gem uninstall sinatra --version=1.4.3


Successfully uninstalled sinatra-1.4.3


[root@mango go]# gem uninstall sequel --version=4.2.0


Successfully uninstalled sequel-4.2.0


[root@mango go]# gem uninstall rack-protection --version=1.5.0


Successfully uninstalled rack-protection-1.5.0


[root@mango go]# gem uninstall rack --version=1.5.2


Successfully uninstalled rack-1.5.2


[root@mango go]# gem uninstall eventmachine --version=1.0.3


Successfully uninstalled eventmachine-1.0.3


[root@mango go]# gem uninstall daemons --version=1.1.9


Successfully uninstalled daemons-1.1.9


[root@mango go]# gem list


[root@mango go]# bundle install
[root@mango go]#sudo sed -i "1i\require 'rubygems'" app.rb


[root@mango go]# vim /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra


sinatra/ sinatra.rb


[root@mango go]# vim /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb


運行go


[root@mango go]# ruby app.rb


/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- json (LoadError)


from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'


from app.rb:5



提示缺少rubygem-json


[root@mango go]# yum -y install rubygem-json




[root@mango go]# ruby app.rb


== Sinatra/1.3.2 has taken the stage on 4567 for development with backup from Thin


>> Thin web server (v1.3.1 codename Triple Espresso)


>> Maximum connections set to 1024


>> Listening on 0.0.0.0:4567, CTRL+C to stop

打開瀏覽器,輸入IP加端口訪問,默認是4567端口,可以修改


#vim /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb 查找到4567,改成相應的端口


set :bind, '0.0.0.0'


set :port, 4567



公司內部導航go搭建

本文參考:http://heylinux.com/archives/2497.html


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

社旗县| 东源县| 清涧县| 平原县| 南漳县| 上林县| 中阳县| 辛集市| 监利县| 南京市| 台东县| 双流县| 福安市| 清河县| 阳江市| 依安县| 平南县| 葵青区| 潍坊市| 合川市| 和顺县| 博白县| 万宁市| 都安| 饶阳县| 崇仁县| 安福县| 延长县| 伽师县| 游戏| 广灵县| 商都县| 河西区| 台北市| 宜宾市| 灌阳县| 四子王旗| 山东| 柘荣县| 同心县| 滨州市|