Last active
September 7, 2015 16:53
-
-
Save KitaitiMakoto/05dbe4652a9b9fdc8654 to your computer and use it in GitHub Desktop.
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
vagrant@epub-searcher-demo:~$ sudo -udroonga-http-server bash -c 'cd /home/droonga-http-server/droonga && droonga-http-server --daemon --pid-file=/var/run/droonga-http-server/droonga-http-server.pid --system-log-level=trace --droonga-engine-port=10031' |
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
# DigitalOcean Ubuntu 15.04 | |
%w[ | |
make | |
gcc | |
patch | |
curl | |
git | |
vim | |
zlib1g-dev | |
nginx | |
ruby | |
ruby-dev | |
nodejs | |
npm | |
nodejs-legacy | |
libxml2-dev | |
libxslt1-dev | |
libssl-dev | |
].each do |pkg| | |
package pkg | |
end | |
execute "add-apt-repository -y ppa:groonga/ppa" do | |
not_if "test -e /etc/apt/sources.list.d/groonga-ubuntu-ppa-vivid.list" | |
end | |
%w[ | |
groonga | |
libgroonga-dev | |
groonga-tokenizer-mecab | |
].each do |pkg| | |
package pkg | |
end | |
gem_package "bundler" | |
execute "npm -g install bower" do | |
not_if "type bower" | |
end | |
execute "curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | bash" do | |
not_if "type droonga-engine" | |
end | |
execute "curl https://raw.githubusercontent.com/droonga/droonga-http-server/master/install.sh | bash" do | |
not_if "type droonga-http-server" | |
end | |
template "/etc/nginx/sites-available/epub-searcher-demo" do | |
source :auto | |
owner "root" | |
group "root" | |
mode "0755" | |
notifies :reload, "service[nginx]" | |
end | |
link "/etc/nginx/sites-enabled/epub-searcher-demo" do | |
user "root" | |
to "/etc/nginx/sites-available/epub-searcher-demo" | |
end | |
directory "/var/www/epub-searcher" do | |
owner "www-data" | |
group "www-data" | |
mode "0755" | |
end | |
directory "/var/run/epub-searcher" do | |
owner "www-data" | |
group "www-data" | |
mode "0755" | |
end | |
%w[ | |
nginx | |
droonga-engine | |
].each do |srv| | |
service srv do | |
action [:start, :enable] | |
end | |
end | |
service "droonga-http-server" do | |
action :start | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment