Beginner using Windows-Server help?

Posted by Maple on Wed 30 Jan 2013 09:37 PM — 25 posts, 103,467 views.

#0
You guys probably get this a lot so excuse my cluelessness. But I've been roleplaying on a TinyMUX for about two years now (Not very long, I know) using MUSHCLIENT on my Windows 7.
Currently our current server host no longer pays attention and stopped attending to us so we are practically forced out of the game.
I'm not very computer smart sadly and the only other person who is cannot host a MUSH for us due to problems.
My first question is, can TinyMUX or a similar roleplaying program (preferred TinyMUX) be hosted on a Windows 7 computer. Second, will it cost anything to maintain a server or other players. Our Wizard never really told us anything so we aren't positive how most of this works but in game codes.

Basically I just want to know how to set-up a server on my computer is possible and how. I looked a lot of places online but I haven't really gotten very much information since most websites seem to be dead or what not.

Sorry if this is posted not in the correct location or so. This kind of thing stresses me out and I'm not sure where else it could go.
Australia Forum Administrator #1
You have the server code, I hope? And the MUX database files?

Probably the simplest thing is to install Cygwin and then compile it under that.

http://www.cygwin.com/

If you are running the server on your own computer (I guess you must be) then there won't be any cost other than your usual ones.

You will almost certainly need port forwarding on your router so that people can access your server PC from outside your house.

http://en.wikipedia.org/wiki/Port_forwarding
#2
Unfortunately, I have neither. My friend attempted setting up a server and has MUX database files for her Mac computer, if that would be any the same? But if that won't do no good, then where would I get both the server code and these database files?
And will Cygwin do any major inferface/other changes to my computer, and will I need to keep it while hosting the MUSH? Or can that be scrapped afterwords?
Australia Forum Administrator #3
You are going to need the database file(s) and the TinyMUX codebase. Hopefully you had a standard one, if not, and you don't have the code, you are in serious trouble.

Cygwin is pretty non-intrusive as far as I am aware. It gives you a Unix-like environment for running stuff like this which is designed for Unix/Linux.

It doesn't take over your machine, it just runs if you want it to.
Australia Forum Administrator #4
Quote:

where would I get both the server code and these database files?


You would get the database files from your friend, surely?
#5
Oh yeah, She gave me the Datebase codes earlier today and as for Tinymux codebase, would that be the server that will run my game? She sent me downloads for the thing that will run it if that has any meaning.
So I basically just take Cygwin and compile the information under that and it'll run onto the server just fine after Port Forwarding is activated on my router.

As for the actual running of the server and since it's hosted on my computer I suppose; that would mean I would need to practically keep my computer running while the MUX is up. And if I were to turn my computer off or shut the laptop, the MUSH's connection goes down too? Just like any other servers would.
#6
I messed around with it a bit and got the Mux 2.10.1.12.unix.tar if I'm not mistaken, that would be the right file with the instructions all under it like in the Tinymux website? Also have Cygwin now and began to follow the Installation instructions after reading the Readme file.
But I only get to the last part of the first instruction and got an error.

$ ./configure
./configure: line 18: $'\r': command not found
./configure: line 33: syntax error near unexpected token `newline'
'/configure: line 33: ` ;;

Unless I missed a stepped in the process of what I would be downloading onto my computer or what I should of received earlier.
Australia Forum Administrator #7
Can you give a link to the exact file you are trying to compile? (The download that is).
#8
The file with the instructions and all that? This is probably the only thing, besides Cygwin that I downloaded.

http://code.google.com/p/tinymux/downloads/detail?name=mux-2.10.1.12.unix.tar.gz
Australia Forum Administrator #9
I just built it under Windows 7 without any problems.


Unzip the package:


$ tar xzf mux-2.10.1.12.unix.tar.gz


Change to the directory:


$ cd mux2.10/


Change to src directory and run "configure":


$ ls
ATTACK  CHANGES  docs  game  INSTALL  LOCAL  MODULES  NOTES  README  REALITY  REALITY.SETUP  SGP  SQL  src  SSL

$ cd src

$ ./configure


Output:


