mirror of
https://github.com/IntenseWebs/servercode.git
synced 2025-02-25 18:55:26 -06:00
Add Gitea Upgrade, Update SSH, KVM
This commit is contained in:
parent
d20f94c765
commit
0d28519a03
@ -1,4 +1,6 @@
|
||||
# Generate OpenSSH Private Key id_rsa and Public Key id_rsa.pub
|
||||
# ssh-keygen -t ed25519 -C "user@website.com"
|
||||
# ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "john@example.com"
|
||||
# Generate OpenSSH Private Key id_rsa and Public Key id_rsa.pub (4096, 7680, 15360)
|
||||
ssh-keygen -t rsa -b 4096 -C "user@website.com"
|
||||
|
||||
# ENABLE root access during OS install with password but don't enable SSH remote login for 'root'.
|
||||
@ -27,7 +29,7 @@ chmod 700 ~/.ssh
|
||||
chmod 600 ~/.ssh/authorized_keys
|
||||
|
||||
# Restart machine, Switchback to existing working machine with SSH authorized_keys installed
|
||||
ssh-copy-id -f iw@192.168.1.203
|
||||
ssh-copy-id -f user@hostname.domain.com
|
||||
|
||||
# IMPORTANT -DISABLE SSH PASSWORDS - Only uses Public w/Private Keys for SSH. Local Console logins with passwords is still allowed.
|
||||
su - root
|
||||
|
@ -15,7 +15,7 @@ git commit * -m "Initial Commit"
|
||||
git commit -a
|
||||
git status
|
||||
|
||||
# CLONE ON BRANCH
|
||||
# CLONE FROM MAIN
|
||||
git clone ssh://git@192.168.1.123/~/Repos/servercode servercode
|
||||
# After changes on remote branch open bash terminal
|
||||
git remote -v
|
||||
|
33
gitea-upgrade.txt
Normal file
33
gitea-upgrade.txt
Normal file
@ -0,0 +1,33 @@
|
||||
su -
|
||||
cd /usr/local/bin
|
||||
gitea --version
|
||||
systemctl stop gitea
|
||||
killall gitea
|
||||
systemctl status gitea
|
||||
mv gitea gitea.1.21.1.old
|
||||
cp /home/iw/Downloads 1.21.2* .
|
||||
cp ~/Downloads 1.21.2* .
|
||||
cp ~/Downloads/gitea-1.21.2* .
|
||||
cp ~/Downloads/gitea-1.21.3* .
|
||||
cp ~/Downloads/gitea-1.21.4* .
|
||||
chmod +x gitea*
|
||||
chown gitea:gitea gitea
|
||||
mv gitea-1.21.2-linux-amd64 gitea
|
||||
mv gitea gitea.1.21.2.old
|
||||
mv gitea-1.21.3-linux-amd64 gitea
|
||||
chmod +x gitea*
|
||||
chown gitea:gitea gitea
|
||||
mv gitea-1.21.4-linux-amd64 gitea
|
||||
chmod +x gitea*
|
||||
chown gitea:gitea gitea
|
||||
rm -f gitea.1.21.*
|
||||
|
||||
### su - gitea
|
||||
export GITEA_WORK_DIR=/var/lib/gitea/
|
||||
/usr/local/bin/gitea --version
|
||||
/usr/local/bin/gitea web --config /etc/gitea/app.ini
|
||||
/usr/local/bin/gitea web --config ~/app.ini
|
||||
export GITEA_WORK_DIR=/var/lib/gitea/
|
||||
/usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
killall gitea
|
||||
/usr/local/bin/gitea web -c /etc/gitea/app.ini
|
@ -31,24 +31,21 @@ sudo modprobe vhost_net
|
||||
sudo vi /etc/modules
|
||||
# Add vhost_net
|
||||
|
||||
ip addr
|
||||
sudo vi /etc/network/interfaces
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
iface br0 inet static
|
||||
address 192.168.1.203
|
||||
broadcast 192.168.1.255
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.1.131
|
||||
dns-domain intensewebs.com
|
||||
dns-nameservers 192.168.1.140 192.168.1.141 192.168.1.124
|
||||
bridge_ports enp1s0
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge fd 0
|
||||
______________________________________________________________________________
|
||||
#Be on server as root. nmtui for graphical. RECOMMENDED using nmtui - see kvm-debian-ovmf-uefi-boot-fix.pdf
|
||||
sudo vi /etc/libvirt/qemu/networkshost-bridge.xml
|
||||
#Add the following lines:
|
||||
<network>
|
||||
<name>host-bridge</name>
|
||||
<forward mode="bridge"/>
|
||||
<bridge name="br0"/>
|
||||
</network>
|
||||
#Run the following commands to start the newly created bridge and make it as default bridge for VMs:
|
||||
sudo virsh net-define /etc/libvirt/qemu/networkshost-bridge.xml
|
||||
sudo virsh net-autostart host-bridge
|
||||
# virsh net-destroy default
|
||||
# virsh net-undefine default
|
||||
|
||||
**WARNING** Be on server as root. nmtui for graphical. RECOMMENDED using nmtui
|
||||
# create file if not created
|
||||
sudo vi /etc/sysctl.d/bridge.conf
|
||||
# add the following lines
|
||||
@ -83,16 +80,3 @@ service NetworkManager restart
|
||||
nmcli device show
|
||||
nmcli -f bridge con show br0
|
||||
|
||||
# Create file
|
||||
sudo vi /etc/libvirt/qemu/networkshost-bridge.xml
|
||||
#Add the following lines:
|
||||
<network>
|
||||
<name>host-bridge</name>
|
||||
<forward mode="bridge"/>
|
||||
<bridge name="br0"/>
|
||||
</network>
|
||||
#Run the following commands to start the newly created bridge and make it as default bridge for VMs:
|
||||
sudo virsh net-define /etc/libvirt/qemu/networkshost-bridge.xml
|
||||
sudo virsh net-autostart host-bridge
|
||||
virsh net-destroy default
|
||||
virsh net-undefine default
|
||||
|
@ -4,6 +4,22 @@ echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs)
|
||||
cat /etc/apt/sources.list.d/pgadmin4.list
|
||||
curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
|
||||
|
||||
su - postgres
|
||||
psql
|
||||
# DROP DATABASE djadmindb;
|
||||
CREATE USER djadmin WITH PASSWORD '***************************' CREATEDB;
|
||||
CREATE DATABASE djadmindb WITH OWNER djadmin;
|
||||
ALTER ROLE djadmin SET client_encoding TO 'utf8';
|
||||
ALTER ROLE djadmin SET default_transaction_isolation TO 'read committed';
|
||||
ALTER ROLE djadmin SET timezone TO 'UTC';
|
||||
GRANT ALL PRIVILEGES ON DATABASE djadmindb TO djadmin;
|
||||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO djadmin;
|
||||
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO djadmin;
|
||||
grant postgres to djadmin
|
||||
\q
|
||||
|
||||
psql "postgres://djadmin@192.168.1.6/djadmindb"
|
||||
|
||||
sudo apt update
|
||||
apt install pgadmin4-web
|
||||
/usr/pgadmin4/bin/setup-web.sh
|
||||
@ -14,6 +30,6 @@ sudo adduser MYUSERNAME
|
||||
sudo usermod -aG sudo MYUSERNAME
|
||||
su - MYUSERNAME
|
||||
sudo usermod -a -G www-data $USER
|
||||
|
||||
sudo apt remove curl
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user