樹莓派4 開發環境 搭建

#準備raspbian ISO文件

選擇 第一個 Raspbian Buster with desktop and recommended software
 
#下載 Win32 Disk Imager
 
 
 
#進行燒寫
 
 
#設置無網絡
 
vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CN

network={
        ssid="COPARTNER"
        scan_ssid=1
        psk="1234567890A"
        key_mgmt=WPA-PSK
}

#設置IP地址(固定IP)

vi /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.10/24
static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
profile static_eth0
static ip_address=192.168.1.23/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
interface eth0
fallback static_eth0

#升級系統

apt-get update -y

apt-get upgrade -y
apt-get autoremove -y
rpi-updater
 
#設置SSH root登錄
systemctl enable ssh
vi /etc/ssh/sshd_config
PermitRootLogin yes 
 
#設置語言和輸入法
 
apt-get install fcitx-hangul fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin -y
apt-get install fonts-unfonts-core fonts-nanum fonts-nanum-extra -y
vi /etc/default/im-config
 
# Default im-config mode (see im-config(8))
# Always start best input method
#IM_CONFIG_DEFAULT_MODE=auto
IM_CONFIG_DEFAULT_MODE=fcitx
 
 
#install chromium 
apt-get install chromium -y
#設置自動運行權限
chrome://flags/#autoplay-policy And select 'No user gesture is required'
#install web server & remote control
apt-get install nginx tomcat9 
 
#install remote control
apt-get install xrdp -y
#設置遠程服務端口
vi /etc/xrdp/xrdp.ini
port=3389
#install & setup MariaDB
apt-get install mariadb-server
mysql_secure_installation
#設置MariaDB 服務IP & Port
vi /etc/mysql/mariadb.conf.d/50-server.cnf
port                    = 3306
bind-address            = 0.0.0.0

#設置遠程登錄權限

mysql

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

#安裝MariaDB Library

apt-get install unixodbc unixodbc-bin unixodbc-dev -y
apt-get install freetds-bin freetds-common freetds-dev tdsodbc -y
apt-get install libmariadb-dev-compat

#install wiringPi GIPO

wget https://project-downloads.drogon.net/wiringpi-latest.deb
dpkg -i wiringpi-latest.deb
gpio readall

#install QT5

apt-get install qt5-default
apt-get install qtcreator
apt-get install qt-sdk
apt-get install libqt5sql5-odbc

#設置SQL SERVER ODBC

vi /etc/odbcinstall

[SQL SERVER]
	Description = MS SQL SERVER
	Driver = /usr/lib/arm-linux-gnueabihf/odbc/libtdsodbc.so
	Setup =  /usr/lib/arm-linux-gnueabihf/odbc/libtdsS.so
	FileUsage = 1
	client charset = UTF8

#Hiding mouse after being few seconds idle on X display ...

apt-get install unclutter
 
#設置開機自啓動
vi /home/pi/.config/autostart/my.desktop
[Desktop Entry]

Type=Application
Exec = xhost +
Exec = chromium-browser --kiosk "www.csdn.net" --disable-popup-blocking --disable-desktop-notifications --no-first-run --kiosk-printing

 

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章