cleaning up and preparing for next step
This commit is contained in:
parent
8ec03e83a5
commit
9f9e046627
@ -8,5 +8,9 @@ To switch user use: `su minecraft -s /bin/bash`
|
||||
- [x] my own .service file
|
||||
- [x] modification of run.sh
|
||||
- [x] screen usege
|
||||
- [ ] SSH keys
|
||||
- [x] SSH keys
|
||||
- [ ] CloudFlare
|
||||
|
||||
|
||||
# To be nice
|
||||
- [ ] do not hardcode soma variables
|
||||
|
||||
31
podklady.md
31
podklady.md
@ -1,14 +1,26 @@
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
# Best to run on sudo su - because of permisions
|
||||
|
||||
# Just to be shure
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
# SSH keys
|
||||
ssh-copy-id -f -i mc-perfect.pub godot@localhost
|
||||
|
||||
# Dependencies
|
||||
sudo apt install qemu-guest-agent openjdk-17-jre-headless neofetch btop screen wget curl vim grep vim p7zip-full -y
|
||||
|
||||
#User and groupe managment
|
||||
groupadd minecraft
|
||||
useradd --system --shell /usr/sbin/nologin --home /opt/minecraft -g minecraft minecraf
|
||||
|
||||
# File strukture and basic install
|
||||
mkdir /opt/minecraft # it may exist
|
||||
cp Mods.zip Forge-1.20.1.jar eula.txt server.properties run.sh mc-forge.service /opt/
|
||||
mv Forge-1.20.1.jar minecraft/
|
||||
cd /opt/minecraft/
|
||||
java -Xms512M -Xmx2048M -jar Forge-1.20.1.jar --installServer
|
||||
./run.sh
|
||||
./run.sh # wait antil proces is stoped
|
||||
rm eula.txt
|
||||
mv ../eula.txt .
|
||||
^C
|
||||
@ -18,11 +30,20 @@ mv ../server.properties .
|
||||
rm run.sh
|
||||
mv ../run.sh .
|
||||
7z x ../Mods.zip -omods
|
||||
|
||||
# SystemD service
|
||||
cp mc-forge.service /etc/systemd/system/
|
||||
chown -R minecraft:minecraft /opt/minecraft
|
||||
systemctl enable mc-forge
|
||||
|
||||
# Permision handeling
|
||||
chown -R minecraft:minecraft /opt/minecraft
|
||||
# **TODO!**
|
||||
|
||||
# ipTable script integration
|
||||
# **TODO!**
|
||||
|
||||
# CloudFlare integration
|
||||
# **TODO!**
|
||||
|
||||
# ./run.sh
|
||||
# Start server thruw systemD
|
||||
systemctl start mc-forge.service
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user