① 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锻戒护宸ュ叿銆