Назад

хм,хм,хм Столкнулся с таким типом проблемы

Автор: TrojanX: Дата: 11.10.2009

И так я начну
Я хотел бы узнать как мне скомплектовать eathena под ОС линекс??

Автор: TrojanX: Дата: 11.10.2009

хм кароч, просто вопрос как мне её запустить на ОС линекс?

Автор: Cole McCormick: Дата: 11.10.2009

ну ты когда запускаешь компилятор там ведь есть выбор системы? типа "Win32" или чтот типа того, глянь может там есть "UNIX"

Автор: TrojanX: Дата: 11.10.2009

нету((( там тока win32

Автор: Sanasol: Дата: 11.10.2009

http://www.eathena.ws/board/index.php?showtopic=108

Автор: TrojanX: Дата: 11.10.2009

Sorry, the link that brought you to this page seems to be out of date or broken.


Не заходит

Автор: Sanasol: Дата: 11.10.2009

Installing eAthena On Linux

Note: Alot of the picture examples may not exactly be the same as the way I tell you to do it in the instructions, this is done to save space and to fit it all into one image... I.e., alot of times I send the output to /dev/null so the screen won't get flooded and etc...


This is a small article that will explain how to install eAthena on Linux...
too many people ask, but its really no different then doing it on Win32... thus I right this article to show you how damned easy it is!

Things you will need:
wget ( http://www.gnu.org/software/wget/ )
gcc ( gcc.gnu.org )
gmake ( http://www.gnu.org/software/make/ )
rar ( rarlabs.com )
pico
gdb ( http://www.gnu.org/software/gdb/ )

Chances are your already going to have wget, gcc, gmake and pico... So I'm just going to tell you how to get RAR for Linux and get it working... Since the eAthena team doesn't release tar-balls(grrr) we have to go download RAR and install it....


[Installing RAR]
1. Go to rarlabs.com, go to the download page, and record the URL for the latest release down on a piece of paper
2. You want to login as root to wget the installation files, and install them, so if you're not already logged in as root type 'su -' and then login with your root password.
3. After that we want to make sure we're in the home directory for root... but in this example we will make a separate directory to keep things organized, so type 'mkdir ~/rar' to create our directory, and then 'cd ~/rar' to make it our working directory
4. After that we need to 'wget' rar... (Check RarLabs.com for the latest version) so 'wget http://rarlabs.com/rar/rarlinux-3.3.0.tar.gz'
5. Once thats done, we want to extract it via 'tar' so type 'tar -xzf rarlinux-3.3.0.tar.gz' (You can use wild cards too)
6. The tar-ball will create a directory called 'rar', so lets make it our working directory by typing 'cd rar'
7. Now that our working directory is ~/rar/rar we will type 'gmake' which will run the make file and copy the RAR binary to the correct locations so that we can later use it.



Now that we're finished installing RAR, time to get off 'root' and back into our users home directory, so go ahead and type 'logout' to get back to your user account...
Once again we will be creating a directory for eAthena to keep organized, so go a head and make the directory eAthena in your home directory ('mkdir ~/eAthena') and then make it your working directory('cd ~/eAthena')


[Downloading and Compiling eAthena]
1. Go ahead and look for the URL for the latest build of eAthena, this can usually be found at the Official eAthena BBS( eathena.deltaanime.net ) as well as ASB( aegis.de.tf ) or even the IRC channel(irc.sorcery.net #athena)
2. Once you have the URL, once again we're going to get it via 'wget' so 'wget http://files.deltaanime.net/eathena/eAthen....2.rar'
3. After it downloads, time to extract it... type 'rar x eAthena-v0.5.2.rar'
4. Then lets cd to the 'athena' directory which RAR creates for us. Now that where in this directory, type 'ls' and get a directory listing... You will see a bunch of useless crap we don't need... Since eAthena doesn't release specifically a Linux or Win32 build(little alone a friggen tar-ball!!), they just throw it all together... so go ahead and type 'rm *exe; rm *dll; rm *rar; rm *bat' to delete the Win32 binaries and eASM stuff that they throw in there.
5. Finely, we've done all the mess crap(maybe not).... now its time to build eAthena... normally we could just type 'gmake' but noooooooooo... eAthena likes to put all the binaries and crap in there instead of just releasing the plain source.... this can cause conflicting problems since these *.o files were compiled on another machine, and possibly with another version of gcc... so since eAthena is lazy we gotta run 'gmake clean' first... then 'gmake'... (The point being, since the *.o files are there... gcc is going to try and link them before even recompiling them, which is bad... because they were NOT compiled on your machine)
6. Once its done compiling(with no errors), its time to configure it, which is basically the same as doing so on Win32 so I won't be going too in depth
IF YOU HAVE PROBLEMS COMPILING, TRY UPDATING YOUR GCC AND GMAKE...
If problems persist come get help on the eAthena IRC channel




[Configuring eAthena]
(Opening plain text files can be done via 'pico'.... i.e 'pico map_athena.conf'... I've said before that configuring it is exactly the same as on Win32... I recommend reading Darkchild's installation guide for more information on configuring)
1. First of all, you need to get the IP addresses correct in map_athena.conf and char_athena.conf
2. Second, you need to edit lan_support.conf and enter in the correct information... if you don't know the info, simply type 'ifconfig' as root
3. Then you will need to change admin_pass and gm_pass in login_athena.conf
4. After that the only thing you really need to do is edit grf-files.txt and enter the correct location of the GRF files

5. Besides that, you should edit battle_athena.conf to setup the gameplay mechanics (how things should work, the exp rates, drop rates, penlites, will a pet support its master and etc etc )
6. Lastly, don't forget to add your self to the GM_account.txt... you can find your account number in ../save/account.txt


[Running eAthena]
Okay this is really simple as hell... but there are different ways you can do this...

'The Different Ways' lol:
A. The way I like to do it is just send the map, char and login-server all into nohup then I can just close the terminal and not worry about anything... this can be done by typeing:
'nohup ./map-server& nohup ./char-server& nohup ./login-server' and walla, your done...
B. Another option is using just launching it like a normal binary, but it will NOT ignore hangup messages sooooo.... Yeah I don't like it lol... but just make sure your in the athena working directory and type './map-server'(or ./char-server or ./login-server depending on what you want open)
C. The third and most useful option is running it through GDB... GDB is a VERY powerful debugger(I dunno about industrial strength but its probably overkill, even for eAthena)

(Make sure you have GDB installed and updated, if not go ahead and get the latest version at gnu.org)
To run the map-server through gdb, you would type 'gdb map-server' and then once it loads, type 'r'(for run) to get it going... NOW once it dies.... if you want to examine the stack, just type 'bt' and there ya go... I'm not going to go in-depth about memory allocation and the stack, registers and etc... I'd have to explain too much about assembly... and the chances are if you are using this guide, you're not even going to want to mess with GDB...

(Too lazy to copy some huge GRF files... a good example of what you'd do but not very realistic)


[Killing eAthena]
This was a last minute addition (as well as the auto-server reboot) so I have no screenshots...

Just before I hit submit I remembered the countless times people joined #athena asking how to kill the map/char/login-server... (Guess they ran it through nohup or something since ^C didn't work lol)...

This is really simple, just type 'ps -x', then get the process ID of the app you want to kill then type 'kill PIDHERE' i.e. if the process ID of the map-server was 2026 and you wanted to kill it, you'd type 'kill 2026' but of course besides that, you can simply kill them via 'killall'... 'killall map-server' would kill the map-server... just change 'map-server' to the name of the binary you want to kill... Simple, eh?


[Making the map-server auto-reboot]
Alot of people like auto-reboots scripts because some times the server might die while there unavailable to put it back up...
To tell you the truth, on Linux, the map-server RARELY dies(hahah Win32 users).... but it does happen... so I wrote a little script(which I use my self) to auto-reboot the map-server if it crashs.

The source file is(and always will be): http://hax-studios.net/projects/fritz/sour...e/hAxRO-lnx.cpp

1. Go ahead and wget the source file via wget, 'wget http://hax-studios.net/projects/fritz/sour...nx.cpp'
2. Once its downloaded, time to compile it via g++ (NOT gcc!!!!!) and have it output as 'hAx', 'g++ hAxRO-lnx.cpp -o hAx'
3. After its compiled, we can now utilize it... (For full usage, run './hAx' with no arguments) hAx Auto-Rebooter takes 3 arguments, the first which can be one of two things... '--hup' or '--nohup'... this is the mode that the MAP-SERVER will be ran in... not hAx... The second is the name of the map-server. The third is the where to log all the data(/dev/null is acceptable)

Now that you know the usage, lets go ahead and use it... type './hAx --nohup map-server /dev/null' and your good to go... but of course, remember that hAx will not be in nohup unless you run it in nohup. To do so, use 'nohup ./hAx --nohup map-server /dev/null'




And thats how the cookie crumbles

If you need any help, e-mail me

Regards,
fritz


EDIT BY JMAN: Edited extra large fonts out, and the color.

Автор: TrojanX: Дата: 11.10.2009

а по русски не зя?

Автор: Мяфк: Дата: 11.10.2009

Жесть, а может за тебя поставить еА?

Автор: TrojanX: Дата: 11.10.2009

нет в этом я не нуждаюсь потому что хочу всё сделать сам.

Автор: Мяфк: Дата: 11.10.2009

Сам и переведи.

Автор: nomn: Дата: 11.11.2009

ы, просто запускаешь компилятор и компилишь, разумеется, всё делается под нужной осью. На windows, насколько я знаю, скомпилить под LINUX невозможно. А вот с линуха - как 2 пальца об асфальт.

Автор: TrojanX: Дата: 11.11.2009

хм а что за программу надо ставить на линекс ??? (С++)

Автор: Sanasol: Дата: 11.11.2009

для сведения eAthena написана на C# (c)Funt