mongrel2是一个高效的web服务器框架
0.安装依赖软件
1)GNU make (gmake).
2)ZeroMQ 2.1.4 for the messaging
- wget http://download.zeromq.org/zeromq-2.1.7.tar.gz
- tar -xzvf zeromq-2.1.7.tar.gz
- cd zeromq-2.1.7/
- ./configure
- make
- sudo make install
3)SQLite3.
- wget http://sqlite.org/sqlite-autoconf-3070603.tar.gz
- tar -zxvf sqlite-autoconf-3070603.tar.gz
- cd sqlite-autoconf-3070603
- ./configure
- make;make install;
- echo "//usr/local/lib" >> /etc/ld.so.conf
- ldconfig
1.下载
2.安装
- tar -jxvf mongrel2-1.7.3.tar.bz2
-
- cd mongrel2-1.7.3
- vi Makefile
- 把第二行LIBS=-lzmq -ldl -lsqlite3 $(OPTLIBS)改为LIBS=-lzmq -ldl -lsqlite3 -L/usr/local/lib $(OPTLIBS)
- make all install
3.运行
- mkdir run logs tmp
-
- m2sh start -host localhost
4.访问
echo "test" > tests/index.html
5.配置
- [root@localhost mongrel2-1.7.3]# sqlite3 config.sqlite
-
- SQLite version 3.7.6.3
-
- Enter ".help" for instructions
-
- Enter SQL statements terminated with a ";"
-
- sqlite> .table
-
- directory host mimetype route setting
-
- handler log proxy server statistic
-
- sqlite> select * from server;
-
- 1|f400bf85-4538-4f7a-8908-67e313d515c2|/logs/access.log|/logs/error.log|./|/run/mongrel2.pid|localhost|test|0.0.0.0|6767|0