Centos7安装gearman和php扩展
Centos7安装gearman和php扩展
标签(空格分隔): php,linux
gearman所需要的依赖
yum install \
vim \
git \
gcc \
gcc-c++ \
wget \
make \
gperf \
automake \
autoconf \
boost-devel \
libuuid-devel \
libevent-devel \
-y \
安装gearmand
// wget https://launchpad.net/gearmand/1.2/1.1.6/+download/gearmand-1.1.6.tar.gz
cd /root
wget https://github.com/gearman/gearmand/releases/download/1.1.17/gearmand-1.1.17.tar.gz
tar -zxvf gearmand-1.1.17.tar.gz
cd gearmand-1.1.17
./configure \
--prefix=/usr/local/gearman/ \
--disable-libpq \
--disable-hiredis \
--disable-libdrizzle \
--disable-silent-rules \
--disable-libtool-lock \
--disable-libmemcached \
--disable-option-checking \
--disable-libtokyocabinet \
--disable-dependency-tracking \
make
make install
创建gearman用户
useradd -s /sbin/nologin -M gearman
mkdir /usr/local/gearman/var/
mkdir /usr/local/gearman/var/log/
chown -R gearman:gearman /usr/local/gearman/
启动gearman并设置开机启动
# 进入单元文件目录
cd /etc/systemd/system
# 创建redis单元文件,格式为: [单元文件名].[单元文件类型]
vim gearman.service
[Unit]
Description=Start gearman on boot.
After=default.target network.target
[Service]
User=gearman
Group=gearman
Type=forking
PIDFile=/usr/local/gearman/var/log/gearmand.pid
ExecStart=/usr/local/gearman/sbin/gearmand --log-file=/usr/local/gearman/var/log/gearmand.log --pid-file=/usr/local/gearman/var/log/gearmand.pid -d
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=false
Restart=always
[Install]
WantedBy=multi-user.target
ESC
:wq
修改文件权限为只有root用户可以编辑该文件
chown -R root:root /etc/systemd/system/gearman.service
chmod -R 644 /etc/systemd/system/gearman.service
更新systemd
systemctl daemon-reload
systemctl enable gearman
systemctl start gearman
安装php扩展
yum install libgearman-devel -y
cd ~
wget https://github.com/wcgallego/pecl-gearman/archive/gearman-2.0.3.tar.gz
tar -zxvf gearman-2.0.3.tar.gz
cd pecl-gearman-gearman-2.0.3
phpize
./configure
make
make install
修改php.ini
vim /usr/local/gearman/php-7.0.13/lib/php.ini
extension=gearman.so
ESC
Centos7安装gearman和php扩展的更多相关文章
- mac下快速安装gearman和php扩展
1.brew install gearman 用brew安装gearman 2.pecl install gearman 用pecl安装php的gearman扩展 3.ln -s /usr/local ...
- Linux 上安装Gearman及其PHP扩展
安装Gearman服务端 # yum install -y uuid-devel libuuid libuuid-devel uuid boost-devel libevent libevent-de ...
- centos7安装PHP7的redis扩展
前言: 在本篇博客中,我将给大家介绍如何在Centos7上安装PHP-Redis扩展,关于如何在Centos上安装redis的,可以参考另外一篇博客:Centos7安装redis 想要在php中操作r ...
- centos7 安装sqlserver驱动以及扩展
安装sqlserver驱动 sudo su curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repo ...
- 如何在Centos7安装rabbitmq的PHP扩展
1.先安装rabbitmq-c, wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0 ...
- CentOS7 安装Redis和PHP-redis扩展
aemonize yes Redis是一个key-value存储系统,属于我们常说的NoSQL.它遵守BSD协议.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的AP ...
- Centos7 安装php7.3 并扩展 MySQL、postgresql
首先是安装需要的扩展文件 yum -y install freetype-devel yum -y install libpng-devel yum -y install libjpeg-devel ...
- CentOS7 安装PHP7的swoole扩展:
一.绪 Swoole简介 PHP异步网络通信引擎 最终编译为so文件作为PHP的扩展 准备工作 Linux环境 PHP7 swoole2.1 redis 源码安装PHP7 源码安装swoole htt ...
- centos7安装redist 以及redis扩展
wget http://download.redis.io/releases/redis-3.2.1.tar.gz 用wget下载 $ tar xzf redis-3.2.1.tar.gz 解 ...
随机推荐
- 二维码生成器,基于python,segno库
import segno temp = input("Please enter value:") qr = segno.make(temp) qr.save("qrcod ...
- python获取ip地址
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import socket,fcntl,struct #crontab下shell命令无 ...
- luoguP1600 天天爱跑步(NOIP2016)(主席树+树链剖分)
阅读体验: https://zybuluo.com/Junlier/note/1303550 为什么这一篇的Markdown炸了? # 天天爱跑步题解(Noip2016)(桶+树上差分 ^ 树剖+主席 ...
- 10、numpy——位运算
NumPy 位运算 NumPy "bitwise_" 开头的函数是位运算函数. NumPy 位运算包括以下几个函数: 函数 描述 bitwise_and 对数组元素执行位与操作 b ...
- Codeforces Round #460 (Div. 2) B Perfect Number(二分+数位dp)
题目传送门 B. Perfect Number time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- StatusStrip 分类: C# 2015-07-23 11:58 2人阅读 评论(0) 收藏
通过StatusStrip显示窗体状态栏 同时将状态栏分成三部分 居左边显示相关文字信息 中间空白显示 居右边显示时间信息 1.创建窗体及添加StatusStrip 默认StatusStrip名称 ...
- MySQL查询时报错Illegal mix of collations
开发十年,就只剩下这套架构体系了! >>> 1.具体场景 两张表分别为: CREATE TABLE `tb_user` ( `id` bigint(20) NOT NULL AU ...
- nginx部署静态资源
第一步.推荐使用EditPlus中ftp工具 安装,然后点击File->FTP->FTPUPLOAD->Settings->add.然后进行配置: 这样只是为了方便编辑Linu ...
- spring整合Quartz2持久化任务调度
转摘 https://blog.csdn.net/qwe6112071/article/details/50999386 因为通过Bean配置生成的JobDetail和CronTrigger或Simp ...
- 爬虫技术:cookies池的维护
一:为什么要维护cookie 1.登录才能爬取内容 2.爬取频繁会被封号. 3.需要维护多个账号的cookie,实现大规模抓取 二:cookies的要求 1.自动登录更新 2.定期筛选验证 3.提供外 ...