Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Nginx repository for Ubuntu/Debian

  1. #1
    Join Date
    Aug 2008
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Nginx repository for Ubuntu/Debian

    Edit: I'm stopping with this.

    Nginx is a lightweight server written by Igor Sysoev. Nginx is capable of running heavy websites with a lot less resources then Apache for example. Unfortunately nginx has frequent updates, making the package in the official repository age very quick. At this time of writing, the newest stable version of nginx is 0.7.59 while Debian Lenny provides 0.6.32 and Ubuntu Jaunty 0.6.35.
    The packages have been compiled on Ubuntu and installed on both Ubuntu and Debian without a problem.

    That's why I've set up a repository for the latest stable versions of nginx. Just add the following lines to '/etc/apt/sources.list' with your favorite text editor:

    deb http://apt.avuc.nl lenny stable
    deb-src http://apt.avuc.nl lenny stable
    And update your system with 'sudo aptitude update' or just 'aptitude update' as root. Now run 'sudo aptitude safe-upgrade' to upgrade nginx to the newest version.

    Important:
    Install nginx from the official repositories first! Then update with my newer packages. The nginx executable from my packages is located somewhere else, so we need to make a symlink to the new location for '/etc/init.d/nginx' to work. Just do
    ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx
    And you're done! Restart nginx with '/etc/init.d/nginx' and if that doesn't work do 'killall nginx' as root.

    More information, like compile options, can be found here.

    Development and legacy version are now also available, just replace "stable" with "development" or "legacy" to get the corresponding packages.
    Last edited by CP1256; September 11th, 2009 at 03:38 PM.

  2. #2
    Join Date
    Jun 2009
    Beans
    3

    Re: Nginx repository for Ubuntu/Debian

    Thanks for supplying your compile flags. I have an x86-64 compiled system and your .deb packages only support i386. I was able to get my own compiled using your flags.

  3. #3
    Join Date
    Aug 2008
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Nginx repository for Ubuntu/Debian

    I also have a 64 bit server now so I think I'm going to offer 64-bit packages soon.

    Glad I could help though!

  4. #4
    Join Date
    May 2006
    Beans
    1

    Re: Nginx repository for Ubuntu/Debian

    i need the x84 version too ^^

    thx

  5. #5
    Join Date
    Aug 2008
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Nginx repository for Ubuntu/Debian

    64Bit packages added, for all versions. You can now download 32 and 64bit packages.

  6. #6
    Join Date
    Feb 2008
    Beans
    15

    Re: Nginx repository for Ubuntu/Debian

    Everything seems to go swimmingly 'til I try to start nginx:

    Code:
    foo@bar:/usr/local/nginx/sbin$ sudo /etc/init.d/nginx start
    Starting nginx: start-stop-daemon: Unable to start /usr/sbin/nginx: No such file or directory (No such file or directory)
    nginx.
    I installed nginx from the normal repo, added your repos to sources.list, ran apt-get update, then aptitude safe-upgrade. The upgrade completed, and when I try to start nginx, I get the above error.

    Running Jaunty on x86_64.

    Any pointers would be appreciated. Thanks!

    -a.

  7. #7
    Join Date
    Aug 2008
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Nginx repository for Ubuntu/Debian

    Quote Originally Posted by aresnick View Post
    Everything seems to go swimmingly 'til I try to start nginx:

    Code:
    foo@bar:/usr/local/nginx/sbin$ sudo /etc/init.d/nginx start
    Starting nginx: start-stop-daemon: Unable to start /usr/sbin/nginx: No such file or directory (No such file or directory)
    nginx.
    I installed nginx from the normal repo, added your repos to sources.list, ran apt-get update, then aptitude safe-upgrade. The upgrade completed, and when I try to start nginx, I get the above error.

    Running Jaunty on x86_64.

    Any pointers would be appreciated. Thanks!

    -a.
    The new nginx executable is located somewhere else, just run 'ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx' and you'll be able to start it again.

    I would also place this in '/etc/init.d/nginx', so you can upgrade to newer versions of nginx without downtime.

    Code:
      upgrade)
            echo -n "Upgrading $DESC: "
    
            # See http://wiki.nginx.org/NginxCommandLine for details
            # First, start a new process running the new binary
            kill -USR2 `cat /var/run/nginx.pid`
            sleep 1
    
            # Next, kill the old worker processes
            kill -WINCH `cat /var/run/nginx.pid.oldbin`
            sleep 1
    
            # Next, kill the old master processe
            kill -QUIT `cat /var/run/nginx.pid.oldbin`
    
            echo "$NAME."
            ;;
    Last edited by CP1256; July 22nd, 2009 at 12:09 PM.

  8. #8
    Join Date
    Feb 2008
    Beans
    15

    Re: Nginx repository for Ubuntu/Debian

    Sorry, forgot to mention that I also made the symlink--I actually can verify that the nginx executable is there, as is nginx.old. Strangely, even when I try to execute nginx from its directory, I get a "No such file or directory" error.

  9. #9
    Join Date
    Aug 2008
    Beans
    35
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Nginx repository for Ubuntu/Debian

    Quote Originally Posted by aresnick View Post
    Sorry, forgot to mention that I also made the symlink--I actually can verify that the nginx executable is there, as is nginx.old. Strangely, even when I try to execute nginx from its directory, I get a "No such file or directory" error.
    That is strange, try to remove nginx, then install the version from the repos, and see if it works. Then try again, maybe that will solve it. Currently I'm using version 0.8.6, which version are you using?

  10. #10
    Join Date
    Feb 2008
    Beans
    15

    Re: Nginx repository for Ubuntu/Debian

    No joy. I'm currently using nginx 0.6.35. To make sure we're on the same page about what I did:
    • install nginx from official repos (yours aren't even in sources.list, yet)
    • add your repos to sources.list
    • sudo apt-get update && sudo apt-get upgrade
    • sudo ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx
    • sudo /etc/init.d/nginx restart


    and then things fall apart, as detailed above. Any idea how to investigate the weird file's-here-but-i-can't-see-it syndrome?

    Thanks!

    -a.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •