公司內(nèi)部導(dǎo)航go搭建-創(chuàng)新互聯(lián)

公司內(nèi)部導(dǎo)航go搭建

創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),濱州企業(yè)網(wǎng)站建設(shè),濱州品牌網(wǎng)站建設(shè),網(wǎng)站定制,濱州網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,濱州網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

一,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

二,安裝準(zhǔn)備

[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

運(yùn)行g(shù)o

[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加端口訪問,默認(rèn)是4567端口,可以修改

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

set :bind, '0.0.0.0'

set :port, 4567

公司內(nèi)部導(dǎo)航go搭建

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

創(chuàng)新互聯(lián)www.cdcxhl.cn,專業(yè)提供香港、美國(guó)云服務(wù)器,動(dòng)態(tài)BGP最優(yōu)骨干路由自動(dòng)選擇,持續(xù)穩(wěn)定高效的網(wǎng)絡(luò)助力業(yè)務(wù)部署。公司持有工信部辦法的idc、isp許可證, 機(jī)房獨(dú)有T級(jí)流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確進(jìn)行流量調(diào)度,確保服務(wù)器高可用性。佳節(jié)活動(dòng)現(xiàn)已開啟,新人活動(dòng)云服務(wù)器買多久送多久。

分享文章:公司內(nèi)部導(dǎo)航go搭建-創(chuàng)新互聯(lián)
標(biāo)題URL:http://muchs.cn/article30/dchdpo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、品牌網(wǎng)站設(shè)計(jì)、ChatGPT、手機(jī)網(wǎng)站建設(shè)網(wǎng)站設(shè)計(jì)、外貿(mào)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)