pure-ftpd rpmbuild rpm file

Name:           pure-ftpdVersion:        1.0.36Release:        1%{?dist}Summary:        Pure-FTPd

Group:          System Environment/DaemonsLicense:        BSDURL:            http://www.pureftpd.orgSource0:        ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.36.tar.bz2Source1:        http://machiel.generaal.net/files/pureftpd/ftp_v2.1.tar.gzBuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)Vendor:         itnihao@qq.com

BuildRequires: gccRequires:      shadow-utils%descriptionPure-FTPd is a free (BSD), secure, production-quality and standard-conformant FTP server. It doesn't provide useless bells and whistles, but focuses on efficiency and ease of use. It provides simple answers to common needs, plus unique useful features for personal users as well as hosting providers.

%prep%setup -q

%build./configure --prefix=/usr/local/pureftpd \--with-mysql \--with-pam \--with-shadow \--with-welcomemsg \--with-uploadscript \--with-cookie \--with-virtualchroot \--with-virtualhosts \--with-diraliases \--with-quotas \--with-puredb \--with-sysquotas \--with-ratios \--with-ftpwho \--with-throttling \--with-language=simplified-chinesemake %{?_smp_mflags}%installrm -rf %{buildroot}make install DESTDIR=%{buildroot}%{__install} -d %{buildroot}%{_sysconfdir}/pureftpd%{__install} -d %{_datadir}%{__install} -d %{buildroot}%{_initrddir}#%{__install} -d %{buildroot}%{_sbindir}%{__install} -d %{buildroot}%{_mandir}/man8/%{__install} -m 755 configuration-file/pure-config.pl %{buildroot}/usr/local/pureftpd/sbin/pure-config.pl%{__install} -m 755 configuration-file/pure-ftpd.conf %{buildroot}%{_sysconfdir}/default.pure-ftpd.conf%{__install} -m 755 configuration-file/pure-ftpd.conf %{buildroot}%{_sysconfdir}/pure-ftpd.conf%{__install} -m 755 pureftpd-mysql.conf %{buildroot}%{_sysconfdir}/default.pureftpd-mysql.confcat >> %{buildroot}%{_sysconfdir}/pureftpd/pureftpd-mysql.conf << EOFMYSQLSocket     /var/lib/mysql/mysql.sockMYSQLServer     127.0.0.1MYSQLPort       3306MYSQLUser       pureftpuserMYSQLPassword   pureftpuserMYSQLDatabase   pureftpMYSQLCrypt      md5MYSQLGetPW      SELECT Password FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")MYSQLGetUID     SELECT Uid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")MYSQLGetGID     SELECT Gid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")MYSQLGetDir     SELECT Dir FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")EOF%{__install} -m 755 contrib/redhat.init %{buildroot}%{_initrddir}/pureftpdsed -i\    -e  "s|usr/local|usr/local/pureftpd|g" \    -e  "s|etc/pure-ftpd.conf|etc/pureftpd/pure-ftpd.conf|g" \%{buildroot}%{_initrddir}/pureftpdsed -i \    -e "s|NoAnonymous                 no|NoAnonymous                 yes|g" \    -e "s|# MySQLConfigFile               /etc/pureftpd-mysql.conf|MySQLConfigFile               /etc/pureftpd/pureftpd-mysql.conf|g" \    -e "s|# Bind                      127.0.0.1,21| Bind                      127.0.0.1,21|g" \    -e "s|AllowUserFXP                no|AllowUserFXP                yes|g" \    -e "s|AnonymousCantUpload         no|AnonymousCantUpload         yes|g" \    -e "s|#CreateHomeDir               yes|CreateHomeDir               yes|g" \    %{buildroot}%{_sysconfdir}/pure-ftpd.conf

