Skip to content

Instantly share code, notes, and snippets.

@GDog1985
Forked from hexparrot/install_mineos-node
Created May 25, 2019 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GDog1985/7da6adf90b25fe11a7008e499787fb75 to your computer and use it in GitHub Desktop.
Save GDog1985/7da6adf90b25fe11a7008e499787fb75 to your computer and use it in GitHub Desktop.
Downloads, installs and configures components required for the MineOS Web User Interface on rpm based systems using systemd.
#!/bin/sh
# update repositories
#yum update
# download the necessary prerequisite components for mineos
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
yum -y install screen git wget java-1.8.0-openjdk-headless.x86_64 openssl openssl-devel
yum -y groupinstall "Development tools"
yum -y install nodejs
wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/21/Everything/x86_64/os/Packages/l/librsync-0.9.7-24.fc21.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/25/Everything/x86_64/os/Packages/p/pylibacl-0.5.2-2.fc25.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/19/Everything/x86_64/os/Packages/r/rdiff-backup-1.2.8-9.fc19.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/updates/25/x86_64/Packages/r/rsync-3.1.2-4.fc25.x86_64.rpm
rpm -ivh librsync*.rpm
rpm -ivh pylibacl*.rpm
rpm -ivh rdiff-backup*.rpm
rpm -Uvh rsync*.rpm
# download the most recent mineos web-ui files from github
mkdir -p /usr/games
cd /usr/games
git clone https://github.com/hexparrot/mineos-node.git minecraft
cd minecraft
git config core.filemode false
chmod +x service.js mineos_console.js generate-sslcert.sh webui.js
npm install --all --unsafe-perm
ln -s /usr/games/minecraft/mineos_console.js /usr/local/bin/mineos
cp mineos.conf /etc/mineos.conf
# distribute service related files
cp init/systemd_conf /etc/systemd/system/mineos.service
systemctl enable mineos
# generate self-signed certificate
./generate-sslcert.sh
# start the background service
systemctl start mineos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment