"Raspberry Pi"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
(같은 사용자의 중간 판 45개는 보이지 않습니다) | |||
12번째 줄: | 12번째 줄: | ||
http://assets.windowsphone.com/3f82dfe6-a179-4ddf-9738-91989190c3fa/IoT-rpi2-board_InvariantCulture_Default.png | http://assets.windowsphone.com/3f82dfe6-a179-4ddf-9738-91989190c3fa/IoT-rpi2-board_InvariantCulture_Default.png | ||
+ | |||
+ | Raspberry Pi 3 B 사양 | ||
+ | * 4 Core (1.2 GHz) / 1 GB Memory / 16 GB Disk | ||
+ | * CentOS Linux release 7.5.1804 (AltArch), 32 bits | ||
== 싱글 보드 컴퓨터의 종류 == | == 싱글 보드 컴퓨터의 종류 == | ||
125번째 줄: | 129번째 줄: | ||
:* CentOS Linux release 7.5.1804 (Core), 32 bits | :* CentOS Linux release 7.5.1804 (Core), 32 bits | ||
:* 4 cores | :* 4 cores | ||
+ | |||
+ | Disk resize | ||
+ | |||
+ | rootfs-expand | ||
+ | df -h | ||
Network 설정 | Network 설정 | ||
− | systemctl stop NetworkManager.service | + | # systemctl stop NetworkManager.service |
− | systemctl disable NetworkManager.service | + | # systemctl disable NetworkManager.service |
− | systemctl status NetworkManager.service | + | # systemctl status NetworkManager.service |
− | + | # | |
# systemctl stop firewalld.service | # systemctl stop firewalld.service | ||
# systemctl disable firewalld.service | # systemctl disable firewalld.service | ||
140번째 줄: | 149번째 줄: | ||
# setenforce 0 | # setenforce 0 | ||
# shutdown -r now | # shutdown -r now | ||
− | + | # | |
− | cd /etc/sysconfig/network-scripts | + | # cd /etc/sysconfig/network-scripts |
− | mv ifcfg-link nouse_ifcfg-link | + | # mv ifcfg-link nouse_ifcfg-link |
− | vi ifcfg-eth0 | + | # vi ifcfg-eth0 |
− | + | # DEVICE=eth0 | |
− | + | # TYPE="Ethernet" | |
− | + | # BOOTPROTO="dhcp" | |
− | + | # ONBOOT="yes" | |
− | + | # NM_CONTROLLED="no" | |
− | shutdown -r now | + | # shutdown -r now |
# systemctl restart network.service | # systemctl restart network.service | ||
− | ping -c 3 google -v | + | # ping -c 3 google -v |
WiFi 설정 | WiFi 설정 | ||
− | wpa_passphrase ${SSID} ${비밀번호} #--- WPA2 등을 사용할 경우 psk 값을 생성 | + | yum -y install wpa_supplicant NetworkManager NetworkManager-wifi |
− | vi /etc/wpa_supplicant/wpa_supplicant.conf | + | systemctl enable NetworkManager.service |
− | + | systemctl disable NetworkManager-wifi.service | |
− | + | systemctl start NetworkManager.service | |
− | + | systemctl stop NetworkManager-wifi.service | |
− | + | ||
− | + | nmcli dev wifi rescan | |
− | + | nmcli dev wifi list #--- WiFi 이름 확인 | |
− | + | nmcli --ask dev wifi connect ${와이파이_이름} #--- WiFi 연결 | |
− | + | ||
+ | # cd /etc/sysconfig/network-scripts | ||
+ | # vi ifcfg-wlan0 | ||
+ | # DEVICE=wlan0 | ||
+ | # TYPE="Ethernet" | ||
+ | # BOOTPROTO="dhcp" | ||
+ | # ONBOOT="yes" | ||
+ | # NM_CONTROLLED="no" | ||
+ | # wpa_cli reconfigure | ||
+ | # ifdown wlan0 | ||
+ | # ifup wlan0 | ||
+ | # | ||
+ | # vi /etc/sysconfig/wpa_supplicant | ||
+ | # wpa_passphrase ${SSID} ${비밀번호} #--- WPA2 등을 사용할 경우 psk 값을 생성 | ||
+ | # vi /etc/wpa_supplicant/wpa_supplicant.conf | ||
+ | # ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev #--- netdev, wheel | ||
+ | # network={ | ||
+ | # ssid="접속하고자 하는 wifi 이름" | ||
+ | # psk="접속하고자 하는 wifi 비밀번호" | ||
+ | # # psk=NONE #--- 비밀번호 없음 | ||
+ | # scan_ssid=1 #--- SSID를 자동으로 찾기 | ||
+ | # # key_mgmt=WPA-PSK | ||
+ | # priority=1 | ||
+ | # } | ||
− | + | Bluetooth 설정 | |
− | + | # yum -y install NetworkManager-bluetooth | |
+ | # # systemctl enable NetworkManager-bluetooth.service | ||
+ | # # systemctl start NetworkManager-bluetooth.service | ||
+ | # systemctl restart NetworkManager.service | ||
기본 S/W 설치 | 기본 S/W 설치 | ||
yum -y install which | yum -y install which | ||
+ | # yum -y install wireless-tools wpa_supplicant dhcpcd | ||
+ | |||
+ | timedatectl list-timezones | grep -i seoul | ||
+ | timedatectl set-timezone Asia/Seoul | ||
참고 문헌 | 참고 문헌 | ||
+ | * https://soulsearcher.github.io/blog/2017/11/23/centos7_setup2/ | ||
* https://rharmonson.github.io/cos7instpi.html | * https://rharmonson.github.io/cos7instpi.html | ||
+ | |||
+ | === Raspberry Pi 3에 GNOME 설치 === | ||
+ | |||
+ | yum -y install "GNOME Desktop" | ||
+ | |||
+ | #--- 대기 모드 끄기 | ||
+ | vi /etc/systemd/logind.conf | ||
+ | HandleLidSwitch=ignore | ||
+ | |||
+ | systemctl restart systemd-logind.service | ||
=== Raspberry Pi 2에 CentOS 7 설치 === | === Raspberry Pi 2에 CentOS 7 설치 === | ||
242번째 줄: | 292번째 줄: | ||
* https://rharmonson.github.io/cos7instpi.html | * https://rharmonson.github.io/cos7instpi.html | ||
− | === | + | === Raspberry Pi 3에 Raspbian 설치 === |
+ | |||
+ | * [http://sourceforge.net/projects/win32diskimager/?source=directory Win32 Disk Imager 사이트]에서 Win32DiskImager-0.9.5-install.exe 파일을 설치 합니다. | ||
+ | * [http://www.raspberrypi.org/downloads/ Raspberry Pi 다운로드 사이트]에서 Raspbian 파일을 다운로드 합니다. | ||
+ | :* 2018-10-09-raspbian-stretch-lite.img : Text 모드 | ||
+ | :* 2018-10-09-raspbian-stretch.img : GUI 모드 | ||
+ | * Win32 Disk Imager로 Micro SD 카드에 img 파일을 설치 합니다. | ||
+ | |||
+ | * Raspberry Pi로 부팅해서 다음 작업을 진행 합니다. pi / raspberry 로 로그인 한다. | ||
+ | raspi-config | ||
+ | #--- "4 Localisation Options" 선택 | ||
+ | |||
+ | #--- "1 Change Locale" : | ||
+ | #--- en_GB.UTF-8, en_US.UTF-8, ko_KR.UTF8 (디폴트), ko_KR.ECU-KR 선택 | ||
+ | #--- "2 Change Timezone" : Asia > Seoul | ||
+ | #--- "3 Change Keyboard Layout" | ||
+ | #--- Generic 105-key (Intl) PC > Other > Korean > Korean - Korean (101/104 key compatible) > The default for the keyboard layout > No compose key | ||
+ | #--- "4 Change Wi-fi Country" : US Unite States (KR Korea (South) 사용 않음) | ||
+ | |||
+ | #--- 업데이트 | ||
+ | apt-get update | ||
+ | apt-get upgrade | ||
+ | reboot | ||
+ | |||
+ | #--- 한글이 깨어지는 경우 | ||
+ | apt-get install ibus | ||
+ | apt-get install ibus-hangul | ||
+ | apt-get install fonts-unfonts-core | ||
+ | reboot | ||
+ | |||
+ | X11 (X-Window) 환경 구성 | ||
+ | apt install lxde lightdm xinit | ||
+ | # export DISPLAY=0.0 | ||
+ | startx | ||
+ | |||
+ | === IP 확인 === | ||
+ | |||
+ | mkdir -p /work/bin | ||
+ | cd /work/bin | ||
+ | vi raspberrypi.bash | ||
+ | #!/usr/bin/env bash | ||
+ | IPADDR=`/usr/sbin/ip addr list eth0 | /usr/bin/grep 'inet ' | /usr/bin/awk '{print \$2}'` | ||
+ | /usr/bin/curl http://www.obcon.biz/raspberrypi.php?ip=raspberrypi_2_${IPADDR} | ||
+ | chmod 755 raspberrypi.bash | ||
+ | |||
+ | crontab -e | ||
+ | * * * * * /work/bin/raspberrypi.bash | ||
+ | |||
+ | == S/W 설치 == | ||
+ | |||
+ | === Node.js 설치 === | ||
+ | |||
+ | * Node.js 8.9.4 | ||
+ | |||
+ | # yum list | grep nodejs | ||
+ | # yum -y install nodejs | ||
+ | |||
+ | yum -y install which wget | ||
+ | uname -m #--- ARM 아키텍처 확인 | ||
+ | mkdir -p /work/install | ||
+ | cd /work/install | ||
+ | #--- https://nodejs.org/dist/ | ||
+ | # wget https://nodejs.org/dist/v10.9.0/node-v10.9.0-linux-armv7l.tar.xz | ||
+ | # tar -xvf node-v10.9.0-linux-armv7l.tar.xz | ||
+ | # cd node-v10.9.0-linux-armv7l | ||
+ | wget https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-armv7l.tar.xz | ||
+ | tar -xvf node-v8.9.4-linux-armv7l.tar.xz | ||
+ | cd node-v8.9.4-linux-armv7l | ||
+ | |||
+ | /usr/bin/rm CHANGELOG.md LICENSE README.md | ||
+ | /usr/bin/cp -R * /usr/local/ | ||
+ | node -v | ||
+ | npm -v | ||
+ | |||
+ | === Python 설치 === | ||
+ | |||
+ | Python 2.7 설치 | ||
+ | yum -y install python python-IPy python-backports python-backports-ssl_match_hostname python-chardet python-cheetah python-configobj python-decorator python-firewall python-iniparse python-javapackages python-jsonpatch python-jsonpointer python-libs python-lxml python-markdown python-perf python-pillow python-prettytable python-progressbar python-pycurl python-pygments python-pyudev python-requestbuilder python-requests python-setuptools python-six python-slip python-slip-dbus python-urlgrabber python-urllib3 | ||
+ | |||
+ | python -V | ||
+ | |||
+ | |||
+ | Python 3.4 설치 | ||
+ | vi /etc/yum.repos.d/epel.repo | ||
+ | [epel] | ||
+ | name=Epel rebuild for armhfp | ||
+ | baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/ | ||
+ | enabled=1 | ||
+ | gpgcheck=0 | ||
+ | |||
+ | yum -y install python34 python34-pip | ||
+ | python3 -V | ||
+ | |||
+ | === GNOME에 VNC Server 설치 === | ||
− | + | * Raspberry Pi 7인치 Touch Screen Display | |
+ | :* LCD | ||
+ | :* 해상도 : 800 * 480 | ||
+ | :* Raspberry Pi 7inch HDMI LCD (C)의 경우 1024*600의 해상도를 지원하며 /boot/config.txt 파일을 수정하여야 합니다. | ||
− | + | * 사용자 : centos | |
+ | * VNC Port : 5901 port | ||
+ | * VNC Viewer : https://www.realvnc.com/en/connect/download/viewer/ | ||
+ | :* 접속시 "IP:5901"로 접속 한다. | ||
− | + | yum -y install tigervnc-server | |
+ | cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service | ||
+ | vi /lib/systemd/system/vncserver@:1.service | ||
+ | [Service] | ||
+ | Type=forking | ||
+ | |||
+ | # Clean any existing files in /tmp/.X11-unix environment | ||
+ | ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' | ||
+ | ExecStart=/usr/sbin/runuser -l centos -c "/usr/bin/vncserver %i" | ||
+ | PIDFile=/home/centos/.vnc/%H%i.pid | ||
+ | ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' | ||
+ | |||
+ | systemctl enable firewalld.service | ||
+ | systemctl restart firewalld.service | ||
+ | systemctl status firewalld.service | ||
+ | |||
+ | firewall-cmd --permanent --zone=public --add-service vnc-server | ||
+ | firewall-cmd --reload | ||
+ | |||
+ | su - centos #--- 일반 사용자로 vncserver 시작 | ||
+ | vncserver -geometry 800x480 | ||
+ | You will require a password to access your desktops. | ||
+ | |||
+ | Password: | ||
+ | Verify: | ||
+ | Would you like to enter a view-only password (y/n)? y | ||
+ | Password: | ||
+ | Verify: | ||
+ | xauth: file /home/centos/.Xauthority does not exist | ||
+ | |||
+ | New 'localhost.localdomain:1 (centos)' desktop is localhost.localdomain:1 | ||
+ | |||
+ | Creating default startup script /home/centos/.vnc/xstartup | ||
+ | Creating default config /home/centos/.vnc/config | ||
+ | Starting applications specified in /home/centos/.vnc/xstartup | ||
+ | Log file is /home/centos/.vnc/localhost.localdomain:1.log | ||
+ | # vncserver #--- vncserver 실행 | ||
+ | # vncserver -geometry 1920x1080 #--- 해상도를 지정한 후 vncserver 실행 | ||
+ | # vncserver -kill :포트번호 #--- vncserver 종료 | ||
+ | exit | ||
+ | |||
+ | systemctl daemon-reload | ||
+ | systemctl enable vncserver@:1.service | ||
+ | systemctl status vncserver@:1.service | ||
+ | reboot | ||
− | + | == 관리자 가이드 == | |
− | + | === 화면 로테이션 === | |
− | + | 화면을 180도 로테이션을 한다. 로테이션에 따라 터치 스크린 정보가 같이 수정 한다. | |
− | + | 참조 | |
+ | :* /sys/class/graphics/fbcon/rotate 파일 | ||
− | + | === GNOME용 한글 폰트 설치 === | |
− | + | GNOME에서 한글이 깨어지면 아래와 같이 작업 한다. | |
− | + | # yum -y install kde-l10n-Korean | |
+ | # yum -y install fonts-korean | ||
+ | yum -y install google-noto-sans-korean-fonts | ||
== 참고 문헌 == | == 참고 문헌 == | ||
<ul style="line-height: 20.7999992370605px;"> | <ul style="line-height: 20.7999992370605px;"> | ||
<li>[[Arduino|Arduino]]</li> | <li>[[Arduino|Arduino]]</li> | ||
+ | <li>[[Raspbian|Raspbian]]</li> | ||
<li>[http://dev.windows.com/en-us/featured/raspberrypi2support Windows 10 for Raspberry Pi 2]</li> | <li>[http://dev.windows.com/en-us/featured/raspberrypi2support Windows 10 for Raspberry Pi 2]</li> | ||
<li>[http://cafe.naver.com/pipc 라즈베리파이 네이버 카페]</li> | <li>[http://cafe.naver.com/pipc 라즈베리파이 네이버 카페]</li> |
2018년 11월 7일 (수) 19:03 기준 최신판
Raspberry Pi 정리
- 홈페이지 : http://www.raspberrypi.org/
- 다운로드 : http://www.raspberrypi.org/downloads/
- 라이선스 :
- 플랫폼 :
목차
Raspberry 개요
영국 Raspberry Pi 재단에서 만든 초소형 PC (2012.03), $35 (모델 B)
700 MHz * ARM * GPU / 512 MB Memory / SD 카드 / 100 M bits Network
영상 출력 : 컴포지트, HDMI, DSI
음성 출력 : 잭, HDMI
USB, GPIO
OS : NO OBS, 라즈비안, Apache Linux, Pidora, RISC OS
Raspberry Pi 3 B 사양
- 4 Core (1.2 GHz) / 1 GB Memory / 16 GB Disk
- CentOS Linux release 7.5.1804 (AltArch), 32 bits
싱글 보드 컴퓨터의 종류
싱글 보드 컴퓨터 | 상세 |
Arduino $27 |
|
Raspberry Pi (www.raspberrypi.org) $35 |
|
BeagleBone Black (BBB) (beagleboard.org) $55 |
|
Intel Gallireo $60 |
|
Intel Edison $50 |
|
OS 설치
Raspberry Pi 3에 CentOS 7 설치
- http://mirror.centos.org/altarch/7/isos/armhfp/ 사이트에서 CentOS 7 다운로드 (CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1804-sda.raw.xz)
- 압축을 풀어 CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1804-sda.raw 파일을 만든다.
- CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1804-sda.raw 파일은 SD에 굽는다.
- Etcher을 사용하여 SD에 굽는다.
root / centos 로 로그인하여 사용 한다.
- 설치된 사양
- CentOS Linux release 7.5.1804 (Core), 32 bits
- 4 cores
Disk resize
rootfs-expand df -h
Network 설정
# systemctl stop NetworkManager.service # systemctl disable NetworkManager.service # systemctl status NetworkManager.service # # systemctl stop firewalld.service # systemctl disable firewalld.service # systemctl status firewalld.service # # getenforce # vi /etc/sysconfig/selinux # SELINUX=disabled # setenforce 0 # shutdown -r now # # cd /etc/sysconfig/network-scripts # mv ifcfg-link nouse_ifcfg-link # vi ifcfg-eth0 # DEVICE=eth0 # TYPE="Ethernet" # BOOTPROTO="dhcp" # ONBOOT="yes" # NM_CONTROLLED="no" # shutdown -r now # systemctl restart network.service # ping -c 3 google -v
WiFi 설정
yum -y install wpa_supplicant NetworkManager NetworkManager-wifi systemctl enable NetworkManager.service systemctl disable NetworkManager-wifi.service systemctl start NetworkManager.service systemctl stop NetworkManager-wifi.service nmcli dev wifi rescan nmcli dev wifi list #--- WiFi 이름 확인 nmcli --ask dev wifi connect ${와이파이_이름} #--- WiFi 연결 # cd /etc/sysconfig/network-scripts # vi ifcfg-wlan0 # DEVICE=wlan0 # TYPE="Ethernet" # BOOTPROTO="dhcp" # ONBOOT="yes" # NM_CONTROLLED="no" # wpa_cli reconfigure # ifdown wlan0 # ifup wlan0 # # vi /etc/sysconfig/wpa_supplicant # wpa_passphrase ${SSID} ${비밀번호} #--- WPA2 등을 사용할 경우 psk 값을 생성 # vi /etc/wpa_supplicant/wpa_supplicant.conf # ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev #--- netdev, wheel # network={ # ssid="접속하고자 하는 wifi 이름" # psk="접속하고자 하는 wifi 비밀번호" # # psk=NONE #--- 비밀번호 없음 # scan_ssid=1 #--- SSID를 자동으로 찾기 # # key_mgmt=WPA-PSK # priority=1 # }
Bluetooth 설정
# yum -y install NetworkManager-bluetooth # # systemctl enable NetworkManager-bluetooth.service # # systemctl start NetworkManager-bluetooth.service # systemctl restart NetworkManager.service
기본 S/W 설치
yum -y install which # yum -y install wireless-tools wpa_supplicant dhcpcd timedatectl list-timezones | grep -i seoul timedatectl set-timezone Asia/Seoul
참고 문헌
- https://soulsearcher.github.io/blog/2017/11/23/centos7_setup2/
- https://rharmonson.github.io/cos7instpi.html
Raspberry Pi 3에 GNOME 설치
yum -y install "GNOME Desktop" #--- 대기 모드 끄기 vi /etc/systemd/logind.conf HandleLidSwitch=ignore systemctl restart systemd-logind.service
Raspberry Pi 2에 CentOS 7 설치
- http://mirror.centos.org/altarch/7/isos/armhfp/ 사이트에서 CentOS 7 다운로드 (CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1804-sda.raw.xz)
- 압축을 풀어 CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1804-sda.raw 파일을 만든다.
- CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1804-sda.raw 파일은 SD에 굽는다.
- Etcher을 사용하여 SD에 굽는다.
root / centos 로 로그인하여 사용 한다.
- 설치된 사양
- CentOS Linux release 7.5.1804 (Core), 32 bits
- 4 cores
Network 설정
systemctl stop NetworkManager.service systemctl disable NetworkManager.service systemctl status NetworkManager.service # systemctl stop firewalld.service # systemctl disable firewalld.service # systemctl status firewalld.service # # getenforce # vi /etc/sysconfig/selinux # SELINUX=disabled # setenforce 0 # shutdown -r now cd /etc/sysconfig/network-scripts mv ifcfg-link nouse_ifcfg-link vi ifcfg-eth0 DEVICE=eth0 TYPE="Ethernet" BOOTPROTO="dhcp" ONBOOT="yes" NM_CONTROLLED="no" shutdown -r now # systemctl restart network.service ping -c 3 google -v
Disk resize
rootfs-expand lsblk df -h
# [root@localhost ~]# lsblk -l # NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT # mmcblk0 179:0 0 14.7G 0 disk # mmcblk0p2 179:2 0 488M 0 part [SWAP] # mmcblk0p3 179:3 0 1.4G 0 part / # mmcblk0p1 179:1 0 668M 0 part /boot # # # fdisk /dev/mmcblk0 # #--- p d 3 # #--- n p 3 엔터 엔터 # #--- w # shutdown -r now
기본 S/W 설치
yum -y install which
참고 문헌
Raspberry Pi 3에 Raspbian 설치
- Win32 Disk Imager 사이트에서 Win32DiskImager-0.9.5-install.exe 파일을 설치 합니다.
- Raspberry Pi 다운로드 사이트에서 Raspbian 파일을 다운로드 합니다.
- 2018-10-09-raspbian-stretch-lite.img : Text 모드
- 2018-10-09-raspbian-stretch.img : GUI 모드
- Win32 Disk Imager로 Micro SD 카드에 img 파일을 설치 합니다.
- Raspberry Pi로 부팅해서 다음 작업을 진행 합니다. pi / raspberry 로 로그인 한다.
raspi-config #--- "4 Localisation Options" 선택 #--- "1 Change Locale" : #--- en_GB.UTF-8, en_US.UTF-8, ko_KR.UTF8 (디폴트), ko_KR.ECU-KR 선택 #--- "2 Change Timezone" : Asia > Seoul #--- "3 Change Keyboard Layout" #--- Generic 105-key (Intl) PC > Other > Korean > Korean - Korean (101/104 key compatible) > The default for the keyboard layout > No compose key #--- "4 Change Wi-fi Country" : US Unite States (KR Korea (South) 사용 않음) #--- 업데이트 apt-get update apt-get upgrade reboot #--- 한글이 깨어지는 경우 apt-get install ibus apt-get install ibus-hangul apt-get install fonts-unfonts-core reboot
X11 (X-Window) 환경 구성
apt install lxde lightdm xinit # export DISPLAY=0.0 startx
IP 확인
mkdir -p /work/bin cd /work/bin vi raspberrypi.bash #!/usr/bin/env bash IPADDR=`/usr/sbin/ip addr list eth0 | /usr/bin/grep 'inet ' | /usr/bin/awk '{print \$2}'` /usr/bin/curl http://www.obcon.biz/raspberrypi.php?ip=raspberrypi_2_${IPADDR} chmod 755 raspberrypi.bash crontab -e * * * * * /work/bin/raspberrypi.bash
S/W 설치
Node.js 설치
- Node.js 8.9.4
# yum list | grep nodejs # yum -y install nodejs yum -y install which wget uname -m #--- ARM 아키텍처 확인 mkdir -p /work/install cd /work/install #--- https://nodejs.org/dist/ # wget https://nodejs.org/dist/v10.9.0/node-v10.9.0-linux-armv7l.tar.xz # tar -xvf node-v10.9.0-linux-armv7l.tar.xz # cd node-v10.9.0-linux-armv7l wget https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-armv7l.tar.xz tar -xvf node-v8.9.4-linux-armv7l.tar.xz cd node-v8.9.4-linux-armv7l /usr/bin/rm CHANGELOG.md LICENSE README.md /usr/bin/cp -R * /usr/local/ node -v npm -v
Python 설치
Python 2.7 설치
yum -y install python python-IPy python-backports python-backports-ssl_match_hostname python-chardet python-cheetah python-configobj python-decorator python-firewall python-iniparse python-javapackages python-jsonpatch python-jsonpointer python-libs python-lxml python-markdown python-perf python-pillow python-prettytable python-progressbar python-pycurl python-pygments python-pyudev python-requestbuilder python-requests python-setuptools python-six python-slip python-slip-dbus python-urlgrabber python-urllib3 python -V
Python 3.4 설치
vi /etc/yum.repos.d/epel.repo [epel] name=Epel rebuild for armhfp baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/ enabled=1 gpgcheck=0 yum -y install python34 python34-pip python3 -V
GNOME에 VNC Server 설치
- Raspberry Pi 7인치 Touch Screen Display
- LCD
- 해상도 : 800 * 480
- Raspberry Pi 7inch HDMI LCD (C)의 경우 1024*600의 해상도를 지원하며 /boot/config.txt 파일을 수정하여야 합니다.
- 사용자 : centos
- VNC Port : 5901 port
- VNC Viewer : https://www.realvnc.com/en/connect/download/viewer/
- 접속시 "IP:5901"로 접속 한다.
yum -y install tigervnc-server cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service vi /lib/systemd/system/vncserver@:1.service [Service] Type=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' ExecStart=/usr/sbin/runuser -l centos -c "/usr/bin/vncserver %i" PIDFile=/home/centos/.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' systemctl enable firewalld.service systemctl restart firewalld.service systemctl status firewalld.service firewall-cmd --permanent --zone=public --add-service vnc-server firewall-cmd --reload su - centos #--- 일반 사용자로 vncserver 시작 vncserver -geometry 800x480 You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? y Password: Verify: xauth: file /home/centos/.Xauthority does not exist New 'localhost.localdomain:1 (centos)' desktop is localhost.localdomain:1 Creating default startup script /home/centos/.vnc/xstartup Creating default config /home/centos/.vnc/config Starting applications specified in /home/centos/.vnc/xstartup Log file is /home/centos/.vnc/localhost.localdomain:1.log # vncserver #--- vncserver 실행 # vncserver -geometry 1920x1080 #--- 해상도를 지정한 후 vncserver 실행 # vncserver -kill :포트번호 #--- vncserver 종료 exit systemctl daemon-reload systemctl enable vncserver@:1.service systemctl status vncserver@:1.service reboot
관리자 가이드
화면 로테이션
화면을 180도 로테이션을 한다. 로테이션에 따라 터치 스크린 정보가 같이 수정 한다.
참조
- /sys/class/graphics/fbcon/rotate 파일
GNOME용 한글 폰트 설치
GNOME에서 한글이 깨어지면 아래와 같이 작업 한다.
# yum -y install kde-l10n-Korean # yum -y install fonts-korean yum -y install google-noto-sans-korean-fonts