Ubuntu/Raspberry Pi: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(46 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| | {| | ||
| | |valign="top"| | ||
'''Network Config:''' | '''Network Config:''' | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 15: | Line 15: | ||
optional: true | optional: true | ||
access-points: | access-points: | ||
ChorkeOrg_2.4GHz: | "ChorkeOrg_2.4GHz": | ||
password: "sadaqah!" | password: "sadaqah!" | ||
ChorkeOrg: | "ChorkeOrg": | ||
password: "sadaqah!" | password: "sadaqah!" | ||
EOF | EOF | ||
</source> | </source> | ||
| | |valign="top"| | ||
'''User Data:''' | '''User Data:''' | ||
<source lang="bash"> | <source lang="bash"> | ||
ls -lah /Volumes/system-boot/|grep user-data | ls -lah /Volumes/system-boot/|grep user-data | ||
cat << \EOF > /Volumes/system-boot/user-data | |||
#cloud-config | |||
system_info: | |||
default_user: | |||
name: pi | |||
chpasswd: | |||
expire: true | |||
list: | |||
- pi:ubuntu | |||
ssh_pwauth: true | |||
runcmd: | |||
- [ df, -h, / ] | |||
- [ sh, -xc, "echo $(date) ': hello academian!'" ] | |||
power_state: | |||
mode: reboot | |||
EOF | |||
</source> | |||
|- | |||
|colspan="2"| | |||
---- | |||
|- | |||
|valign="top" colspan="2"| | |||
<source lang="bash"> | |||
ls -lah /Volumes/system-boot/{.fseventsd,.Spotlight-V100} | |||
rm -rf /Volumes/system-boot/{.fseventsd,.Spotlight-V100} | |||
</source> | |||
|- | |||
|colspan="2"| | |||
---- | |||
|- | |||
|valign="top" colspan="2"| | |||
<source lang="bash" highlight="5,7,14-16"> | |||
:<<EOF | |||
The authenticity of host '10.19.83.111 (10.19.83.111)' can't be established. | |||
ECDSA key fingerprint is SHA256:9Lgs5Xxsypm4s/3F87TU2EMh6vUz6pjAMaNHXUDImVs. | |||
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes | |||
Warning: Permanently added '10.19.83.111' (ECDSA) to the list of known hosts. | |||
[email protected]'s password: | |||
You are required to change your password immediately (administrator enforced) | |||
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64) | |||
WARNING: Your password has expired. | |||
You must change your password now and login again! | |||
Changing password for pi. | |||
Current password: | |||
New password: | |||
Retype new password: | |||
passwd: password updated successfully | |||
Connection to 10.19.83.111 closed. | |||
EOF | |||
</source> | |||
|- | |||
|colspan="2"| | |||
---- | |||
|- | |||
|valign="top" colspan="2"| | |||
<source lang="bash"> | |||
:<<EOF | |||
[email protected]'s password: | |||
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64) | |||
EOF | |||
</source> | |||
|} | |||
==Network Config== | |||
{| | |||
| valign="top" | | |||
dpkg --list|grep network-manager | |||
dpkg --list|grep wpasupplicant | |||
dpkg --list|grep iw | |||
| valign="top" | | |||
apt -qq list network-manager | |||
apt -qq list wpasupplicant | |||
apt -qq list iwd | |||
| valign="top" | | |||
sudo apt install network-manager | |||
sudo apt install wpasupplicant | |||
sudo apt install iwd | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
sudo apt install net-tools | |||
sudo nmcli radio all | |||
sudo nmcli con help | |||
| valign="top" | | |||
sudo nmcli device wifi list | |||
sudo nmcli device | |||
sudo nmcli con | |||
| valign="top" | | |||
sudo nmcli dev wifi con 'ChorkeOrg_2.4GHz' password 'sadaqah!' | |||
sudo nmcli dev wifi con 'ChorkeInc' password 'sadaqah!' | |||
sudo nmcli dev wifi con 'ChorkeOrg' password 'sadaqah!' | |||
|} | |||
==Server Config== | |||
{| | |||
| valign="top" | | |||
sudo apt install postgresql-12 | |||
sudo apt install mariadb-server-10.3 | |||
sudo apt install apache2 | |||
| valign="top" | | |||
sudo systemctl enable apache2.service | |||
sudo systemctl start apache2.service | |||
ls -lah /usr/lib/systemd/system/ | |||
| valign="top" | | |||
sudo ufw status verbose | |||
sudo ufw allow ssh | |||
sudo ufw enable | |||
|- | |||
|colspan="3"| | |||
---- | |||
|- | |||
|valign="top" colspan="3"| | |||
<source lang="bash" highlight="12"> | |||
sudo groupadd --system lxd | |||
sudo usermod -G lxd -a pi | |||
sudo newgrp lxd | |||
sudo lxd init | |||
:' | |||
Would you like to use LXD clustering? (yes/no) [default=no]: | |||
Do you want to configure a new storage pool? (yes/no) [default=yes]: | |||
Name of the new storage pool [default=default]: | |||
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: | |||
Create a new ZFS pool? (yes/no) [default=yes]: | |||
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]: | |||
Size in GB of the new loop device (1GB minimum) [default=5GB]: 15GB | |||
Would you like to connect to a MAAS server? (yes/no) [default=no]: | |||
Would you like to create a new local network bridge? (yes/no) [default=yes]: | |||
What should the new bridge be called? [default=lxdbr0]: | |||
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: | |||
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: | |||
Would you like the LXD server to be available over the network? (yes/no) [default=no]: | |||
Would you like stale cached images to be updated automatically? (yes/no) [default=yes] | |||
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: | |||
' | |||
</source> | |||
|} | |||
==Desktop Config== | |||
{| | |||
| | |||
sudo apt install tasksel | |||
sudo tasksel install kubuntu-full | |||
sudo tasksel install kubuntu-desktop | |||
|valign='bottom'| | |||
sudo apt install sddm | |||
sudo dpkg-reconfigure sddm | |||
| | |||
|- | |||
|colspan='3'| | |||
---- | |||
|- | |||
| | |||
'''sudo apt install kde-plasma-desktop -y''' | |||
sudo apt purge kde-plasma-desktop -y | |||
| | |||
sudo apt install kde-standard -y | |||
sudo apt purge kde-standard -y | |||
| | |||
sudo apt install kde-full -y | |||
sudo apt purge kde-full -y | |||
|} | |||
==Device Status== | |||
{| | |||
| valign="middle" | | |||
<source lang="bash"> | |||
sudo nmcli dev | |||
:' | |||
DEVICE TYPE STATE CONNECTION | |||
wlan0 wifi unavailable -- | |||
eth0 ethernet unmanaged -- | |||
lo loopback unmanaged -- | |||
' | |||
lsblk | |||
:' | |||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |||
loop0 7:0 0 48.9M 1 loop /snap/core18/2127 | |||
loop1 7:1 0 57.4M 1 loop /snap/core20/1171 | |||
loop2 7:2 0 62M 1 loop /snap/lxd/21032 | |||
loop3 7:3 0 49M 1 loop /snap/core18/2248 | |||
loop4 7:4 0 28.1M 1 loop /snap/snapd/12707 | |||
loop5 7:5 0 60.7M 1 loop /snap/lxd/21843 | |||
loop6 7:6 0 28.2M 1 loop /snap/snapd/13643 | |||
mmcblk0 179:0 0 119.3G 0 disk | |||
├─mmcblk0p1 179:1 0 256M 0 part /boot/firmware | |||
└─mmcblk0p2 179:2 0 119G 0 part / | |||
' | |||
df -h | |||
:' | |||
Filesystem Size Used Avail Use% Mounted on | |||
udev 3.8G 0 3.8G 0% /dev | |||
tmpfs 782M 4.0M 778M 1% /run | |||
/dev/mmcblk0p2 118G 2.8G 110G 3% / | |||
tmpfs 3.9G 0 3.9G 0% /dev/shm | |||
tmpfs 5.0M 0 5.0M 0% /run/lock | |||
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup | |||
/dev/loop0 49M 49M 0 100% /snap/core18/2127 | |||
/dev/loop1 58M 58M 0 100% /snap/core20/1171 | |||
/dev/loop3 49M 49M 0 100% /snap/core18/2248 | |||
/dev/loop2 62M 62M 0 100% /snap/lxd/21032 | |||
/dev/loop4 29M 29M 0 100% /snap/snapd/12707 | |||
/dev/loop5 61M 61M 0 100% /snap/lxd/21843 | |||
/dev/loop6 29M 29M 0 100% /snap/snapd/13643 | |||
/dev/mmcblk0p1 253M 120M 133M 48% /boot/firmware | |||
tmpfs 782M 0 782M 0% /run/user/1000 | |||
' | |||
sudo fdisk /dev/mmcblk0 -l | |||
:' | |||
Disk /dev/mmcblk0: 119.26 GiB, 128043712512 bytes, 250085376 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disklabel type: dos | |||
Disk identifier: 0xf66f0719 | |||
Device Boot Start End Sectors Size Id Type | |||
/dev/mmcblk0p1 * 2048 526335 524288 256M c W95 FAT32 (LBA) | |||
/dev/mmcblk0p2 526336 250085342 249559007 119G 83 Linux | |||
' | |||
</source> | |||
| valign="middle" | | |||
<source lang="bash"> | |||
sudo fdisk -l | |||
:' | |||
Disk /dev/loop0: 48.92 MiB, 51277824 bytes, 100152 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/loop1: 57.42 MiB, 60198912 bytes, 117576 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/loop2: 61.98 MiB, 64962560 bytes, 126880 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/loop3: 48.98 MiB, 51335168 bytes, 100264 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/loop4: 28.7 MiB, 29433856 bytes, 57488 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/loop5: 60.68 MiB, 63610880 bytes, 124240 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/loop6: 28.22 MiB, 29581312 bytes, 57776 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk /dev/mmcblk0: 119.26 GiB, 128043712512 bytes, 250085376 sectors | |||
Units: sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disklabel type: dos | |||
Disk identifier: 0xf66f0719 | |||
Device Boot Start End Sectors Size Id Type | |||
/dev/mmcblk0p1 * 2048 526335 524288 256M c W95 FAT32 (LBA) | |||
/dev/mmcblk0p2 526336 250085342 249559007 119G 83 Linux | |||
' | |||
</source> | </source> | ||
|} | |||
==Knowledge== | |||
{| | |||
| valign="top" | | |||
dpkg --list|grep network-manager | |||
dpkg --list|grep wpasupplicant | |||
dpkg --list|grep iw | |||
| valign="top" | | |||
apt -qq list network-manager | |||
apt -qq list wpasupplicant | |||
apt -qq list iwd | |||
| valign="top" | | |||
sudo apt update | |||
sudo apt upgrade | |||
sudo apt autoremove | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
'''physical volume''' | |||
sudo pvdisplay -m | |||
sudo pvdisplay | |||
sudo pvs | |||
| valign="top" | | |||
'''logical volume''' | |||
sudo lvdisplay -m | |||
sudo lvdisplay | |||
sudo lvs | |||
| valign="top" | | |||
'''volume group''' | |||
sudo vgdisplay -s | |||
sudo vgdisplay | |||
sudo vgs | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valigan="top" | | |||
lsblk | |||
df -h | |||
ll /dev/mm* | |||
| valign="top" | | |||
sudo pvscan | |||
sudo fdisk -l | |||
sudo fdisk /dev/mmcblk0 | |||
sudo parted /dev/mmcblk0 | |||
| valign="top" | | |||
sudo resize2fs /dev/mmcblk0p3 | |||
sudo e2fsck -f /dev/mmcblk0p3 | |||
sudo xfs_growfs /dev/ubuntu_ubuntu/root | |||
sudo vgdisplay -v ubuntu_ubuntu|grep -i 'Free PE' | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
$GRAALVM_HOME/bin/gu install native-image | |||
sudo apt install icedtea-netx openjdk-8-jre | |||
sudo update-alternatives --config java | |||
| valign="top" | | |||
sudo apt install openjdk-8-jre | |||
sudo apt install openjdk-11-jre | |||
sudo apt install openjdk-17-jre | |||
| valign="top" | | |||
sudo apt install openjdk-8-jdk | |||
sudo apt install openjdk-11-jdk | |||
sudo apt install openjdk-17-jdk | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="2" | | |||
sudo apt install build-essential libz-dev zlib1g-dev | |||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.fc35.aarch64 | |||
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin | |||
| valign="top" | | |||
export ACADEMIA_HOME="$HOME/.chorke/academia" | |||
mkdir -p $ACADEMIA_HOME/var/download | |||
cd $ACADEMIA_HOME/var/download | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="3" | | |||
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz | |||
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="2" | | |||
tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz | |||
tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz | |||
ln -s /opt/cli/graalvm-ce-java11-21.3.0 /usr/lib/jvm/graalvm-ce-java11-21.3.0 | |||
ln -s /opt/cli/graalvm-ce-java17-21.3.0 /usr/lib/jvm/graalvm-ce-java17-21.3.0 | |||
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java11-21.3.0/bin/java 4 | |||
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java17-21.3.0/bin/java 5 | |||
| valign="top" | | |||
mkdir -p /opt/cli | |||
cd /opt/cli | |||
ls -lah /usr/lib/jvm | |||
ls -lah /usr/lib/jvm | |||
sudo update-alternatives --config java | |||
sudo update-alternatives --config java | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
apt -qq list network-manager | |||
apt -qq list wpasupplicant | |||
apt -qq list iwd | |||
| valign="top" | | |||
sudo apt install network-manager | |||
sudo apt install wpasupplicant | |||
sudo apt install iwd | |||
| valign="top" | | |||
sudo systemctl status NetworkManager.service | |||
sudo systemctl status wpa_supplicant.service | |||
sudo systemctl status iwd.service | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="2" | | |||
ssh-keygen -f "/home/chorke/.ssh/known_hosts" -R "10.19.83.111" | |||
ssh-keygen -f ~/.ssh/known_hosts -R 10.19.83.111 | |||
| valign="top" | | |||
|} | |||
==References== | |||
{| | |||
| valign="top" | | |||
* [https://alestic.com/2014/01/ec2-change-username/ Change default <code>ubuntu</code> user via CloudInit On AWS EC2] | |||
* [https://serverfault.com/questions/440618/ Change default <code>ubuntu</code> user via CloudInit on Pi4] | |||
* [https://stackoverflow.com/questions/3466166/ Detect the OS Name from a Bash Script] | |||
* [https://stackoverflow.com/questions/394230/ Detect the OS Type from a Bash Script] | |||
* [[Fedora/Raspberry Pi]] | |||
* [[Raspberry Pi]] | |||
* [[Quarkus]] | |||
* [[Podman]] | |||
* [[Fedora]] | |||
* [[Docker]] | |||
| valign="top" | | |||
* [https://blogs.oracle.com/javamagazine/post/java-arm64-aarch64-development The AArch64 hardware, software, cloud & JDK] | |||
* [https://askubuntu.com/questions/261824/ CloudInit to change the default <code>ubuntu</code> user] | |||
* [https://gist.github.com/ricardozanini/fa65e485251913e1467837b1c5a8ed28 Gist Install GraalVM CE on Linux] | |||
* [https://git-scm.com/download/linux Git Download for Linux and Unix] | |||
* [https://medium.com/@john_freeman/native-javac-with-graalvm-ddcc18a53edb Native javac built with GraalVM] | |||
* [[Convention for Workspaces]] | |||
* [https://ubuntu.com/core/docs/networkmanager/install Install NetworkManager] | |||
* [[Convention for Projects]] | |||
* [https://stackoverflow.com/questions/31851611/ ARM64 vs. AArch64] | |||
* [[Linux Containers]] | |||
| valign="top" | | |||
* [https://www.answertopia.com/ubuntu/ubuntu-network-management/ Ubuntu 20.04 Network Management] | |||
* [https://discuss.linuxcontainers.org/t/lxd-cluster-on-raspberry-pi-4/9076 LXD cluster on Raspberry Pi 4] | |||
* [https://help.ubuntu.com/community/UFW UFW: Uncomplicated Firewall] | |||
* [https://github.com/lxc/lxd/issues/5034 LXD command hangs] | |||
* [https://discuss.linuxcontainers.org/t/lxd-cleanup-problem-when-uninstall-install-again/1840 LXD purge and install] | |||
* [[LAMP Stack for PI]] | |||
* [[LAPP Stack for PI]] | |||
* [[Linux Containers]] | |||
* [[Fedora/GraalVM]] | |||
* [[Ubuntu/GraalVM]] | |||
|- | |||
|colspan="3"| | |||
---- | |||
|- | |||
| valign="top" | | |||
* [https://www.tecmint.com/install-kde-plasma-5-in-linux/ Install KDE Plasma in Linux Desktop] | |||
* [https://stgraber.org/2016/10/17/lxd-snap-available/ Ubuntu install LXD Snap Store] | |||
* [https://peen.dev/2021/06/08/ubuntu-on-the-legion-5-pro-2021/ Ubuntu on the Legion 5 Pro] | |||
* [https://infolinux.com/2019/02/19/install-unijoy-in-linux/ Install Unijoy on Linux] | |||
| valign="top" | | |||
| valign="top" | | |||
|} | |} |
Latest revision as of 08:29, 9 May 2022
Network Config: ls -lah /Volumes/system-boot/|grep network-config
cat <<EOF > /Volumes/system-boot/network-config
version: 2
ethernets:
eth0:
dhcp4: true
optional: true
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
"ChorkeOrg_2.4GHz":
password: "sadaqah!"
"ChorkeOrg":
password: "sadaqah!"
EOF
|
User Data: ls -lah /Volumes/system-boot/|grep user-data
cat << \EOF > /Volumes/system-boot/user-data
#cloud-config
system_info:
default_user:
name: pi
chpasswd:
expire: true
list:
- pi:ubuntu
ssh_pwauth: true
runcmd:
- [ df, -h, / ]
- [ sh, -xc, "echo $(date) ': hello academian!'" ]
power_state:
mode: reboot
EOF
|
| |
ls -lah /Volumes/system-boot/{.fseventsd,.Spotlight-V100}
rm -rf /Volumes/system-boot/{.fseventsd,.Spotlight-V100}
| |
| |
ssh [email protected]
:<<EOF
The authenticity of host '10.19.83.111 (10.19.83.111)' can't be established.
ECDSA key fingerprint is SHA256:9Lgs5Xxsypm4s/3F87TU2EMh6vUz6pjAMaNHXUDImVs.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.19.83.111' (ECDSA) to the list of known hosts.
[email protected]'s password:
You are required to change your password immediately (administrator enforced)
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64)
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for pi.
Current password:
New password:
Retype new password:
passwd: password updated successfully
Connection to 10.19.83.111 closed.
EOF
| |
| |
ssh [email protected]
:<<EOF
[email protected]'s password:
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64)
EOF
|
Network Config
dpkg --list|grep network-manager dpkg --list|grep wpasupplicant dpkg --list|grep iw |
apt -qq list network-manager apt -qq list wpasupplicant apt -qq list iwd |
sudo apt install network-manager sudo apt install wpasupplicant sudo apt install iwd |
| ||
sudo apt install net-tools sudo nmcli radio all sudo nmcli con help |
sudo nmcli device wifi list sudo nmcli device sudo nmcli con |
sudo nmcli dev wifi con 'ChorkeOrg_2.4GHz' password 'sadaqah!' sudo nmcli dev wifi con 'ChorkeInc' password 'sadaqah!' sudo nmcli dev wifi con 'ChorkeOrg' password 'sadaqah!' |
Server Config
sudo apt install postgresql-12 sudo apt install mariadb-server-10.3 sudo apt install apache2 |
sudo systemctl enable apache2.service sudo systemctl start apache2.service ls -lah /usr/lib/systemd/system/ |
sudo ufw status verbose sudo ufw allow ssh sudo ufw enable |
| ||
sudo groupadd --system lxd
sudo usermod -G lxd -a pi
sudo newgrp lxd
sudo lxd init
:'
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]:
Create a new ZFS pool? (yes/no) [default=yes]:
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]:
Size in GB of the new loop device (1GB minimum) [default=5GB]: 15GB
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
Would you like the LXD server to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
'
|
Desktop Config
sudo apt install tasksel sudo tasksel install kubuntu-full sudo tasksel install kubuntu-desktop |
sudo apt install sddm sudo dpkg-reconfigure sddm |
|
| ||
sudo apt install kde-plasma-desktop -y sudo apt purge kde-plasma-desktop -y |
sudo apt install kde-standard -y sudo apt purge kde-standard -y |
sudo apt install kde-full -y sudo apt purge kde-full -y |
Device Status
sudo nmcli dev
:'
DEVICE TYPE STATE CONNECTION
wlan0 wifi unavailable --
eth0 ethernet unmanaged --
lo loopback unmanaged --
'
lsblk
:'
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 48.9M 1 loop /snap/core18/2127
loop1 7:1 0 57.4M 1 loop /snap/core20/1171
loop2 7:2 0 62M 1 loop /snap/lxd/21032
loop3 7:3 0 49M 1 loop /snap/core18/2248
loop4 7:4 0 28.1M 1 loop /snap/snapd/12707
loop5 7:5 0 60.7M 1 loop /snap/lxd/21843
loop6 7:6 0 28.2M 1 loop /snap/snapd/13643
mmcblk0 179:0 0 119.3G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot/firmware
└─mmcblk0p2 179:2 0 119G 0 part /
'
df -h
:'
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 782M 4.0M 778M 1% /run
/dev/mmcblk0p2 118G 2.8G 110G 3% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/loop0 49M 49M 0 100% /snap/core18/2127
/dev/loop1 58M 58M 0 100% /snap/core20/1171
/dev/loop3 49M 49M 0 100% /snap/core18/2248
/dev/loop2 62M 62M 0 100% /snap/lxd/21032
/dev/loop4 29M 29M 0 100% /snap/snapd/12707
/dev/loop5 61M 61M 0 100% /snap/lxd/21843
/dev/loop6 29M 29M 0 100% /snap/snapd/13643
/dev/mmcblk0p1 253M 120M 133M 48% /boot/firmware
tmpfs 782M 0 782M 0% /run/user/1000
'
sudo fdisk /dev/mmcblk0 -l
:'
Disk /dev/mmcblk0: 119.26 GiB, 128043712512 bytes, 250085376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf66f0719
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 526335 524288 256M c W95 FAT32 (LBA)
/dev/mmcblk0p2 526336 250085342 249559007 119G 83 Linux
'
|
sudo fdisk -l
:'
Disk /dev/loop0: 48.92 MiB, 51277824 bytes, 100152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 57.42 MiB, 60198912 bytes, 117576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 61.98 MiB, 64962560 bytes, 126880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 48.98 MiB, 51335168 bytes, 100264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 28.7 MiB, 29433856 bytes, 57488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 60.68 MiB, 63610880 bytes, 124240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 28.22 MiB, 29581312 bytes, 57776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0: 119.26 GiB, 128043712512 bytes, 250085376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf66f0719
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 526335 524288 256M c W95 FAT32 (LBA)
/dev/mmcblk0p2 526336 250085342 249559007 119G 83 Linux
'
|
Knowledge
dpkg --list|grep network-manager dpkg --list|grep wpasupplicant dpkg --list|grep iw |
apt -qq list network-manager apt -qq list wpasupplicant apt -qq list iwd |
sudo apt update sudo apt upgrade sudo apt autoremove |
| ||
physical volume sudo pvdisplay -m sudo pvdisplay sudo pvs |
logical volume sudo lvdisplay -m sudo lvdisplay sudo lvs |
volume group sudo vgdisplay -s sudo vgdisplay sudo vgs |
| ||
lsblk df -h ll /dev/mm* |
sudo pvscan sudo fdisk -l sudo fdisk /dev/mmcblk0 sudo parted /dev/mmcblk0 |
sudo resize2fs /dev/mmcblk0p3 sudo e2fsck -f /dev/mmcblk0p3 sudo xfs_growfs /dev/ubuntu_ubuntu/root sudo vgdisplay -v ubuntu_ubuntu|grep -i 'Free PE' |
| ||
$GRAALVM_HOME/bin/gu install native-image sudo apt install icedtea-netx openjdk-8-jre sudo update-alternatives --config java |
sudo apt install openjdk-8-jre sudo apt install openjdk-11-jre sudo apt install openjdk-17-jre |
sudo apt install openjdk-8-jdk sudo apt install openjdk-11-jdk sudo apt install openjdk-17-jdk |
| ||
sudo apt install build-essential libz-dev zlib1g-dev JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.fc35.aarch64 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin |
export ACADEMIA_HOME="$HOME/.chorke/academia" mkdir -p $ACADEMIA_HOME/var/download cd $ACADEMIA_HOME/var/download | |
| ||
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz | ||
| ||
tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz ln -s /opt/cli/graalvm-ce-java11-21.3.0 /usr/lib/jvm/graalvm-ce-java11-21.3.0 ln -s /opt/cli/graalvm-ce-java17-21.3.0 /usr/lib/jvm/graalvm-ce-java17-21.3.0 update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java11-21.3.0/bin/java 4 update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java17-21.3.0/bin/java 5 |
mkdir -p /opt/cli cd /opt/cli ls -lah /usr/lib/jvm ls -lah /usr/lib/jvm sudo update-alternatives --config java sudo update-alternatives --config java | |
| ||
apt -qq list network-manager apt -qq list wpasupplicant apt -qq list iwd |
sudo apt install network-manager sudo apt install wpasupplicant sudo apt install iwd |
sudo systemctl status NetworkManager.service sudo systemctl status wpa_supplicant.service sudo systemctl status iwd.service |
| ||
ssh-keygen -f "/home/chorke/.ssh/known_hosts" -R "10.19.83.111" ssh-keygen -f ~/.ssh/known_hosts -R 10.19.83.111 |
References
| ||