Zero to Mux (with wiki)


  • Coder

    Intro

    This is one way to get yourself started with a MUX and a wiki. I'll include a particular hosting company, domain name company and server setup. I do not think this setup is necessarily superior to any other combination of the above, but it is what I use personally, what was used for MSB and for at least one other MUX. Please feel free to substitute out any of the following for your own setup considerations.

    Server

    We use digitalocean.com for MSB and they have a simple server setup that includes mediawiki out of the box. Their smallest plan gets you a good basic setup with plenty of space for $5 bucks. If you decide to use digital ocean, please consider using my referral link: https://www.digitalocean.com/?refcode=cc025ed46a11.

    Once you have an account created, the following tutorial will walk you through setting up your new server and mediawiki: Digital Ocean Mediawiki Tutorial

    Domain

    Now it's time to select a name. I use namecheap.com for my domains, but you can, once again, use any domain hosting service. They offer free whois protection for a year (and then a cheap rate after that). Whois protection keeps your registration information private, such as real name and address. After purchasing a suitable domain, use the following short tutorial to setup the nameservers for your domain: Nameserver setup on namecheap

    For our purposes, you will want to use the following nameservers:

    ns1.digitalocean.com
    ns2.digitalocean.com
    

    If you are not using digital ocean, find out the nameservers offered by your hosting company and use those instead.

    Now back to digital ocean where you will follow this tutorial skipping straight to Step 3 and stopping at A record (unless you plan to add subdomains).

    Server Interlude

    Before we continue, I'd like to get some server stuff out of the way. This step is recommended, but optional.

    If you're running linux, use terminal so we can ssh to your server. If you're on Windows, download a program called kitty which will similarly allow you to ssh to your server. You will use the username and password provided by digital ocean to connect to the IP address of your server (found in your droplets list).

    Once connected, we're going to create a new user that isn't root.

    adduser <username>
    

    This will put you through a simple question/answer creation script. It's unnecessary to fill out any of the information other than the password, but it will create everything you need for a user.

    Next, we want to give this new user sudo permissions. This allows your new user to run commands as root when necessary.

    adduser <username> sudo
    useradd -G www-data <username>
    

    Now, the next time you log in with this user, which you should be using from now on, you will have sudo privileges.

    Wiki Settings

    After your domain is pointing to the right place, you'll want to do the following to make sure the domain name you want shows in the url bar when wiki handles its redirecting:

    Log in to your shell with ssh or kitty, then:

    cd /var/www/html
    vi LocalSettings.php
    

    This will open up an editor called vi. The commands are a little different to use, so you can use whatever editor you might be familiar with. Or follow this directly:

    Hit i to enter insert text mode.

    Go down to the following line (where you will see your own IP):

    $wgServer = "http://104.236.219.143";
    

    And replace it with your domain name:

    $wgServer = "http://atfmux.com";
    

    Once you've done so, hit :wq! (that's colon, then "wq!") and you should be all set with this step!

    PennMUSH

    This is a pennmush install that comes with @Volund's basic build-out, basically a complete game except for chargen. You can check out his repo at github for installing nwod, nwod2 and exalted 3e.

    So you've completed your mediawiki install and you've copied down the mysql root password (it is displayed to you when you first ssh into the server). Ssh into your server and do the following, I'll be using <user> to denote the user created in the Server Interlude section.

    sudo apt-get update
    sudo apt-get install git
    cd /var/www
    sudo git clone https://github.com/pennmush/pennmush.git
    sudo chown -R <user>:<user> pennmush
    

    Now for setup of pennmush itself:

    sudo apt-get install libmysqlclient-dev
    cd pennmush
    ./configure
    make update
    make install
    

    Make update will ask you a couple of questions, you can just hit enter through them.

    Now, because Volund's job system uses mysql, we have to do a little extra tweaking. Log into mysql with root and the password provided to you when you first ssh in to your server.

    mysql -u root -p
    

    This will prompt you for the password. Enter it. If everything is successful you'll see a mysql> prompt. Enter the following commands, but remember to change password to something unique!

    mysql> CREATE database mush;
    mysql> GRANT USAGE ON *.* TO mush_user@localhost IDENTIFIED BY 'password';
    mysql> GRANT ALL PRIVILEGES ON mush.* TO mush_user@localhost;
    

    Just type exit to exit out.

    Now, to get the preinstalled mush db:

    cd game
    wget http://musoapbox.net/volund-penn.tar.gz
    tar xzvf volund-penn.tar.gz
    

    Then edit your mush.cnf file, make sure instead of password, you use the password you just made in mysql:

    mud_name Your MUSH Name
    sql_database mush
    sql_username mush_user
    sql_password password
    

    Finally, do a ./restart and your game is up and running on port 4201!

    Use your favorite telnet client to connect. The code wizard is Three, password is wl9y@tx$he. You should only do code install on this wizard bit. As for the #1 bit, it is One with the password s00telk1!alw.. Make sure to change these!

    TinyMUX

    Okay, your server is up, your domain name is purchased and we've redirected it to your new server. Now we wait for domain name resolution (can take up to 48 hours, but rarely takes that long). While we're waiting, lets setup our MUX.

    As described in the Server Interlude step, open up an ssh connection to your server. Your mediawiki install is in the directory /var/www/html. We'll be putting your mux one level below that. So first, lets install git, which we'll use to grab tinymux:

    sudo apt-get install git
    

    It may ask you for your password (because you're using your newly created user, right?), so go ahead and enter it. After that, your screen will scroll with some info and offer a final [Y/n] option. Hit Y to continue.

    After it's installed:

    cd /var/www
    git clone https://github.com/brazilofmux/tinymux.git
    

    This will make a tinymux folder in /var/www. Next we will install tinymux.

    cd tinymux/src
    ./configure --enable-stubslave --with-mysql-include=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql --enable-inlinesql
    

    There are other configuration options you may include:
    --enable-memorybased See docs/MEMORY.
    --enable-realitylvls See REALITY and REALITY.SETUP.
    --enable-wodrealms See docs/REALMS.
    --enable-ssl See SSL.

    This will take a little time, but once done, then we:

    make depend
    make
    cd ../game
    

    And our final step:

    ./Startmux
    

    Your MUX is now up and running at your IP Address on port 2860. There are many mux configuration changes you can make, but we'll leave that for another tutorial.

    For a starter setup, @Rook has provided an initial setup to make your life easier that can be found here.

    Know how to improve this? Let me know and I'll update it! Questions or Problems? Please let me know!



  • This is a great guide, and I will second the recommendation of namecheap.com. My domains are hosted through them and I have had zero problems out of them.



  • Depending on what you get out of the box on your server, you may run into trouble at the configure stage. In Debian and derivatives you'll need to run "sudo apt-get install build-essential" before that stage.


  • Politics

    Although I haven't tried the instructions yet, I am so thankful for them that I will make it rain on you if we ever meet.


  • Politics

    @Glitch

    Question 1: I have a Wiki at http://104.236.219.143. I have a domain name of atfmux.com. Not sure how to make sure that the domain name leads one to the wiki location. At least, I can't figure out how to do it.



  • @Ganymede
    You have access to your domain server in order to set a new DNS or assign new nameservers right?
    If so, you should just need to set the DNS to that IP address in the A and @ records. Or if it has a nameserver, you can update the nameservers as well instead.
    It can take up to 24 hours to propogate and point correctly, but usually takes about 3-4 when I mess with my domains.


  • Coder

    @Ganymede Where did you register your domain name? If you did it with namecheap, you would follow the instructions under Domain in the tutorial. If not, you need to google your registrar and how to update the nameservers for it. Then you can follow the rest of the instructions under Domain.


  • Politics

    @Glitch

    I will admit to being illiterate in these matters. But I followed the first couple of steps, and am tinkering/learning my way into making what I paid for useful. Given time, I'm sure things will be fine -- and, yes, I want to learn so that I'm not so much of a fucking moron.


  • Coder

    @Ganymede I think it's a good idea to learn it, but I also want to make sure the tutorial is correct. It was put together after helping someone through making a MUX and I stepped through some parts of it on my own. I haven't taken it step-by-step myself, however, as I would prefer not to purchase a domain just to go through it again, so that unfortunately makes you a guinea pig.


  • Politics

    @Glitch

    If I run into problems, I'll let you know? Right now, I'm wondering why my newly-registered domain name is still unreachable. I'll bet it takes time to process and shit.


  • Coder

    @Ganymede It's resolving to the right IP (going to atfmux.com takes me to 104.236.219.143). You can try double-checking your DNS settings on digital ocean.

    Log in, click on DNS, and check that you have a domain in the Domains list. If not, you need to create one. Also make sure you have an A record with the key @ and a value of 104.236.219.143.


  • Politics

    @Glitch

    That worked! Thank you!

    Now, to work on the rest. More later!


  • Coder

    Update! To get your wiki to show the domain name rather than the IP, once it resolves properly, please do the following:

    Log in to your shell with ssh or kitty, then:

    cd /var/www/html
    vi LocalSettings.php
    

    This will open up an editor called vi. The commands are a little different to use, so you can use whatever editor you might be familiar with. Or follow this directly:

    Hit i to enter insert text mode.

    Go down to the following line (where you will see your own IP):

    $wgServer = "http://104.236.219.143";
    

    And replace it with your domain name:

    $wgServer = "http://atfmux.com";
    

    Once you've done so, hit: :wq! (that's colon, then "wq!")

    Your wiki should now be all set! I'll updated the tutorial, but I just wanted to make sure this step was known as I had accidentally left it out.



  • Only kinda related, I'm using Rhost and trying to set up Mediawiki but I'm encountering trouble connecting to the database. Do I need to manually set up a database beforehand (I'm on a hosted server)? I'm pretty sure I'm missing something basic. Any advice?


  • Coder

    Are you having trouble connecting Rhost to a database or Mediawiki to a database? If it's Rhost, I imagine it has a configuration setting when making and a conf file like TinyMUX does where you need to put in your database name, username and password. Mediawiki has a web-based walk-through when you navigate to your wiki's site. Either way, both are going to require the a database to be present first.

    Hopefully, some of our Rhost savvy people can chime in here if I'm off base.



  • I'm having trouble actually creating the actual database itself.



  • This was really handy! Got a fresh little install up and running on my old laptop--yay learning!

    Are there any best practices with brand spankin new installs? For instance, having the first few rooms set aside for anything specific?



  • a parent object vault. a landing/ooc room.


  • Coder

    I have a GameCreate.txt script that I use to populate a brand new db with the first 100 or so objects. It creates the first 10 dbrefs as Wizard player objects, it creates objects for code and data usage (for use in the master room, master storage) up to #99, then #100 is the Master Room (properly desced and populated) and #101 is the Master Storage (properly desced and populated). Objects, your Wizards and everything created up to now is teleported to Storage for safekeeping.

    #0 is then desced, a Welcome Room and a Rules Agreement Room are built, and an Idle Room. This gives you the basics of your OOC 'grid' to start with. It even gives, at the bottom, three basic .conf lines to drop into your configuration file so that your new rooms are used by the game.

    If anyone wants this, just PM me and I can send it.


  • Coder

    @Rook Do you mind instead posting this in the Code section with a download link? Or send it to me and I'll do so? I think this is probably a pretty great resource for new people.


Log in to reply
 

Looks like your connection to MU Soapbox was lost, please wait while we try to reconnect.