InstallationSome software packages end with. src. rpm. These software packages are rpm packages that contain source code and need to be compiled during installation. There are two ways to install such software packages:Method 1:1. Execute rpm-ivh your-package.src.rpm2. cd/usr/src/redhat/SPECS3. rpmbuild-bp your-package.specs A specs file with the same name as your package4. cd/usr/src/redhat/BUILD/your-package/a directory with the same name as your p
temporary files generated during the packaging process; RPMS is used to save the generated binary RPM package; SOURCES is used to save the packaged source files (including compressed files); SPECS is used to save. spec script; SRPMS is used to save the generated source code rpm package.
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
Use the following command to generate the macro file required by rpm
-- add myhttpd
% Preun //Operations performed by detaching the rpm package
/Etc/init. d/myhttpd stop
Chkconfig -- del myhttpd
% Changelog //You can use rpm-q -- changelog httpd to define some log files.
* Wed Mar 26 2014 zhangzhg
-First rpm from httpd-2.2.25
[Tom @ server1 ~] $
Step 3: Generate related directories
[Tom @ server1 ~] $ Ls
Httpd-2.2.25.tar.gz httpd. spec
[Tom @ server1 ~] $ Rpmbuild httpd. spec //Generate related directories with Error Type prompts, which is normal
Error: Fi
To install the src. rpm package containing the source code, first install a software rpm-build.
After the software is installed, the/usr/src/RedHat folder is generated in the Red Hat 5 environment. The folder contains the following folders:
BUILDROOT: stores temporary compilation files.
BUILD: stores compiled files
SOURCE: storage SOURCE code package, such as tar.gz tar.bz2
RPMS: stores rpm packages after successful conversion.
SRPMS: stores the src. rpm package to be converted.
Install rpmbuild
Sudo yum install rpm-buildConfigurations of common users
/Home/you/rpmbuild/assume that the rpm directory is to be built
Let's talk about the usage of rpmbuild. Here is an example:
Echo "% _ topdir/home/you/rpmbuild"> ~ /. Rpmmacros
Mkdir-p/home/you/rpmbuild/{SPECS, BUILD, SRPMS, RPMS, SOURCES}
The configuration in/usr/lib/rpm/macros allows you to change the specific build configuration item. If an error occurs, you can modify this
practice is the correct content, citing a lot of specifications content:
OK, so let's walk through the specs here. https://drafts.csswg.org/cssom-view/#dom-element-getclientrects says:
If the element on which it is invoked does not has an associated layout box return a empty sequence and stop this Algor Ithm.
where "layout box" links to https://drafts.csswg.org/cssom-view/#layout-box which says, a "layou
packageInstallation: Rpm-rebuild *.src.rpm Cd/usr/src/dist/rpms Description: The rpm--rebuild *.src.rpm command compiles the source code and generates a binary RPM package under/usr/src/dist/rpms, and then installs the binary package. Packgename as mentioned earlier, the two methods are as follows:FA 1:rpm-i your-package.src.rpmcd/usr/src/redhat/specsrpmbuild-bp your-package.specs #一个和你的软件包同名的specs文件cd/usr /src/redhat/build/your
In the words "Automake: from C to make", I started with a C language source code file and made a standard tar package.
How do I make an RPM package with a bar bag?
I have learned how to make RPM packages by referring to Linuxfans.org's article, "the RPM package principle (update 2010.11.22)". The following will show the process. establish a development environment first need software such as compilers
Yum Groupinstall "Development Tools"
and then do a little bit of the RPM configuration
E
Recently a lot of friends asked how to make the RPM package, you can not compile the other server on the software directory complex to other servers directly apply and so on ... Here is a simple introduction, advanced complex does not.
This method uses Rpmbuild to complete an RPM package by writing a spec file.
Take Nginx as an example to introduce
Production platform: CentOS 5.x x86_64
Four Step walk:
The first step: building the directory structure
MKDIR/USR/SRC/REDHAT/{SOURCES,
Run File hints:
/usr/local/tools/fetion:/lib/libgcc_s.so.1:version ' gcc_4.2.0 ' not found (required by/usr/local/tools/fetion/lib/ libstdc++.so.6)
View/lib/libgcc_s.so.1 file exists, is a link
[Root@localhost tools]# Ll/lib/libgcc_s.so.1
lrwxrwxrwx 1 root 28 March 08:16/lib/libgcc_s.so.1-> libgcc_s-3.4.3-20041213.so.1
View the GCC version of the system is gcc (GCC) 3.4.3
[Root@localhost ~]# gcc--version
GCC (gcc) 3.4.3 20041212 (Red Hat 3.4.3-9.el4)
So want to upgrade GCC, did not find gcc_4.2.
Compile Fedora kernel from src RPM package for Fedora 8 and later versions
Reference Http://fedoraproject.org/wiki/Docs/CustomKernel
All of the following commands are run under a non-root user
preparatory work
Before you begin, make sure that the following necessary packages are installed on the system:
Yum-utils
Rpmdevtools
The following command can be used to install:
Su-c ' yum install yum-utils rpmdevtools '
Where Yum-utils package provides Yumdownloader and YUM-BUILDDEP these two
information.
Just one place in the code. Note that each data is converted to lowercase when the signature is generated.
At the end of this section there is demo download.
Successful Data acquisition
When looking at the log output below the information, I know already victory in sight, integrated so many interfaces, the process is almost the same, a few hours to get it, of course, to achieve all the interface, so that orders run up, there is a lot of work to do, and so on the back of the emp
This is the first technical blog that I wrote on CSDN, because I have recently been working on RPM packaging. Share it today. The advantage of RPM is that installation and post-upgrade are quick and easy, eliminating the need to manually compile the source code again. Save a lot of time. Here the Nginx Server installation package is tested for an instance.
Environment:
1. System: CentOS release 6.5 (Final) x86_64
2. Hardware: KVM virtual machine, dual core cpu,2g memory, 50G HDD
3.user: Using
-ba xx.spec #生成rpmbuild目录以及子目录[[email protected] ~]# ls rpmbuild/BUILD buildroot RPMS SOURCES SPECS SRPMSSOURCES: directory where source packages are storedSPECS: Configuration file (basic information, source installation)BuildRoot: Rhizoids (for rpmbuild This software, packed under this root, does not affect the real root)RPMS: The position of the finished product, RPM package3) Prepare to copy the source software to the sources directoryIn the case
Some software packages end with. src. rpm. These software packages are rpm packages that contain source code and need to be compiled during installation. There are two ways to install such software packages:
Method 1:1. Execute rpm-I your-package.src.rpm2. cd/usr/src/redhat/SPECS3. rpmbuild-bp your-package.specs A specs file with the same name as your package4. cd/usr/src/redhat/BUILD/your-package/a directory with the same name as your package5 ../co
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.