gearman 在Ubuntu上部署Gearman
来源:互联网 发布:特朗普政治主张知乎 编辑:程序博客网 时间:2024/06/08 13:58
sudo apt-get 中没有gearmand,所以用wget下载
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
tar zxvf gearmand-1.1.12.tar.gz
cd gearmand-1.1.12/
./configure
configure: error: could not find boost
sudo apt-get install libboost-dev
接着重新执行:./configure
configure: error: Could not find a version of the library!
sudo apt-get install libboost-all-dev
接着重新执行:./configure
configure: error: could not find gperf
sudo apt-get install gperf*
接着重新执行:./configure
configure: error: Unable to find libevent
sudo apt-get install libevent-dev
接着重新执行:./configure
configure: error: Unable to find libuuid
sudo apt-get install uuid-dev
./configure
sudo make
sudo make install
这里要等一段时间。。
gearman
第一次运行会看到以下提示:
gearman: error while loading shared libraries: libgearman.so.8: cannot open shared object file: No such file or directory
(这表示系统不知道libgearman.so.8 放在哪个目录下。 要在/etc/ld.so.conf中加入libgearman.so.8所在的目录。 检查了下,文件所在目录为/usr/local/lib。 因此出现这个问题的原因是libgearman.so.8刚生成,没有加入到ld.so.cache中,所以这时需要重新运行一下 /sbin/ldconfig( ldconfig命令的作用):)
sudo /sbin/ldconfig
此时再执行 gearman 则已安装成功!
安装完Job Server之后,用gearmand –d命令启动
gearmand -d
第一次运行会看到以下提示:
gearmand: Could not open log file "/usr/local/var/log/gearmand.log", from "/home/wangyulu/下载/gearmand-1.1.12", switching to stderr. (No such file or directory)
在提示的目录下创建好/log/gearmand.log文件,再次执行上述命令,就正常启动了job server。
sudo gearmand -d
到这里就已经完全ok了
安装PHP Gearman扩展
wget http://pecl.php.net/get/gearman-1.1.2.tgz
sudo tar zxvf gearman-1.1.2.tgz
cd gearman-1.1.2/
sudo phpize (这里可能会提示没有此命令,执行 sudo apt-get install php5-dev 安装)
sudo ./configure
sudo make
sudo make install
sudo echo "extension=gearman.so" >> /etc/php5/apache2/php.ini (注意这里php.ini位置)
sudo /etc/init.d/apache2 restart
这时查看php_info时就应该看到 gearman扩展了
0 0
- gearman 在Ubuntu上部署Gearman
- 在Ubuntu上部署Gearman
- ubuntu上配置安装gearman
- gearman 在mac上为php添加Gearman扩展
- Gearman
- gearman
- Gearman
- Gearman
- gearman
- gearman
- gearman
- gearman
- ubuntu下gearman安装
- centos 上安装gearman
- 在Linux上安装Gearman及配置使用Gearman的PHP扩展环境
- 在Mac OS 上安装 Gearman及PHP的扩展
- gearman在虚拟机上运行没有自动开启的处理
- ubuntu 安装Gearman php扩展
- 是否有Root权限
- Redis复制与可扩展集群搭建
- Qt入门之信号与槽机制
- SpringMvc与Struts2的对比,孰优孰劣
- vtk实战(十四)——解析vtk XML 文件的内容
- gearman 在Ubuntu上部署Gearman
- 通过减色运算来学习遍历图像像素值三种方法
- If Is Evil
- CVE-2015-7547 临时解决方法
- 用vmware 虚拟机 安装linux i686CPU
- mysql table checksum
- 搬家啦!
- 使用TestFlight和蒲公英测试的区别
- jquery的deferred使用详解