Raspberry Pi Raspbian Software source change watchdog enabled

Source: Internet
Author: User
Tags raspi

1. Replace Script

The following script please copy directly to the terminal execution!!

For Raspbian-stretch (based on Debian9)

sudo -secho"deb Http://mirrors.ustc.edu.cn/raspbian/raspbian/stretch main Contrib Non-free RPI \ deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/stretch main contrib non-free RPI  " >/etc/apt/sources.listecho"Deb http://mirrors.ustc.edu.cn/ Archive.raspberrypi.org/stretch Main UI" >/etc/apt/sources.list.d/raspi.listexit sudo sudo apt-y upgrade

For Raspbian-jessie (based on DEBIAN8)

 sudo -s  echo -e  " deb Http://mirrors.ustc.edu.cn/raspbian/raspbian/jessie main Non-free contrib \ n DEB-SRC Http://mirrors.ustc.edu.cn/raspbian/raspbian/jessie main Non-free contrib   " >/etc/apt/sources.list  echo -E  deb/HTTP/ Mirrors.ustc.edu.cn/archive.raspberrypi.org/jessie main   >/etc/ Apt/sources.list.d/raspi.listexit  sudo  apt-get update && sudo  apt-get-y upgrade 

2. Other sources: (not tested!) )

Zhongshan University Raspbian http://mirror.sysu.edu.cn/raspbian/raspbian/Tsinghua Raspbian http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/Huazhong University of Science and Technology Raspbian http://Mirrors.hustunique.com/raspbian/raspbian/archLinux ARM http://mirrors.hustunique.com/archlinuxarm/Dalian Neusoft Information Institute Source (North User) Raspbian http://mirrors.neusoft.edu.cn/raspbian/raspbian/Chongqing University Source (Midwest User) Raspbian http://mirrors.cqu.edu.cn/raspbian/raspbian/

Other parts:

1. Chinese language support and Chinese input method

sudo Install -y ttf-wqy-zenheisudoinstall -y Scim-pinyin

2. Install Vim

sudo Install -y vim

If the following error occurs:

The following packages has unmet Dependencies:vim:Depends:vim 2:7.4. 488-72:8.0. 0197-4  is to being installed e:unable to correct problems and you have held broken packages.

First uninstall the Vim-common and then install VIM

sudo apt-get remove vim-commonsudoinstall -y vim

3. Watchdog (prevents the monitoring of Raspberry Pi crash)

When using raspberry to do some applications that require long-term standby, such as downloads, cloud storage, home theater and other applications, one of the problems we often encounter is that the Raspberry Pi will crash due to overheating, we need to restart the Raspberry Pi, and then open the Raspberry Pi application again. This will bring a lot of trouble to our daily operations. Watchdog (watchdog) can make Raspberry Pi never crash.
1 //The Raspberry Pi comes with a watchdog module, which we need to add in just fine. 2 sudo modprobeBcm2708_wdog3 Echo-E"\nbcm2708_wdog">sudo Tee-a/etc/Modules4 //installing the watchdog software5 sudoApt-getInstall-y chkconfig watchdog6 //Configuration7 sudovim/etc/watchdog.conf8 //Remove the # comment from the line "Watchdog-device=/dev/watchdog"9 //other configuration references are as follows:Ten # for setting the CPU temperature restart condition OneTemperature-device =/sys/class/thermal/thermal_zone0/Temp A # maximum temperature of 100 degrees, more than immediate restart -Max-temperature =100000 - # 1 Minutes Max process is 24, over that is reboot themax-load- the= A - # 5 minutes Max process is 18, over that is reboot -max-load- the= A - # 15 minutes Max process is 12, over that is reboot +max-load- the= A -  + //when the configuration is complete, start the watchdog A sudo/etc/init.d/watchdog start at //set to start -Chkconfig watchdog on

4.Screen (Let Raspberry Pi never lose the Union)

Using SSH (serare shell, Secure Shell protocol) to remotely control the Raspberry Pi should be our most commonly used way to operate the Raspberry Pi, but when we connect with SSH, we often encounter the problem of sudden disconnection of the connection. Once the connection is disconnected, the operation of the original meter is interrupted, and if used again, it has to be re-started. I'm sure you're upset that you interrupted the Raspberry Pi task because of your computer's standby. Screen to make the Raspberry Pi never lose its way. This method, even if the connection is broken, when we reconnect and still do the original operation, and do not need to start again.
// Install screen directly sudo Install -yscreen//  open a background view (the terminal in the background is not terminated due to disconnection)screen-S terminal name //  and then you can go on with your operation.

Common commands

Command Parameters Role
Screen -S terminal name Create a new background virtual terminal
-ls View the background virtual terminal you have created
-R Terminal Name Enter the terminal

Shortcut keys

Shortcut keys Then press Role
Ctrol+a D Save a background virtual terminal
Ctrol+a W Show list of all windows
Ctrol+a Ctrol+a Switch to the previously displayed window
Ctrol+a C Create a new window to run the shell
Ctrol+a N Switch to the next window
Ctrol+a P Switch to the previous window
Ctrol+a 0...9 Toggle Window 0: 9
Ctrol+a A Send C-a to current session
Ctrol+a K Kill the current window
Ctrol+a [ Enter copy/rollback mode

Reprinted from: Raspberry Pi 3b+ software source changes

Raspberry Pi Raspbian Software source change watchdog enabled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.