树莓派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

 

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