2014-11-06 38 views
12

由于配置错误,我将VPS从CentOs 6迁移到CentOs 7以重新开始。除此之外,我在CentOs 6上安装了豆杆服务。用于CentOs的Beanstalk 7

当时我按照这个教程http://viewsfromtheside.com/2014/06/12/install-beanstalkd-centos-6/,它对我来说非常合适。

但现在,我无法在我的CentOs 7版本上安装Beanstalkd。

我用于EPEL回购那些行:

# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm 
# rpm -ivh epel-release-7-2.noarch.rpm 

然后我试图:

# yum install beanstalkd --enablerepo=epel-testing 

和:

# yum --disablerepo="*" --enablerepo="epel" list available | grep 'beanstalkd' 

甚至:

# yum search beanstalkd 

但仍然:没有找到匹配:豆杆...

我是新来的CentOs和EPEL回购,所以也许我错过了什么?无论如何,我如何在CentOs 7上安装Beanstalkd?

回答

16

是的,你可以通过GIT中安装装配,然后复制systemd脚本:

步骤0安装混帐

yum install git

第1步:克隆库

git clone git://github.com/kr/beanstalkd.git 
cd beanstalkd 
make 
cp beanstalkd /usr/bin/beanstalkd 
mkdir /var/lib/beanstalkd 

第2步。启动s CRIPT

与此内容创建文件/etc/systemd/system/beanstalkd.service

[Unit] 
Description=Beanstalkd is a simple, fast work queue 

[Service] 
User=root 
ExecStart=/usr/bin/beanstalkd -b /var/lib/beanstalkd 

[Install] 
WantedBy=multi-user.target 

第3步:最后,运行

systemctl enable beanstalkdsystemctl start beanstalkd

第4步。检查

ps ax | grep beanstalkd

+0

运行为无人更好? https://github.com/kr/beanstalkd/blob/master/adm/systemd/beanstalkd.service – 2015-04-06 15:21:00

+0

值得一提的一个干净的服务器,包gcc,git,make都是必需的 'yum install gcc git make' 此外,如果您执行'make install',则不需要复制到/ usr/bin,因为它安装到/ usr/local/bin,这需要在启动脚本中更改 'ExecStart =/usr/local/bin/beanstalkd -b在/ var/lib中/ beanstalkd' – 2015-10-26 14:45:01

0

我能够从源头上建立在CentOS 7只是混帐克隆它:

https://github.com/kr/beanstalkd

然后让,使安装的注意那里。 这个工程,但我无法守护它,并找不到Centos 7的启动脚本。 最后只是在supervisord中配置它,以确保它始终运行。