Created
September 16, 2011 02:44
-
-
Save nojimage/1221064 to your computer and use it in GitHub Desktop.
gearman with mysql in macports
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
sudo port install gearmand +drizzle | |
sudo port install php5-gearman | |
sudo vim /Library/LaunchDaemons/org.macports.gearmand.plist |
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
create database gearman_queue; | |
create table gearman_queue.queue ( | |
unique_key VARCHAR(64) PRIMARY KEY, | |
function_name VARCHAR(255), | |
priority INT, | |
-- when_to_run INT, -- in 0.20 | |
data LONGBLOB | |
); |
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
sudo port load gearmand |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" > | |
<plist version='1.0'> | |
<dict> | |
<key>Label</key><string>org.macports.gearmand</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/opt/local/bin/daemondo</string> | |
<string>--label=gearmand</string> | |
<string>--start-cmd</string> | |
<string>/opt/local/sbin/gearmand</string> | |
<string>-vv</string> | |
<string>--port=4730</string> | |
<string>-u</string> | |
<string>root</string> | |
<string>--pid-file=/opt/local/var/run/gearmand.pid</string> | |
<string>--log-file=/opt/local/var/log/gearmand.log</string> | |
<string>-q</string> | |
<string>libdrizzle</string> | |
<string>--libdrizzle-mysql</string> | |
<string>--libdrizzle-host=127.0.0.1</string> | |
<string>--libdrizzle-db=gearman_queue</string> | |
<string>--libdrizzle-table=queue</string> | |
<string>--libdrizzle-user=gearman</string> | |
<string>--libdrizzle-password=gearman</string> | |
<string>;</string> | |
<string>--pid=exec</string> | |
</array> | |
<key>Debug</key><false/> | |
<key>Disabled</key><true/> | |
<key>KeepAlive</key><true/> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DBユーザとかは適当に作ってね。