From bf3e60632bd7d420b431f321e6ec5704351b04a0 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 17:34:04 -0400 Subject: [PATCH 01/12] Script cleanup --- Backup_Game_Databases_Linux_Mac.sh | 3 +++ Backup_Game_Databases_Windows.cmd | 2 ++ Clone_Game_Website_Wiki_Windows.cmd | 7 +++++ Clone_Game_Website_Windows.cmd | 5 ++++ Clone_Game_Windows.cmd | 2 ++ Delete_Local_Repos_Linux_Mac.sh | 4 +++ Delete_Local_Repos_Windows.cmd | 2 ++ Import_Databases_Linux_Mac.sh | 15 ++++++++++- Import_Databases_Windows.cmd | 10 +++++++ Restore_Game_Database_Backup_Linux_Mac.sh | 4 +++ Restore_Game_Database_Backup_Windows.cmd | 2 ++ Run_Production_Linux_Game_Server.sh | 25 +++++++++++++++-- Start_Single_Player_Game_Linux_Mac.sh | 33 ++++++++++++++++++++--- Start_Single_Player_Game_Windows.cmd | 15 +++++++++++ Stop_Game_Linux_Mac.sh | 6 +++++ Stop_Game_Windows.cmd | 4 +++ ant_launcher.sh | 14 +++------- 17 files changed, 136 insertions(+), 17 deletions(-) diff --git a/Backup_Game_Databases_Linux_Mac.sh b/Backup_Game_Databases_Linux_Mac.sh index 93caef9..59e66b9 100755 --- a/Backup_Game_Databases_Linux_Mac.sh +++ b/Backup_Game_Databases_Linux_Mac.sh @@ -1,3 +1,6 @@ #!/bin/bash +echo "Backing up all databases." +echo "" sudo make backup +echo "" diff --git a/Backup_Game_Databases_Windows.cmd b/Backup_Game_Databases_Windows.cmd index 43174b9..49aa6d2 100644 --- a/Backup_Game_Databases_Windows.cmd +++ b/Backup_Game_Databases_Windows.cmd @@ -1,5 +1,7 @@ @echo off echo: +echo Backing up all databases. +echo: Windows\make backup-windows echo: pause diff --git a/Clone_Game_Website_Wiki_Windows.cmd b/Clone_Game_Website_Wiki_Windows.cmd index 837e753..bb813cc 100644 --- a/Clone_Game_Website_Wiki_Windows.cmd +++ b/Clone_Game_Website_Wiki_Windows.cmd @@ -1,9 +1,16 @@ @echo off echo: +echo Cloning the game repository. Windows\make clone-windows-game echo: +echo: +echo Cloning the website repository. +echo: Windows\make clone-windows-website echo: +echo: +echo Cloning the wiki repository. +echo: Windows\make clone-windows-wiki echo: pause diff --git a/Clone_Game_Website_Windows.cmd b/Clone_Game_Website_Windows.cmd index 2b48aca..8858776 100644 --- a/Clone_Game_Website_Windows.cmd +++ b/Clone_Game_Website_Windows.cmd @@ -1,7 +1,12 @@ @echo off echo: +echo Cloning the game repository. +echo: Windows\make clone-windows-game echo: +echo: +echo Cloning the website repository. +echo: Windows\make clone-windows-website echo: pause diff --git a/Clone_Game_Windows.cmd b/Clone_Game_Windows.cmd index 0e33774..9215cfa 100644 --- a/Clone_Game_Windows.cmd +++ b/Clone_Game_Windows.cmd @@ -1,5 +1,7 @@ @echo off echo: +echo Cloning the game repository. +echo: Windows\make clone-windows-game echo: pause diff --git a/Delete_Local_Repos_Linux_Mac.sh b/Delete_Local_Repos_Linux_Mac.sh index fd68560..69cd819 100755 --- a/Delete_Local_Repos_Linux_Mac.sh +++ b/Delete_Local_Repos_Linux_Mac.sh @@ -1,3 +1,7 @@ #!/bin/bash +echo "" +echo "Deleting local repositories." +echo "" sudo make flush +echo "" diff --git a/Delete_Local_Repos_Windows.cmd b/Delete_Local_Repos_Windows.cmd index f3e101f..077292a 100644 --- a/Delete_Local_Repos_Windows.cmd +++ b/Delete_Local_Repos_Windows.cmd @@ -1,5 +1,7 @@ @echo off echo: +echo Deleting local repositories. +echo: Windows\make flush-windows echo: echo: diff --git a/Import_Databases_Linux_Mac.sh b/Import_Databases_Linux_Mac.sh index 4ae583c..d07add6 100755 --- a/Import_Databases_Linux_Mac.sh +++ b/Import_Databases_Linux_Mac.sh @@ -1,4 +1,17 @@ #!/bin/bash -sudo make import +echo "" +echo "Attempting to import (or overwrite) the game database." +echo "" +sudo make import-game +echo "" +echo "" +echo "Attempting to import (or overwrite) the website database." +echo "" +sudo make import-website +echo "" +echo "" +echo "Attempting to import (or overwrite) the wiki database." +echo "" sudo make import-wiki +echo "" diff --git a/Import_Databases_Windows.cmd b/Import_Databases_Windows.cmd index 5244608..33f2ced 100644 --- a/Import_Databases_Windows.cmd +++ b/Import_Databases_Windows.cmd @@ -1,7 +1,17 @@ @echo off echo: +echo Attempting to import (or overwrite) the game database. +echo: Windows\make import-windows-game +echo: +echo: +echo Attempting to import (or overwrite) the website database. +echo: Windows\make import-windows-website +echo: +echo: +echo Attempting to import (or overwrite) the wiki database. +echo: Windows\make import-windows-wiki echo: pause diff --git a/Restore_Game_Database_Backup_Linux_Mac.sh b/Restore_Game_Database_Backup_Linux_Mac.sh index 57d7283..722b794 100755 --- a/Restore_Game_Database_Backup_Linux_Mac.sh +++ b/Restore_Game_Database_Backup_Linux_Mac.sh @@ -1,3 +1,7 @@ #!/bin/bash +echo "" +echo "Restoring game databases from backup." +echo "" sudo make restore +echo "" diff --git a/Restore_Game_Database_Backup_Windows.cmd b/Restore_Game_Database_Backup_Windows.cmd index c30ef5b..a618b24 100644 --- a/Restore_Game_Database_Backup_Windows.cmd +++ b/Restore_Game_Database_Backup_Windows.cmd @@ -1,5 +1,7 @@ @echo off echo: +echo Restoring game databases from backup. +echo: Windows\make restore-windows echo: pause diff --git a/Run_Production_Linux_Game_Server.sh b/Run_Production_Linux_Game_Server.sh index 56b2253..b31d508 100644 --- a/Run_Production_Linux_Game_Server.sh +++ b/Run_Production_Linux_Game_Server.sh @@ -1,5 +1,26 @@ #!/bin/bash -echo "Launching in a new window. Type 'screen -r' to view the live server screen." -echo "Use CTRL + A + D to detach the live server screen." + +# Check for any updates to the game server +echo "Pulling recent updates from the Open-RSC Game repository." +echo "" +echo "" +sudo make pull +echo "" +echo "" + +# Compile the game server +echo "Compiling the game server." +echo "" +echo "" +sudo Ant/bin/ant -f Game/server/build.xml compile +echo "" +echo "" + +# Run the game server in a detached screen +echo "Launching the game server in a new screen." +echo "" +echo "Type 'screen -r' to access the game server screen." +echo "Use CTRL + A + D to detach the live server screen so it runs in the background." +echo "" echo "" screen -dmS name ./ant_launcher.sh diff --git a/Start_Single_Player_Game_Linux_Mac.sh b/Start_Single_Player_Game_Linux_Mac.sh index 6ab7bc7..13d40e6 100755 --- a/Start_Single_Player_Game_Linux_Mac.sh +++ b/Start_Single_Player_Game_Linux_Mac.sh @@ -1,12 +1,39 @@ #!/bin/bash + +# Check for any updates to the game server +echo "" +echo "Pulling recent updates from the Open-RSC Game repository." +echo "" sudo make pull +echo "" +echo "" +echo "Starting any stopped Docker containers." +echo "" +sudo make start +echo "" +echo "" -#Compile +# Compile the game server and client +echo "Compiling the game client." +echo "" sudo Ant/bin/ant -f Game/client/build.xml compile +echo "" +echo "" +echo "Compiling the game server." +echo "" sudo Ant/bin/ant -f Game/server/build.xml compile +echo "" +echo "" -#Client +# Rune the game client in a new window +echo "Launching the game client." +echo "" Ant/bin/ant -f Game/client/build.xml runclient & +echo "" +echo "" -#Server +# Run the game server in the current window +echo "Launching the game server." +echo "" Ant/bin/ant -f Game/server/build.xml runserver +echo "" diff --git a/Start_Single_Player_Game_Windows.cmd b/Start_Single_Player_Game_Windows.cmd index 2db5182..37ea4f7 100644 --- a/Start_Single_Player_Game_Windows.cmd +++ b/Start_Single_Player_Game_Windows.cmd @@ -1,20 +1,35 @@ @echo off echo: +echo Pulling recent updates from the Open-RSC Game repository. +echo: Windows\make pull echo: echo: +echo Starting any stopped Docker containers. +echo: +Windows\make start +echo: +echo: set PATH=Ant/bin echo: echo: +echo Compiling the game client. +echo: call ant -f Game/client/build.xml compile echo: echo: +echo Compiling the game server. +echo: call ant -f Game/server/build.xml compile echo: echo: +echo Starting the game client in a new window. +echo: call START "" ant -f Game/client/build.xml runclient echo: echo: +echo Starting the game server in the current window. +echo: call ant -f Game/server/build.xml runserver echo: pause diff --git a/Stop_Game_Linux_Mac.sh b/Stop_Game_Linux_Mac.sh index 040599f..4d46251 100755 --- a/Stop_Game_Linux_Mac.sh +++ b/Stop_Game_Linux_Mac.sh @@ -1,3 +1,9 @@ #!/bin/bash +echo "" +echo "Stopping the running Docker containers." +echo "" +echo "" sudo make stop +echo "" +echo "" diff --git a/Stop_Game_Windows.cmd b/Stop_Game_Windows.cmd index 410a94a..e06c26d 100644 --- a/Stop_Game_Windows.cmd +++ b/Stop_Game_Windows.cmd @@ -1,8 +1,12 @@ @echo off echo: +echo Stopping the running Docker containers. +echo: Windows\make stop echo: echo: +echo Killing any running in the background instance of the game server. +echo: tskill java /a echo: pause diff --git a/ant_launcher.sh b/ant_launcher.sh index f38172d..b84925c 100644 --- a/ant_launcher.sh +++ b/ant_launcher.sh @@ -1,17 +1,9 @@ #!/bin/bash -echo "Pulling recent updates from the Open-RSC Game repo" -sudo make pull -echo "" -echo "" -#Compile -echo "Compiling the game server" +# Run the game server echo "" -echo "" -sudo Ant/bin/ant -f Game/server/build.xml compile - -#Run game server -echo "Launching the game server" +echo "Running the game server. Press CTRL + C to shut it down or" +echo "CTRL + A + D to detached the screen so this runs in the background." echo "" echo "" Ant/bin/ant -f Game/server/build.xml runserver From 1a8010566e7fb467c7ab40d94d59ef49fbbd35de Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 17:38:05 -0400 Subject: [PATCH 02/12] File permission correction for +x --- Run_Production_Linux_Game_Server.sh | 0 ant_launcher.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Run_Production_Linux_Game_Server.sh mode change 100644 => 100755 ant_launcher.sh diff --git a/Run_Production_Linux_Game_Server.sh b/Run_Production_Linux_Game_Server.sh old mode 100644 new mode 100755 diff --git a/ant_launcher.sh b/ant_launcher.sh old mode 100644 new mode 100755 From ec98c1af31bde34948b5b8bde3b61ef573724fe5 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 17:43:39 -0400 Subject: [PATCH 03/12] Added pull choices --- Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aa11657..8935796 100644 --- a/Makefile +++ b/Makefile @@ -22,13 +22,22 @@ clone-wiki: clone-windows-website: @git clone https://github.com/Open-RSC/Website.git - + clone-windows-game: @git clone https://github.com/Open-RSC/Game.git - + clone-windows-wiki: @git clone https://github.com/Open-RSC/Wiki.git Website/Wiki - + +pull-game: + @cd Game && git pull + +pull-website: + @cd Website && git pull + +pull-wiki: + @cd Website/Wiki && git pull + pull-game-windows: @cd Game && git reset HEAD --hard && git pull From 405a34bfd197c0d2ac3e083c2a68dd338eac5426 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 17:45:47 -0400 Subject: [PATCH 04/12] Referenced new pull functions --- Run_Production_Linux_Game_Server.sh | 2 +- Start_Single_Player_Game_Linux_Mac.sh | 2 +- Start_Single_Player_Game_Windows.cmd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Run_Production_Linux_Game_Server.sh b/Run_Production_Linux_Game_Server.sh index b31d508..e819799 100755 --- a/Run_Production_Linux_Game_Server.sh +++ b/Run_Production_Linux_Game_Server.sh @@ -4,7 +4,7 @@ echo "Pulling recent updates from the Open-RSC Game repository." echo "" echo "" -sudo make pull +sudo make pull-game echo "" echo "" diff --git a/Start_Single_Player_Game_Linux_Mac.sh b/Start_Single_Player_Game_Linux_Mac.sh index 13d40e6..3fb32ca 100755 --- a/Start_Single_Player_Game_Linux_Mac.sh +++ b/Start_Single_Player_Game_Linux_Mac.sh @@ -4,7 +4,7 @@ echo "" echo "Pulling recent updates from the Open-RSC Game repository." echo "" -sudo make pull +sudo make pull-game echo "" echo "" echo "Starting any stopped Docker containers." diff --git a/Start_Single_Player_Game_Windows.cmd b/Start_Single_Player_Game_Windows.cmd index 37ea4f7..ca0d976 100644 --- a/Start_Single_Player_Game_Windows.cmd +++ b/Start_Single_Player_Game_Windows.cmd @@ -2,7 +2,7 @@ echo: echo Pulling recent updates from the Open-RSC Game repository. echo: -Windows\make pull +Windows\make pull-game echo: echo: echo Starting any stopped Docker containers. From ba2bab432c5a92065409a89979a53ee9e48e975b Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 18:07:32 -0400 Subject: [PATCH 05/12] Attempting to solve issue #5 --- Setup_Linux_Mac.sh | 47 +++------------------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/Setup_Linux_Mac.sh b/Setup_Linux_Mac.sh index 14417e7..ba08cd8 100755 --- a/Setup_Linux_Mac.sh +++ b/Setup_Linux_Mac.sh @@ -289,19 +289,10 @@ if [ "$choice" == "1" ]; then echo "You have picked ${GREEN}single player RSC + PHPMyAdmin!${NC}" echo "" echo "" - echo "Checking the git repos for any recent updates." - echo "" - echo "You may now be prompted for your password so the installer has sudo access." - echo "" - cd Game && sudo git reset HEAD --hard && sudo git pull - cd .. - sudo chmod -R 777 Game - echo "" - echo "" echo "Logging into Docker Hub to get the required images." echo "You may first need to register an account at ${RED}dockerhub.com${NC}" echo "" - docker login + sudo docker login echo "" echo "" echo "Starting up the Docker containers and stopping any existing ones." @@ -339,24 +330,10 @@ elif [ "$choice" == "2" ]; then echo "You have picked ${GREEN}Game + Website + PHPMyAdmin!${NC}" echo "" echo "" - echo "Checking the git repos for any recent updates." - echo "" - echo "You may now be prompted for your password so the installer has sudo access." - echo "" - cd Game && sudo git reset HEAD --hard && sudo git pull - cd .. - sudo chmod -R 777 Game - echo "" - cd Website && sudo git reset HEAD --hard && sudo git pull - cd .. - sudo chmod -R 777 Website - sudo chmod -R 644 Website/board/config.php - echo "" - echo "" echo "Logging into Docker Hub to get the required images." echo "You may first need to register an account at ${RED}dockerhub.com${NC}" echo "" - docker login + sudo docker login echo "" echo "" echo "Starting up the Docker containers and stopping any existing ones." @@ -403,28 +380,10 @@ elif [ "$choice" == "3" ]; then echo "You have picked ${GREEN}Game + Website + PHPMyAdmin + RSC Preservation Wiki!${NC}" echo "" echo "" - echo "Checking the git repos for any recent updates." - echo "" - echo "You may now be prompted for your password so the installer has sudo access." - echo "" - cd Game && git sudo reset HEAD --hard && sudo git pull - cd .. - sudo chmod -R 777 Game - echo "" - cd Website && sudo git reset HEAD --hard && sudo git pull - cd .. - sudo chmod -R 777 Website - sudo chmod -R 644 Website/board/config.php - echo "" - cd Website/Wiki && sudo git reset HEAD --hard && sudo git pull - cd .. - sudo chmod -R 777 Website/Wiki - echo "" - echo "" echo "Logging into Docker Hub to get the required images." echo "You may first need to register an account at ${RED}dockerhub.com${NC}" echo "" - docker login + sudo docker login echo "" echo "" echo "Starting up the Docker containers and stopping any existing ones." From d0bf03afe1b31da3d4d880cf6e498430f87f15c3 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 18:14:20 -0400 Subject: [PATCH 06/12] Ensuring basics are installed --- Setup_Linux_Mac.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Setup_Linux_Mac.sh b/Setup_Linux_Mac.sh index ba08cd8..58e78c8 100755 --- a/Setup_Linux_Mac.sh +++ b/Setup_Linux_Mac.sh @@ -62,6 +62,11 @@ if [ "$install" == "1" ]; then fi # UBUNTU Version <=================================================== + echo "" + echo "" + echo "Verifying the basics are installed." + echo "" + sudo apt update && sudo apt install unzip git build-essential apt-transport-https ca-certificates curl software-properties-common -y echo "" echo "" echo "Do you have Docker installed?" @@ -75,7 +80,6 @@ if [ "$install" == "1" ]; then if [ "$docker" == "1" ]; then echo "Attempting to install Docker now" echo "" - sudo apt update && sudo apt install git build-essential apt-transport-https ca-certificates curl software-properties-common -y curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $vers stable" sudo apt update && sudo apt install docker-ce docker-compose -y @@ -107,6 +111,11 @@ if [ "$install" == "1" ]; then su -c 'yum update && yum install git' echo "" echo "" + echo "Verifying the basics are installed." + echo "" + su -c 'yum update && yum install unzip git build-essential apt-transport-https ca-certificates curl software-properties-common' + echo "" + echo "" echo "Do you have Java OpenJDK installed already?" echo "" echo "${RED}1${NC} - Install for me!" @@ -161,6 +170,11 @@ if [ "$install" == "1" ]; then fi # Mac Brew <=================================================== + echo "" + echo "" + echo "Verifying the basics are installed." + echo "" + brew install unzip wget git curl echo "" echo "" echo "Do you have Java OpenJDK 8 installed already?" @@ -189,7 +203,7 @@ if [ "$install" == "1" ]; then # Mac Docker ===================================================> if [ "$docker" == "1" ]; then echo "Downloading the Docker for Mac installer" - brew install wget + echo "" wget https://download.docker.com/mac/stable/Docker.dmg hdiutil attach Docker.dmg echo "" From 0ea635046022a035a7d1664535a4a9dd2d78d891 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 18:59:50 -0400 Subject: [PATCH 07/12] Fedora 28 x64 now supported --- README.md | 11 +++++++++++ Setup_Linux_Mac.sh | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f0029e8..02a37fb 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,17 @@ Choices: 2. Game + Website + PHPMyAdmin 3. Game + Website + PHPMyAdmin + RSC Preservation Wiki + +Operating systems supported: + +* Windows 10 x64 + +* Mac OS X High Sierra + +* Ubuntu Linux 18.04 x64 + +* Fedora Linux 28 x64 + ___ ## Choice 1: Download the zip, extract it, and open the "Docker-Home" folder diff --git a/Setup_Linux_Mac.sh b/Setup_Linux_Mac.sh index 58e78c8..c3b7f52 100755 --- a/Setup_Linux_Mac.sh +++ b/Setup_Linux_Mac.sh @@ -108,15 +108,20 @@ if [ "$install" == "1" ]; then # Fedora OS ===================================================> elif [ "$os" == "2" ]; then - su -c 'yum update && yum install git' echo "" echo "" echo "Verifying the basics are installed." echo "" - su -c 'yum update && yum install unzip git build-essential apt-transport-https ca-certificates curl software-properties-common' + sudo dnf -y update && sudo dnf -y upgrade && sudo dnf -y install screen make unzip git ca-certificates curl yum-utils device-mapper-persistent-data lvm2 echo "" echo "" - echo "Do you have Java OpenJDK installed already?" + echo "Permitting default game port 53595/tcp through the firewall." + firewall-cmd --permanent --add-port=53595/tcp + echo "" + firewall-cmd --reload + echo "" + echo "" + echo "Do you have Java OpenJDK and Apache Ant installed already?" echo "" echo "${RED}1${NC} - Install for me!" echo "${RED}2${NC} - Im all set" @@ -125,8 +130,7 @@ if [ "$install" == "1" ]; then # Fedora Java ===================================================> if [ "$java" == "1" ]; then - su -c 'yum install alternatives' - su -c '/usr/sbin/alternatives --config java' + sudo dnf -y install ant else continue fi @@ -143,10 +147,31 @@ if [ "$install" == "1" ]; then # Fedora Docker ===================================================> if [ "$docker" == "1" ]; then + echo "Removing any old versions of Docker that might confict." + echo "" + sudo dnf -y remove docker \ + docker-client \ + docker-client-latest \ + docker-common \ + docker-latest \ + docker-latest-logrotate \ + docker-logrotate \ + docker-selinux \ + docker-engine-selinux \ + docker-engine + echo "" + echo "" echo "Attempting to install Docker now" echo "" - curl -fsSL get.docker.com -o get-docker.sh - su -c 'sh get-docker.sh' + sudo dnf -y install dnf-plugins-core + sudo dnf -y config-manager \ + --add-repo \ + https://download.docker.com/linux/fedora/docker-ce.repo + sudo dnf -y install docker-ce docker-compose + sudo systemctl start docker + sudo groupadd docker + sudo usermod -aG docker $USER + sudo systemctl enable docker else continue fi From 0c273db1d9059b32b59db8b34ece6023b84c8a54 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 19:44:33 -0400 Subject: [PATCH 08/12] Added CentOS 7 support --- README.md | 3 +- Setup_Linux_Mac.sh | 79 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 02a37fb..dc86ee3 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@ Choices: 2. Game + Website + PHPMyAdmin 3. Game + Website + PHPMyAdmin + RSC Preservation Wiki +___ -Operating systems supported: +## Operating systems supported: * Windows 10 x64 diff --git a/Setup_Linux_Mac.sh b/Setup_Linux_Mac.sh index c3b7f52..712b718 100755 --- a/Setup_Linux_Mac.sh +++ b/Setup_Linux_Mac.sh @@ -23,8 +23,9 @@ if [ "$install" == "1" ]; then echo "Which operating system are you running?" echo "" echo "${RED}1${NC} - Ubuntu Linux" - echo "${RED}2${NC} - Fedora Linux" - echo "${RED}3${NC} - Mac OS" + echo "${RED}2${NC} - Fedora 28 Linux" + echo "${RED}5${NC} - CentOS 7 Linux" + echo "${RED}3${NC} - Mac OS High Sierra" echo "${RED}4${NC} - Other" echo "" read os @@ -169,15 +170,85 @@ if [ "$install" == "1" ]; then https://download.docker.com/linux/fedora/docker-ce.repo sudo dnf -y install docker-ce docker-compose sudo systemctl start docker - sudo groupadd docker - sudo usermod -aG docker $USER sudo systemctl enable docker + sudo usermod -aG docker $USER else continue fi # Fedora Docker <=================================================== # Fedora OS <=================================================== + # CentOS 7 OS ===================================================> + elif [ "$os" == "5" ]; then + echo "" + echo "" + echo "Verifying the basics are installed." + echo "" + sudo wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm + sudo wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm + sudo wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm + sudo yum -y install dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm python-dnf-0.6.4-2.sdl7.noarch.rpm + sudo dnf -y update && sudo dnf -y upgrade && sudo dnf -y install screen make unzip git ca-certificates curl yum-utils device-mapper-persistent-data lvm2 + echo "" + echo "" + echo "Permitting default game port 53595/tcp through the firewall." + firewall-cmd --permanent --add-port=53595/tcp + echo "" + firewall-cmd --reload + echo "" + echo "" + echo "Do you have Java OpenJDK and Apache Ant installed already?" + echo "" + echo "${RED}1${NC} - Install for me!" + echo "${RED}2${NC} - Im all set" + echo "" + read java + + # CentOS 7 Java ===================================================> + if [ "$java" == "1" ]; then + sudo dnf -y install ant + else + continue + fi + # CentOS 7 Java <=================================================== + + echo "" + echo "" + echo "Do you have Docker installed?" + echo "" + echo "${RED}1${NC} - No, install it for me!" + echo "${RED}2${NC} - Yes" + echo "" + read docker + + # CentOS 7 Docker ===================================================> + if [ "$docker" == "1" ]; then + echo "Removing any old versions of Docker that might confict." + echo "" + sudo dnf -y remove docker \ + docker-client \ + docker-client-latest \ + docker-common \ + docker-latest \ + docker-latest-logrotate \ + docker-logrotate \ + docker-selinux \ + docker-engine-selinux \ + docker-engine + echo "" + echo "" + echo "Attempting to install Docker now" + echo "" + curl -fsSL https://get.docker.com/ | sh + sudo systemctl start docker + sudo systemctl enable docker + sudo usermod -aG docker $USER + else + continue + fi + # CentOS 7 Docker <=================================================== + # CentOS 7 OS <=================================================== + # Mac OS ===================================================> elif [ "$os" == "3" ]; then clear From 0f27b4261f43619cfe7107b89a76df3d52fcd053 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 19:47:01 -0400 Subject: [PATCH 09/12] Renumbering --- Setup_Linux_Mac.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Setup_Linux_Mac.sh b/Setup_Linux_Mac.sh index 712b718..da82c28 100755 --- a/Setup_Linux_Mac.sh +++ b/Setup_Linux_Mac.sh @@ -24,9 +24,9 @@ if [ "$install" == "1" ]; then echo "" echo "${RED}1${NC} - Ubuntu Linux" echo "${RED}2${NC} - Fedora 28 Linux" - echo "${RED}5${NC} - CentOS 7 Linux" - echo "${RED}3${NC} - Mac OS High Sierra" - echo "${RED}4${NC} - Other" + echo "${RED}3${NC} - CentOS 7 Linux" + echo "${RED}4${NC} - Mac OS High Sierra" + echo "${RED}5${NC} - Other" echo "" read os @@ -179,7 +179,7 @@ if [ "$install" == "1" ]; then # Fedora OS <=================================================== # CentOS 7 OS ===================================================> - elif [ "$os" == "5" ]; then + elif [ "$os" == "3" ]; then echo "" echo "" echo "Verifying the basics are installed." @@ -250,7 +250,7 @@ if [ "$install" == "1" ]; then # CentOS 7 OS <=================================================== # Mac OS ===================================================> - elif [ "$os" == "3" ]; then + elif [ "$os" == "4" ]; then clear echo "Do you have brew installed?" echo "" @@ -321,7 +321,7 @@ if [ "$install" == "1" ]; then # Mac OS <=================================================== # Other OS ===================================================> - elif [ "$os" == "4" ]; then + elif [ "$os" == "5" ]; then echo "" echo "You will have to install Git manually then. Press enter to continue." echo "" From f19c5986b3090ef5ad252a9827c89e9dffc3e551 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 20:08:46 -0400 Subject: [PATCH 10/12] CentOS 7 additions --- Setup_Linux_Mac.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Setup_Linux_Mac.sh b/Setup_Linux_Mac.sh index da82c28..96a68e2 100755 --- a/Setup_Linux_Mac.sh +++ b/Setup_Linux_Mac.sh @@ -189,6 +189,10 @@ if [ "$install" == "1" ]; then sudo wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm sudo yum -y install dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm python-dnf-0.6.4-2.sdl7.noarch.rpm sudo dnf -y update && sudo dnf -y upgrade && sudo dnf -y install screen make unzip git ca-certificates curl yum-utils device-mapper-persistent-data lvm2 + sudo yum install -y python-pip + sudo pip install --upgrade pip + sudo pip install docker-compose + sudo yum upgrade python* echo "" echo "" echo "Permitting default game port 53595/tcp through the firewall." @@ -243,6 +247,7 @@ if [ "$install" == "1" ]; then sudo systemctl start docker sudo systemctl enable docker sudo usermod -aG docker $USER + sudo dnf -y install docker-compose else continue fi From 3fe69e99e9107d60aceea991c18338067809f7a5 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 20:09:55 -0400 Subject: [PATCH 11/12] Added OS support --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc86ee3..698eb68 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ Choices: ___ -## Operating systems supported: +## Operating systems supported + +* Windows 7 x64 * Windows 10 x64 From f9535e848c256f08ee5aab193395060f36892f65 Mon Sep 17 00:00:00 2001 From: Marwolf Date: Mon, 16 Jul 2018 20:10:36 -0400 Subject: [PATCH 12/12] added CentOS 7 support reference --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 698eb68..6359b79 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ ___ * Fedora Linux 28 x64 +* CentOS 7 x64 + ___ ## Choice 1: Download the zip, extract it, and open the "Docker-Home" folder