checking whether to enable Reality Levels... no
checking whether to enable WOD Realms... no
checking whether to enable Memory-Based Database... no
checking whether to enable Stub Slave... no
checking whether to enable Firan MUX... no
checking whether to enable inline MySQL... no
checking whether to perform expensive self-checking... no
checking for location of SQL header files... none
checking for location of SQL library files... none
checking whether to enable SSL support... no
checking whether to enable deprecated features... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for library containing crypt... -lcrypt
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for library containing inet_addr... none required
checking for library containing sqrt... none required
checking for dlopen... checking for library containing dlopen... none required
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for unistd.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for memory.h... (cached) yes
checking for string.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/epoll.h usability... no
checking sys/epoll.h presence... no
checking for sys/epoll.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/stat.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking fpu_control.h usability... no
checking fpu_control.h presence... no
checking for fpu_control.h... no
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
configure: checking for sys_errlist decl...
configure: checking for extended string dcls...
configure: checking for malloc dcl...
configure: checking for vsprintf dcl...
configure: checking for sprintf dcl...
configure: checking for extended stdio dcls...
configure: checking for extended socket dcls...
configure: checking for gettimeofday dcl...
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... no
checking whether tzname is declared... yes
checking for tzname... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking size of short... 2
checking size of unsigned short... 2
checking size of int... 4
checking size of unsigned int... 4
checking size of long... 4
checking size of unsigned long... 4
checking size of long long... 8
checking size of unsigned long long... 8
checking size of void *... 4
configure: checking for socklen_t dcls...
checking whether sys_siglist is declared... yes
checking for sys_signame decl... no
configure: checking for getrusage dcl...
configure: checking for getrlimit dcl...
checking whether byte ordering is bigendian... no
checking for in_addr_t... yes
checking for in_addr... yes
checking for sockaddr_in... yes
checking for in6_addr... yes
checking for sockaddr_in6... yes
checking for sockaddr_storage... yes
checking for vprintf... yes
checking for _doprnt... no
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for crypt... yes
checking for getdtablesize... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for getnameinfo... yes
checking for getaddrinfo... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for getpagesize... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for localtime_r... yes
checking for nanosleep... yes
checking for select... yes
checking for setitimer... yes
checking for setrlimit... yes
checking for socket... yes
checking for srandom... yes
checking for tzset... yes
checking for usleep... yes
checking for log2... yes
checking for epoll_create... no
checking for epoll_ctl... no
checking for epoll_wait... no
checking for kqueue... no
checking for kevent... no
configure: checking for pread and pwrite...
configure: checking for signal SIGCHLD braindamage...
configure: checking for IEEE floating-point format...
configure: checking for IEEE floating-point exception handling...
configure: checking for how division/moduli of negative quotients are handled...
configure: checking whether unaligned 'short' access is permitted...
configure: checking whether unaligned 'int' access is permitted...
configure: checking whether unaligned 'long' access is permitted...
configure: checking whether unaligned 'long long' access is permitted...
configure: checking for /dev/urandom...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating autoconf.h
=== configuring in modules (/home/Nicholas Gammon/mux2.10/src/modules)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking for location of SQL header files... Unknown. Use --with-mysql-include with path
checking for location of SQL library files... Unknown. Use --with-mysql-libs with path
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for library containing sqrt... none required
checking for main in -lmysqlclient... no
checking for dlopen... checking for library containing dlopen... none required
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating autoconf.h


Run "make" to compile:


$ make

