mongrel 2設置マニュアル


mongrel 2は効率的なウェブサーバのフレームです。
0.依存ソフトウェアのインストール
1)GNU make(gmake)
2)ZeroMQ 2.1.4 for the messaging
 

  
  
  
  
  1. wget http://download.zeromq.org/zeromq-2.1.7.tar.gz   
  2. tar -xzvf zeromq-2.1.7.tar.gz   
  3. cd zeromq-2.1.7/   
  4. ./configure   
  5. make   
  6. sudo make install  
3)SQLite3.

  
  
  
  
  1. wget http://sqlite.org/sqlite-autoconf-3070603.tar.gz   
  2. tar -zxvf sqlite-autoconf-3070603.tar.gz   
  3. cd sqlite-autoconf-3070603   
  4. ./configure   
  5. make;make install;   
  6. echo "//usr/local/lib" >> /etc/ld.so.conf   
  7. ldconfig 
1.
http://mongrel2.org/static/downloads/mongrel2-1.7.3.tar.bz2
2.
 

   
   
   
   
  1. tar -jxvf mongrel2-1.7.3.tar.bz2   
  2.  
  3. cd mongrel2-1.7.3   
  4. vi Makefile   
  5. LIBS=-lzmq -ldl -lsqlite3 $(OPTLIBS) LIBS=-lzmq -ldl -lsqlite3 -L/usr/local/lib $(OPTLIBS)   
  6. make all install 
3.

   
   
   
   
  1. mkdir run logs tmp   
  2.  
  3. m2sh start -host localhost 
4.
echo "test" > tests/index.html
wget http://127.0.0.1:6767
5.
 

    
    
    
    
  1. [root@localhost mongrel2-1.7.3]# sqlite3 config.sqlite   
  2.  
  3. SQLite version 3.7.6.3   
  4.  
  5. Enter ".help" for instructions   
  6.  
  7. Enter SQL statements terminated with a ";"   
  8.  
  9. sqlite> .table   
  10.  
  11. directory host mimetype route setting   
  12.  
  13. handler log proxy server statistic   
  14.  
  15. sqlite> select * from server;   
  16.  
  17. 1|f400bf85-4538-4f7a-8908-67e313d515c2|/logs/access.log|/logs/error.log|./|/run/mongrel2.pid|localhost|test|0.0.0.0|6767|0