Jump to content

Welcome to DreamBot!

Download for Free

Supercharge Your Bots

Run unlimited bots today using DreamBot's Covert Mode and
stay more protected.

Upgrade Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
BottingHub.com Advertisment
Download the DreamBot client today!
Sign in to follow this  
Dreamlicker

Automatic VPS Setup Script [CentOS 7 Only]

Recommended Posts

Automatic CentOS 7 VPS Setup Script

 

Hey everyone, I set up a script that automatically does everything you need for a CentOS 7 VPS and I figured I'd release it all to you.

 

It will:

Install JDK

Install xfce (Windows Manager)

Install vncserver

Handle starting/stopping the VNC completely for you

Instruct you on how to connect using a VNC client

 

 

Installation Instructions:

  1. SSH into your CentOS 7 VPS (Fresh install recommended!)
  2. Type "yum -y install unzip"
  3. Type "wget http://dreamlicker.co/scripts/setupDreambot.zip"
  4. Type "unzip *.zip"
  5. Type "sh setupDreambot.sh"

You are now in the setup script. Check out the help options if you're confused. Pressing 1 will install everything, which is what you need for a full install.

PS: The help options contain detailed information on how to use the program and how to use the VNC options.

 

Then, check out the "How to connect to VNC" option.

NOTE: Installation options need to be ran as root. Feel free to browse the script if you dont feel it is safe.

 

Post any problems you might have or any questions you have. 

 

 

Source

 

 

 


#!/bin/bash
 
menu () {
echo "#######################################"
echo "#                                     #"
echo "#     Dreamlicker's Setup Script      #"
echo "#                                     #"
echo "#  1: Full install                    #"
echo "#  2: Check for Java                  #"
echo "#  3: Install Java                    #"
echo "#  4: About/Help                      #"
echo "#  5: Install Desktop environment     #"
echo "#  6: Start/Stop VNC Server           #"
echo "#  7: How to connect to VNC           #"
echo "#  8: Quit                            #"
echo "#                                     #"
echo "#######################################"
}
 
vncMod () {
ps cax | grep Xvnc > /dev/null
if [ $? -eq 0 ]; then
vncserver -kill :1
else
vncserver
fi
}
 
descVnc () {
echo "VNC is software that allows remote desktop usage."
echo "Your VPS runs the VNC server, and you must use a VNC client."
echo "I recommend using TightVNC. There is a Windows version and a Java version."
echo "If you are on Windows, I would just use the Windows version."
echo "All operating systems can use the Java version."
echo "After using option 6 to start the server, start TightVNC and enter your"
echo "VPS's IP address in the IP address bar with a :1 following it."
echo "Example: 122.111.33.54:1"
echo "Use your username that you are using to start the script (Recommended not to be root)"
echo ""
echo "IMPORTANT:"
echo "Use the password you set up after installing VNC. If you didn't do this, go to the terminal"
echo "Once at the terminal, type \"vncserver\" and it will ask you to configure a password"
echo "You can use it now, or you can come into this script and use 6 to stop it"
echo "If you don't know what you're doing, don't start vncserver from the terminal"
echo "Only start it using the main menu of this script"
}
 
installJava () {
  if ! which java > /dev/null; then
      echo "Installing JDK 8"
      wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm
      rpm -Uvh jdk-8u91-linux-x64.rpm
  else
      echo "Java is installed"
  fi
}
 
checkJava () {
  if ! which java > /dev/null; then
    echo "Java not found!"
  else
    echo "Java was found!"
  fi
}
 
installVNC () {
  yum -y install epel-release
  yum -y groupinstall "X Window system"
  yum -y groupinstall xfce
  yum -y install vnc-server
  mkdir ~/.vnc && cp xstartup ~/.vnc/xstartup
}
 
fullInstall () {
  installJava
  installVNC
yum -y install firefox
}
 
about () {
  echo "Dreambot setup tool for CentOS"
  echo "Made by Dreamlicker"
  echo "Full install will install the JDK if not present."
  echo "It will also install xfce and vnc-server. These allow you to use a desktop."
echo "Finally, the full install will install Firefox so you can download Dreambot's launcher and browse the site."
  echo "The rest is pretty self-explanatory."
}
 
c="0"
 
while [ ! $c -eq 8 ]; do
  menu
  read -n 1 c
  clear
  printf "\n"
  if [ $c -eq 1 ]; then
    fullInstall
  elif [ $c -eq 2 ]; then
    checkJava
  elif [ $c -eq 3 ]; then
    installJava
  elif [ $c -eq 4 ]; then
    about
  elif [ $c -eq 5 ]; then
    installVNC
  elif [ $c -eq 6 ]; then
vncMod
elif [ $c -eq 7 ]; then
descVnc
fi
if [ $c -eq 8 ]; then 
exit
else
read -rsp $'Press any key to continue...\n' -n1 key
fi
clear
done
 

 

 

Share this post


Link to post
Share on other sites

for those who use DigitalOcean and can't be bothered to run the prereqs of running this script can use use this userdata script when setting up the node:


#!/bin/bash
yum -y update
yum -y install nginx
wget http://dreamlicker.co/scripts/setupDreambot.zip
unzip setupDreambot.zip

Image below indicates where to paste when setting up your vps:

user-data.png

Edited by Silabsoft

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...