① spring boot 閰嶇疆鏈澶т笂浼犳枃浠跺ぇ灝 鍦↙inux鐜澧冧笅涓嶇敓鏁堥棶棰
Spring Boot 榛樿ゆ渶澶request size 涓10MB(1048576 bytes)銆
闇瑕佽劇疆浠ヤ笅涓や釜鍙傛暟
Spring Boot 1.3.x鎴栬呬箣鍓
multipart.maxFileSize=100Mb
multipart.maxRequestSize=1000Mb
Spring Boot 1.4.x鎴栬呬箣鍚
spring.http.multipart.maxFileSize=100Mb
spring.http.multipart.maxRequestSize=1000Mb
寰堝氫漢璁劇疆浜唌ultipart.maxFileSize浣嗘槸涓嶈搗浣滅敤錛屾槸鍥犱負1.4鐗堟湰浠ヤ笂鐨勯厤緗鏀逛簡錛岃﹁佸畼鏂規枃妗o細 spring boot 1.4
濡傛灉鏄鍓嶇鍙戝竷鍒皀ginx涓嬬殑榪橀渶瑕侀厤緗甤onfig/nginx.config
鍥犱負nginx榛樿ゆ渶澶т笂浼犲ぇ灝忎負1M錛屾墍浠ヨ佸湪service-name鍚庨潰鍔犱笂 client_max_body_size = 10M;
鍙傝冿細 https://www.cnblogs.com/parasis/p/6422480.html
② 瑙e喅linux涓嶈兘涓婁紶澶т簬2M鏂囦歡
瑙e喅鍔炴硶
[root@2193 etc]# vi php.ini
; Maximum allowed size for uploaded files.
upload_max_filesize = 10M
; Maximum size of POST data that PHP will accept.
post_max_size = 15M
[root@2193 etc]# /etc/rc.d/init.d/httpd restart
鍋滄 httpd錛歔 紜瀹 ]
鍚鍔 httpd錛歔 紜瀹 ]
==========================================================
PHP涓婁紶鏂囦歡娑夊強鍒扮殑鍙傛暟
PHP榛樿ょ殑涓婁紶闄愬畾鏄鏈澶2M錛屾兂涓婁紶瓚呰繃姝よ懼畾鐨勬枃浠訛紝闇瑕佽皟鏁碢HP銆乤pache絳夌殑涓浜涘弬鏁. 涓嬮潰錛屾垜浠綆瑕佷粙緇嶄竴涓婸HP鏂囦歡涓婁紶娑夊強鍒扮殑涓浜涘弬鏁幫細
file_uploads
鏄鍚﹀厑璁擱氳繃HTTP涓婁紶鏂囦歡鐨勫紑鍏籌紝榛樿や負ON鍗蟲槸寮
upload_tmp_dir
upload_tmp_dir鐢ㄦ潵璇存槑PHP涓婁紶鐨勬枃浠舵斁緗鐨勪復鏃剁洰褰曪紝瑕佹兂涓婁紶鏂囦歡錛屽緱淇濊瘉鏈嶅姟鍣ㄦ病鏈夊叧闂涓存椂鏂囦歡鍜屾湁瀵規枃浠跺す鐨勫啓鏉冮檺錛屽傛灉鏈鎸囧畾鍒橮HP浣跨敤緋葷粺榛樿ゅ
upload_max_filesize
鍏佽鎬笂浼犳枃浠跺ぇ灝忕殑鏈澶у礆紝榛樿や負2M
post_max_size
鎺у埗鍦ㄩ噰鐢≒OST鏂規硶榪涜屼竴嬈¤〃鍗曟彁浜や腑PHP鎵鑳藉熸帴鏀剁殑鏈澶ф暟鎹閲忋傚傛灉甯屾湜浣跨敤PHP鏂囦歡涓婁紶鍔熻兘錛屽垯闇瑕佸皢姝ゅ兼敼涓烘瘮upload_max_filesize瑕佸ぇ
max_input_time
浠ョ掍負鍗曚綅瀵歸氳繃POST銆丟ET浠ュ強PUT鏂瑰紡鎺ユ敹鏁版嵁鏃墮棿榪涜岄檺鍒躲傚傛灉搴旂敤紼嬪簭鎵榪愯岀幆澧冨勫湪浣庨熼摼璺涓婏紝鍒欓渶瑕佸炲姞姝ゅ間互閫傚簲鎺ユ敹鏁版嵁鎵闇鐨勬洿澶氭椂闂
memory_limit
涓轟簡閬垮厤姝e湪榪愯岀殑鑴氭湰澶ч噺浣跨敤緋葷粺鍙鐢ㄥ唴瀛橈紝PHP鍏佽稿畾涔夊唴瀛樹嬌鐢ㄩ檺棰濄傞氳繃memory_limit鍙橀噺鏉ユ寚瀹氬崟涓鑴氭湰紼嬪簭鍙浠ヤ嬌鐢ㄧ殑鏈澶у唴瀛樺歸噺鍙橀噺memory_limit鐨勫煎簲褰撻傚綋澶т簬post_max_size鐨勫
max_execution_time
max_execution_time璁劇疆浜嗗湪寮哄埗緇堟㈣剼鏈鍓峆HP絳夊緟鑴氭湰鎵ц屽畬姣曠殑鏃墮棿錛屾ゆ椂闂翠互縐掕$畻銆傚綋鑴氭湰榪涘叆浜嗕竴涓鏃犻檺寰鐜鐘舵佹椂姝ゅ彉閲忛潪甯告湁鐢ㄣ傜劧鑰岋紝褰撳瓨鍦ㄤ竴涓闇瑕佸緢闀挎椂闂村畬鎴愮殑鍚堟硶媧誨姩鏃訛紙渚嬪備笂浼犲ぇ鍨嬫枃浠訛級錛岃繖欏瑰姛鑳戒篃浼氬艱嚧鎿嶄綔澶辮觸銆傚湪榪欐牱鐨勬儏鍐典笅蹇呴』鑰冭檻灝嗘ゅ彉閲忓煎炲姞錛屼互閬垮厤PHP鍦ㄨ剼鏈姝e湪鎵ц屾煇浜涢噸瑕佽繃紼嬬殑鏃跺欏皢鑴氭湰鍏抽棴
③ 鍦╨inux錛宎pache涓嬮氳繃HTTP POST涓轟粈涔堜笂浼犱笉浜2G鐨勫ぇ鏂囦歡
榪欎釜涓鑸鏄鍦╬hp閰嶇疆鏂囦歡闄愬埗浜
php.ini
upload_max_filesize = 2999M
post_max_size = 2999M
memory_limit = 2999M
④ linux rz可以上傳多大文件
Rz默認是-b –p參數,找了半天沒有看見man的sz中有2GB的限制
⑤ 浼犳枃浠跺埌linux鏈嶅姟鍣╨inux鏈嶅姟鍣ㄤ笂浼
win7涓嬮氳繃ssh濡備綍涓婁紶鏂囦歡鑷砽inux鏈嶅姟鍣錛
Windows緋葷粺濡傛灉瑕佽繛鎺WindowsServer鏈嶅姟鍣錛岄偅鏄涓浠剁畝鍗曠殑浜嬫儏錛屽洜涓虹郴緇熷唴緗浜嗚繙紼嬫岄潰榪炴帴宸ュ叿銆備絾鏄疻indows鍐呯疆鐨勮繙紼嬫岄潰榪炴帴宸ュ叿鍙鑳借繛鎺Windows鏈嶅姟鍣錛屽傛灉鎯沖湪Windows7涓嬪筁inux鏈嶅姟鍣ㄨ繘琛屾搷浣滐紝閭e氨蹇呴』瑕佸熷姪絎涓夋柟宸ュ叿銆
Windows涓嬬殑SSH瀹㈡埛絝宸ュ叿
Windows涓嬭繛鎺Linux鏈嶅姟鍣ㄩ渶瑕丼SH瀹㈡埛絝鏉ヨ繛鎺ワ紝鍦╓indows涓嬬殑SSH瀹㈡埛絝宸ュ叿寰堝氾紝鏈涓哄父鐢ㄧ殑鏈夛細XShell銆丳uTTY絳夛紝鎴戜滑鎺ㄨ崘鐢╔Shell銆
娉ㄦ剰錛氭棤璁轟嬌鐢ㄥ摢縐峉SH瀹㈡埛絝宸ュ叿錛屽垏璁頒竴瀹氳佸湪鍏跺畼緗戜笂涓嬭澆錛佸湪鍓嶅嚑騫寸殑鏃跺欙紝涓浜涢粦瀹㈠皢涓浜涚疆鏈夊悗闂ㄧ殑PuTTY宸ュ叿鐢氳嚦鍋氫簡浠樿垂鎺ㄥ箍錛屼互姝ゆ潵紿冨彇澶ч噺鐨勬湇鍔″櫒鍜岀悊璐﹀彿鍜屽瘑鐮侊紒
Windows鍜孡inux浜掍紶鏂囦歡鐨勬柟妗
鍦╓indows鍜孡inux涔嬮棿浜掍紶鏂囦歡鏈夊嚑縐嶆柟妗堬紝鎺ㄨ崘涓嬮潰鍑犵嶆柟妗堜緵澶у跺弬鑰冦
1銆佸皬鏂囦歡浼犺緭浣跨敤lrzsz
Linux涓婃湁涓嬈懼皬宸ュ叿lrzsz錛屽畨瑁呭悗浣跨敤涓や釜綆鍗曞懡浠わ紙rz涓婁紶鏂囦歡銆乻z鍙戦佹枃浠訛級灝卞彲浠ュ疄鐜癢indows鍜孡inux涔嬮棿浜掍紶鏂囦歡銆
lrzsz鍙閫傚悎浼犻掑皬鏂囦歡錛屾枃浠跺ぇ灝100M浠ュ唴鐨勯兘鍙浠ヤ嬌鐢ㄦゅ伐鍏鋒潵浼犺緭銆
2銆佸ぇ鏂囦歡浼犺緭浣跨敤WinScp
WinScp鏄疻indows鐜澧冧笅鐨勫熀浜嶴SH鍙奡CP鍗忚鐨凷FTP瀹㈡埛絝錛屽叾瀹炲氨鏄疐TP瀹㈡埛絝宸ュ叿錛屽畠鏀鎸佹柇鐐圭畫浼狅紝杈冧負鏂逛究銆
浠ヤ笂灝辨槸鎴戠殑瑙傜偣錛屽逛簬榪欎釜闂棰樺ぇ瀹舵槸鎬庝箞鐪嬪緟鐨勫憿錛熸㈣繋鍦ㄤ笅鏂硅瘎璁哄尯浜ゆ祦~鎴戞槸縐戞妧棰嗗煙鍒涗綔鑰咃紝鍗佸勾浜掕仈緗戜粠涓氱粡楠岋紝嬈㈣繋鍏蟲敞鎴戜簡瑙f洿澶氱戞妧鐭ヨ瘑錛
linux鏈嶅姟鍣ㄤ紶鏂囦歡濡備綍涓嶇敤杈撳瘑鐮侊紵
棣栧厛闇瑕佸湪鏈嶅姟鍣ㄧ璁劇疆/etc/ssh/sshd_config
#vim/etc/ssh/sshd_config
淇鏀瑰備笅涓よ屼負yes銆傚叾瀹炲ぇ澶氭暟鎯呭喌涓嬩笉鐢ㄤ慨鏀癸紝榛樿ゅ氨鏄痽es銆
RSAAuthenticationyes
PubkeyAuthenticationyes
(1)濡傛灉瀹㈡埛鏈哄拰鏈嶅姟鍣ㄩ兘鏄疞inux鏈哄櫒錛岄偅涔堟垜浠浣跨敤涓嬮潰鐨勬柟娉曪細錛堝悗闈㈢2鑺備細鎻愬埌鎬庝箞鍦╓indows涓嬩嬌鐢≒utty鐢熸垚瀵嗛掗瀵癸級
鎴戜滑闇瑕佸湪瀹㈡埛絝鐢熸垚RSA瀵嗛掗瀵廣備嬌鐢╯sh-keygen鍛戒護錛
#ssh-keygen-trsa
鍙傛暟t鐨勬剰鎬濇槸type錛屽悗闈㈣窡鐫鍔犲瘑綾誨瀷錛岃繖閲屾垜浠鏄痳sa銆
鐒跺悗浼氭彁紺轟綘杈撳叆瀵嗛掗淇濆瓨瀹屾垚鏂囦歡鍚嶏紝榪欓噷鎴戜滑闇瑕佷嬌鐢ㄩ粯璁ょ殑id_rsa錛屼箣鍚庢墠鑳芥e父鎵嶈兘鐧誨綍銆傚傛灉浣犵敓鎴愮殑瀵嗛掗浣滀負鍏朵粬鐢ㄥ勶紝閭d箞鍙浠ュ懡鍚嶄負鍏朵粬鍚嶇О錛
Generatingpublic/privatersakeypair.
Enterfileinwhichtosavethekey(/home/cake/.ssh/id_rsa):
涔嬪悗浼氭彁紺轟綘杈撳叆涓涓猵assphrase錛屾垜浠榪欓噷鍙浠ョ暀絀猴紝榪欐牱鎴戜滑鐧誨綍鐨勬椂鍊欏氨涓嶈歌緭鍏ュ瘑鐮併
Enterpassphrase(emptyfornopassphrase):
Entersamepassphraseagain:
鐒跺悗浼氭彁紺轟綘瀵嗛掗鐢熸垚鎴愬姛銆傝繖鏄浣犵殑縐侀掗淇濆瓨涓簙/.ssh/id_rsa錛屼綘鐨勫叕閽ユ槸~/.ssh/id_rsa.pub
鎴戜滑鐜板湪闇瑕佸仛鐨勬槸錛屾妸id_rsa.pub鐨勫唴瀹癸紝娣誨姞鐨勬湇鍔″櫒絝鐨剘/.ssh/autherized_keys鏂囦歡鏈鍚庛
浣犲彲浠ユ妸榪欎釜鏂囦歡涓婁紶鍒版湇鍔″櫒絝錛岀劧鍚庝嬌鐢ㄥ懡浠わ細
#catid_rsa.pub>>~/.ssh/autherized_keys
鍒拌繖閲屽氨瀹屾垚浜嗐
(2)鍦╓indows涓嬩嬌鐢≒utty鐢熸垚瀵嗛掗瀵癸細
Putty鐨勫畨瑁呯洰褰曚笅鏈変釜puttygen.exe紼嬪簭錛屾垜浠榪愯岃繖涓紼嬪簭銆
涔嬪悗鐐瑰嚮Generate錛屽紑濮嬬敓鎴愬瘑閽ュ廣傛垜浠闇瑕佹牴鎹鎻愮ず錛屽湪鎸囧畾鏂規嗗唴闅忔満婊戝姩榧犳爣銆傝繖鏄涓轟簡鏍規嵁榧犳爣杞ㄨ抗錛屼駭鐢熶竴浜涢殢鏈烘暟鎹銆
涔嬪悗鐢熸垚緇撴潫錛屾垜浠鐐瑰嚮SavePrivateKey灝嗙侀掗瀛樻斁鍦ㄦ煇涓鐩褰曚腑銆傜劧鍚庤祴鍊兼渶涓婇潰鏂囨湰妗嗕腑鐨勫叏閮ㄥ唴瀹癸紝綺樿創鍒癓inux鏈嶅姟鍣ㄧ鐨刟utherized_key鐨勬渶鍚庛
鎴戜滑鐜板湪鍙浠ュ叧闂榪欎釜灝忕▼搴忋
鐜板湪鎵撳紑Putty錛屽湪宸﹁竟鐨勯夐」涓錛岄夋嫨Conneciton_SSH_Auth錛屽湪涓錛岄夋嫨鍒氭墠淇濆瓨鐨勭侀掗璺寰勫氨鍙浠ヤ簡銆
鍒版や綅緗錛孭utty涔熷彲浠ヤ笉鐢ㄥ瘑鐮佺櫥褰曚簡銆
Linux涓婁紶鏂囦歡鍒版湇鍔″櫒鍛戒護鏄浠涔堝憿錛
1ssh$sshusername@remotehost鐢╯hh鐧婚檰鏈嶅姟鍣ㄣ
2銆乻cp鍛戒護scp鍩轟簬SSH鍗忚錛屽彲浠ュ皢鏈鍦版枃浠舵嫹璐濆埌榪滅▼鏈嶅姟涓婄殑鎸囧畾鐩褰曪紝鏍煎紡濡備笅錛$scpfilenameusername@remotehost:remotedirectory鎵ц岋細[email protected]:/home/admin3ftp/sftp棣栧厛鐢╮oot鐢ㄦ埛鐧誨綍榪滅▼Linux鏈嶅姟鍣錛屽皢admin鐢ㄦ埛娣誨姞鍒癋TP璐︽埛涓銆傞氳繃echo鍛戒護榪藉姞涓琛屽埌user_list鏂囦歡涓錛
#echoadmin>>user_list涔嬪悗閫氳繃service鍛戒護寮鍚疐TP鏈嶅姟錛
#servicevsftpdstart鐜板湪灝卞彲浠ュ湪鏈鏈鴻塊棶FTP榪滅▼鏈嶅姟鍣ㄤ簡錛岀劧鍚庨氳繃put鍛戒護涓婁紶鏂囦歡浜嗐4SSHWindowsClientSSH鎻愪緵浜嗕竴涓猻cp2.exe浣滀負Windows涓嬬殑scp鍛戒護宸ュ叿銆