一、下载安装
(一)格式化TF卡
格式化的工具下载地址:https://etcher.io/
(根据操作系统进行选择下载所需)
(二)将RaspberryPi操作系统写入TF卡
将TF卡插入raspberrypi,上电启动。
二、系统配置
(一)用本地屏幕登录,开通SSHD服务,用于远程登录操作。
pi@raspberrypi:~$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
(For raspberrypi 3B's root & rootgz0851)
pi:pi0851
(新发现:要在远程的客户机上修改密码,才能在远程的客户机上登录)
#su
(二)扩展存储卡容量
#raspi-config
(二)固定IP配置
root@raspberrypi:/#vi /etc/dhcpcd.conf
interface eth0
inform 192.168.1.222
static routers=192.168.1.253
static domain_name_servers=202.98.192.67
(三)升级vim
#apt-get install vim
(四)修改sources.list,添加国内境像源
root@raspberrypi:/# vi /etc/apt/sources.list
deb https://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src https://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ sstretch main contrib non-free rpi
deb http://mirrors.zju.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.zju.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://ftp.cn.debian.org/raspbian/raspbian/ stretch main non-free contrib
deb-src http://ftp.cn.debian.org/raspbian/raspbian/ stretch main non-free contrib
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
(五)升级操作系统
#apt-get update
#apt-get upgrade
(六)VSFTPD服务安装及配置
#apt-get install vsftpd
#vi /etc/vsftpd.conf
write_enable=YES
idle_session_timeout=60000
data_connection_timeout=12000
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to RaspberryPi FTP service.
#service vsftpd restart
(七)python3.6 安装
#apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
#wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
#tar xvf Python-3.6.1.tar.xz
#cd Python-3.6.1
#./configure --enable-optimizations
(或 #./configure;)
#make;make install
(八)安装python gpio支持库
#pip3 install rpi.gpio
#apt-get install python-dev
#apt-get install python-rpi.gpio
#apt-get install python-serial
(九)Git
#apt-get install git-core
#git clone git://git.drogon.net/wiringPi
#cd wiringPi
#git pull origin
#./build
(十) DRUPAL Varbase安装
apt-get install libxml2-dev
apt-get install flex
apt-get install libjpeg-dev
apt-get install libfreetype6-dev
??? apt-get install libpng12-dev
???apt-get install zlib1g-dev
apt-get install curl
apt-get install libxpm-dev
???apt-get install libcurl3
apt-get install libcurl4-gnutls-dev
apt-get install libmhash2 libmhash-dev
#apt-get install apache2
#apt-get install mysql-server mysql-client
#apt-get install php
#apt-get install libapache2-mod-php php-curl php-gd php-imap php-ldap php-mysql php-pgsql php-sybase php-sqlite3 php-twig libmcrypt-dev php-fpdf
#apt-get install php7.0-xml
#grep -n upload /etc/php/7.0/apache2/php.ini
upload_max_filesize = 1024M
#grep -n max_execution_time /etc/php/7.0/apache2/php.ini