( if [ -f libmux.dll ]; then mv -f libmux.dll libmux.dll~ ; fi )
g++  -g -O              -shared -fPIC -o libmux.dll libmux.cpp -lcrypt
libmux.cpp:1: warning: -fPIC ignored for target (all code is position independent)
g++  -g -O              -c _build.cpp
g++  -g -O              -c alarm.cpp
g++  -g -O              -c alloc.cpp
g++  -g -O              -c attrcache.cpp
g++  -g -O              -c boolexp.cpp
g++  -g -O              -c bsd.cpp
g++  -g -O              -c command.cpp
g++  -g -O              -c comsys.cpp
g++  -g -O              -c conf.cpp
g++  -g -O              -c cque.cpp
g++  -g -O              -c create.cpp
g++  -g -O              -c db.cpp
g++  -g -O              -c db_rw.cpp
g++  -g -O              -c eval.cpp
g++  -g -O              -c file_c.cpp
g++  -g -O              -c flags.cpp
g++  -g -O              -c funceval.cpp
g++  -g -O              -c funceval2.cpp
g++  -g -O              -c functions.cpp
g++  -g -O              -c funmath.cpp
g++  -g -O              -c game.cpp
g++  -g -O              -c help.cpp
g++  -g -O              -c htab.cpp
g++  -g -O              -c local.cpp
g++  -g -O              -c log.cpp
g++  -g -O              -c look.cpp
g++  -g -O              -c mail.cpp
g++  -g -O              -c match.cpp
g++  -g -O              -c mathutil.cpp
g++  -g -O              -c mguests.cpp
g++  -g -O              -c modules.cpp
g++  -g -O              -c move.cpp
g++  -g -O              -c muxcli.cpp
g++  -g -O              -c netcommon.cpp
g++  -g -O              -c object.cpp
g++  -g -O              -c predicates.cpp
g++  -g -O              -c player.cpp
g++  -g -O              -c player_c.cpp
g++  -g -O              -c plusemail.cpp
g++  -g -O              -c powers.cpp
g++  -g -O              -c quota.cpp
g++  -g -O              -c rob.cpp
g++  -g -O              -c pcre.cpp
g++  -g -O              -c set.cpp
g++  -g -O              -c sha1.cpp
g++  -g -O              -c speech.cpp
g++  -g -O              -c stringutil.cpp
g++  -g -O              -c strtod.cpp
strtod.cpp:3647:2: warning: #warning "No method of floating-point control was found, using dummy functions"
g++  -g -O              -c svdrand.cpp
g++  -g -O              -c svdhash.cpp
g++  -g -O              -c timer.cpp
g++  -g -O              -c timeabsolute.cpp
g++  -g -O              -c timedelta.cpp
g++  -g -O              -c timeparser.cpp
g++  -g -O              -c timeutil.cpp
g++  -g -O              -c timezone.cpp
g++  -g -O              -c unparse.cpp
g++  -g -O              -c utf8tables.cpp
g++  -g -O              -c vattr.cpp
g++  -g -O              -c walkdb.cpp
g++  -g -O              -c wild.cpp
g++  -g -O              -c wiz.cpp
g++  -g -O              -DMUX_BUILD_DATE="\"`date`\""  -DMUX_BUILD_NUM="\"`sh ./buildnum.sh`\"" -c version.cpp
( if [ -f netmux ]; then mv -f netmux netmux~ ; fi )
g++  -g -O              -o netmux _build.o alarm.o alloc.o attrcache.o boolexp.o bsd.o  command.o comsys.o conf.o cque.o
 create.o db.o db_rw.o eval.o file_c.o  flags.o funceval.o funceval2.o functions.o funmath.o game.o help.o  htab.o local.o
 log.o look.o mail.o match.o mathutil.o mguests.o modules.o  move.o muxcli.o netcommon.o object.o predicates.o player.o
 player_c.o  plusemail.o powers.o quota.o rob.o pcre.o set.o sha1.o speech.o  stringutil.o strtod.o svdrand.o svdhash.o
 timer.o timeabsolute.o  timedelta.o timeparser.o timeutil.o timezone.o unparse.o utf8tables.o  vattr.o walkdb.o wild.o
 wiz.o  version.o -L. -lcrypt     -lmux
g++  -g -O              -c slave.cpp
g++  -g -O              -o slave slave.o -lcrypt
cd ../game/bin ; rm -f dbconvert ; ln -s ../../src/netmux dbconvert
cd ../game/bin ; rm -f netmux ; ln -s ../../src/netmux netmux
cd ../game/bin ; rm -f slave ; ln -s ../../src/slave slave
( if [ ! -z "" -a -f "" ]; then cd ../game/bin ; rm -f ; ln -s ../../src/  ; fi )
( if [ ! -z "libmux.dll" -a -f "libmux.dll" ]; then cd ../game/bin ; rm -f libmux.dll; ln -s ../../src/libmux.dll libmux.dll ; fi )



