linux jenkins部署之路之,ftp部署怎么匿名还好用咋解决思密达

怎么安装就不说了,网上一堆

这噶搭是配置 目录是/etc/vsftpd/vsftpd.conf

# Example config file /etc/vsftpd/vsftpd.conf

#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/xferlog
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=NO
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
# Make sure, that one of the listen options is commented !!
listen_ipv6=YES


pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
#123qwe123

如果以上完事发现550,那就是用户对那个/var/ftp下的文件夹权限不够,比如/var/ftp/pub文件夹

chmod 755 /var/ftp,这个目录是必须755

可以chmod 777 pub

----------------------------------------------------------------

Publish over FTP

在Jenkins服务上安装 Publish over FTP也就不讲了也可百度 ,配置是这样


----------------------------------------------------------------


----------------------------------------------------------------

最后是pipline配置

node ('master') {
    def mvnHome
    stage('Code checkout') {
        checkout([$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[credentialsId: 'ed7688fa-9ae9-4a1c-a5fd-99957f7b5b5f', depthOption: 'infinity', ignoreExternalsOption: true, local: './tgcw-service-fyz', remote: 'https://10.11.63.242/svnplugin/tyz/fyz-code/trunk/tgcw-service-fyz']], quietOperation: true, workspaceUpdater: [$class: 'UpdateUpdater']])
    }
    stage('Build') {
        mvnHome = tool 'maven3.5.2'
        env.JAVA_HOME= tool 'Java8'
        env.PATH="${env.JAVA_HOME}/bin:${env.PATH}"
        dir('/opt/jenkins/jenkins_home/workspace/tgcw-service-fyz/tgcw-service-fyz') {
            sh "'${mvnHome}/bin/mvn' clean install"
        }
    }
   stage('FTP upload') {
ftpPublisher alwaysPublishFromMaster: false, continueOnError: false, failOnError: false, publishers: [[configName: 'anonymous215', transfers: [[asciiMode: false, cleanRemote: false, excludes: '', flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '**/*.jar']], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false]]
    }
    stage('Clean up') {
        cleanWs cleanWhenFailure: false, cleanWhenUnstable: false, deleteDirs: true, notFailBuild: true
    }

}

-------------------------------------------------------------------------------------------------------------

sbin/service crond start //启动服务

/sbin/service crond stop //关闭服务

/sbin/service crond restart //重启服务

/sbin/service crond reload //重新载入配置

/etc/crontab 


懂的人知道我这思路有多重要,不懂的,联系我也可以给讲。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/387090.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

powerCat进行常规tcp端口转发

实战中,我们也会遇到需要我们进行端口转发的情况,比如已经拿下的目标机1是在dmz区,而目标1所在内网的其他目标只能通过目标1去访问,这时候我们就需要端口转发或者代理来进行后渗透。这次就要介绍一个加强版的nc,基于po…

Lecture 7 Hashing Table I

Hash |---Hash function: Division, Multiplication |---Collision: Chaining, Open addressing(Linear,Double hasing) Symbol-table problem: Table S holding n records pointer --> key|satelite data (record) Hashing: Hash function h maps keys “randomly”…

SpringCloud 微服务

一微服务架构概述1.1 微服务特性以及优点每个服务可以独立运行在自己的进程里一系列独立运行的微服务(goods,order,pay,user,search…)共同构建了整个系统每个服务为独立的业务开发,一个微服务只关注某个特定的功能,例如用户管理,商品管理微服…

vue在ie9中的兼容问题

问题总结 https://github.com/vuejs-templates/webpack/issues/260 首先npm install --save babel-polyfill然后在main.js中的最前面引入babel-polyfillimport babel-polyfill在index.html 加入以下代码&#xff08;非必须&#xff09;<meta http-equiv"X-UA-Compatib…

Lecture 9 Random built Binary Search Trees BSTs

Random built Binary Search Trees BSTs E[hight] near 3logn Quick Sort? Relation to Quick Sort: BST sort & Quick sort make same comparisons but in a different order. Randomized BST Sort: 1. Randomly permute A 2. BST sort(A)

