How to set a custom install directory for a deb package with fpm

0 votes

while using fpm to create a deb package, if I try to install that deb package, it is being installed inside the wrong directory:

Command:

fpm -f -s "dir" -t "deb" -a "all" -n "my_project" -v 1 -C "/tmp/tmpoklyPn" /tmp/tmpoklyPn/myproject

The folder I want to package exists at /tmp/tmpoklyPn/myproject, but when I run:

dpkg -i my_package.deb

it installs it into /tmp/tmpoklyPn/myproject, ideally i'd like it to install into /var/lib/myproject. I  have tried --installdir and --root with my dpkg command, but it complains with cannot access archive: No such file or directory

Other information:

  • I'm using a ubuntu vm
  • I'm not bound to fpm and happy to hear other viable suggestions
  • inside myproject is a python virtualenv and my django project
Mar 26, 2018 in Big Data Hadoop by ajs3033
• 7,300 points
1,520 views

1 answer to this question.

0 votes

Here's something that you can try...

the last argument in an fpm command can contain an equals operator which defines the direcotry to come from and to install to.

Try using this command instead

fpm -f -s "dir" -t "deb" -a "all" -n "myproject" -v 1 -C "/tmp/tmpoklyPn" myproject=/var/lib/myproject

Notice the myproject=/var/lib/myproject, the left side is the directory name of my project (relative, because I used -C to change directory to /tmp/tmpoklyPn before looking for packages) and on the right side is where I want to install to on the remote machine...

the myproject=/var/lib/myproject, the left side is the directory name of the project and on the right side is where I want to install to on the remote machine. This is because  you used -C to change directory to /tmp/tmpoklyPn before looking for packages

answered Mar 26, 2018 by Amrinder
• 140 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to set Hue Plugin for JobTracker on a different host?

When the JobTracker and the Hue Server ...READ MORE

answered May 24, 2019 in Big Data Hadoop by Jishan
805 views
0 votes
1 answer

How to install and configure a multi-node Hadoop cluster?

I would recommend you to install Cent ...READ MORE

answered Mar 22, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,419 views
0 votes
1 answer

How to create a FileSystem object that can be used for reading from and writing to HDFS?

Read operation on HDFS In order to read ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points

edited Mar 22, 2018 by nitinrawat895 3,037 views
0 votes
1 answer

How to delete a directory from Hadoop cluster which is having comma(,) in its name?

Just try the following command: hadoop fs -rm ...READ MORE

answered May 7, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
3,062 views
0 votes
1 answer

Is there any way to include a python package with Hadoop streaming job?

See I don't know the answer to ...READ MORE

answered May 10, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
2,195 views
0 votes
1 answer

How to avoid a “split-brain” scenario with NameNodes?

Okay, so let me tell you that ...READ MORE

answered Jul 11, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
4,479 views
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
3,925 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP