手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2013年01月11日的文章

ubuntu下安装gearman及扩展

Ubuntu下面安装gearman以及php的gearman扩展是需要注意一下的。
不是默认的安装就直接OK
apt-get install gearman
安装完gearman后。使用pecl install gearman安装。这时候会提示你安装新版 的libgearman
如果你直接搜索apt-cache search libgearman,会发现有很多,但其实一个都不是。。不用上当了

OK,怎么办?有人也问过这个问题:http://stackoverflow.com/questions/13312207/installing-gearman-php-extension-on-debian-6
有人这么回复 :

The reason that this doesn't work is that as the error message says, the most recent version of the PHP extension requires libgearman-1.0 (which is why the directory is named 1.0). You'll need to be at least on wheezy (which is the version after debian 6 / squeeze) to get libgearman-1.0.

It might also be a solution to compile libgearman from source, and then use checkinstall to create a debian package that you install afterwards, or use the gearman developer ppa available at https://launchpad.net/~gearman-developers/+archive/ppa. We've built libgearman, gearmand and the PHP extension on a wide variety of distributions (including Debian, Ubuntu, RHEL4 and SL6) and used checkinstall to get a proper package available.

嗯,打开这个网址。
在最上面有提醒你怎么将PPA将入源里:

Adding this PPA to your system

You can update your system with unsupported packages from this untrusted PPA by adding ppa:gearman-developers/ppa to your system's Software Sources. (Read about installing)

OK,那我们开始吧:

 apt-add-repository ppa:gearman-developers/ppa

然后,你根据你的版本,将源加到你的source.list文件里:
vim /etc/apt/source.list
加入:

deb http://ppa.launchpad.net/gearman-developers/ppa/ubuntu precise main  deb-src http://ppa.launchpad.net/gearman-developers/ppa/ubuntu precise main 

然后:apt-get update
apt-get upgrade
会提醒你需要升级gearman到最新版 本
这时候再:
pecl install gearman
然后就直接安装成功,会提示你怎么操作:
XML/HTML代码
  1. Build process completed successfully  
  2. Installing '/usr/lib/php5/20090626+lfs/gearman.so'  
  3. install ok: channel://pecl.php.net/gearman-1.1.1  
  4. configuration option "php_ini" is not set to php.ini location  
  5. You should add "extension=gearman.so" to php.ini  
按照提示操作完后,重启apache。
在命令行下执行:
XML/HTML代码
  1. # php -i |grep gearman  
  2. gearman  
  3. gearman support => enabled  
  4. libgearman version => 0.40  
wow...安装成功。
就是这么简单

 

Tags: ubuntu, gearman, php扩展

liteIDE更新了

其实,这篇博客应该发在昨天的。
昨天据说是liteide2周年,所以作者发布了一个新的版本。
再加上,昨天又是高伯伯的生日,两日 并一日。新版本就这样出来了
网址在:http://code.google.com/p/golangide/downloads/list
话说回来,liteide已经换过N多的LOGO了。一个是“易”的中文,一次是地球 ,这回换上了太极图了。据说太极图是用QT画出来的。。。

蛋疼的人总是很多。嗯其实是我很羡慕罢了。
这次好象没有什么太大的更新,好象基本上就是为了2周年,改了LOGO发布的。
当然也开始支持了tip版的go(http://code.google.com/p/golangide/wiki/changes)

  • GolangDoc:
    • support go tip version
    • show error output

不过还是要介绍一下这个软件:
如果你需要很好的使用markdown,以及预览,建议你下载内嵌webkit核心的那份。还能支持导出成PDF哦。

Introduction

LiteIDE is a simple, open source, cross-platform Go IDE.

Base Features

  • Mime type basis system
  • System environment manage
  • Build system manage
  • Debug system simple and open
  • Kate syntax and style scheme
  • WordApi complete helper

Golang Support

  • Package browser
  • Class view and outline
  • Document browser
  • Gocode(https://github.com/nsf/gocode) support
  • GOPATH api index
  • Jump to declaration
  • Code expression info
  • Go playground

Markdown suppor

  • Live preview and sync scroll
  • Custom css , css files from Mou(http://mouapp.com)
  • Export html and pdf
  • Markdown batch
    • separate to html or pdf
    • merge to html or pdf

System

  • Windows
  • Linux
  • MacOSX

Website

Log

  • 2013-1-10 Version X15.2

Tags: liteide

Golang官网被墙解决办法

GoLang的官网经常 会抽风,至于为什么,我想大家都明白的,所以有人还在code.google.com上维护了一份hosts列表,但是。。恐怕也就因为这些项目,导致了code.google.com也会偶尔抽抽风。

好吧。golang只是一个语言类的网站,何必呢?就象当年的python....

golang的官网在:golang.org,如果打不开但你又想看里面的内容,有几种办法
1、添加hosts记录:
173.194.75.141 golang.org
怎么添加我就不说了,没意思。如果你连这个也不会,那就不用看了

2、看chm,
astaxie维护了一份chm的手册,如果你只是看手册,那当然没问题:https://github.com/astaxie/godoc/downloads

3、godoc
如果你安装了go,那么你是不是忽略了godoc呢?OK在命令行下执行
godoc -http:=8080 ,这个8080就是你自己设置的端口,OK现在你在浏览器里打开http://localhost:8080,是不是看到了与golang.org一样的界面了?

4、还有没有其他办法?
http://go.neatcn.com
我自己也做了个反向代理 ,只是速度可能会较慢一点。

----

后续,刚才看到了这篇:http://zhan.renren.com/golanguage?gid=3602888498033773463&from=post&checked=true

居然很多想法都和我一样,只是他还提出了一个使用liteIDE这个软件,虽然我在用这个软件,但居然没有想过用它来看手册。。。真是的

liteIDE在这里有的下载:http://code.google.com/p/liteide,看页面的左侧,他有提示下载golang ide(或者你直接打开:http://code.google.com/p/golangide/),功能强大,虽然是一个新的软件,但是,它支持了:

  1. go
  2. lua
  3. markdown,markdown可以导出成pdf哦

还有什么不可能的?

Tags: golang, 反向代理, godoc, astaxie