Update 'linux.md'
This commit is contained in:
parent
4bb4f3b8ae
commit
634ca6d18e
79
linux.md
79
linux.md
|
@ -1,29 +1,42 @@
|
||||||
_______________________________________________________________________
|
_______________________________________________________________________
|
||||||
Update & Upgrade
|
Update & Upgrade
|
||||||
apt update && apt upgrade -y
|
|
||||||
|
```apt update && apt upgrade -y```
|
||||||
|
|
||||||
_______________________________________________________________________
|
_______________________________________________________________________
|
||||||
Set hostnames
|
Set hostnames
|
||||||
nano /etc/hostname
|
|
||||||
nano /etc/hosts
|
```nano /etc/hostname```
|
||||||
|
|
||||||
|
```nano /etc/hosts```
|
||||||
_______________________________________________________________________
|
_______________________________________________________________________
|
||||||
|
|
||||||
Pulseway Install
|
Pulseway Install
|
||||||
|
|
||||||
|
```
|
||||||
wget https://www.pulseway.com/download/pulseway_x64.deb
|
wget https://www.pulseway.com/download/pulseway_x64.deb
|
||||||
|
|
||||||
dpkg -i pulseway_x64.deb
|
dpkg -i pulseway_x64.deb
|
||||||
|
|
||||||
pulseway-registration
|
pulseway-registration
|
||||||
|
```
|
||||||
|
|
||||||
_______________________________________________________________________
|
_______________________________________________________________________
|
||||||
|
|
||||||
aaPanel Install
|
aaPanel Install
|
||||||
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh forum
|
|
||||||
|
```wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh forum```
|
||||||
_______________________________________________________________________
|
_______________________________________________________________________
|
||||||
|
|
||||||
ip confings
|
ip confings
|
||||||
|
|
||||||
RUN AS ROOT~
|
RUN AS ROOT~
|
||||||
|
|
||||||
nano /etc/netplan/00-installer-config.yaml
|
```nano /etc/netplan/00-installer-config.yaml```
|
||||||
|
|
||||||
(look at 'ip address' as this differs from VMS to physical systems)
|
(look at 'ip address' as this differs from VMS to physical systems)
|
||||||
|
|
||||||
`
|
```
|
||||||
# This is the network config written by 'subiquity'
|
# This is the network config written by 'subiquity'
|
||||||
network:
|
network:
|
||||||
ethernets:
|
ethernets:
|
||||||
|
@ -32,24 +45,32 @@ network:
|
||||||
gateway4: 192.168.1.1
|
gateway4: 192.168.1.1
|
||||||
nameservers:
|
nameservers:
|
||||||
addresses: [1.1.1.1, 8.8.8.8, 64.6.64.6, 8.8.4.4, 1.0.0.1, 9.9.9.9, 64.6.65.6]
|
addresses: [1.1.1.1, 8.8.8.8, 64.6.64.6, 8.8.4.4, 1.0.0.1, 9.9.9.9, 64.6.65.6]
|
||||||
`
|
```
|
||||||
netplan apply
|
|
||||||
|
```netplan apply```
|
||||||
|
|
||||||
|
|
||||||
Create dev Ips
|
Create dev Ips
|
||||||
ip addr add 192.168.1.LOL/24 dev eth0 (look at 'ip address' as this differs from VMS to physical systems)
|
|
||||||
https://sop.wtf/cl4fzn
|
(look at 'ip address' as this differs from VMS to physical systems)
|
||||||
|
|
||||||
|
```ip addr add 192.168.1.LOL/24 dev eth0```
|
||||||
|
|
||||||
|
https://sop.wtf/cl4fzn
|
||||||
_______________________________________________________________________
|
_______________________________________________________________________
|
||||||
|
|
||||||
How to resize /dev/ubuntu-vg/ubuntu-lv "Root Dir"
|
How to resize /dev/ubuntu-vg/ubuntu-lv "Root Dir"
|
||||||
This is if you have LVM enabled, if its non LVM read this ask ubuntu thread https://sop.wtf/3nn8bi
|
This is if you have LVM enabled, if its non LVM read this ask ubuntu thread https://sop.wtf/3nn8bi
|
||||||
|
```
|
||||||
df -h
|
df -h
|
||||||
lvm
|
lvm
|
||||||
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
|
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
|
||||||
exit
|
exit
|
||||||
df -h
|
df -h
|
||||||
|
```
|
||||||
|
|
||||||
You may need to do this if on virsion 22.04 or higher
|
You may need to do this if on virsion 22.04 or higher
|
||||||
|
```
|
||||||
fdisk -l (note it's partition 3 by looking at the current Size)
|
fdisk -l (note it's partition 3 by looking at the current Size)
|
||||||
parted
|
parted
|
||||||
resizepart, Fix, 3, 100% (type this instead), quit
|
resizepart, Fix, 3, 100% (type this instead), quit
|
||||||
|
@ -57,20 +78,24 @@ pvresize /dev/sda3
|
||||||
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
|
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
|
||||||
resize2fs /dev/ubuntu-vg/ubuntu-lv
|
resize2fs /dev/ubuntu-vg/ubuntu-lv
|
||||||
df -h
|
df -h
|
||||||
|
```
|
||||||
|
|
||||||
_________________________________________________________________________
|
_________________________________________________________________________
|
||||||
|
|
||||||
Enable Root on SSH
|
Enable Root on SSH
|
||||||
sudo su -
|
|
||||||
|
```sudo su -
|
||||||
passwd
|
passwd
|
||||||
nano /etc/ssh/sshd_config
|
nano /etc/ssh/sshd_config
|
||||||
Look for: PermitRootLogin prohibit-password (line 34) and change it to PermitRootLogin yes
|
Look for: PermitRootLogin prohibit-password (line 34) and change it to PermitRootLogin yes
|
||||||
or if your lazy, sudo echo "PermitRootLogin yes" >> nano /etc/ssh/sshd_config
|
or if your lazy, sudo echo "PermitRootLogin yes" >> nano /etc/ssh/sshd_config
|
||||||
reboot
|
reboot
|
||||||
|
```
|
||||||
_________________________________________________________________________
|
_________________________________________________________________________
|
||||||
|
|
||||||
If Gitea fucking expodes.
|
If Gitea fucking expodes.
|
||||||
https://sop.wtf/s8a74h
|
https://sop.wtf/s8a74h
|
||||||
|
```
|
||||||
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/1.17.2/gitea-1.17.2-linux-amd64
|
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/1.17.2/gitea-1.17.2-linux-amd64
|
||||||
sudo chmod +x /usr/local/bin/gitea
|
sudo chmod +x /usr/local/bin/gitea
|
||||||
sudo chown -Rv git:git /var/lib/gitea
|
sudo chown -Rv git:git /var/lib/gitea
|
||||||
|
@ -80,55 +105,67 @@ sudo chmod -Rv 770 /etc/gitea
|
||||||
sudo nano /etc/systemd/system/gitea.service
|
sudo nano /etc/systemd/system/gitea.service
|
||||||
https://linustechtips.xyz/nirO5/bIZAfuse84.txt/raw
|
https://linustechtips.xyz/nirO5/bIZAfuse84.txt/raw
|
||||||
sudo systemctl enable --now gitea
|
sudo systemctl enable --now gitea
|
||||||
|
```
|
||||||
_________________________________________________________________________
|
_________________________________________________________________________
|
||||||
|
|
||||||
Mount SMB CIFS
|
Mount SMB CIFS
|
||||||
|
|
||||||
sudo apt install cifs-utils
|
```sudo apt install cifs-utils
|
||||||
sudo mkdir /mnt/NAME
|
sudo mkdir /mnt/NAME
|
||||||
sudo nano /root/.NAME-credentials
|
sudo nano /root/.NAME-credentials
|
||||||
|
```
|
||||||
`
|
```
|
||||||
username=username
|
username=username
|
||||||
password=password
|
password=password
|
||||||
|
|
||||||
`
|
```
|
||||||
|
|
||||||
sudo chmod 400 /root/.NAME-credentials
|
```sudo chmod 400 /root/.NAME-credentials
|
||||||
sudo mount -t cifs -o rw,vers=3.0,credentials=/.NAME-credentials //IPADD/Share/NAME /mnt/NAME
|
sudo mount -t cifs -o rw,vers=3.0,credentials=/.NAME-credentials //IPADD/Share/NAME /mnt/NAME
|
||||||
|
```
|
||||||
Automount on system reboot
|
Automount on system reboot
|
||||||
|
|
||||||
|
```
|
||||||
sudo nano /etc/fstab
|
sudo nano /etc/fstab
|
||||||
//IPADD/Share/NAME /mnt/NAME cifs vers=3.0,credentials=/.NAME-credentials
|
//IPADD/Share/NAME /mnt/NAME cifs vers=3.0,credentials=/.NAME-credentials
|
||||||
|
```
|
||||||
_________________________________________________________________________
|
_________________________________________________________________________
|
||||||
|
|
||||||
Time change
|
### Time change
|
||||||
|
|
||||||
|
```
|
||||||
timedatectl
|
timedatectl
|
||||||
timedatectl list-timezones
|
timedatectl list-timezones
|
||||||
sudo timedatectl set-timezone America/Los_Angeles
|
sudo timedatectl set-timezone America/Los_Angeles
|
||||||
|
```
|
||||||
|
|
||||||
_________________________________________________________________________
|
_________________________________________________________________________
|
||||||
|
|
||||||
Observium Install
|
Observium Install
|
||||||
https://sop.wtf/0qjgzv
|
https://sop.wtf/0qjgzv
|
||||||
|
|
||||||
|
```
|
||||||
wget http://www.observium.org/observium_installscript.sh
|
wget http://www.observium.org/observium_installscript.sh
|
||||||
sudo chmod +x observium_installscript.sh
|
sudo chmod +x observium_installscript.sh
|
||||||
sudo ./observium_installscript.sh
|
sudo ./observium_installscript.sh
|
||||||
|
```
|
||||||
________________________________________________________________________
|
________________________________________________________________________
|
||||||
|
|
||||||
SNMP v3 Configuration
|
SNMP v3 Configuration
|
||||||
|
|
||||||
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install snmp snmpd libsnmp-dev
|
sudo apt install snmp snmpd libsnmp-dev
|
||||||
|
|
||||||
sudo net-snmp-config --create-snmpv3-user -ro -A [PASSWORD] -X [CRYPTO-PASSWORD] -a MD5 -x AES [USER]
|
sudo net-snmp-config --create-snmpv3-user -ro -A [PASSWORD] -X [CRYPTO-PASSWORD] -a MD5 -x AES [USER]
|
||||||
|
```
|
||||||
________________________________________________________________________
|
________________________________________________________________________
|
||||||
|
|
||||||
PHP 8.1.x
|
Install PHP 8.1.x
|
||||||
|
|
||||||
|
```
|
||||||
sudo apt install software-properties-common (Should be install by default, but run just incase)
|
sudo apt install software-properties-common (Should be install by default, but run just incase)
|
||||||
sudo add-apt-repository ppa:ondrej/php
|
sudo add-apt-repository ppa:ondrej/php
|
||||||
|
```
|
||||||
|
|
||||||
________________________________________________________________________
|
________________________________________________________________________
|
||||||
|
|
Reference in New Issue
Block a user