Last active
January 5, 2017 21:09
-
-
Save CauanCabral/5967374 to your computer and use it in GitHub Desktop.
Install Gearman 1.1.12 on OpenSuse 13.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Gearman Job Server | |
Wants=network.target | |
[Service] | |
ExecStart=/usr/local/sbin/gearmand \ | |
--daemon \ | |
--listen=127.0.0.1 \ | |
--pid-file=/var/run/gearman/gearmand.pid \ | |
--log-file=/var/log/gearman/gearmand.log | |
# Example with MySQL Persistent | |
# -q MySQL \ | |
# --mysql-host=localhost \ | |
# --mysql-port=3306 \ | |
# --mysql-user=mygearman \ | |
# --mysql-password=mypass \ | |
# --mysql-db=gearman \ | |
# --mysql-table=gearman_queue | |
# Example with Postgres Persistent | |
# -q Postgres \ | |
# --libpq-conninfo "hostaddr=127.0.0.1 port=5432 dbname=gearman user=mygearman password=mypass" | |
# --libpq-table=queue | |
Type=forking | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
echo "Install gearman dependencies ------------------------------" | |
zypper in -l --recommends gcc-g++ boost-devel gperf libevent-devel postgresql-devel libmysqlclient-devel libuuid-devel | |
clear | |
echo "Download gearman-------------------------------------------" | |
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz | |
clear | |
echo "Upnziping gearman------------------------------------------" | |
tar -zxf gearmand-1.1.12.tar.gz | |
cd gearmand-1.1.12 | |
clear | |
echo "Configure gearman------------------------------------------" | |
./configure --with-postgresql=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config | |
clear | |
echo "Compile and install----------------------------------------" | |
make && make install | |
clear | |
echo "Create user and group--------------------------------------" | |
useradd -r -s /bin/bash -g gearman gearman | |
echo "Create system directories----------------------------------" | |
mkdir -p /var/run/gearman /var/log/gearman | |
chown gearman /var/run/gearman | |
chown gearman /var/log/gearman | |
clear | |
echo "Install Sytemd Service for Gearman" | |
cd .. | |
wget https://gist.github.com/CauanCabral/5967374/raw/9ca1a323ccc6c58fecbba7b6fe60420f255a46cd/gearmand.service | |
cp gearmand.service /etc/systemd/system/gearmand.service | |
systemctl enable gearmand.service | |
clear | |
echo "Install PHP extension for gearman--------------------------" | |
pecl install gearman | |
src=`find /usr/ -name 'gearman.so' 2> /dev/null` | |
echo extension=\"$src\" >> /etc/php5/conf.d/gearman.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you meant gcc-c++ on your zypper install.. Not sure exactly what a compiler for google plus would do.. ;)