Updated: Wed, 27 Mar 2002 01:18:59 GMT
|
|
Compiling Mozilla from source
-
The first thing
you will need is a source tarball from mozilla.org. You can find the latest
and greatest (again, at the time of this writing) at:
ftp://ftp.mozilla.org/pub/mozilla/releases/
Next, you'll want to grab some plugins. I've made the following plugins available from my site:
- Blackdown Java
- Blackdown
is an implementation of Java that runs on Linux. It was recently voted as
the "Best Java Implementation for Linux". Grab it: j2re-1.3.1-FCS-linux-i386.tar.bz2
- Macromedia Flash Player
- Does this really need a description? Grab it:
flash_linux.tar.gz
- RealPlayer
- Streaming media player. You all know what it is. Grab it:
rp8_linux20_libc6_i386_cs2.bin
- Adobe Acrobat
- View PDF files within your browser. Grab it:
linux-ar-405.tar.gz
Please note that I'm going to assume the following is installed on your Linux system already:
- Configuring Mozilla
I configure Mozilla to use the QT toolkit by default. You might want to
adjust this to your tastes. I also compile for a 686 CPU. You should change
this to match your processor type.
tar zxvf mozilla-source-x.x.x.tar.gz
cd mozilla
./configure --prefix=/opt/mozilla \
--with-x \
--with-pthreads \
--with-system-jpeg \
--with-system-zlib \
--with-system-mng \
--enable-toolkit-gtk \
--enable-toolkit-xlib \
--enable-toolkit-qt \
--with-qtdir=/usr/lib/qt2 \
--enable-xft \
--disable-debug \
--enable-crypto \
--enable-optimize='-O3 -march=i686 -mcpu=i686' \
--enable-reorder \
--enable-strip \
--enable-xterm-updates \
--enable-cpp-rtti \
--enable-cpp-exceptions \
--enable-default-toolkit=qt
- Now we're ready to build. Since we need to build a "distribution" in
order to install it ourselves, we need a couple of environment items set:
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
Finally, the following command will produce us a browser. Run it and go
do whatever it is you've been putting off doing. You're going to get a lot
done waiting for this thing to compile!
-
Now, we need to
"get to the creamy middle" and get the stuff we don't need removed so we
can keep the stuff we do need (when done compiling, my latest mozilla source
folder was almost 500M). Again, within the mozilla source folder, type the
following:
cd xpinstaller/packager
make
This will create a tarball in /dist.
You may then untar this anywhere you like to install Mozilla. I set mine
up in /opt/mozilla, but you can put yours whereever you want. Being lazy,
I then create a link in /usr/bin to the executable:
cd /opt
tar xvf /path/to/mozilla_source/dist/mozilla-x.x.x.tar.gz
ln -s /opt/mozilla/mozilla /usr/bin/mozilla
-
Okay, personally, I'd prefer to avoid using Java where possible, but there's
a couple of sites I frequent that require it, so... Fortunately, or
unfortunately depending on your viewpoint, Blackdown is only available in
binary format, so it's relatively easy to install. You simply untar the
tarball you downloaded to the folder you want. It will create a j2re within.
I wanted mine in /opt, so...
cd /opt
tar xvfI /some/path/j2re-1.3.1-FCS-linux-i386.tar.bz2
You then need to add /bin to your path if you want to run Java
programs directly. To use the Java plugin, simply create a symlink from it's
home in the into the Mozilla plugins folder. In my case, Mozilla
lives in /opt/mozilla, so:
cd /opt/mozilla/plugins
ln -s /opt/j2re1.3.1/plugin/i386/mozilla/javaplugin_oji.so
You then need to restart your browser. The following page has some applets
running, so it's a quick and easy test of a working plugin:
http://java.sun.com/openstudio/index.html
-
Installing Flash player is really straightforward.
cd /opt
tar -xvzf /some/path/flash_linux.tar.gz
cd flash_linux
cp libflashplayer.so ShockwaveFlash.class /opt/mozilla/plugins
Restart Mozilla. A good (and funny) test site is
http://www.stileproject.com/britney.html.
There are those who might consider that site offensive, so if you're easily
offended, try with some other site. Personally, I think it's hillarious. :)
-
Another one I prefer not to install, as I think Real Player files are crap.
But, if you want to keep up on the latest movie trailers... :) The file you
downloaded is the installer, but you need to make it executable and execute
that, so:
chmod u+x rp8_linux20_libc6_i386_cs2.bin
./rp8_linux20_libc6_i386_cs2.bin
It's your typical graphic installer, so click and choose the options you want.
One caveat: pay attention, on one screen it sets the MIME type for MP3s to
itself. If you have another MP3 player you prefer, make sure to deselect it.
- Installing Adobe Acrobat is fairly simple as well.
tar -xvzf linux-ar-405.tar.gz
cd ILINXR.install
./INSTALL
This will run the install script which will propmt you for the final location
to install Acrobat. After this runs, you should run the following command to
create a link in your path to the acroread startup script (the recommended
way to run the program directly:
ln -s /bin/acroread /usr/bin/acroread
Finally, to make it available as a plugin...
cd /opt/mozilla/plugins
ln -s /Browsers/intellinux/nppdf.so
That's it. You
now have a modern, relatively stable browser which can handle most of the
fluff webmasters today will throw at you.
As an added bonus, you can configure KDE/Konqueror to scan the Mozilla
plug-in directory (/opt/mozilla/plugins) and you should be able to
use the newly installed plugins with Konqueror!
� Douglas Hunley (doug at hunley.homeip.net)