In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Now with the increase of production servers, I found that java based applications are particularly many, the system default comes with openjdk I am re-making kickstart, it is deleted, for jdk, our company's specified path is/usr/local/jdk, the company requires tar package to install...
For convenience, I think I'll make it an rpm package and put it in the/iso/media/Packages/directory of the system image, and configure the environment variables.
rpmbuild, for students who are not familiar with SPEC, it is difficult, so take a look at fpm this tool, packaging rpm is very convenient.
①yum installation related package
yum -y install ruby-devel ruby-rdoc
② Download rubygems
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.25.zip
Remove rubygems.
unzip rubygems-1.8.25.zip
④ Install ruby library
cd rubygems-1.8.25 && ruby setup.rb
Install fpm(slow, patient, etc.)
gem install fpm
I installed jdk under/usr/local/jdk
Run the following command directly from the root directory
fpm -s dir -a all -t rpm -n "jdk" -v 1.7.0.45 /usr/local/jdk
Okay, you'll see an rpm pack for jdk, everybody try it!!!
Supplement: If you encounter such an error
Need executable 'rpmbuild' to convert dir to rpm {:level=>:error}
Usually because you need to install rpmbuild
Yum -y install rpm-build can solve this problem
If you also need to execute the relevant initialization script after the regenerated rpm package, you can use the-post-install parameter
For example, I just installed a version 2.6 mongodb database with the source package
After I pack it, I hope that the startup script/etc/init.d/mongod I created can also be typed in.
Just write the script to the mongodb installation directory and use the--post-install parameter!
My mongodb directory is at/opt/mongodb, write an initialization script file
vi /opt/mongodb/postinstall
#################################
cat >> /etc/init.d/mongod
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.