Loading ...
Sorry, an error occurred while loading the content.

# HowTo recompile Debian packages .. and others

Expand Messages
  • ahmedhamdy_27
    Just Another Linux Lover Blog [http://gmodules.com/ig/images/plus_google.gif]
    Message 1 of 2 , Aug 31 3:04 AM
    • 0 Attachment
      Just Another Linux Lover Blog <http://www.linux-masters.com/>
      [http://gmodules.com/ig/images/plus_google.gif]
      <http://fusion.google.com/add?source=atgs&feedurl=http://feeds.feedburne\
      r.com/JustAnotherLinuxLoverBlog>

      * HowTo recompile Debian packages
      <https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy#1236e3c21\
      f6f48db_1>
      * Configuring a lightweight Apache / MySQL install on Debian/Ubuntu
      <https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy#1236e3c21\
      f6f48db_2>
      * Send Mail with Gmail and sSMTP
      <https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy#1236e3c21\
      f6f48db_3>

      HowTo recompile Debian packages
      <http://feedproxy.google.com/%7Er/JustAnotherLinuxLoverBlog/%7E3/hqdF1ym\
      GtaY/howto-recompile-debian-packages.html>

      Posted: 30 Aug 2009 02:55 PM PDT
      This article will show how you can rebuild any debian package. You might
      need to rebuild a package for various reasons: add/remove some
      compilation options, make some changes to the sources, or compile a
      newer version from testing/sid into stable, etc. Regardless of your
      reason, this can be done very easy using debian tools.
      First you will need to have some basic debian building tools installed:

      apt-get install devscripts build-essential
      1. Get the source packageDebian repositories contain the sources for all
      existing debian packages. In order to get a source package you will need
      to have in your /etc/apt/sources.list a deb-src line (this is exactly as
      a regular deb repository line, but it is for sources). This will look
      like:

      deb-src http://ftp.us.debian.org/debian/
      <http://ftp.us.debian.org/debian/> etch main non-free contrib
      change it accordingly to your needs (a close mirror, testing or sid
      instead of etch, and so on).
      Once you have your sources file updated refresh your packages lists:

      apt-get update
      Now you can install the source package using:

      apt-get source
      this will download the source package inside the local folder, so you
      might want to change to a proper location before doing this. Also as the
      final step it verifies and uncompresses the package and prepares it for
      compilation. You will just have to move in the newly created folder
      (name and version of the package).
      2. Installing dependenciesThe compilation of each package will have its
      own unique set of dependencies, based on the software itself. You will
      need to install them prior to the actual compilation, if not the process
      will most certainly fail. To do this we will again rely on the powerful
      apt:

      apt-get build-dep
      this will pull from your current repository the needed dependencies, and
      install them.
      3. Make your changes and rebuild the packageNow is the time to make your
      changes. This is outside the scope of this post, but normally you will
      either modify source files of the package or make changes inside the
      debian compilation scripts (or maybe no changes are needed and you are
      doing just a recompile on a different architecture). Inside the debian
      folder you have important files like rules (that contain the compilation
      options among others), changelog if you want to add your own version you
      will need to add it here, and so on. Check the debian maintainer's
      guide <http://www.debian.org/doc/manuals/maint-guide/index.en.html> for
      full details.
      Once you've made your changes you can start the compilation using:

      cd
      debuild -us -uc
      We used debuild -us -uc since we are not the maintainer of the package
      and we will not be able to sign the package.
      You will find the debian packages that you have just compiled one folder
      above, among some other files (the initial sources, compilation logs,
      etc.). You can either put them in a local repository and install them
      using apt-get as usual, or you can just install them using dpkg:

      cd ..
      dpkg -i Finally here is a real life exampleOk, let's see how this
      works for a real package. Let's say we want to recompile for some
      reason the mysql server package (mysql-server-5.0). Here is how this
      would work:

      apt-get source mysql-server-5.0
      apt-get build-dep mysql-server-5.0
      cd mysql-dfsg-5.0-5.0.32
      debuild -us -uc
      cd ..
      dpkg -i *.deb
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:yIl2AUoC8zA>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:63t7Ie-LG7Y>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:4cEx4HpKnUU>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:dnMXMwOfBR0>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:F7zBnMyn0Lo>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:7Q72WNTAKBA>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:V_sGLiPBpWU>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:qj6IDK7rITs>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:KwTdNBX3Jqk>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:l6gmwiTKsz0>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:gIN9vFwOqvQ>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
      aY:NrTZl3PYzDM:TzevzKxY174>
      Configuring a lightweight Apache / MySQL install on Debian/Ubuntu
      <http://feedproxy.google.com/%7Er/JustAnotherLinuxLoverBlog/%7E3/prKU5zw\
      gQVc/configuring-lightweight-apache-mysql.html>

      Posted: 30 Aug 2009 02:50 PM PDT
      I'm going to explain how to setup a lightweight Apache and MySQL to
      work on a smaller server such as SliceHost's <http://slicehost.com/>
      256mb VPS. This will work on both Debian and Ubuntu servers. You are
      going to install Apache 2 and MySQL like you normally would. After you
      install it, we are going to edit the config files to better utilize your
      available memory. To do this you need to be logged in via SSH to your
      server.
      First enter:
      $topLook for the MySQL command. (If you don't see it, press + M to
      sort by the amount of memory used) Once you locate MySQL, make note of
      the percentage of memory it is using. Now exit top by hitting
      `q'.
      We are now going to edit your MySQL configuration. First you want to
      make a backup by entering:
      $sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.origNow open my.cnf using
      your preferred editor. We will use nano for this tutorial.
      $sudo nano /etc/mysql/my.cnfFind the following line in your my.cnf file:
      #skip-innodbUncomment that line. (Note: if after changing this line your
      database no longer works, come back and comment this line out again and
      restart MySQL.)
      Next locate the line:
      skip-external-lockingand add:
      skip-lockingbelow it. Next find the section labeled Fine Tuning. Change
      the settings in that section to match:
      key_buffer = 16K
      max_allowed_packet = 1M
      thread_stack = 64K
      thread_cache_size = 4
      sort_buffer = 64K
      net_buffer_length = 2K
      #max_connections = 100
      #table_cache = 64
      #thread_concurrency = 10Now restart MySQL:
      $sudo /etc/init.d/mysql restartNow run `top' again, and see what
      your percentage of memory is. If all is right, it should be much lower.
      Now we will change the apache configuration. This will not show you a
      lower memory usage per se, however, it should prevent apache from using
      too much memory. First lets make a backup of your apache config.
      $sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.origNow
      lets open the apache config file for editing:
      $sudo nano /etc/apache2/apache2.confNow make your entries match the
      following:
      Timeout 45
      KeepAlive On
      MaxKeepAliveRequests 200
      KeepAliveTimeout 3

      StartServers 5
      MinSpareServers 5
      MaxSpareServers 10
      MaxClients 30
      MaxRequestsPerChild 2000
      Finally restart apache:
      $sudo /etc/init.d/apache2 restartIf you have problems with memory still,
      try lowering your "MaxClients" to 25.
      This setup should work on most Debian and Ubuntu VPS's. Note that
      your results may very. If you have any questions, or need help, feel
      free to post a comment and I will try to get back to you.
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:yIl2AUoC8zA>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:63t7Ie-LG7Y>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:4cEx4HpKnUU>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:dnMXMwOfBR0>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:F7zBnMyn0Lo>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:7Q72WNTAKBA>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:V_sGLiPBpWU>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:qj6IDK7rITs>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:KwTdNBX3Jqk>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:l6gmwiTKsz0>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:gIN9vFwOqvQ>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
      Vc:MkXK1LM7kKI:TzevzKxY174>
      Send Mail with Gmail and sSMTP
      <http://feedproxy.google.com/%7Er/JustAnotherLinuxLoverBlog/%7E3/KJNeiVX\
      1mzs/send-mail-with-gmail-and-ssmtp.html>

      Posted: 30 Aug 2009 02:42 PM PDT

      <http://3.bp.blogspot.com/_eXWn-Xf4AYs/SpryExPv-6I/AAAAAAAAAFA/NnxKx4DUe\
      2o/s1600-h/tux-gmail.png> sSmtp is an extremely simple, resource
      conserving, SMTP server that will allow your desktop or server to send
      email. In this article we are going to use sSMTP to send email through
      Gmail.
      Sometimes we want to enable our servers/desktops to be able to send
      email without setting up a full featured mail server or configuring
      postfix to route through Gmail
      <http://www.marksanborn.net/linux/send-mail-postfix-through-gmails-smtp-\
      on-a-ubuntu-lts-server/> .
      sSmtp is an extremely simple, resource conserving, SMTP server that will
      allow your desktop or server to send email. In this article we are going
      to use sSMTP to send outgoing email through Gmail.
      Install sSMTPDebian/Ubuntu users can Install with this command or click
      here to open up apt:
      sudo apt-get install ssmtpWe need to then need to edit,
      `/etc/ssmtp/ssmtp.conf':
      root=username@... <mailto:root=username@...>
      mailhub=smtp.gmail.com:587 <http://smtp.gmail.com:587/>
      rewriteDomain=
      hostname=username@... <mailto:hostname=username@...>
      UseSTARTTLS=YES
      AuthUser=username
      AuthPass=password
      FromLineOverride=YES
      Then add each account that you want to be able to send mail from by
      editing, `/etc/ssmtp/revaliases`:
      root:username@...:smtp.gmail.com:587
      <mailto:root:username@...:smtp.gmail.com:587>
      localusername:username@...:smtp.gmail.com:587
      <mailto:localusername:username@...:smtp.gmail.com:587>
      Now try sending an emailYou can send an email through your favorite
      email client, like `mutt`, or type:
      sudo ssmtp someemail@... <mailto:someemail@...> You will
      then type your message, hit enter and `ctrl+d`
      Now that you have a simple outgoing email server setup, you can do all
      sorts of neat things:

      * Configure cron jobs to send log reports to your email address
      * Alert you of all kinds of system changes
      * Send email alerts when your computer reaches a certain temperature
      * Send email through PHP, Python
      <http://www.nixtutor.com/linux/send-mail-through-gmail-with-python/> ,
      Ruby, and Perl

      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:yIl2AUoC8zA>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:63t7Ie-LG7Y>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:4cEx4HpKnUU>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:dnMXMwOfBR0>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:F7zBnMyn0Lo>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:7Q72WNTAKBA>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:V_sGLiPBpWU>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:qj6IDK7rITs>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:KwTdNBX3Jqk>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:l6gmwiTKsz0>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:gIN9vFwOqvQ>
      <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
      zs:zL9ZGYZekXw:TzevzKxY174> You are subscribed to email updates
      from Just Another Linux Lover Blog <http://www.linux-masters.com/>









      [Non-text portions of this message have been removed]
    • dg4mfn
      Message 2 of 2 , Sep 1, 2009
      • 0 Attachment
        ...and what have this to do with Suselinux ????

        --- In suselinuxusers@yahoogroups.com, "ahmedhamdy_27" <ahmedhamdy_27@...> wrote:
        >
        >
        >
        > Just Another Linux Lover Blog <http://www.linux-masters.com/>
        > [http://gmodules.com/ig/images/plus_google.gif]
        > <http://fusion.google.com/add?source=atgs&feedurl=http://feeds.feedburne\
        > r.com/JustAnotherLinuxLoverBlog>
        >
        > * HowTo recompile Debian packages
        > <https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy#1236e3c21\
        > f6f48db_1>
        > * Configuring a lightweight Apache / MySQL install on Debian/Ubuntu
        > <https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy#1236e3c21\
        > f6f48db_2>
        > * Send Mail with Gmail and sSMTP
        > <https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy#1236e3c21\
        > f6f48db_3>
        >
        > HowTo recompile Debian packages
        > <http://feedproxy.google.com/%7Er/JustAnotherLinuxLoverBlog/%7E3/hqdF1ym\
        > GtaY/howto-recompile-debian-packages.html>
        >
        > Posted: 30 Aug 2009 02:55 PM PDT
        > This article will show how you can rebuild any debian package. You might
        > need to rebuild a package for various reasons: add/remove some
        > compilation options, make some changes to the sources, or compile a
        > newer version from testing/sid into stable, etc. Regardless of your
        > reason, this can be done very easy using debian tools.
        > First you will need to have some basic debian building tools installed:
        >
        > apt-get install devscripts build-essential
        > 1. Get the source packageDebian repositories contain the sources for all
        > existing debian packages. In order to get a source package you will need
        > to have in your /etc/apt/sources.list a deb-src line (this is exactly as
        > a regular deb repository line, but it is for sources). This will look
        > like:
        >
        > deb-src http://ftp.us.debian.org/debian/
        > <http://ftp.us.debian.org/debian/> etch main non-free contrib
        > change it accordingly to your needs (a close mirror, testing or sid
        > instead of etch, and so on).
        > Once you have your sources file updated refresh your packages lists:
        >
        > apt-get update
        > Now you can install the source package using:
        >
        > apt-get source
        > this will download the source package inside the local folder, so you
        > might want to change to a proper location before doing this. Also as the
        > final step it verifies and uncompresses the package and prepares it for
        > compilation. You will just have to move in the newly created folder
        > (name and version of the package).
        > 2. Installing dependenciesThe compilation of each package will have its
        > own unique set of dependencies, based on the software itself. You will
        > need to install them prior to the actual compilation, if not the process
        > will most certainly fail. To do this we will again rely on the powerful
        > apt:
        >
        > apt-get build-dep
        > this will pull from your current repository the needed dependencies, and
        > install them.
        > 3. Make your changes and rebuild the packageNow is the time to make your
        > changes. This is outside the scope of this post, but normally you will
        > either modify source files of the package or make changes inside the
        > debian compilation scripts (or maybe no changes are needed and you are
        > doing just a recompile on a different architecture). Inside the debian
        > folder you have important files like rules (that contain the compilation
        > options among others), changelog if you want to add your own version you
        > will need to add it here, and so on. Check the debian maintainer's
        > guide <http://www.debian.org/doc/manuals/maint-guide/index.en.html> for
        > full details.
        > Once you've made your changes you can start the compilation using:
        >
        > cd
        > debuild -us -uc
        > We used debuild -us -uc since we are not the maintainer of the package
        > and we will not be able to sign the package.
        > You will find the debian packages that you have just compiled one folder
        > above, among some other files (the initial sources, compilation logs,
        > etc.). You can either put them in a local repository and install them
        > using apt-get as usual, or you can just install them using dpkg:
        >
        > cd ..
        > dpkg -i Finally here is a real life exampleOk, let's see how this
        > works for a real package. Let's say we want to recompile for some
        > reason the mysql server package (mysql-server-5.0). Here is how this
        > would work:
        >
        > apt-get source mysql-server-5.0
        > apt-get build-dep mysql-server-5.0
        > cd mysql-dfsg-5.0-5.0.32
        > debuild -us -uc
        > cd ..
        > dpkg -i *.deb
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:yIl2AUoC8zA>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:63t7Ie-LG7Y>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:4cEx4HpKnUU>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:dnMXMwOfBR0>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:F7zBnMyn0Lo>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:7Q72WNTAKBA>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:V_sGLiPBpWU>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:qj6IDK7rITs>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:KwTdNBX3Jqk>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:l6gmwiTKsz0>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:gIN9vFwOqvQ>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=hqdF1ymGt\
        > aY:NrTZl3PYzDM:TzevzKxY174>
        > Configuring a lightweight Apache / MySQL install on Debian/Ubuntu
        > <http://feedproxy.google.com/%7Er/JustAnotherLinuxLoverBlog/%7E3/prKU5zw\
        > gQVc/configuring-lightweight-apache-mysql.html>
        >
        > Posted: 30 Aug 2009 02:50 PM PDT
        > I'm going to explain how to setup a lightweight Apache and MySQL to
        > work on a smaller server such as SliceHost's <http://slicehost.com/>
        > 256mb VPS. This will work on both Debian and Ubuntu servers. You are
        > going to install Apache 2 and MySQL like you normally would. After you
        > install it, we are going to edit the config files to better utilize your
        > available memory. To do this you need to be logged in via SSH to your
        > server.
        > First enter:
        > $topLook for the MySQL command. (If you don't see it, press + M to
        > sort by the amount of memory used) Once you locate MySQL, make note of
        > the percentage of memory it is using. Now exit top by hitting
        > `q'.
        > We are now going to edit your MySQL configuration. First you want to
        > make a backup by entering:
        > $sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.origNow open my.cnf using
        > your preferred editor. We will use nano for this tutorial.
        > $sudo nano /etc/mysql/my.cnfFind the following line in your my.cnf file:
        > #skip-innodbUncomment that line. (Note: if after changing this line your
        > database no longer works, come back and comment this line out again and
        > restart MySQL.)
        > Next locate the line:
        > skip-external-lockingand add:
        > skip-lockingbelow it. Next find the section labeled Fine Tuning. Change
        > the settings in that section to match:
        > key_buffer = 16K
        > max_allowed_packet = 1M
        > thread_stack = 64K
        > thread_cache_size = 4
        > sort_buffer = 64K
        > net_buffer_length = 2K
        > #max_connections = 100
        > #table_cache = 64
        > #thread_concurrency = 10Now restart MySQL:
        > $sudo /etc/init.d/mysql restartNow run `top' again, and see what
        > your percentage of memory is. If all is right, it should be much lower.
        > Now we will change the apache configuration. This will not show you a
        > lower memory usage per se, however, it should prevent apache from using
        > too much memory. First lets make a backup of your apache config.
        > $sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.origNow
        > lets open the apache config file for editing:
        > $sudo nano /etc/apache2/apache2.confNow make your entries match the
        > following:
        > Timeout 45
        > KeepAlive On
        > MaxKeepAliveRequests 200
        > KeepAliveTimeout 3
        >
        > StartServers 5
        > MinSpareServers 5
        > MaxSpareServers 10
        > MaxClients 30
        > MaxRequestsPerChild 2000
        > Finally restart apache:
        > $sudo /etc/init.d/apache2 restartIf you have problems with memory still,
        > try lowering your "MaxClients" to 25.
        > This setup should work on most Debian and Ubuntu VPS's. Note that
        > your results may very. If you have any questions, or need help, feel
        > free to post a comment and I will try to get back to you.
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:yIl2AUoC8zA>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:63t7Ie-LG7Y>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:4cEx4HpKnUU>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:dnMXMwOfBR0>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:F7zBnMyn0Lo>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:7Q72WNTAKBA>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:V_sGLiPBpWU>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:qj6IDK7rITs>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:KwTdNBX3Jqk>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:l6gmwiTKsz0>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:gIN9vFwOqvQ>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=prKU5zwgQ\
        > Vc:MkXK1LM7kKI:TzevzKxY174>
        > Send Mail with Gmail and sSMTP
        > <http://feedproxy.google.com/%7Er/JustAnotherLinuxLoverBlog/%7E3/KJNeiVX\
        > 1mzs/send-mail-with-gmail-and-ssmtp.html>
        >
        > Posted: 30 Aug 2009 02:42 PM PDT
        >
        > <http://3.bp.blogspot.com/_eXWn-Xf4AYs/SpryExPv-6I/AAAAAAAAAFA/NnxKx4DUe\
        > 2o/s1600-h/tux-gmail.png> sSmtp is an extremely simple, resource
        > conserving, SMTP server that will allow your desktop or server to send
        > email. In this article we are going to use sSMTP to send email through
        > Gmail.
        > Sometimes we want to enable our servers/desktops to be able to send
        > email without setting up a full featured mail server or configuring
        > postfix to route through Gmail
        > <http://www.marksanborn.net/linux/send-mail-postfix-through-gmails-smtp-\
        > on-a-ubuntu-lts-server/> .
        > sSmtp is an extremely simple, resource conserving, SMTP server that will
        > allow your desktop or server to send email. In this article we are going
        > to use sSMTP to send outgoing email through Gmail.
        > Install sSMTPDebian/Ubuntu users can Install with this command or click
        > here to open up apt:
        > sudo apt-get install ssmtpWe need to then need to edit,
        > `/etc/ssmtp/ssmtp.conf':
        > root=username@... <mailto:root=username@...>
        > mailhub=smtp.gmail.com:587 <http://smtp.gmail.com:587/>
        > rewriteDomain=
        > hostname=username@... <mailto:hostname=username@...>
        > UseSTARTTLS=YES
        > AuthUser=username
        > AuthPass=password
        > FromLineOverride=YES
        > Then add each account that you want to be able to send mail from by
        > editing, `/etc/ssmtp/revaliases`:
        > root:username@...:smtp.gmail.com:587
        > <mailto:root:username@...:smtp.gmail.com:587>
        > localusername:username@...:smtp.gmail.com:587
        > <mailto:localusername:username@...:smtp.gmail.com:587>
        > Now try sending an emailYou can send an email through your favorite
        > email client, like `mutt`, or type:
        > sudo ssmtp someemail@... <mailto:someemail@...> You will
        > then type your message, hit enter and `ctrl+d`
        > Now that you have a simple outgoing email server setup, you can do all
        > sorts of neat things:
        >
        > * Configure cron jobs to send log reports to your email address
        > * Alert you of all kinds of system changes
        > * Send email alerts when your computer reaches a certain temperature
        > * Send email through PHP, Python
        > <http://www.nixtutor.com/linux/send-mail-through-gmail-with-python/> ,
        > Ruby, and Perl
        >
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:yIl2AUoC8zA>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:63t7Ie-LG7Y>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:4cEx4HpKnUU>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:dnMXMwOfBR0>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:F7zBnMyn0Lo>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:7Q72WNTAKBA>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:V_sGLiPBpWU>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:qj6IDK7rITs>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:KwTdNBX3Jqk>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:l6gmwiTKsz0>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:gIN9vFwOqvQ>
        > <http://feeds.feedburner.com/%7Eff/JustAnotherLinuxLoverBlog?a=KJNeiVX1m\
        > zs:zL9ZGYZekXw:TzevzKxY174> You are subscribed to email updates
        > from Just Another Linux Lover Blog <http://www.linux-masters.com/>
        >
        >
        >
        >
        >
        >
        >
        >
        >
        > [Non-text portions of this message have been removed]
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.