This post is primarily for me to remember what links I use when I’m admin of a Linux box. My distro of choice is ubuntu because I am a no-nonsense developer.
Tag: admin
Admin of machines, usually linux
We’ll be using a Ubuntu 14.10 image. The size/flavor you choose depends on the amount of players that you want to support.
Synopsis
- Make instance
- Install stuff and run Minecraft in tmux
Process of Making a Rackspace Instance
[code lang=text]
<wip>
[/code]
Installing the Base Packages
[code lang=text]
# update all of our package lists
sudo apt-get update
# install utilities and java
# if openjdk-7-jre is not available use openjdk-6-jre
sudo apt-get -y install unzip python-software-properties \
openjdk-7-jre tmux
# create a user to run the server as and become them
sudo adduser minecraft
sudo su minecraft
cd ~
# get the config files for the server to work
cd /usr/local
sudo wget http://mcmyadmin.com/Downloads/etc.zip
sudo unzip etc.zip
# download mcmyadmin and unzip
wget http://mcmyadmin.com/Downloads/MCMA2_glibc25.zip
unzip MCMA2_glibc25.zip && rm MCMA2_glibc25.zip
# create our working directory
mkdir mcmyadmin
mv MCMA2_Linux_x86_64 mcmyadmin
# run the script with the admin password
# this will put you into blue(maybe) screen saying to
# complete setup with the web interface
./MCMA2_Linux_x86_64 -setpass A_Password_For_You
# You should now be able to log on to the web interface
# which is at http://YOUR_IP:8080
# I recommend setting your License if you have a McMyAdmin key
# You can find the License portion in About > Updates
# When done stop McMyAdmin by typing in the blue interface
/quit
# Then start it again and go to website to accept EULA
./MCMA2_Linux_x86_64
# Your new Minecraft server and world will be up now
[/code]
If you want to import a world
[code lang=text]
# Stop the server from interface using /quit
# These instructions are from some other linux server to this one
# (this might take awhile, my world was 750 MB)
scp world_backup.tar minecraft@YOUR_IP:~
# remove the existing world
rm mcmyadmin/Minecraft/world -rf
# untar and mv the world folder into the Minecraft folder
tar -xvf world_backup.tar
mv world mcmyadmin/Minecraft/
[/code]
Running the Server in Tmux
[code lang=text]
# As the minecraft user:
tmux
cd ~/mcmyadmin
./MCMA2_Linux_x86_64
[/code]
This is apparently a pretty common thing to do but I was unaware. It’s pretty simple once you know about it and I’m just blogging about it to remember:
[code lang=”text”]
# SSH into the machine with the -A argument:
$ ssh -A user@host -p 314
# Once on the machine if you need to use sudo
# use the -E argument to save the environment:
$ sudo -E su
[/code]
Some concerns are that a clever person on the machine can use your credentials to do nefarious things.
This is useful for allowing you to use your ssh-keys (such as github, or SSHing into other machines using a key) from your local machine on remote machines.
You will need to ensure that your ssh config ~/.ssh/config
contains (I put mine at the top) ForwardAgent yes
for this to work.
Cheers
I’m writing this post so I can keep a local copy of the neat trick a found on the web. This command allows you to refresh your Linux group membership without logging out. This is super useful if you’re doing development in directory owned by a service group, like www-data.
How to do it
exec su -l $USER
Source
I have recently moved from Ghost to WordPress. Simply because I am too busy to really manage my own server.