in reply to Install perl packages using yum
If your OS package manager doesn't have the modules/versions you need install them via cpan, or manually:
cpan Search-Elasticsearch
Manually (download, extract etc):
perl Makefile.PL make make test make install
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Install perl packages using yum
by mrdvt92 (Acolyte) on Apr 08, 2020 at 14:26 UTC | |
I know this is an old post but this information is not readily available. On a packaged managed system like CentOS, please do not use cpan to install packages. It is not an enterprise solution since most companies will not let you install software from the Internet for production systems and you will just have to figure out some other way to package your software anyway. The correct method is to build your own RPMs with `cpanspec`.
Unfortunately, for Excel-Writer-XLSX, cpanspec did not pick up the installed man page and script in /usr/bin.
So, I had to manually add those paths to the SPEC %files section and try again.
Then rebuild it
At this point you now have an RPM that you could put on your yum repository and it will be available for all of your systems. Or install it with yum from the command line
Bonus points Sign your rpms
Build your own yumrepo with createrepo. If your path is /var/www/html/yumrepo then your yumrepo will be at http://127.0.0.1/yumrepo/ requires `yum install httpd`
Configure your yum repo on the client systems (change 127.0.0.1 to your host name)
Clean up your older rpm repo versions with repomanage
| [reply] [d/l] [select] |
by marto (Cardinal) on Apr 08, 2020 at 15:19 UTC | |
I tend to avoid using the OS perl whenever possible. When dealing with the system perl, the OS package manager should use used. "It is not an enterprise solution since most companies will not let you install software from the Internet for production systems and you will just have to figure out some other way to package your software anyway." This depends upon your environment. We have no direct internet connections. A cpan mirror (crated using minicpan on a system which does have interwebs access) allows us to build what we need before deploying fleet wide.
Here you are still just downloading software from the internet, repackaging it and later deploying it, albeit with the OS package manager, Archive::Zip isn't core so I think you'd have to use cpanspec --follow to ensure you satisfy dependencies: "If you are feeling really lucky (or maybe crazy), you can also have cpanspec build a binary rpm by passing the -b (or --build) option. As of version 1.66, you can also use --follow to have cpanspec fetch any build dependencies that aren't already available." | [reply] [d/l] [select] |