LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-02-2014, 02:56 PM   #1
slipstreamed
Member
 
Registered: Nov 2010
Posts: 60

Rep: Reputation: 24
Compiling Openresty into a .deb package


I'm trying to compile Openresty 1.7.2.1 into a .deb package for Debian 7 using FPM. Although the FPM compilation is successful and I get a deb file, but when I install it using dpkg somehow the config files are not getting placed in /etc/nginx and obviously when I run /usr/sbin/nginx I get:

Code:
nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
Following are the steps I'm taking for compilation:
Code:
./configure --with-luajit \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-log-path=/var/log/nginx/access.log \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--lock-path=/var/lock/nginx.lock \
--pid-path=/run/nginx.pid \
--with-pcre-jit \
--with-pcre \
--with-http_ssl_module \
--without-http_redis2_module \
--without-http_redis_module \
--without-http_memc_module \
--without-http_memcached_module
Then

Code:
make
INSTALL=/tmp/openresty
make install DESTDIR=$INSTALL
mkdir -p $INSTALL/var/lib/nginx
And finally
Code:
fpm -s dir -t deb -n openresty -v 1.7.2.1 --iteration 1 -C $INSTALL \
--description "Openresty 1.7.2.1" \
-d libpcre3 \
--config-files /etc/nginx/fastcgi.conf.default \
--config-files /etc/nginx/win-utf \
--config-files /etc/nginx/fastcgi_params \
--config-files /etc/nginx/nginx.conf \
--config-files /etc/nginx/koi-win \
--config-files /etc/nginx/nginx.conf.default \
--config-files /etc/nginx/mime.types.default  \
--config-files /etc/nginx/koi-utf \
--config-files /etc/nginx/fastcgi_params.default  \
--config-files /etc/nginx/mime.types \
--config-files /etc/nginx/fastcgi.conf \
etc usr var run
After FPM finishes I get
Code:
Created package {:path=>"openresty_1.7.2.1-1_amd64.deb"}
When I install using dpkg I get only the following files in /etc/nginx:

Code:
cgi_params  scgi_params.default  uwsgi_params  uwsgi_params.default
I don't know what am I doing wrong here?

Last edited by slipstreamed; 08-02-2014 at 03:07 PM.
 
Old 08-02-2014, 06:15 PM   #2
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hi,

I haven't used FPM and I wasn't even aware of it until I read your post, so I may be wrong here, but shouldn't you create the /tmp/openresty directory before running make install?

Something else: if this package is only for personal use (not a professional package), you can also use checkinstall to create the deb. It's in the repos, it's quite easy to use and works in most cases.
 
1 members found this post helpful.
  


Reply

Tags
debian, nginx



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How best to install deb package jkirchner Slackware 5 10-21-2012 12:38 PM
Is there a way to see when a package (.deb) was installed? ravedog Linux - Newbie 6 06-10-2010 03:50 PM
Linux 2.6.20 deb package available nx5000 Debian 4 02-09-2007 03:08 AM
How to make deb package chrisstooss Debian 6 09-16-2005 05:21 PM
help with deb package on Xandros 3.0 xiongnu Debian 2 06-08-2005 11:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration