UNIXETC

树莓派使用DietPi

下载安装DietPi

DietPi项目主页 http://dietpi.com/

DietPi镜像下载地址 https://dietpi.com/#downloadinfo

然后将镜像写入到SD卡中,linux下使用dd

	dd if=DietPi_v74.img of=/dev/sdc bs=2M

Windows下使用balenaEtcher写入镜像。

写入完成后将SD卡插入树莓派,加电启动。

预设置Wifi链接

首次使用时,可以通过编辑dietpi.txt来进行wifi预设置。

将TF卡插入电脑读卡器,打开对应的磁盘,找到dietpi.txt文件,打开。

找到Wifi_Enabled=0,将其设置为1

然后找到Wifi_SSIDWifi_KEY分别设置wifi节点名和密码,保存即可。

配置DietPi

DietPi默认用户名密码为root dietpi,第一次启动DietPi提示检测升级,按提示操作。

不过由于天朝网路问题,可能升级比较缓慢,建议Ctrl+c终止升级,修改sources.list为朝内镜像。

DietPi默认没有vi,使用nano进行编辑,添加Aliyun源。

	deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib
	deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib

更新软件

	apt-get update&&apt-get upgrade -y

然后运行dietpi-config进行配置。

DietPi - Config


               ┌────┤ ---------- DietPi-Config ---------- ├─────┐
               │  Hardware : Raspberry Pi 1 (512MB)               │                                                │
1 Display Options                    │
2 Audio Options                      │
3 Performance Options                │
4 Advanced Options                   │
5 Language/Regional Options          │
6 Security Options                   │
7 Networking Options                 │
8 AutoBoot Options                   │
9 Tools                              │
               │                                                │
               │                                                │
               │           <Ok>               <Exit>            │
               │                                                │
               └────────────────────────────────────────────────┘

推荐配置:

Networking Options中干货比较多,大家自行设置


	┌──────────────────┤ --- DietPi - Network Options --- ├───────────────────┐
	│                                                                         │
	│  Ethernet     : Not Found | Enabled | Disconnected                      │
	│  Wifi         : Not Found | Disabled | Disconnected                     │
	│  Internet     : Please run Internet Test                                │
	│  Samba client : Not Installed                                           │
	│  FTP client   : Not Installed                                           │
	│  NoIp status  : Not Installed                                           │
	│                                                                         │
	│        Ethernet     Change Wired Network Settings                       │
	│        Wifi         Change Wireless Network Settings                    │
	│        Test         Run the Internet Connection Test                    │
	│        Samba Client Install now to access Windows shares                │
	│        Ftp Client   Install now to access FTP as filesystem mount       │
	│        NoIp         Install No-Ip now                                   │
	│                                                                         │
	│                                                                         │
	│                   <Ok>                       <Back>                     │
	│                                                                         │
	└─────────────────────────────────────────────────────────────────────────┘

设置完成后重启系统。

DietPi软件快捷安装工具

DietPi自带一个便捷的软件安装工具dietpi-software,可以通过这个工具快速安装一些常用软件


	Setup USB Dedicated Drive?
		┌───────────────────┤ Setup USB Dedicated Drive? ├───────────────────┐
		│                                                                    │
		│ Will you be using a dedicated USB hard drive with this DietPi      │
		│ installation?                                                      │
		│                                                                    │
(NOTICE) Your decision now is final and cannot be changed at a     │
		│ later date. DietPi will automatically setup your future software   │
		│ installations to utilize the USB drive instead of MicroSD.         │
		│ As USB hard drives are generally faster than MicroSD, using a USB  │
		│ drive can vastly improve system performance.                       │
		│                                                                    │
		│  This is recommended for:                                          │
		│  - BitTorrent (Store downloads)		│  - OwnCloud                                                        │
		│  - Kodi (Store Media Files)		│  - RetroPie (Store Roms)		│  - Hifi (Store Music)		│                                                                    │
		│                                                                    │
		│                  <Yes>                     <No>                    │
		│                                                                    │
		└────────────────────────────────────────────────────────────────────┘

          ┌────┤ ---------- DietPi - Software Setup ---------- ├─────┐
          │                                                          │
1  Select DietPi Optimized Software.           │
2  Select Additional Linux Software.           │
3  SSH Server  : Dropbear                      │
4  File Server : None                          │
5  Log System  : DietPi-Ramlog #1              │
6  DietPi-Config                               │
7  Help!                                       │
          │           Go Start Install                               │
          │                                                          │
          │                                                          │
          │              <Ok>                  <Exit>                │
          │                                                          │
          └──────────────────────────────────────────────────────────┘

1 Select DietPi Optimized Software.包含以下软件:

2 Select Additional Linux Software.包含以下软件


散装IT人公众号

#Linux #Debian #Raspberry Pi #Raspi #Dietpi #BalenaEtcher #Etcher