I then attached to the game directory and started it up as directed in the INSTALL file.
Amended on Sun 03 Feb 2013 07:49 AM by Nick Gammon
Australia Forum Administrator #10
You may need to re-run the Cygwin install and make sure you have the "compiler" packages selected.

This (somewhat out of date) page describes the general idea:

http://www.gammon.com.au/smaug/installingcygwin.htm
Amended on Sun 03 Feb 2013 03:47 AM by Nick Gammon
#11
I reinstalled Cygwin using the instructions and opened it after it was done and got this.

-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
-bash: /etc/profile.d/bash_completion.sh: syntax error: operand expected (error token is "/etc/profile.d/bash_completion.sh")

but when I continued to follow to src and input the command ./configure, I got the same error.


-bash-3.2$ ./configure
./configure: line 18: $'\r': command not found
./configure: line 33: syntax error near unexpected token `newline'
'/configure: line 33: ` ;;
-bash-3.2$

Australia Forum Administrator #12
Cygwin comes with a Bash Shell (Cygwin) icon. Did you use that?

#13
Yes, I used the icon on my desktop to open it up, should I open it up another way?
Australia Forum Administrator #14
Double-clicking on the Cygwin icon is the correct way. I am unsure what all your error messages mean, as you can see I got a totally different result.
#15
Hmm. Well I tried reinstalling it and found out I skipped a few of the 'Skips' which allowed Cygwin to act normal again. I did a screenshot of my screen:

http://i49.tinypic.com/143oxh5.png

I don't think I unzipped the file correctly because Winzip already did that for me and when I tried to do it with Cygwin I got an error:

$ tar xzf mux-2.10.1.12.unix.tar.gz
tar (child): mux-2.10.1.12.unix.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

I'm assuming I should probably unzip the file with Cygwin directly or does that not matter?
Australia Forum Administrator #16
Copy the .tar file manually into your "home" folder. Then use tar to decompress it.

One way of doing that is to use the Cygwin "bash" shell, and type:


mv 


(with a trailing space).

Then drag the file that you downloaded to after the "mv" and then type (space) (period).

eg.


mv C:\Downloads\mux-2.10.1.12.unix.tar.gz .


That will move the download into your directory. Then you can proceed to untar it.
#17
That definitely seemed to do the trick! The ./configure gave me the output all up to:

configure: creating ./config.status

Currently it has been creating for two hours. Which my friend told me it took her much quicker to get through the last three parts of the output. Unless this is normal, should I close it and put the ./configure back in?



#18
Nevermind the last comment. I ended up restarting and doing the process again. Finished the Configuring file and up to ./StartMux. I'm not sure if entering that command was to make something in the /game part of the folder.

And I was told to try connecting to the server with my computer's IP and the default Port given (Since it didn't give me any, unless I use my computer's ports instead) and was unable to connect.

Would I need Port Forwarding enabled onto my router first before I am able to connect? I am trying to enable that too, but not sure what Service a MUX would be under (Like Telnet/FTP/HTTP/etc)
Australia Forum Administrator #19
What port? The default port is 2860. Your own computer is "localhost". You don't need to port forward from inside your own house.

#20
I get the typical error message when a MUSH is usually not turned on. This is directly after running ./StartMUX

Unable to connect to "MUSH", code = 10061 (Connection refused)

Error occurred during phase: Connecting to world: 127.0.0.1, port 2860

For assistance with connection problems see:
Australia Forum Administrator #21
Quote:

Finished the Configuring file and up to ./StartMux. I'm not sure if entering that command was to make something in the /game part of the folder.


That runs the server. You need to do that first.
#22
Yeah, I have that entered into Cygwin right now and is, I guess, running currently, and opened my MUSHclient second and attempted to connect with the localhost and default port. It's acting like it doesn't exist.
Australia Forum Administrator #23
Firewall issue?
#24
Most probably I suppose. I'll have to mess with it later today then and see what I get with it.
But thanks for answering all of my compiling questions. :) Really helped out a lot.