#cp conf/pureftpd-mysql.conf %{buildroot}%{_sysconfdir}/pureftpd#cp conf/pure-ftpd.conf %{buildroot}%{_sysconfdir}/pureftpdinstall -m 0644 -p man/pure-authd.8          $RPM_BUILD_ROOT%{_mandir}/man8/pure-authd.8install -m 0644 -p man/pure-ftpd.8           $RPM_BUILD_ROOT%{_mandir}/man8/pure-ftpd.8install -m 0644 -p man/pure-ftpwho.8         $RPM_BUILD_ROOT%{_mandir}/man8/pure-ftpwho.8install -m 0644 -p man/pure-mrtginfo.8       $RPM_BUILD_ROOT%{_mandir}/man8/pure-mrtginfo.8install -m 0644 -p man/pure-pw.8             $RPM_BUILD_ROOT%{_mandir}/man8/pure-pw.8install -m 0644 -p man/pure-pwconvert.8      $RPM_BUILD_ROOT%{_mandir}/man8/pure-pwconvert.8install -m 0644 -p man/pure-quotacheck.8     $RPM_BUILD_ROOT%{_mandir}/man8/pure-quotacheck.8install -m 0644 -p man/pure-statsdecode.8    $RPM_BUILD_ROOT%{_mandir}/man8/pure-statsdecode.8install -m 0644 -p man/pure-uploadscript.8   $RPM_BUILD_ROOT%{_mandir}/man8/pure-uploadscript.8

%{__tar} xf %{SOURCE1} -C $RPM_BUILD_ROOT/%{_datadir}%cleanrm -rf %{buildroot}

%files%defattr(-,root,root,-)%doc/usr/local/pureftpd/bin/pure-pw/usr/local/pureftpd/bin/pure-pwconvert/usr/local/pureftpd/bin/pure-statsdecode

