Difference between revisions of "HowTo Compile In RedHat-Fedora"

From AMule Project FAQ
Jump to: navigation, search
m
m
Line 1: Line 1:
<h1>aMule in RedHat/Fedora</h1>
+
<h1>aMule in RedHat/Fedora</h1> ''(rev 0.1 by [[User:bootstrap|bootstrap]])''
 
+
<h3>''(rev 0.1 by [[User:bootstrap|bootstrap]])''</h3>
+
  
 
== What's this all about?  ==
 
== What's this all about?  ==

Revision as of 16:45, 1 January 2005

aMule in RedHat/Fedora

(rev 0.1 by bootstrap)

What's this all about?

This mini-howto explains how to get a working aMule installation on RedHat/Fedora based installations.
It covers installing by RPM as well as building from source.
Focus is to keep things easy so that probably everybody will be able to follow this instructions without learning to rebuild a complete system from scratch ;)

Show me the way...

This Section is divided into 2 parts. Part (a) will cover the easy way using RPMs (which is quite easy, so I really don't like to write it down, but there have been questions, and I won't leave them unanswered...), while part (b) covers the more complex way: using the sources to build your own aMule.

Easy

I said it's easy and it really is. The one and only rule to get an RPM based aMule installation up and running is:

Get the right RPMs. That means:
1. Get wxGTK and wxBase from http://www.wxwidgets.org (you don't need the -devel packages to get aMule running) and install them. Whatever someone else may say or you might think, don't use any other wx RPM.
2. Install some additional RPMs. On a common RedHat-ish system you will have most of them, but I've read some questions regarding libcrypto (not libcrypto++, that's next...), so it's better to say that you will need to have openssl installed. If you're installing aMule <= 2.0rc6 you will also need to install libcrypto++ (we're talking about libcrypto++ from http://www.eskimo.com/~weidai/cryptlib.html). You can find RPMs for RedHat/Fedora on http://www.hirnriss.net or links on the aMule download page. That should probably be all you RPMs you will need to install by hand (actually openssl will be installed on most systems, but as I mentioned before, there have been questions about that, so here you are...). If you're still getting a dependency problem and can't figure it out on your own, contact us through IRC (come to irc.freenode.net and visit #amule). Somebody will surely help you. Some rpms you should probably check are libcurl, openssl and automake >= 1.7.
3. Get aMule from http://www.amule.org/dl/index.php?category=22 and install it.

That's it. If nothing went wrong you can drop your root privileges and start aMule. That's as easy as typing amule & in your favourite shell. Have fun!

Not that easy

First notes

So you're one of that guys that don't like RPMs? Well - you asked for it...

Preparation:

You will need to get some wx stuff. If you'd like to build wxBase and wxGTK yourself, you will have to look into another howto. Building wx can be complex and takes some time, so i really recommend to use the http://www.wxwidgets.org RPMs.

As you want to build aMule yourself, you will need some more RPMs than other people. Install wxGTK, wxBase, wxGTK-devel and wxBase-devel.

If you're building aMule <= 2.0rc6 you will also need libcryptopp and libcryptopp-devel (RedHat/Fedora downloads at http://www.hirnriss.net) to get aMule compiled. Skip this if you're building aMule => 2.0rc7.

Get the sources you want (probably a cvs tarball from http://amule.hirnriss.net ?) from http://www.amule.org and untar it (if you don't know about tarballs, use RPMs. Please!) into a directory you'd like to work in.

Drop your root privileges and proceed to the fun part...

Configuring your aMule build

The following is an example, but it will work on RedHat/Fedora systems and it's been used for quite some time when building the "official" aMule RPMs. Anyway, your system or your opinion may be different, so feel free to change the options if you feel like changing them.

Note: If you're building aMule => 2.0rc7 you will have an embedded crypto lib that makes libcrypto++ installation obsolete. It's enabled by default, so you don't need to change your configure options.

Go to the directory you created, change into the aMule sources and type: ./configure --prefix=/usr --enable-optimize --enable-amulecmd --enable-amulecmdgui --enable-webserver --enable-webservergui --enable-utf8-systray --with-wx-config=/usr/bin/wxgtk-2.4-config --with-wxbase-config=/usr/bin/wxbase-2.4-config

Now you should see a bunch of output, while your system tries to configure aMule for building. If you're NOT building a CVS Version and you encounter problems, join the [[IRC|aMule IRC channel] at #amule on irc.freenode.net and prepare to paste some info. If your building a CVS version you should probably wait a day and try again - it may just be some of those days where CVS sources are not really working out for unexperienced users ;). If you're suspecting an interesting bug or just want to build that tarball whatever it takes, you're welcome to IRC in #amule as well, but bring some time because solving problems may not be as easy as installing RPMs.

Once configure is done (should not take that long... 30 - 60 seconds on a modern system, a little more on older systems) type make, sit down and relax. Depending on your systems speed this can take some time. Prepare for at least 5 minutes of strange output. If make stops check the last few lines of output for something that looks like an error message. If you can find something that looks like an error message, again, join IRC, come to #amule and prepare for pasting or do a make clean, try to change some of your configure options and restart make. If it's still not working, ask someone at IRC in #amule on irc.freenode.net for help.

If your build completed without error you're nearly done.

Get root privileges and type make install to install your newly built aMule. Now drop your root privileges and try to start aMule with amule &. If your build was ok and you had a good day on CVS versions you may have a great piece of software running by now. If your aMule instantly dies and produces a bunch of output containing words like "backtrace" - don't worry, Join IRC at #amule on irc.freenode.net and somebody might help you.

After building you can remove the directory you just built aMule in, as well as you can remove the installed -devel RPMs. I suggest you leave the RPMs in place in case you want to rebuild or build a new version some other day.

If nothing works and your home built aMule won't run, don't worry, try one of our RPMs ;)

Suggestions

This section is quite small (at the time of this writing) and contains some tips regarding aMule usage.

* Drop your root privileges. Don't work/play/watch movies/drive a car/{you're favourite way to waste some time here} as root. Working as root can be dangerous. One mistake can lead to some interesting hours, restoring your system's health. If you know what you're doing: fine, but it's probably still better if you don't work as root.
* Keep an eye on the aMule forum and the aMule Project FAQ and probably use the search function: most questions have been answered before.
* Don't drink and drive.

