网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

公司内部导航go搭建-创新互联

公司内部导航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

创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。


分享名称:公司内部导航go搭建-创新互联
文章路径:http://bjjierui.cn/article/dchdpo.html

其他资讯