Hi There!
Contrary to popular belief, you do not need some behemoth 27 core god machine to run FTB. In this case, I am describing my setup that i have for me and a small group of friends. there are usually about 5-6 people on at peak times, so this is for really small communities. However some of the scripts I use can help those guys too! I will be using command lines and linux commands, but none of them are too scary.
For my example I will be using a server from [Redacted]
Instead, kiddies, go ahead and find a 2 gig vps. thats what i'm using in this tutorial. for simplicity i pointed to where this vps was, but now you get to google for one for the same price i got it for. HAVE FUN.
PART 1: IN WHICH A MADMAN PRECONFIGURES THE SERVER.
So you have your shiny new server, and you got an email from them saying "SSH login details." Now what the poo is SSH? it is essentially a way to connect to another computers command line. so we are going to use PuTTY, a windows SSH client. Ignore all the other options, and just put your servers IP in the address box and hit connect. It will pop up a box saying "Login as: " Here, type in root and hit enter. It will now ask for a password. "But Johnley, when I type nothing shows up!" No worries, this is a feature dating back to the 90s, its designed to protect your password from bad guys. go ahead and put your password in, and press enter. if it says Access Denied, try again, copy and pasting from your email. otherwise, hit the Questions section below. Now you should have a screen like this:
Right! so now we have this nice server, lets see how much ram its got. type
in the console (thats what you are at right now) and you should get something like this:
Not bad, not bad. but lets run a quick script on the server to clean out some unused processes. If you are still using debian or ubuntu, we are going to use this script. It brought my usage down to about 5 megs. to grab it and run, do:
It will run, and you will see a whole bunch of stuff roll by. this is just uninstalling some gaff from the server and updating all your applications. you might get a prompt now and then, just press enter. At this stage, we should reboot. type reboot at the prompt and hit enter. it will kill your connection; but no worries, click on the lightning bolt computer in the top left corner and hit "restart session." log back in, and now lets run free -m again:
Nice! but I bet we can do better. I bet you won't be using the server as a mail server, so at the prompt, run:
and then wait.
done? good. lets reboot again and check our free -m:
Nice! that leaves plenty of ram for our minecraft server. now lets get to the minecraft server stuff.
PART 2: IN WHICH A MADMAN INSTALLS A MINECRAFT SERVER.
Ok, so now lets make us a user for the minecraft server. don't want to run everything as an administrator, do we? go ahead and type
at the prompt. it will ask you for a password, but won't show it to you, just like logging in. after that, you can press enter through the name and location bits, and press enter to confirm.
awesome! now lets do a few more things to get everything running for java, which runs minecraft. I follow this guide, which you can just copy and paste the commands from straight into your terminal. once you've done that, lets get our server running. lets open up a new screen so that we can leave the server running after we close our terminal:
press enter to get to a new prompt. now lets get the server file from feed-the-beast.com:
the file is pretty big, and may take a few seconds to download. you should get download bar with wget showing an ETA (estimated time of arrival). now lets unzip that:
and now if we look at our directory with the ls command, we see:
now we are on the home stretch! lets open up that startup file:
and change the values. I run with
so that i have a bit of wiggle room with java. hit ctrl-o and enter, then ctrl-x and you are 2 steps away from launch!
PART 3: IN WHICH A MADMAN FINALLY LAUNCHES THE SERVER.
Now we need to make linux recognize that file as an executable. run:
and then run:
BOOM! you now are loading a server. go play.
Now go check out This post on how to improve what you just made. Dudes a genius, I had completely forgot about naming screen sessions >.<
PART 4: IN WHICH A MADMAN ANSWERS SOME QUESTIONS.
Q: My ram usage goes up instead of down after the script runs. help?
A: In some cases, the script actually backfires and installs some stuff. to remedy this, we run
to get rid of it.
Q: are you actually a madman?
A: Yes. 3 cups of coffee and 2 hours of sleep make jack a crazed lunatic.
Q: whats with the # and the $ at the beginning of your commands?
A: those are to keep me slightly sane. when you run a program as root (the admin) it has a # in front. a regular user (minecraft) has a $ in front.
Q: Why did you remove your link to that host?
A: apparently I was advertising.
Please leave me a review of my work, and point out any errors or bugs! I'm not a linux master by any standard, but I definitely am no noob.
Contrary to popular belief, you do not need some behemoth 27 core god machine to run FTB. In this case, I am describing my setup that i have for me and a small group of friends. there are usually about 5-6 people on at peak times, so this is for really small communities. However some of the scripts I use can help those guys too! I will be using command lines and linux commands, but none of them are too scary.
For my example I will be using a server from [Redacted]
Instead, kiddies, go ahead and find a 2 gig vps. thats what i'm using in this tutorial. for simplicity i pointed to where this vps was, but now you get to google for one for the same price i got it for. HAVE FUN.
PART 1: IN WHICH A MADMAN PRECONFIGURES THE SERVER.
So you have your shiny new server, and you got an email from them saying "SSH login details." Now what the poo is SSH? it is essentially a way to connect to another computers command line. so we are going to use PuTTY, a windows SSH client. Ignore all the other options, and just put your servers IP in the address box and hit connect. It will pop up a box saying "Login as: " Here, type in root and hit enter. It will now ask for a password. "But Johnley, when I type nothing shows up!" No worries, this is a feature dating back to the 90s, its designed to protect your password from bad guys. go ahead and put your password in, and press enter. if it says Access Denied, try again, copy and pasting from your email. otherwise, hit the Questions section below. Now you should have a screen like this:
Right! so now we have this nice server, lets see how much ram its got. type
Code:
# free -m
Code:
total used free shared buffers cached
Mem: 2048 25 2022 0 0 15
-/+ buffers/cache: 10 2037
Swap: 0 0 0
Code:
# wget -q http://www.lowendbox.com/scripts/lowend-debian.sh
# bash ./lowend-debian.sh
Code:
total used free shared buffers cached
Mem: 2048 14 2033 0 0 9
-/+ buffers/cache: 4 2043
Swap: 0 0 0
Code:
# apt-get -y remove sendmail*
done? good. lets reboot again and check our free -m:
Code:
total used free shared buffers cached
Mem: 2048 9 2038 0 0 7
-/+ buffers/cache: 2 2045
Swap: 0 0 0
PART 2: IN WHICH A MADMAN INSTALLS A MINECRAFT SERVER.
Ok, so now lets make us a user for the minecraft server. don't want to run everything as an administrator, do we? go ahead and type
Code:
adduser minecraft
Code:
# adduser minecraft
Adding user `minecraft' ...
Adding new group `minecraft' (1000) ...
Adding new user `minecraft' (1000) with group `minecraft' ...
Creating home directory `/home/bob' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for bob
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
Code:
# screen
Code:
$ wget http://repo.creeperhost.net/direct/FTB2/67e5b096596d54255f46697589eae39b/FTBBetaAServer.zip
Code:
$ unzip FTBBetaAServer.zip
Code:
$ ls
FTB-Beta-A.jar README.txt Server Start.sh coremods
FTBBetaAServer.zip Server Start.bat config mods
Code:
$ nano Server\ Start.sh
Code:
java -Xms512M -Xmx1500M -jar FTB-Beta-A.jar
PART 3: IN WHICH A MADMAN FINALLY LAUNCHES THE SERVER.
Now we need to make linux recognize that file as an executable. run:
Code:
$ chmod a+x Server\ Start.sh
Code:
$ ./Server \Start.sh
Now go check out This post on how to improve what you just made. Dudes a genius, I had completely forgot about naming screen sessions >.<
PART 4: IN WHICH A MADMAN ANSWERS SOME QUESTIONS.
Q: My ram usage goes up instead of down after the script runs. help?
A: In some cases, the script actually backfires and installs some stuff. to remedy this, we run
Code:
# apt-get remove samba* bind* sasl* --purge
Q: are you actually a madman?
A: Yes. 3 cups of coffee and 2 hours of sleep make jack a crazed lunatic.
Q: whats with the # and the $ at the beginning of your commands?
A: those are to keep me slightly sane. when you run a program as root (the admin) it has a # in front. a regular user (minecraft) has a $ in front.
Q: Why did you remove your link to that host?
A: apparently I was advertising.
Please leave me a review of my work, and point out any errors or bugs! I'm not a linux master by any standard, but I definitely am no noob.