Vue项目中遇到了大文件分片上传的问题

Vue项目中遇到了大文件分片上传的问题&#xff0c;之前用过webuploader&#xff0c;索性就把Vue2.0与webuploader结合起来使用&#xff0c;封装了一个vue的上传组件&#xff0c;使用起来也比较舒爽。 上传就上传吧&#xff0c;为什么搞得那么麻烦&#xff0c;用分片上传&#x…

NDK学习笔记-使用现有so动态库

前面将的都是如何使用C/C文件生成so动态库&#xff0c;那么在使用别人的so动态库的时候应该怎么做呢&#xff1f;这篇文章就是使用一个变声功能的动态库&#xff0c;完成对于以有so动态库的说明。 动态库来源 在互联网中&#xff0c;有着许许多多动态库&#xff0c;很多厂商也对…

Spring cloud系列十四 分布式链路监控Spring Cloud Sleuth

1. 概述 Spring Cloud Sleuth实现对Spring cloud 分布式链路监控 本文介绍了和Sleuth相关的内容&#xff0c;主要内容如下&#xff1a; Spring Cloud Sleuth中的重要术语和意义&#xff1a;Span、Trance、AnnotationZipkin中图形化展示分布式链接监控数据并说明字段意义Spring …

Spring Cloud Sleuth进阶实战

为什么需要Spring Cloud Sleuth 微服务架构是一个分布式架构&#xff0c;它按业务划分服务单元&#xff0c;一个分布式系统往往有很多个服务单元。由于服务单元数量众多&#xff0c;业务的复杂性&#xff0c;如果出现了错误和异常&#xff0c;很难去定位。主要体现在&#xff…

Element表格嵌入复选框以及单选框

1&#xff0c;element 表格嵌入CheckBox 效果图如下&#xff1a; 2&#xff0c;element结合checkBox实现单选效果如下&#xff1a; html代码&#xff1a; <template><div><p>shopInfo</p><el-tableref"multipleTable":data"tableDat…

实验二3

#include "stdafx.h" #include "stdio.h" int main(int argc, char* argv[]) {int a,b,c; scanf("%d %d %d",&a,&b,&c);if(ab&&bc) printf("等边三角形");else if((ab&&b!c)||(ac&&c!b)||(bc&a…

webpack来打包你的vue项目,如发现你的vendor.js过大

1.如果你使用了webpack来打包你的vue项目&#xff0c;如发现你的vendor.js过大则可以参考本文的解决方案. 2.造成过大的原因是因为在main.js导入第三库太多时,webpack合并js时生成了vendor.js(我们习惯把第三方库放在vendor里面)造成的.如下图在main.js引用element-ui等第三方…

K8s基本概念入门

序言 没等到风来&#xff0c;绵绵小雨&#xff0c;所以写个随笔&#xff0c;聊聊k8s的基本概念。 k8s是一个编排容器的工具&#xff0c;其实也是管理应用的全生命周期的一个工具&#xff0c;从创建应用&#xff0c;应用的部署&#xff0c;应用提供服务&#xff0c;扩容缩容应用…

ElasticSearch、Logstash和Kiabana三个开源工具。

一 方案背景 通常&#xff0c;日志被分散的储存不同的设备上。如果你管理数十上百台服务器&#xff0c;你还在使用依次登录每台机器的传统方法查阅日志。这样是不是感觉很繁琐和效率低下。开源实时日志分析ELK平台能够完美的解决日志收集和日志检索、分析的问题&#xff0c;ELK…

力扣(LeetCode)292. Nim游戏 巴什博奕

你和你的朋友&#xff0c;两个人一起玩 Nim游戏&#xff1a;桌子上有一堆石头&#xff0c;每次你们轮流拿掉 1 - 3 块石头。 拿掉最后一块石头的人就是获胜者。你作为先手。 你们是聪明人&#xff0c;每一步都是最优解。 编写一个函数&#xff0c;来判断你是否可以在给定石头数…