... to be continued ...

Additional fun

This section covers additional ways to have fun with or around aMule.

VNC Server. Did you ever think about using aMule on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.

Using aMule in VNC is quite easy in RedHat/Fedora, because you don't need more than a simple RPM install of vnc-server and a minor modification to a startup script.

Just install vnc-server (RPM comes with your installation CDs) and drop your root privileges. This howto assumes that your default user is named bob. As 'bob' do: vncserver -depth 16 :1. If you never used VNC as 'bob' before, the VNC server should ask you for a password. This password is used to connect to your VNC session. It is not the password your user 'bob' has and it should not be set to the same password. Furthermore your VNC password can be only 8 letters/digits long, so you really should not set your users pw here. The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your VNC session. To make sure you get the right port, use the following syntax: pizza:1 or 192.168.100.1 assuming your server is named pizza and your DNS is running, or your server is running on the IP 192.168.100.1 - if not, change the values to your needs. Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the twm folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside VNC. Go back to your shell and stop VNC using vncserver -kill :1 as 'bob'. Now your VNC server should immediatly go offline. As next step edit /home/bob/.vnc/xstartup - uncomment the two lines below "Uncomment the following two lines for a normal desktop" and comment the rest. If you now start your VNC server again, you will have a fully functional RedHat/Fedora desktop. Now open a shell or use your window manager to start aMule and enjoy. One last hint: VNC uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using KDE you should have a nice button on your taskbar already. That should protect your system, even if your VNC password has been compromised.

How to use RPM

There are several how to's on RPM available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the aMule installation from part 2.

Install: rpm -i rpmname (use the complete filename of your RPM, like: openssl-0.9.7a-35.i386.rpm)

Remove: rpm -e rpmname (don't use the complete filename here, just the package name. Like openssl, but not openssl-0.9.7a-35)

Update: rpm -U rpmname (use the complete filename of your rpm, like: openssl-0.9.7a-35.i386.rpm)

If you need any further info on RPM, please consult the rpm howto or use man rpm.