mongrel 2設置マニュアル
mongrel 2は効率的なウェブサーバのフレームです。
0.依存ソフトウェアのインストール
1)GNU make(gmake)
2)ZeroMQ 2.1.4 for the messaging
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.
http://mongrel2.org/static/downloads/mongrel2-1.7.3.tar.bz2
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
wget
http://127.0.0.1:6767
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