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

From AMule Project FAQ
Jump to: navigation, search
(finished with i in general lines)
Line 29: Line 29:
 
=== Not that easy ===
 
=== Not that easy ===
  
So you're one of that guys that don't like rpms? Well - you asked for it...
+
==== First notes ====
 +
 
 +
So you're one of that guys that don't like [http://www.rpm.org RPM]s? Well - you asked for it...
 
Preparation:
 
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 really recommend to use the wxwidgets.org rpms.
+
You will need to get some [[wxWidgets|wx]] stuff. If you'd like to build [[wxBase]] and [[wxWidgets|wxGTK]] yourself, you will have to look into another howto. Building [[wxWidgets|wx]] can be complex and takes some time, so really recommend to use the http://www.wxwidgets.org [http://www.rpm.org RPM]s.
  
As you want to build aMule yourself, you will need some more rpms as for only running it. Install wxGTK, wxBase, wxGTK-devel and wxBase-devel.
+
As you want to build [[aMule]] yourself, you will need some more [http://www.rpm.org RPM]s as for only running it. Install [[wxWidgets|wxGTK]], [[wxBase]], [[wxWidgets|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.
+
If you're building [[aMule]] <= 2.0rc6 you will also need [[libcrypto]]pp and [[libcrypto]]pp-devel ([http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] downloads at [http://www.hirnriss.net 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 folder you'd like to work in.
+
Get the sources you want (probably a cvs tarball from http://amule.hirnriss.net ?) from http://www.amule.org and un[http://www.gnu.org/software/tar/tar.html tar] it (if you don't know about tarballs, use [http://www.rpm.org RPM]s. Please!) into a folder you'd like to work in.
  
Drop your root privileges("root privileges" should be a link to part 3) and proceed to the fun part...
+
Drop your root privileges <!-- "root privileges" should be a link to part 3 --> and proceed to the fun part...
  
Configuring your aMule build.
+
==== Configuring your [[aMule]] build ====
  
The following is an example, but it will work on RedHat/Fedora systems and it's has 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.
+
The following is an example, but it will work on [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] systems and it's been used for quite some time when building the "official" [[aMule]] [http://www.rpm.org RPM]s. 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 libcryptopp installation obsolete. It's enabled by default, so you don't need to change your configure options.''
+
''Note: If you're building [[aMule]] => 2.0rc7 you will have an embedded [http://www.openssl.org/docs/crypto/crypto.html 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 folder 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''
+
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 #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 good for unexperienced users ;). If you're suspecting an interesting bug or just want to build that tarball whatever it takes, you're welcome in #amule as well, but bring some time because solving problems may not be as easy as installing rpms.
+
Now you should see a bunch of output, while your system tries to configure [[aMule]] for building. If you're '''NOT''' building a [http://www.gnu.org/software/cvs 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 [http://www.gnu.org/software/cvs CVS] version you should probably wait a day and try again - it may just be some of those days where [http://www.gnu.org/software/cvs CVS] sources are not really good 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 [http://www.rpm.org RPM]s.
  
Once configure is done (should not take that long... 30-60seconds 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 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 in #amule on irc.freenode.net for help.
+
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.
 
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("root privileges" should be a link to part 3) 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 #amule on irc.freenode.net and somebody might help you.
+
Get root privileges and type ''make install'' to install your newly built [[aMule]]. Now drop your root privileges <!-- "root privileges" should be a link to part 3 --> and try to start [[aMule]] with ''amule &''. If your build was ok and you had a good day on [http://www.gnu.org/software/cvs 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 folder 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.
+
After building you can remove the directory you just built [[aMule]] in, as well as you can remove the installed -devel [http://www.rpm.org RPM]s. I suggest you leave the [http://www.rpm.org RPM]s 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 ;)
+
If nothing works and your home built [[aMule]] won't run, don't worry, try one of our [http://www.rpm.org RPM]s ;)
  
 
== Suggestions ==
 
== Suggestions ==
  
This section is quite small (at the time of this writing) and contains some tips regarding aMule usage.
+
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 systems health. If you know what you're doing: fine. But if you really know it: don't work as root.
+
: * 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 if you really know it: don't work as root.
  
: * Keep an on the aMule forum / the aMule faq and probably use the search function - most questions have been answered before.
+
: * Keep an eye on the [http://forum.amule.org aMule forum] and the [[Main_Page|aMule FAQ] and probably use the search function: most questions have been answered before.
  
 
: * Don't drink and drive.
 
: * Don't drink and drive.
Line 78: Line 80:
 
This section covers additional ways to have fun with or around [[aMule]].
 
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.
+
[http://www.uk.research.att.com/vnc 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("install" should be a link to part 5) of vnc-server and a minor modification to a startup script.
+
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> 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("root privileges" should be a link to part 3). This howto assumes that your default user is named 'bob'. So 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. If your connection succeeds yuo should be watching a very simple and nearly ugly desktop by now. This is because the default setting is to start only a little set of apps and a small windowmanager 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 desktop as if your sitting on your desk. Now open a shell or use your windowmanager 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 broken.
+
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges <!-- "root privileges" should be a link to part 3 -->. This howto assumes that your default user is named ''bob''. So as 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc 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 [http://www.uk.research.att.com/vnc 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 [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs. If your connection succeeds yuo should be watching a very simple and nearly ugly desktop by now. This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc 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 [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional desktop as if your sitting on your desk. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc 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 [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been broken.
  
== How to use rpm ==
+
== How to use [http://www.rpm.org RPM] ==
  
 
There are several how to's on [http://www.rpm.org 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.
 
There are several how to's on [http://www.rpm.org 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.
Line 94: Line 96:
 
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35'')
 
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35'')
  
If you need any further info on rpm, please consult the rpm howto or use ''man rpm''.
+
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.

Revision as of 17:16, 20 October 2004

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 your RPMs from where they are made. 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.
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 really recommend to use the http://www.wxwidgets.org RPMs.

As you want to build aMule yourself, you will need some more RPMs as for only running it. 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 folder 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 good 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 if you really know it: don't work as root.
* Keep an eye on the aMule forum and the [[Main_Page|aMule 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. So 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. If your connection succeeds yuo should be watching a very simple and nearly ugly desktop by now. 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 desktop as if your sitting on your desk. 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 broken.

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)

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)

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