amazon linuxにranetoをインストールする方法です。
yum -y install nodejs npm --enablerepo=epel wget https://github.com/gilbitron/Raneto/archive/0.6.0.tar.gz tar -zxvf 0.6.0.tar.gz mv Raneto-0.6.0/* /var/www/html/raneto/ cd /var/www/html/raneto/ npm install
webサーバがnginxの場合の設定は以下の通りです。
upstream nodejs {
server localhost:2368;
}
server {
listen 80;
server_name _;
root /var/www/html/raneto;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location /public {
rewrite ^/public/(.*)$ /core/built/public/$1;
}
location /core/built/public {
}
location / {
proxy_pass http://nodejs/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
cd /var/www/html/raneto npm start &
http://{domain}/にWebアクセスするとRanetoが開きます。 mdファイルを/var/www/html/raneto/content/下に配置することでWebアクセスが可能になります。
/var/www/html/raneto/content/test.md
→http://{domain}/test
/var/www/html/raneto/content/sample/test.md
→http://{domain}/sample/test


