Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/springmt/hello_world_rack
hello_world_rack
https://github.com/springmt/hello_world_rack
Last synced: about 2 months ago
JSON representation
hello_world_rack
- Host: GitHub
- URL: https://github.com/springmt/hello_world_rack
- Owner: SpringMT
- Created: 2012-03-07T07:49:05.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-03-20T15:56:12.000Z (almost 13 years ago)
- Last Synced: 2024-12-07T00:55:10.526Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# This is only show "Hello World" rack app
## setup
~~~
root
# yum install git
# yum install libyaml libyaml-devel
# yum install zlib-devel
# yum install openssl-devel
# yum install curl-develruby setup
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ exec $SHELL
$ mkdir src
$ cd src
$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
$ tar zxf ruby-1.9.3-p125.tar.gz
$ cd ruby-1.9.3-p125
$ ./configure —prefix=$HOME/.rbenv/versions/1.9.3-p125
$ make
$ make install
$ cd
$ rbenv global 1.9.3-p125
$ source .bash_profile$ git clone git://github.com/SpringMT/hello_world_rack.git
$ cd hello_world_rack
$ bundle install
$ bundle exec passenger-install-apache2-module
~~~## rackup test
~~~
$ cd ~/hello_world_rack
$ rackup -I . -p 3000
access http://localhost:3000
~~~## passenger
* passenger need apache~~~~
Edit httpd.conf
Mac /private/etc/apache2/httpd.conf
Linux /etc/http/conf/httpd.confadd berow text at httpd.conf
Include $HOME/hello_world_rack/*.conf
Please rewrite $HOME properly based on your env.and rewrite passenger.conf properly
~~~~## unicorn
~~~
$ cd ~/hello_world_rack
bundle exec unicorn -I ./ -p 3000 -D -c unicorn.rb
access http://localhost:3000
~~~## nginx
~~~
brew install nginx or yum install nginxEdit nginx.conf for properly
Mac /usr/local/etc/nginx/nginx.conf
Linux~~~
## performance test
~~~
ab -c 10 -n 100 [PATH]
~~~## plack
~~~
mkdir extlib
wget --no-check-certificate http://cpanmin.us/curl -L http://xrl.us/perlbrew > perlbrew
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
perl perlbrew install
rm perlbrew
echo 'source $HOME/perl5/perlbrew/etc/bashrc' >> ~/.bashrc
source .bashrc
perlbrew init
perlbrew install 5.14.2
perlbrew switch perl-5.14.2
perl cpanm -v -L extlib Module::CoreList
perl cpanm -v -L extlib Module::Install CPAN
perl cpanm -v -L extlib Plack
perl cpanm -v -L extlib Starman
perl cpanm -v -L extlib Plack::Runnerstarman --workers=60 -p 3000 app.psgi
~~~## thin
~~~
bundle exec thin start --servers 30 -d
~~~