다음 작업 내용들은 macOS에서 작업한 내용들임을 참고 바랍니다.
- 라즈비안 이미지 다운로드
- 다운로드 페이지 : https://www.raspberrypi.org/downloads/
- 일반적으로는 라즈비안이나 NOOBS를 이용한 두 가지 방법을 주로 사용
- 이미지 복사
- NOOBS의 경우에는 MicroSD 카드를 FAT32로 포맷 후 압축파일 내의 내용을 그대로 복사해주기만 하면 됨
- 라즈비안 이미지 복사
- MicroSD 카드 연결 후 터미널에서 “diskutil list” 명령으로 디스크 넘버 확인
$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_CoreStorage Macintosh HD 120.5 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 (internal, virtual): #: TYPE NAME SIZE IDENTIFIER 0: Macintosh HD +120.1 GB disk1 Logical Volume on disk0s2 6A953263-DF83-4E41-A54D-4CEED479231A Unencrypted /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *15.9 GB disk2 1: Windows_FAT_32 NO NAME 15.9 GB disk2s1
- 디스크 언마운트 : 절대 데스크탑에서 추출 명령으로 언마운트 하지 말것
$ diskutil unmountDisk /dev/disk2 Unmount of all volumes on disk2 was successful
- dd 명령으로 디스크 이미지 복사
$ sudo dd bs=1m if=2017-03-02-raspbian-jessie.img of=/dev/rdisk2 Password: 4190+0 records in 4190+0 records out 4393533440 bytes transferred in 403.586955 secs (10886213 bytes/sec)
- MicroSD 카드 연결 후 터미널에서 “diskutil list” 명령으로 디스크 넘버 확인
- 라즈비안 GUI 부팅 후 기본 환경 설정(sudo raspi-config)
- pi 계정 패스워드 변경
- 서버용으로만 사용한다면 부팅 옵션을 GUI 모드가 아닌 CLI 모드로 변경
- 자동 로그인은 가능하면 해제
- Wi-Fi 지역 제외한 지역 및 시간대 설정을 ‘한국/서울’로. 키보드 역시 ‘한글101/104’ 키보드로 변경
- ssh 활성화하고 GUI 환경일 경우에는 vnc도 활성화
- 기본 환경 설정 후 업데이트
- 패키지 업그레이드
-
pi@raspberrypi:~ $ sudo apt-get update pi@raspberrypi:~ $ sudo apt-get upgrade
- 배포판 업그레이드
-
pi@raspberrypi:~ $ sudo apt-get dist-upgrade pi@raspberrypi:~ $ sudo apt-get autoremove
- 커널 및 펌웨어 업데이트
-
pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux pi@raspberrypi:~ $ sudo rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom This update bumps to rpi-4.4.y linux tree Be aware there could be compatibility issues with some drivers Discussion here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144087 ############################################################## *** Downloading specific firmware revision (this will take a few minutes) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 168 0 168 0 0 157 0 --:--:-- 0:00:01 --:--:-- 157 100 52.2M 100 52.2M 0 0 654k 0 0:01:21 0:01:21 --:--:-- 543k *** Updating firmware *** Updating kernel modules *** depmod 4.4.46+ *** depmod 4.4.46-v7+ *** Updating VideoCore libraries *** Using HardFP libraries *** Updating SDK *** Running ldconfig *** Storing current firmware revision *** Deleting downloaded files *** Syncing changes to disk *** If no errors appeared, your firmware was successfully updated to 975ebd8aba11b767e33a178e453c978601f53f1e *** A reboot is needed to activate the new firmware pi@raspberrypi:~ $ sudo reboot <<<리부팅 후>>> pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.4.46-v7+ #959 SMP Fri Feb 3 17:24:25 GMT 2017 armv7l GNU/Linux
- 한글 입력기 및 폰트 설치(GUI)
-
pi@raspberrypi:~ $ sudo apt-get install ibus ibus-hangul ttf-unfonts-core fonts-nanum
- APM 설치
-
pi@raspberrypi:~ $ sudo apt-get install apache2 -y pi@raspberrypi:~ $ sudo apt-get install php5 libapache2-mod-php5 -y pi@raspberrypi:~ $ sudo apt-get install mysql-server php5-mysql -y 1)
- vsftpd 설치
-
pi@raspberrypi:~ $ sudo apt-get install vsftpd pi@raspberrypi:~ $ sudo vi /etc/vsftpd.conf listen=YES write_enable=YES ascii_upload_enable=YES ascii_download_enable=YES chroot_local_user=YES #listen_port=21 pi@raspberrypi:~ $ sudo service vsftpd restart