/usr/local/pureftpd/sbin/pure-authd/usr/local/pureftpd/sbin/pure-config.pl/usr/local/pureftpd/sbin/pure-ftpd/usr/local/pureftpd/sbin/pure-ftpwho/usr/local/pureftpd/sbin/pure-mrtginfo/usr/local/pureftpd/sbin/pure-quotacheck/usr/local/pureftpd/sbin/pure-uploadscript%{_initrddir}/pureftpd%{_sysconfdir}/pureftpd/*%{_mandir}/man8/pure*%{_datadir}/ftp%postgetent group pureftpuser >/dev/null || groupadd -r  pureftpusergetent passwd pureftpuser >/dev/null || useradd -r -g pureftpuser -s   /sbin/nologin  -c "pureftp user" pureftpusersed -i \    -e "s|DBLogin = "ftp";|DBLogin = "pureftpuser";|g"  \    -e "s|DBPassword = "tmppasswd";|DBPassword = "pureftpuser";|g"   \    -e "s|FTPAddress = "myipaddress.com:21";|FTPAddress = "127.0.0.1:21";|g" \    -e "s|DBDatabase = "ftpusers"|DBDatabase = "pureftp"|g" \    -e "s|DEFUserID = "65534"|DEFUserID = "$ftpuid"|g" \    -e "s|DEFGroupID = "31"|DEFGroupID = "$ftpgid"|g" /usr/share/ftp/config.php/sbin/chkconfig pureftpd oncat <<EOFcreate pureftp database like this:====================================================================================mysql>create database pureftp;mysql>grant all on pureftp.* to pureftpuser@'127.0.0.1' identified by 'pureftpuser';mysql>grant privileges;====================================================================================if you want to use pdb to store password :you should change /etc/pureftpd/pure-ftpd.confsed -i  "s|MySQLConfigFile               /etc/pureftpd-mysql.conf|# MySQLConfigFile               /etc/pureftpd/pureftpd-mysql.conf|g"  /etc/pureftpd/pure-ftpd.confsed -i  "s|# PureDB                        /etc/pureftpd.pdb|PureDB                        /etc/pureftpd/pureftpd.pdb|g" /etc/pureftpd/pure-ftpd.conf#adduser/usr/local/pureftpd/bin/pure-pw useradd virtualftp -f /usr/local/pureftpd/etc/pureftpd.passwd -u 500 -g 500 -d /ftproot#make it into effect/usr/local/pureftpd/bin/pure-pw mkdb /usr/local/pureftpd/etc/pureftpd.pdb -f /usr/local/pureftpd/etc/pureftpd.passwd#modify user password/usr/local/pureftpd/bin/pure-pw passwd virtualftp -f /usr/local/pureftpd/etc/pureftpd.passwd -mEOF%changelog

本文出自 “itnihao的运维技术博客” 博客,请务必保留此出处http://itnihao.blog.51cto.com/1741976/1148570

以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索conf
, cdh rpmbuild
, install
, local
, PureFTPd
, VirtualHosts
PureFTP
,以便于您获取更多的相关知识。

时间: 2024-12-22 16:43:46

pure-ftpd rpmbuild rpm file的相关文章

IconFont-来自字体的图标

IconFont IconFont is a way to build lossless images of pure color with font file. 简介 IconFont是一种通过字体文件来构建纯色图的方案.更详细的介绍参见使用IconFont减小iOS应用体积.简单说来其目的是: 减小应用体积,字体文件比图片要小 图标保真缩放,解决2x/3x乃至将来nx图问题 方便更改颜色大小,图片复用 局限性在于只支持纯色图,但是在扁平化的今天纯色图变得越来越多.目前这套方案在点点iOS客户

[VBS]转换二进制数据为字符串常用办法

二进制|数据|转换|字符串 至少有三种以上办法,可以把二进制数据(比如您从ASP的Request.BinaryRead方法得到的数据)转换为字符串. 第一种:使用VBS的MultiByte 方法 实例: Function SimpleBinaryToString(Binary) 'SimpleBinaryToString converts binary data (VT_UI1 | VT_ARRAY Or MultiByte string) 'to a string (BSTR) using M

Pure-Ftpd在企业网中的应用

Pure-FTPd 是一款免费(BSD)的,安全的,高质量和符合标准的FTP服务器. 侧重于运行效率和易用性. 它提供了简单的答案,他满足了大众化的需求,包括普通用户以及主机供应商们.pure - ftpd 得到了充分的支持,它是始终以安全设计为理念,其代码总是作为有漏洞的来进行讨论,并重新审核.该服务可以适应严格的安全需要做到权限分离. 甚至在不需要Root权限的情况下通过其内建的chroot()仿真以及虚拟帐户100%正常运行.避免密码作为明文传输:pure - ftpd的OpenSSL库支

VBS中转换二进制数据为字符串常用办法_vbs

至少有三种以上办法,可以把二进制数据(比如您从ASP的Request.BinaryRead方法得到的数据)转换为字符串.  第一种:使用VBS的MultiByte 方法  实例:  Function SimpleBinaryToString(Binary)  'SimpleBinaryToString converts binary data (VT_UI1 | VT_ARRAY Or MultiByte string)  'to a string (BSTR) using MultiByte 

Opera 开发者版本推出VPN功能【分享】

Opera 开发者版本推出VPN功能[分享] 欧鹏浏览器,开发者版本不是针对中国的,是针对世界的,支持所有语言并且自动识别当前系统语言,主要为了提高隐私保护和提高用户体验速度. 上下载地址:这是个在线安装器,大小874kb,XP安装不了,Win7以上可以安装. Opera developer for Windows Opera developer for Mac Opera developer for 32-bit Linux – deb file Opera developer for 64-

LINUX中VPS安装eAccelerator加速器方法

一,在VPS上的安装和配置 以下操作在ssh中进行.先查看有没有安装make模块,大部分都安装了,没有的,先安装make模块:  代码如下 复制代码 yum install make 输入以下命令,逐行运行.下载 - 解压 - 切换目录 - 配置编译安装 - 切换到根目录 - 删除 - 创建缓存目录 - 修改缓存目录的权限.  代码如下 复制代码 wget http://www.hwzj.org/soft/Linux/eaccelerator-0.9.6.1.zip tar xjf eaccel

Nim编码风格

介绍 Nim语言不限制开发人员使用哪种具体的编码风格, 但为了社区的发展,在编写一些标准库的时候还是应该遵从统一的编码风格 这篇文章会列出一系列的编码风格准则,供大家参考.   但值得注意的是,有很多例外场景会与这些准则相悖, 而且,nim语言非常灵活,在一些特定上下文中,这些编码风格准则也不适用. 跟python相似,python的编码风格在不断演化.改变, nim语言也是这样,随着时间的推移,这个编码风格准则也会改变.   在编写nim的基础类库.编译器.官方工具的时候, 强制要求遵从这些编

check_openmanage 3.7.1发布 戴尔PowerEdge服务器插件

check_openmanage 3.7.1该版本一个新的黑名单关键字添加到允许的黑名单中关于外部驱动的警告信息.一些小错误被修正. check_openmanage是Nagios的插件,可以用来检查戴尔PowerEdge服务器和http://www.aliyun.com/zixun/aggregation/13533.html">Dell PowerVault健康,它使用的Dell OpenManage服务器管理器(OMSA)软件来完成这项任务. 下载地址: Gzipped tarbal

7.4. rpmbuild - Build RPM Package(s)

安装rpmbuild,我们将使用它来制作rpm包 yum search rpm-build yum install -y rpm-build Debian: sudo apt-get install rpm rpm 工作空间,默认是/usr/src/redhat/ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} echo "%_topdir /home/neo/rpmbuild" >> ~/.rpmmacros ec