OS

[raspberry pi] lighttpd, php 설치

2013.07.03 15:05
https://github.com/SSilence/selfoss.wiki.git

The Raspberry Pi is a great device for running simple web services as it uses only a few watts of electricity and can be kept running all the time. Selfoss performs very well on the device due to Selfoss's efficient code, unlike Tiny Tiny RSS which doesn't run fast enough on the Pi. I've compared performance running Selfoss on the Pi to a free web hosting service and the performance was near identical.

Installation

Install the following:

sudo apt-get install lighttpd php5 php5-cgi php5-cli php5-sqlite php5-gd

Configure lighttpd

sudo /usr/sbin/lighttpd-enable-mod fastcgi fastcgi-php

unzip (as root) selfoss into /var/www so the directory is /var/www/selfoss

sudo chown -R www-data:www-date /var/www/selfoss/

Edit "/etc/lighttpd/lighttpd.conf": in server.modules uncomment "mod_rewrite"

Add the following:

"^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
 "^/selfoss/favicons/(.*)$" => "/selfoss/data/favicons/$1",
 "^/selfoss/thumbnails/(.*)$" => "/selfoss/data/thumbnails/$1",
 "^/selfoss/(.*.(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1",
 "^/selfoss/index.php(.*)$" => "$0",
 "^/selfoss/([^\?]*)(\?(.*))?" => "/selfoss/index.php?$3",
 "^/selfoss/public/" => "$0",
 "^/selfoss/(.*)" => "/selfoss/index.php$1"
)
Edit /etc/php5/cgi/php.ini: max_execution_time = 60

cd /var/www/selfoss/

Edit .htaccess uncomment "RewriteBase /selfoss"

Copy default.ini to config.ini Edit config.ini: auto_mark_as_read=1

Add the update to the root crontab: sudo crontab -e

Then add the following:

*/35 6-23 * * * su - www-data -c "/usr/bin/php /var/www/selfoss/update.php" >>/tmp/selfoss_update.log 2>&1

Restart lighttpd: sudo service lighttpd restart

Open selfoss in your web browser by going to http://{hostipaddress}/selfoss The first run may give a timeout error whilst it sets up the environment. From then on it should work fine.


'OS' 카테고리의 다른 글

[Linux] 폴더 유저 권한 변경  (0) 2013.07.29
[ubuntu] root 계정 비밀번호 부여하기  (0) 2013.07.09
[raspberry pi] lighttpd, php 설치  (0) 2013.07.03
[Ubuntu] 종료, 재시작 명령어  (0) 2013.06.29
mswinsck.ocx 오류 발생시  (0) 2013.03.04
mscomctl.ocx 오류 발생시  (0) 2013.03.04