Category Archives: Raspberry PI

Raspberry PI 부팅시 전체 화면 크롬 실행

1. 관련 패키지 설치
# sudo apt-get update
# sudo apt-get dist-upgrade
# sudo apt-get install matchbox chromium x11-xserver-utils ttf-mscorefonts-installer xwit sqlite3 libnss3
# sudo reboot

2. /etc/rc.local 에 실행 구문 추가
if [ -f /boot/xinitrc ]; then
ln -fs /boot/xinitrc /home/pi/.xinitrc;
su – pi -c ’startx’ &
fi

3. /boot/xinitrc 생성
#!/bin/sh
while true; do

# Clean up previously running apps, gracefully at first then harshly
killall -TERM chromium 2>/dev/null;
killall -TERM matchbox-window-manager 2>/dev/null;
sleep 2;
killall -9 chromium 2>/dev/null;
killall -9 matchbox-window-manager 2>/dev/null;

# Clean out existing profile information
rm -rf /home/pi/.cache;
rm -rf /home/pi/.config;
rm -rf /home/pi/.pki;

# Generate the bare minimum to keep Chromium happy!
mkdir -p /home/pi/.config/chromium/Default
sqlite3 /home/pi/.config/chromium/Default/Web Data ”CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); INSERT INTO meta VALUES(’version’,’46’); CREATE TABLE keywords (foo INTEGER);”;

# Disable DPMS / Screen blanking
xset -dpms
xset s off

# Reset the framebuffer’s colour-depth
fbset -depth $( cat /sys/module/*fb*/parameters/fbdepth );

# Hide the cursor (move it to the bottom-right, comment out if you want mouse interaction)
xwit -root -warp $( cat /sys/module/*fb*/parameters/fbwidth ) $( cat /sys/module/*fb*/parameters/fbheight )

# Start the window manager (remove ”-use_cursor no” if you actually want mouse interaction)
matchbox-window-manager -use_titlebar no -use_cursor no &

# Start the browser
chromium –app=[URL]
done;

 

 

Raspberry PI Nginx + PHP5 + Maria DB Install

1. Maria DB 설치
# sudo wget -O /etc/apt/sources.list.d/repository.pi3g.com.list http://repository.pi3g.com/sources.list
# wget -O – http://repository.pi3g.com/pubkey | sudo apt-key add –
# sudo apt-get update
# sudo apt-get upgrade
# apt-get install mariadb-server

2. Nginx + PHP 5 설치
# sudo apt-get install nginx php5-fpm php5-cli php5-curl php5-gd php5-mcrypt php5-mysql