mongrel2是一个高效的web服务器框架

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.下载
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
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