15

Due to a misconfiguration I've migrated a VPS from CentOs 6 to CentOs 7 for a fresh start. Among other things I had a beanstalkd service installed on CentOs 6.

At the time I've followed this tutorial http://viewsfromtheside.com/2014/06/12/install-beanstalkd-centos-6/ and it worked perfectly for me.

But now, I can't install Beanstalkd on my CentOs 7 version.

I used those line for EPEL repo :

# 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

Then I tried :

# yum install beanstalkd --enablerepo=epel-testing

and :

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

and even :

#  yum search beanstalkd

But still : No matches found for: beanstalkd ...

I am new to CentOs and EPEL repos, so maybe I missed something ? Anyway, how can I install Beanstalkd on CentOs 7 ?

Hrusdik
  • 225
  • 3
  • 8

5 Answers5

20

Yes, you can instal it via git and then copy systemd script:

Step 0. Install git

yum install git

Step 1. Clone repository

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

Step 2. Make startup script

Create file /etc/systemd/system/beanstalkd.service with this content:

[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

Step 3. Finally, run

systemctl enable beanstalkd and systemctl start beanstalkd

Step 4. Check

ps ax | grep beanstalkd

Maxim Demkin
  • 1,215
  • 11
  • 13
  • run as nobody better? https://github.com/kr/beanstalkd/blob/master/adm/systemd/beanstalkd.service – Zero Zhang Apr 06 '15 at 15:21
  • 2
    worth mentioning for a clean server, packages gcc, git, make are all required `yum install gcc git make` Also if you do `make install` then copy to /usr/bin not needed as it installs to /usr/local/bin which would need changing in startup script `ExecStart=/usr/local/bin/beanstalkd -b /var/lib/beanstalkd` – Kevin Andrews Oct 26 '15 at 14:45
  • Don't forget `systemctl daemon-reload` after you create the service file. Also, if you don't want the default 65335 bytes, you can add `-z BYTES` to the argument in the service file. – n0nag0n Oct 25 '20 at 15:37
3
  1. yum install beanstalkd
  2. service beanstalkd start
  3. service beanstalkd status
Ankit Vishwakarma
  • 1,573
  • 16
  • 13
2

A request to publish a beanstalkd rpm package in EPEL for CentOS 7 has been made via https://bugzilla.redhat.com/show_bug.cgi?id=1139358. You have to wait for the package maintainer to publish a package.

Meanwhile you can build your own package or download and install the RPM from http://cbs.centos.org/koji/buildinfo?buildID=686:

yum install http://cbs.centos.org/kojifiles/packages/beanstalkd/1.9/3.el7/x86_64/beanstalkd-1.9-3.el7.x86_64.rpm
prupert
  • 29
  • 5
0

I was able to build from source on Centos 7. Just git clone it:

https://github.com/kr/beanstalkd

Then make, make install as noted there. This works but I could not daemonize it and could not find startup scripts for Centos 7. Ended up just configuring it in supervisord to make sure it always runs.

0

Four easy steps to install, enable on boot, start and check status for beanstalkd service on Centos 7:

  • yum install beanstalkd
  • systemctl enable beanstalkd
  • service beanstalkd start
  • service beanstalkd status
Sinan Eldem
  • 5,564
  • 3
  • 36
  • 37