rpm包的制作真几把烦,制作php的rpm花了我3天时间,因为是根据线上环境来做的,依赖的第三方库太多,本来想把所有的第三方库做进php包,后来发现在rpmbuild -bb的时候非常耗时,而且乱七八糟的错满天飞,好不容易全部解决了第一次成功第二次又不行了,因此决定能用yum安装的就用yum安装,没有的才用源码。

1、安装rpm-build和rpmdevtools

  yum install rpmdevtools rpm-build

2、生成制作rpm包的必备目录,没有安装rpmdevtools则无法使用以下命令

  cd ~

  rpmdev-setuptree

  此时,你的家目录中有一个rpmbuild文件夹,里面有5个文件夹,分别是SPEC,SOURCE,RPMS,BUILD,SRPMS。spec文件夹存放书写生成rpm包的文件,rpms存放生成的rpm包,build存放生成rpm包过程中产生的文件,SRPMS存放srpm包,source存放源码文件和你要装入系统的文件

3、生成过程

  将nginx/php的源码包、配置文件,init.d中的启动文件放入source目录下,进入spec文件夹,写spec文件

  nginx.spec

%define nginx_user nginx
#after compile no dependies check
AutoReqProv: no Name: tengine
Version: 2.1.
Release: %{?dist}
Summary: Tengine from taobao Group: System Environment/Daemons
License: GPLv2
URL: http://www.nginx.org/downloads/nginx-1.2.1.tar.gz
Source0: %{name}-%{version}.tar.gz
Source1: tengine.init
#Source2: pcre-8.32.tar.gz
BuildRoot: %{_topdir}/BUILDROOT/%{name}-%{version}-%{release} BuildRequires: gcc,make
#Requires: pcre,pcre-devel,openssl,openssl-devel,zlib,zlib-devel
#Requires(post): info
#Requires(preun):info
%description
nginx from taobao %prep
%setup -q %build export DESTDIR=%{buildroot}
./configure\
--prefix=/usr/local/sina_mobile/tengine\
--sbin-path=/usr/local/sina_mobile/tengine/sbin/nginx\
--conf-path=/usr/local/sina_mobile/tengine/conf/nginx.conf\
--error-log-path=/usr/local/sina_mobile/tengine/logs/error.log\
--http-log-path=/usr/local/sina_mobile/tengine/logs/access.log\
--pid-path=/usr/local/sina_mobile/tengine/logs/nginx.pid\
--http-client-body-temp-path=/usr/local/sina_mobile/tengine/client_body_temp \
--http-proxy-temp-path=/usr/local/sina_mobile/tengine/proxy_temp \
--http-fastcgi-temp-path=/usr/local/sina_mobile/tengine/fcgi_temp \
--http-uwsgi-temp-path=/usr/local/sina_mobile/tengine/uwsgi_temp \
--http-scgi-temp-path=/usr/local/sina_mobile/tengine/scgi_temp \
--user=%{nginx_user}\
--group=%{nginx_user}\
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-http_realip_module\
--with-pcre=/usr/local/src/pcre-8.32\
--with-openssl=/usr/local/src/openssl-1.0.1t\
--with-zlib=/usr/local/src/zlib-1.2.
# --with-pcre
make %{?_smp_mflags} %install
rm -rf %{buildroot}%{_infodir}/dir
make install DESTDIR=%{buildroot}
install -p -D -m %{SOURCE1} %{buildroot}/etc/rc.d/init.d/nginx
#install -p -D -m %{SOURCE2} %{buildroot}/usr/local/src/pcre-8.32.tar.gz
#install -p -d -m %{buildroot}/usr/local/nginx/sbin
#install -p -d -m %{buildroot}/usr/local/nginx/conf
#install -p -d -m %{buildroot}/usr/local/nginx/log %pre
if [ $ == ];then
/usr/sbin/useradd -s /bin/false -r %{nginx_user} >/dev/null || :
fi %post
if [ $ == ];then
/sbin/chkconfig --add nginx
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir >/dev/null || :
fi
%preun
if [ $ == ];then
/sbin/service nginx stop > /dev/null >&
/sbin/chkconfig --del nginx
/usr/sbin/userdel -r %{nginx_user} > /dev/null
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir >/dev/null || :
fi %postun
rm -rf /usr/local/sina_mobile/tengine/sbin
rm -rf /usr/local/sina_mobile/tengine/conf
rm -rf /usr/local/sina_mobile/tengine/*_temp
rm -rf /usr/local/sina_mobile/tengine/include
rm -rf /usr/local/sina_mobile/tengine/html
rm -rf /usr/local/sina_mobile/tengine/modules
#rm -rf /usr/local/src/pcre-8.32
rm -f /etc/rc.d/init.d/nginx %clean
rm -rf %{buildroot} %files
%defattr(-,root,root,-)
#/usr/local/src/pcre-8.32
/usr/local/sina_mobile/tengine/*
%attr(0755,root,root) /etc/rc.d/init.d/nginx %changelog
* Fri Jul 5 2016 laoguang <weijing@qq.com> - 2.1.2-1.el6
- Initial version

rpmbuild -bb nginx.spec即可生成rpm包

php.spec

%define         php_path        /usr/local/sina_mobile/phpfpm538
%define dep_path /usr/local/sina_mobile
%define debug_package %{nil}
#AutoReq: 0          #阻止rpm自动解析需要的依赖,当你确定你使用的库都会在本文件中安装,则可以使用此选项
#AutoProv: 0          #阻止rpm自动解析提供的依赖 Name: php
Version: 5.3.
Release: %{?dist}
Summary: PHP is a server-side scripting language for creating dynamic Web page
Group: System Environment/Daemons
License: GPLv2
URL: http://www.php.net/downloads/php-5.3.8.tar.gz
Source0: %{name}-%{version}.tar.gz
Source1: libiconv-1.14.tar.gz
#Source2: libxml2-2.7..tar.gz
Source3: libpng-1.5..tar.gz
Source4: freetype-2.4..tar.gz
Source5: libmcrypt-2.5..tar.gz
Source6: gd-2.0..tar.gz
#Source7: mysql-5.5..tar.gz
Source8: jpegsrc.v8d.tar.gz
Source9: php-fpm
Source10: php-fpm.conf
BuildRoot: %{_topdir}/BUILDROOT/%{name}-%{version}-%{release}
BuildRequires: gcc,gcc-c++,make,cmake,ncurses-devel,bison,openssl-devel,libcurl-devel,gdbm-devel,openldap-devel,libtidy-devel,zlib-devel,libxml2-devel,libpng-devel
#Requires: libtool,gd-devel,mhash
%description
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. %prep
%setup -q -b -b -b -b -b -b %build
cd ../jpeg-8d
./configure --prefix=%{dep_path}/jpeg
make %{?_smp_mflags} cd ../libpng-1.5.
./configure --prefix=%{dep_path}/libpng
CFLAGS="-O3 -fPIC"
make %{?_smp_mflags} cd ../freetype-2.4.
./configure --prefix=%{dep_path}/freetype
CFLAGS="-O3 -fPIC"
make %{?_smp_mflags} cd ../gd-2.0.
./configure --prefix=%{dep_path}/gd --with-jpeg=%{dep_path}/jpeg --with-freetype=%{dep_path}/freetype --with-png=%{dep_path}/libpng
CFLAGS="-O3 -fPIC"
make %{?_smp_mflags} cd ../libiconv-1.14
./configure --prefix=%{dep_path}/libiconv
CFLAGS="-O3 -fPIC"
make %{?_smp_mflags} #cd ../libxml2-2.7.
#./configure --prefix=%{dep_path}/libxml2
#CFLAGS="-O3 -fPIC"
#make %{?_smp_mflags} #cd ../mysql-5.5.
#cmake -DCMAKE_INSTALL_PREFIX=%{dep_path}/mysql
#make %{?_smp_mflags} cd ../libmcrypt-2.5.
./configure --prefix=%{dep_path}/libmcrypt
CFLAGS="-O3 -fPIC"
make %{?_smp_mflags}
cd libltdl
./configure --prefix=%{dep_path}/libltdl --enable-ltdl-install
make %{?_smp_mflags} cd ../../php-5.3.
./configure\
--prefix=%{php_path} \
--with-config-file-path=%{php_path}/etc\
--with-iconv-dir=%{dep_path}/libiconv\
--with-mysql=%{dep_path}/mysql\
--with-mysqli=%{dep_path}/mysql/bin/mysql_config\
--with-pdo-mysql=%{dep_path}/mysql\
--with-mcrypt=%{dep_path}/libmcrypt\
--with-png-dir=%{dep_path}/libpng\
--with-freetype-dir=%{dep_path}/freetype\
--with-libxml-dir=%{dep_path}/libxml2\
--with-jpeg-dir=%{dep_path}/jpeg\
--with-gd\
--with-zlib\
--with-openssl\
--with-pear\
--with-gettext\
--enable-fpm\
--enable-safe-mode\
--enable-mbstring\
--enable-zip\
--enable-soap\
--enable-sysvsem\
--enable-shmop\
--enable-sockets\
--enable-ftp\
--enable-gd-native-ttf\
--enable-bcmath\
--with-gdbm\
--with-curl\
--with-mhash\
--with-curlwrappers\
--with-ldap\
--enable-pcntl\
--enable-maintainer-ztswith-xmlrpc\
--with-tidy
make %{?_smp_mflags} %install
rm -rf %{buildroot}
rm -rf %{buildroot}/{.channels,.depdb,.depdblock,.filemap,.lock,.registry}
cd ../jpeg-8d
mkdir -p %{buildroot}/usr/local/bin/{bin,include,lib,man/man1}
make install DESTDIR=%{buildroot}
cd ../libpng-1.5.
make install DESTDIR=%{buildroot}
cd ../freetype-2.4.
make install DESTDIR=%{buildroot}
cd ../gd-2.0.
make install DESTDIR=%{buildroot}
cd ../libiconv-1.14
make install DESTDIR=%{buildroot}
#cd ../libxml2-2.7.
#make install DESTDIR=%{buildroot}
#cd ../mysql-5.5.
#make install DESTDIR=%{buildroot}
cd ../libmcrypt-2.5.
make install DESTDIR=%{buildroot}
cd libltdl
make install DESTDIR=%{buildroot}
cd ../../php-5.3.
make install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_initrddir}
install -p -D -m %{SOURCE9} %{buildroot}%{_initrddir}/php-fpm
install -p -D -m %{SOURCE10} %{buildroot}%{php_path}/etc/php-fpm.conf
install -p -D -m php.ini-production %{buildroot}%{php_path}/etc/php.ini #Grep reports BUILDROOT inside our object files; disable that test.
QA_SKIP_BUILD_ROOT=1          #忽略buildroot检查,这在生成rpm包时报错found ${buildroot} in installed files;abort时,可以加此参数避过检查
QA_RPATHS=$[ 0x0001|0x0010 ]     #禁止rpath检查,这在生成rpm包时出现图一情况可以加此参数 
export QA_SKIP_BUILD_ROOT       
export QA_RPATHS %clean
rm -rf %{buildroot} %post
if [ $ == ];then
/bin/ln -s /usr/lib64/libldap* /usr/lib > /dev/null >&
cat >/etc/profile.d/php.sh<<EOF
PATH=$PATH:%{dep_path}/gd/bin:%{dep_path}/libmcrypt/bin:%{dep_path}/libiconv/bin:%{dep_path}/libpng/bin:%{dep_path}/libxml2/bin:%{dep_path}/mysql/bin:%{dep_path}/freetype/bin
EOF
source /etc/profile.d/php.sh
cat >/etc/ld.so.conf.d/php.conf<<EOF
%{dep_path}/libiconv/lib
%{dep_path}/libmcrypt/lib
%{dep_path}/libltdl/lib
%{dep_path}/gd/lib
%{dep_path}/libpng/lib
%{dep_path}/mysql/lib
#%{dep_path}/libxml2/lib
%{dep_path}/freetype/lib
EOF
/sbin/ldconfig > /dev/null >&
[ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=%{php_path}/bin:\$PATH" >> /etc/profile
[ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep '%{php_path}' /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=%{php_path}/bin:\1@" /etc/profile
/sbin/chkconfig --add php-fpm
/sbin/chkconfig php-fpm on
Mem=`free -m | awk '/Mem:/{print $2}'` #下面主要是参数的优化
if [ $Mem -le ];then
Mem_level=512M
Memory_limit=
elif [ $Mem -gt -a $Mem -le ];then
Mem_level=1G
Memory_limit=
elif [ $Mem -gt -a $Mem -le ];then
Mem_level=2G
Memory_limit=
elif [ $Mem -gt -a $Mem -le ];then
Mem_level=3G
Memory_limit=
elif [ $Mem -gt -a $Mem -le ];then
Mem_level=4G
Memory_limit=
elif [ $Mem -gt -a $Mem -le ];then
Mem_level=6G
Memory_limit=
elif [ $Mem -gt ];then
Mem_level=8G
Memory_limit=
fi
sed -i "s@^memory_limit.*@memory_limit = ${Memory_limit}M@" %{php_path}/etc/php.ini
sed -i 's@^output_buffering =@output_buffering = On\noutput_buffering =@' %{php_path}/etc/php.ini
sed -i 's@^;cgi.fix_pathinfo.*@cgi.fix_pathinfo=0@' %{php_path}/etc/php.ini
sed -i 's@^short_open_tag = Off@short_open_tag = On@' %{php_path}/etc/php.ini
sed -i 's@^expose_php = On@expose_php = Off@' %{php_path}/etc/php.ini
sed -i 's@^request_order.*@request_order = "CGP"@' %{php_path}/etc/php.ini
sed -i 's@^;date.timezone.*@date.timezone = Asia/Shanghai@' %{php_path}/etc/php.ini
sed -i 's@^post_max_size.*@post_max_size = 50M@' %{php_path}/etc/php.ini
sed -i 's@^upload_max_filesize.*@upload_max_filesize = 50M@' %{php_path}/etc/php.ini
sed -i 's@^;upload_tmp_dir.*@upload_tmp_dir = /tmp@' %{php_path}/etc/php.ini
sed -i 's@^max_execution_time.*@max_execution_time = 5@' %{php_path}/etc/php.ini
sed -i 's@^disable_functions.*@disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen@' %{php_path}/etc/php.ini
sed -i 's@^session.cookie_httponly.*@session.cookie_httponly = 1@' %{php_path}/etc/php.ini
sed -i 's@^mysqlnd.collect_memory_statistics.*@mysqlnd.collect_memory_statistics = On@' %{php_path}/etc/php.ini
#cat > %{php_path}/etc/php-fpm.conf < /dev/null >&
if [ -e '/etc/profile.d/custom_profile_new.sh' ];then
sed -i 's@%{php_path}/bin:@@' /etc/profile.d/custom_profile_new.sh
else
sed -i 's@%{php_path}/bin:@@' /etc/profile
fi
fi
%preun
if [ "$1" = ] ; then
/sbin/service php-fpm stop > /dev/null >&
/sbin/chkconfig --del php-fpm
fi %postun
if [ "$1" = ] ; then
/bin/rm -rf %{php_path}
/bin/rm -rf %{dep_path}/libmcrypt
/bin/rm -rf %{dep_path}/libiconv
/bin/rm -rf %{dep_path}/libltdl
/bin/rm -rf %{dep_path}/libpng
# /bin/rm -rf %{dep_path}/libxml2
# /bin/rm -rf %{dep_path}/mysql
/bin/rm -rf %{dep_path}/freetype
/bin/rm -rf %{dep_path}/gd
/bin/rm -rf /etc/profile.d/php.sh
/bin/rm -rf /etc/ld.so.conf.d/php.conf
fi
%files
%defattr(-,root,root,-)
%{dep_path}/libmcrypt
%{dep_path}/libltdl
%{dep_path}/libiconv
%{dep_path}/libpng
#%{dep_path}/libxml2
%{dep_path}/jpeg
#%{dep_path}/mysql
%{dep_path}/freetype
%{dep_path}/gd
%{php_path}
%config(noreplace) %{php_path}/etc/php-fpm.conf
%config(noreplace) %{php_path}/etc/php.ini
%attr(,root,root) /etc/rc.d/init.d/php-fpm
%exclude /.channels
%exclude /.depdb
%exclude /.depdblock
%exclude /.filemap
%exclude /.lock %changelog
* Tue Jul wejing <weijing@qq.com> - 5.3.-.el6
- Initial version

php-fpm里面关于php的路径需要修改为实际安装的路径,此文件在源码包的support-files中有

php-fpm.conf将pid,log等几个参数的注释去掉,然后就能启动了

使用此php包的前提是已经安装了mysql,并且系统能找到libmysqlclient.so.18

mysql.spec

%define mysql_user mysql
%define mysql_group mysql
%define debug_package %{nil}
AutoReq: Name: mysql
Version: 5.5.
Release: %{?dist}
Summary: database Group: System Environment/Daemons
License: GPLv2
URL: http://www.mysql.com/downloads/%{name}-%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
Source1: mysql3306.cnf
Source2: mysql
BuildRoot: %{_topdir}/%{name}-%{version}-%{release} #BuildRequires: gcc-c++,ncurses,ncurses-devel,bison,cmake,zlib %description %prep
%setup -q %build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/sina_mobile/mysql -DWITH_MYISAM_STORAGE_ENGINE= -DWITH_INNOBASE_STORAGE_ENGINE= -DWITH_ARCHIVE_STORAGE_ENGINE= -DWITH_BLACKHOLE_STORAGE_ENGINE= -DWITH_MEMORY_STORAGE_ENGINE= -DWITH_PARTITION_STORAGE_ENGINE= -DWITH_PERFSCHEMA_STORAGE_ENGINE= -DWITH_PIC= -DWITH_READLINE= -DWITH_DEBUG= -DENABLED_LOCAL_INFILE= -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -Wno-dev
make %{?_smp_mflags} %install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
install -p -D -m %{SOURCE1} %{buildroot}/data/mysql3306/mysql3306.cnf
install -p -D -m %{SOURCE2} %{buildroot}/etc/init.d/mysql %pre
if [ $ == ];then
/usr/sbin/groupadd mysql
/usr/sbin/useradd -r %{mysql_user} -M -g %{mysql_group} -s /bin/false >/dev/null || :
fi %post
if [ $ == ];then
/bin/chown -R mysql:mysql /usr/local/sina_mobile/mysql
/usr/local/sina_mobile/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/sina_mobile/mysql --datadir=/data/mysql3306
/bin/chown -R root /usr/local/sina_mobile/mysql
/bin/chown -R mysql /data/mysql3306
#/bin/cp /usr/local/sina_mobile/mysql/support-files/mysql.server /etc/init.d/mysql
#/bin/sed -i "s@^basedir=@basedir=/usr/local/sina_mobile/mysql@g;s@^datadir=@datadir=/data/mysql3306@g;s@conf=/etc/my.cnf@conf=/data/mysql3306/mysql3306.cnf@g" /etc/init.d/mysql
#/bin/chmod /etc/init.d/mysql
/sbin/chkconfig --add mysql
#/bin/echo "PATH=$PATH:/usr/local/sina_mobile/mysql/bin" >/etc/profile.d/mysql.sh
#source /etc/profile.d/mysql.sh
#/bin/echo "/usr/local/sina_mobile/mysql/lib" > /etc/ld.so.conf.d/mysql.conf
#/sbin/ldconfig > /dev/null >&
/bin/ln -s /data/mysql3306/mysql3306.sock /tmp/mysql.sock >/dev/null
/bin/ln -s /usr/local/sina_mobile/mysql/bin/* /usr/local/bin/
/bin/ln -s /usr/local/sina_mobile/mysql/scripts/* /usr/local/bin/
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
fi %preun
if [ $1 == 0 ];then
/sbin/service mysql stop > /dev/null 2>&1
/sbin/chkconfig --del mysql
#/usr/sbin/userdel -r %{mysql_user} 2> /dev/null
#/usr/sbin/groupdel %{mysql_user} 2> /dev/null
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
fi %postun
#rm -rf /etc/profile.d/mysql.sh
#rm -rf /etc/ld.so.conf.d/mysql.conf
rm -rf /tmp/mysql.sock
rm -rf /usr/local/bin/mysql*
rm -rf /usr/local/bin/myisam*
rm -rf /usr/local/bin/resolve*
rm -rf /usr/local/bin/{innochecksum,msql2mysql,my_print_defaults,perror,replace}
rm -rf /usr/local/sina_mobile/mysql/*
rm -rf /etc/init.d/mysql %clean
rm -rf %{buildroot} %files
%defattr(-,root,root,-)
/usr/local/sina_mobile/mysql/*
/data/mysql3306/mysql3306.cnf
%attr(0755,root,root) /etc/init.d/mysql
%doc %changelog
* Thu Jul 21 2016 weijing <645509024@qq.com> - 5.5.29-1.el6
- Initial version

全部搞定,搞了爸爸一周,不过感觉对于包管理和rpm打包的流程清晰了很多,可能以后安装别的包发生了dependence错误会更清楚的知道哪里出了问题

附上友情链接:

http://blog.digitalstruct.com/2011/12/21/rpm-packaging-building-and-deploying-your-own-php/    这是制作php的

http://www.centoscn.com/image-text/config/2014/1201/4215.html                    这是制作nginx

http://www.bkjia.com/Linuxjc/1088197.html                              这是制作rpm包出错的解决方法

http://ju.outofmemory.cn/entry/95476                                 这是rpm包每个字段的解释

http://fedoraproject.org/wiki/How_to_create_an_RPM_package                      这是fedora的官方文档,英语牛逼的可以直接看这个

制作nginx和php的rpm包的更多相关文章

  1. 编译制作Linux 3.18内核rpm包(升级centos6.x虚拟机内核)

    介绍 openstack平台需要使用各种Linux发行版模板镜像,其制作方法主要有两种,要么是基于各大Linux发行版ISO光盘手动制作,要么是使用官方提供的模板镜像再做修改 之前制作的opensta ...

  2. RPM包制作方法

    一.RPM介绍 RPM 前是Red Hat Package Manager 的缩写,本意是Red Hat 软件包管理,顾名思义是Red Hat 贡献出来的软件包管理:现在应为RPM Package M ...

  3. 一步步制作RPM包

    一步步制作RPM包 来源 http://blog.51cto.com/laoguang/1103628 一.RPM制作步骤 我们在企业中有的软件基本都是编译的,我们每次安装都得编译,那怎么办呢?那就根 ...

  4. RPM包定制

    概述 问题:当领导给你 100 台已经安装好系统的服务器,然后让优化,让你提出一个快速部署方案.解答: 1.tar 打包 先编译安装 打包-->分发-->解包(比如 mysql 打包后直接 ...

  5. 利用fpm定制rpm包

    环境说明 系统版本    CentOS 6.9 x86_64 软件版本    fpm-1.4.0 1.安装ruby环境 fpm利用ruby编程语言开发,先安装ruby的环境 [root@m01 ~]# ...

  6. 其他综合-搭建本地yum仓库及自制rpm包

    搭建本地yum仓库及自制rpm包 实验目的 为方便本地 yum 的管理,建本地 yum 仓库,实现局域网内部快速安装常用软件 实验环境 VMware:12版本 系统版本:CentOS Linux re ...

  7. 搭建yum仓库与定制rpm包

    笔者Q:972581034 交流群:605799367.有任何疑问可与笔者或加群交流 当我们自动化部署集群的时候,想要快速的安装所有服务,搭建yum仓库与定制rpm包是我们首先要做的 原创作品,转载请 ...

  8. DIY的RPM包怎么签名呢 - 笔记

    参考 https://gist.github.com/fernandoaleman/1376720 如果打不开上一个连接,请参考https://www.cnblogs.com/LiuYanYGZ/p/ ...

  9. 制定RPM包和加入YUM源

    ##################################################### ##如有转载,请务必保留本文链接及版权信息 ##欢迎广大运维同仁一起交流linux/unix ...

随机推荐

  1. MVC学习笔记索引帖

    [MVC学习笔记]1.项目结构搭建及单个类在各个层次中的实现 [MVC学习笔记]2.使用T4模板生成其他类的具体实现 [MVC学习笔记]3.使用Spring.Net应用IOC(依赖倒置) [MVC学习 ...

  2. 【循序渐进学Python】12.Python 正则表达式简介

    正表达式就是一段匹配文本片段的模式,在Python 中 re 模块包含了对正则表达式(regular expression)的支持. 1. 正则表达式的基本概念 1. 通配符 点号( . )可以匹配换 ...

  3. JPA学习(3)JPA API

    在我们的jpa的helloworld中,我们看到了简单的一个jpa保存操作,下面就来好好学习一下,JPA最主要的几个类 1.基本的几个类: ①:Persistence 类是用于获取 EntityMan ...

  4. 【NOIP训练】【规律+数论】欧拉函数的应用

    Problem 1 [题目大意] 给出 多组数据 ,给出  求出 . 题解 证明:  除了 以为均为偶数, 所以互质的个数成对. 由 得 . 所以对于每对的和为 , 共有 对 . 则 Problem ...

  5. (旧)子数涵数·PS——文字人物

    首先我们来看一下我用到的素材(在百度图库里下载的). 一.打开PS,在PS中打开素材. 二.复制一个图层(好习惯不解释). 三.图像->调整->阈值,或者按下图示按钮后选择阈值,弹出阈值窗 ...

  6. python函数和常用模块(一),Day3

    set集合 函数 三元运算 lambda表达式 内置函数1 文件操作 set集合 创建 se = {"123", "456"} # 直接创建一个集合 se = ...

  7. [转载]hashmap hashtable 的区别

    Hashtable 和 HashMap 做为 Map 的基本特性 两者都实现了Map接口,基本特性相同 -          对同一个Key,只会有一个对应的value值存在 -          如 ...

  8. 总结一下SQL的全局变量

    SQL Server 2008中的全局变量及其用法 T-SQL程序中的变量分为全局变量和局部变量两类,全局变量是由SQL Server系统定义和使用的变量.DBA和用户可以使用全局变量的值,但不能自己 ...

  9. Play Framework框架 JPA惯用注解

    Play Framework框架 JPA常用注解 1.@Entity(name=”EntityName”) 必须 ,name 为可选 , 对应数据库中一的个表 2.@Table(name=”" ...

  10. JS中标准对象

    JS中标准对象1:不要使用new Number().new Boolean().new String()创建包装对象:2:用parseInt()或parseFloat()来转换任意类型到number: ...