- Download the official image from mirror.centos.org:
- e.g.
curl http://mirror.centos.org/altarch/7/isos/armhfp/CentOS-Userland-7-armv7hl-Minimal-1708-RaspberryPi3.img.xz > CentOS.img.xz
- e.g.
- Write the image you downloaded above:
- e.g.
xzcat CentOS.img.xz | dd of=/path/to/sd/card status=progress bs=4M; sync
- e.g.
- Boot your Raspberry Pi:
- root password:
centos
- root password:
- Change the default password and add a new user:
passwd root
: type root's passwordadduser username
andpasswd username
: add a new user without sudo privilegesgpasswd -a username wheel
: granting sudo privileges to a new user
- Set the system hostname:
- e.g.
hostnamectl set-hostname RaspberryPi
- e.g.
- Set the system time:
timedatectl list-timezones | grep Europe
: choose your time zone- e.g.
timedatectl set-timezone Europe/Astrakhan
- Set the system locale:
localectl set-locale LANG="en_US.utf8" LC_NUMERIC="C" LC_TIME="POSIX" LC_MESSAGES="POSIX"
localectl set-keymap us ru --no-convert
localectl set-x11-keymap us,ru pc105 grp:ctrl_shift_toggle --no-convert
echo "FONT=UniCyr_8x16" >> /etc/vconsole.conf
- Configure SSH settings file
/etc/ssh/sshd_config
:
Port 2222
LogLevel QUIET
SyslogFacility DAEMON
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]
KexAlgorithms diffie-hellman-group-exchange-sha256,[email protected]
MACs [email protected],[email protected]
AcceptEnv LANG LC_*
ChallengeResponseAuthentication no
LoginGraceTime 1m
MaxAuthTries 3
PrintLastLog no
UseDNS no
UsePAM yes
- Uninstall
firewalld
and installiptables
:- Turn off daemon:
systemctl stop firewalld
systemctl disable firewalld
- Delete the package and dependencies:
yum remove firewalld
yum autoremove
- Install the iptables' dependencies:
yum install iptables-services iptables-utils
- Reanimate the iptables daemon:
systemctl enable iptables.service
systemctl start iptables.service
- Turn off daemon:
- List available Wi-Fi access points:
nmcli device wifi list
- Connect to a Wi-Fi network specified by SSID:
nmcli device wifi connect "SSID" password "password_for_secured_networks"
Requirements: yum install bzip2-devel expat-devel gdbm-devel libpcap-devel ncurses-devel openssl-devel readline-devel sqlite-devel tk-devel xz-devel zlib-devel
curl https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz > Python-3.6.3.tar.xz
tar xf Python-3.6.3.tar.xz
cd Python-3.6.3
./configure --enable-optimizations --prefix=/usr/local --enable-shared LDFLAGS="-Wl,rpath /usr/local/lib"
make altinstall
- Get temperature of CPU:
cat /sys/class/thermal/thermal_zone0/temp
- Backup system:
dd if=/dev/mmcblk0 bs=4M status=progress conv=noerror | xz --stdout > /path/to/external/disk/backup.img.xz
- Pretty prompt: add
export PS1='\[\e[0;32m\]\u \[\e[1;34m\]\w \[\e[1;32m\]\$ \[\e[m\]'
to.bashrc
Licensed under the terms of the CC0 1.0 Universal License.