크랜베리 파이 튜토리얼: 크랜베리 파이 개봉 조작

3219 단어
디스플레이 뒤집기
1. sudo vi /boot/config.txt
2.     
#display_rotate=0        Normal
#display_rotate=1        90 degrees
#display_rotate=2        180 degrees
#display_rotate=3        270 degrees

터치스크린 회전
1.   libinput
  sudo apt-get install xserver-xorg-input-libinput
2.  /etc/X11/   xorg.conf.d   (        ,      3 )
  sudo mkdir /etc/X11/xorg.conf.d
3.   40-libinput-conf            
  sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
4.     (    )   touchscreen   。
         ,      (        (        ,      ):
sudo vi /usr/share/X11/xorg.conf.d/40-libinput.conf )
    Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
    90    : Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
    180   : Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
    270   : Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

공식 카메라 입력(opencv 조작 카메라에 구체적)
1.       ,   "sudo raspi-config" 
2.     "Interfacing Options",   enable camera.
3.  /etc/modules        "bcm2835-v4l2",    ,  。

pip 소스 교체
#      ,       
mkdir ~/.pip
vim ~/.pip/pip.conf
#         :
[global]
timeout =6000
index-url =https://pypi.douban.com/simple/
[install]
use-mirrors =true 
mirrors =https://pypi.douban.com/simple/ 
trusted-host =pypi.douban.com

mysql 설치
#  root  
MariaDB [(none)]> use mysql;
MariaDB [mysql]> update user set plugin='mysql_native_password' where user='root';
MariaDB [mysql]> UPDATE user SET password=PASSWORD('root   ') WHERE user='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit;

#  Mysql
$ sudo /etc/init.d/mysql restart
# mysql         status、start、stop、restart

#      
$ sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf
#  bind-address     
#    127.0.0.1        0.0.0.0
#     
$ sudo /etc/init.d/mysql restart

#      
$ mysql -u root -p
$     
MariaDB [(none)]> use mysql;
MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root   ' WITH GRANT OPTION;
MariaDB [mysql]> flush privileges;


Swap 파티션 설정
Swap 파티션은 디스크에 특수한 용도로 사용되는 파티션입니다.시스템의 물리적 메모리가 부족할 때 현재 실행 중인 프로그램에 사용할 수 있도록 물리적 메모리의 일부분을 방출합니다.방출된 공간은 오랫동안 아무런 조작이 없었던 프로그램에서 나올 수 있다. 방출된 공간은 Swap 구역에 임시로 저장되고, 프로그램이 실행될 때까지 기다렸다가 Swap 구역에서 저장된 데이터를 메모리로 복원한다.Swap 공간을 너무 많이 할당하면 디스크 공간이 낭비되고 Swap 공간이 너무 적으면 오류가 발생합니다.일반적으로 메모리가 2G보다 작으면 스왑 파티션이 메모리의 2배가 되어야 합니다.크랜베리 파이의 경우 2GB로 설정할 수 있다.물론 마이크로SD 카드의 용량과 사용 상황도 고려해야 한다.
sudo vi /etc/dphys-swapfile
#   CONF_SWAPSIZE CONF_MAXSWAP        ,            SWAP  。      2048(  2GB  )。  Micro SD       , 64GB ,      4096(  4GB  )。   vim                    。

#     SWAP    :
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start

글로벌 환경 변수 설정
# ~/.bashrc        :
export MY_ENV = "ABC"
  
#    
source ~/.bashrc
#       
echo $MY_ENV


수정vi모드에서 xshell 오른쪽 단추를 누르면 붙일 수 없습니다
vi ~/.vimrc #     

#       
if has('mouse')
    set mouse-=a
endif

좋은 웹페이지 즐겨찾기