## Using a self-compiled Mix executable on Linux/UNIX

If you really want to compile the sources by yourself, perhaps the best way would be to use the admin scripts. If you do not want this, please follow these instructions:

### Compiling the sources

Fisrt, go into the source directory:

> `cd proxytest`

There are several configuration options available to adapt the source configuration to you system. For detailed help run

> `./configure --help`

Now run the configure command:

> `./configure [you may use one or more options here]`

The output will be something like

>     checking for a BSD-compatible install... /usr/bin/install -c
>     checking whether build environment is sane... yes
>     checking for gawk... no
>     checking for mawk... mawk
>     ...
>     checking for OpenSSL directory... (system)
>     checking for dom/DOM.hpp... yes
>     Xerces-C includes found
>     XercesC-Lib found
>     configure: creating ./config.status
>     config.status: creating Makefile
>     config.status: creating popt/Makefile
>     config.status: creating xml/Makefile
>     config.status: creating aes/Makefile
>     config.status: creating trio/Makefile
>     config.status: creating config.h
>     config.status: executing depfiles commands

If configure didn't completely run through, you can check the config.log file for errors (e.g. using `less config.log`). Toward the end of that file you may find a clue as to what went wrong. Look for a line that contains the error message that you got from configure. Like this one:

> `configure:5328: error: Xerces-C Lib NOT found - please use --with-xml-lib`

Above this error message you will find the test that caused the error and possibly a more detailed error message.

If configure didn't show any errors, you are ready to compile. Type

> `make`

You should now have an executable file called 'mix' in this directory. It is the Mix server component. Do a quick test to see if it starts:

> `./mix -?`

This should list a short description of the command line options.

Now Start it for testing using a shipped configuration with:

> `./mix --config=./documentation/SampleConfiguration/FirstMix.xml`

You should see something like this

>     [2003/06/17-22:43:27, info ] Anon proxy started!
>     [2003/06/17-22:43:27, info ] Version: 00.01.60
>     [2003/06/17-22:43:27, info ] Using: OpenSSL 0.9.6c 21 dec 2001!
>     [2003/06/17-22:43:27, info ] I am the First MIX..
>     [2003/06/17-22:43:27, info ] Starting MIX...
>     [2003/06/17-22:43:27, debug ] Starting FirstMix InitOnce
>     [2003/06/17-22:43:27, info ] SOCKET Option SENDLOWWAT not set!
>     [2003/06/17-22:43:27, info ] MUXOUT-SOCKET RecvBuffSize: 131070
>     [2003/06/17-22:43:27, info ] MUXOUT-SOCKET SendBuffSize: 131070
>     [2003/06/17-22:43:27, info ] MUXOUT-SOCKET SendLowWatSize: 1

The mix will look for the next mix, but there is none, of course. Shut it down by pressing `CTRL+C`. Now you can use your own config file in the same way and start your mix. Be sure to let it run as daemon, as otherwise it will be shut down when you log out from the console:

> `./mix --config=config.xml &`