当前位置:首页 » 文件管理 » mono可以识别哪些文件
扩展阅读
非保密文件可以外传吗 2024-11-26 08:01:40

mono可以识别哪些文件

发布时间: 2024-07-01 08:38:36

❶ mono鏄浠涔堟剰镐

mono鏄浠涔堟剰镐濓细鏄鍗曞0阆撶殑锛屾剰鎸囧崟澹伴亾褰曢煶(鎴栨斁阔)绯荤粺銆

𨰾揿𪾢璧勬枡锛

鍗曞0阆撶殑浠嬬粛锛

1銆佸崟澹伴亾锛圫ingle channel锛夋槸澹伴煶澶嶅埗褰㈠纺锛屾槸鎸囧彧链夊崟涓澹伴亾镄勯煶棰戞枃浠剁О涔嬩负鍗曞0阆撱备竴涓澹伴煶阃氶亾锛岀敤涓涓浼犲0鍣ㄦ嬀鍙栧0阔筹纴鐢ㄤ竴涓镓澹板櫒杩涜屾斁阔崇殑杩囩▼锛岀О涔嬩负鍗曞0阆撱傚崟澹伴亾鏄鎸囨妸𨱒ヨ嚜涓嶅悓鏂逛綅镄勯煶棰戜俊鍙锋贩钖埚悗缁熶竴鐢卞綍阔冲櫒𨱒愭妸瀹冭板綍涓嬫潵锛屽啀鐢变竴鍙阔崇辫繘琛岄吨鏀俱

2銆佸湪鍗曞0阆撶殑阔冲搷鍣ㄦ潗涓锛屼綘鍙鑳芥劅鍙楀埌澹伴煶銆侀煶涔愮殑鍓嶅悗浣岖疆鍙婇煶镩层侀煶閲忕殑澶у皬锛岃屼笉鑳芥劅鍙楀埌澹伴煶浠庡乏鍒板彸绛夋í钖戠殑绉诲姩銆傛墍閲嶆挱镞剁殑鏁堟灉鐩稿逛簬鐪熷疄镄勮嚜铹跺0𨱒ヨ达纴鏄绠鍗曞寲镄勶纴鏄澶辩湡浜嗙殑銆傚湪鐢佃嗗箍鎾涓锛屽崟澹伴亾浼撮煶璐ㄩ噺娆犱匠锛岀壒鍒鏄阆囧埌浼桦娍镄勬枃镩鸿妭鐩锛屽挨鍏舵槸鐜板満鐩存挱楂樻按骞崇殑阔充箰琛ㄦ紨镞跺氨鏄惧缑阃婅壊涓嶅皯銆

5銆佸崟澹伴亾鏄姣旇缉铡熷嬬殑澹伴煶澶嶅埗褰㈠纺锛屾棭链熺殑澹板崱閲囩敤镄勬瘆杈冩櫘阆嶃傚綋阃氲繃涓や釜镓澹板櫒锲炴斁鍗曞0阆扑俊鎭镄勬椂鍊欙纴鎴戜滑鍙浠ユ槑鏄炬劅瑙夊埌澹伴煶鏄浠庝袱涓阔崇变腑闂翠紶阃掑埌鎴戜滑钥虫湹閲岀殑銆傝繖绉岖己涔忎綅缃镒熺殑褰曞埗鏂瑰纺鏄寰堣惤钖庣殑銆

❷ 濡备綍鍒╃敤mono鎶.net windows service绋嫔簭杩佺Щ鍒发inux涓

鐩镄勶细浣跨敤mono灏咥SP.NET缂栧啓镄刉indow链嶅姟绉绘嶅埌Linux涓嬭繍琛
浣跨敤镄勮蒋浠讹细mono2.0, Linux Red hat
姝ラわ细
1銆佸湪Window涓嬬紪鍐欎竴涓猂emoting链嶅姟绔浣滀负Window链嶅姟銆傚寘𨰾
銆銆RemoteServer.exe锛堟湇锷¤繍琛屾枃浠讹级
RemoteServer.exe.config锛堥厤缃鏂囦欢锛
灏呜繖涓や釜鏂囦欢鏀惧埌Linux绯荤粺镄勪竴涓鐩褰曚笅锛屾湰渚嬫斁鍦/home/RemoteTest/RemoteServer涓
2銆 缂栧啓Linux链嶅姟鑴氭湰sjhServer锛屽皢鑴氭湰鏀惧湪 /etc/rc.d/init.d鐩褰曚笅
3銆 寤虹珛绗﹀彿阈炬帴銆傚缓绔嬬浉搴旇繍琛岀骇鍒镄勮剼链绗﹀彿阈炬帴锛屾湰渚嬩腑鏄2銆3銆4銆5绾э纴浣跨敤锻戒护 锛
cd /etc/rc.d/rc2.d (鐩稿簲鍦板缓绔嬬3绾х殑阈炬帴锛宑d鍒皉c3.d鐩褰曚笅)
ln 钬搒 /etc/rc.d/init.d/sjhServer S97sjhServer
4銆 钖锷ㄦ湇锷°备娇鐢ㄥ懡浠わ细
service sjhService start

5銆 链渚嬩腑链変竴涓瀹㈡埛绔绋嫔簭RemoteClient.exe鐢ㄥ仛渚﹀惉銆傝繍琛孯emoteClient.exe锛岃繑锲炶繍琛岀粨鏋滆存槑链嶅姟宸茬粡鍦ㄨ繍琛岋纴濡傛灉瀹㈡埛绔鍑虹幇鐩镙囨満鍣ㄧН鏋佹嫆缁濊存槑链嶅姟娌℃湁钖锷
6銆佸仠姝㈡湇锷★纴浣跨敤锻戒护锛
service sjhService stop

鍒版ASP.NET镄勬湇锷$Щ妞嶅埌Linux灏辩畻瀹屾垚锛屽拰鍏跺畠Linux镄勭郴缁熸湇锷′竴镙凤纴镎崭綔鏂规硶閮戒竴镙枫

瀛桦湪镄勫嚑涓鐤戠偣锛
涓銆佺3镣瑰缓绔嬬﹀彿阈炬帴镞讹纴鍙寤虹珛浜哠镄勯摼鎺ワ纴娌℃湁寤虹珛K镄勯摼鎺ャ傝缮链夊惎锷ㄥ拰锅沧㈡湇锷$殑椤哄簭镄勫畾涔夋湁浠涔堣勫垯锛屾槸钖﹀瑰叾瀹冩湇锷℃湁椤哄簭涓婄殑渚濊禆銆
浜屻佹湇锷$殑𨱌傚仠涓嶈捣浣灭敤锛孯emoting杩欎釜链嶅姟鏄钖︽病链夎繖涓姒傚康銆傚叾瀹幂被鍨嬫湇锷℃湁寰呮祴璇曘

鍙﹀栦竴绉嶆柟寮忥细
濡备綍鍦↙inux閮ㄧ讲mono锛屽苟鎴愬姛镄勮繍琛.net绋嫔簭锛岃缮璇峰ぇ瀹跺氩氭煡璇㈠惂锛屾垜鍦ㄨ繖鏂归溃涔熷彧鏄鎼寤烘垚锷熶简锛岄亣鍒扮殑闂棰树笉瓒冲熷氾纴灏变笉璇瀵煎ぇ瀹朵简銆

鐢╩ono𨱒ュ湪Linux杩愯屼竴涓.net绋嫔簭杩樻槸寰埚规槗镄勶纴浣嗗备綍杩愯屼竴涓钖庡彴链嶅姟绋嫔簭锻锛屼粖澶╀篃鏄璐逛简涔濈墰浜岃柠涔嫔姏锛屾渶钖庡熼壌涓涓媠tackoverflow涓镄勪竴涓锲炵瓟𨱒ヨ癄閲婅繖涓闅鹃桦惂銆

Under Linux, deamons are simple background processes. No special control methods (e.g start() , stop() ) are used as in Windows. Build your service as a simple (console) application, and run it in the background. Use a tool like daemonizeto run a program as a Unix daemon, and remember to specify mono as the program to be activated.
As noted by others, mono-service is a host to run services built with the ServiceProcess assembly. Services built for Windows can use this method to run unmodified under Linux. You can control the service by sending signals to the process (see man page).
鎴戣嫳鏂囦笉鏄澶濂斤纴鍙鑳藉ぇ姒傜悊瑙e叾涓镄勬剰镐濄傞噷杈圭殑婊嫔懗澶у跺彲浠ヨ嚜宸辩粏缁嗗搧锻炽
澶ц嚧镒忔濆氨鏄璇达纴绗涓绉嶆柟寮忥细鍦↙inux涓嫔彲浠ユ妸windows链嶅姟鏀归犳垚涓涓鎺у埗鍙扮▼搴忔潵杩愯屻傜浜岀嶆柟寮忥细鐢╩ono-service𨱒ヨ繍琛寃indows镄勬湇锷$▼搴忋傚墠鎻愭槸浣犺繖涓绋嫔簭鏄链.net鍐欐垚镄勚
mono-service杩愯屾椂鍙傛暟鍙堣ュ备綍閰岖疆锻锛
锻戒护镙煎纺锛歮ono-service [options] program.exe
-d:DIRECTORYUse this option to specify the working directory for the service. The default is the current directory.
-l:LOCKFILESpecifies the file to use for locking, the default is a filename constructed in /tmp based on the name of the program that hosts the service.
-m:MESSAGEName to show in the syslog.
-n:NAMEUse this to specify the service to be launched (if the program contains more than one service). The default is to run the first defined service.
--debug锛歎se this option to prevent mono-service from redirecting stdin and stdout and prevent the program to be sent to the background. Equivalent to
--no-daemon锛歎se this option to prevent mono-service from redirecting stdin and stdout and prevent the program to be sent to the background. Equivalent to --debug.
渚嬶细mono-service -l:/root/service-lock MyService.exe

鎺у埗链嶅姟锛堣繖鍑犵嶆搷浣灭殑鍖哄埆璇峰弬钥僿indows镄勪娇鐢ㄦ柟寮忥纴杩欓噷鎴戝氨涓嶅仛杩囧氲В閲娄简锛夛细
𨱌傚仠: kill -USR1 'cat <lock file>'
缁х画: kill -USR2 'cat <lock file>'
锅沧: kill 'cat <lock file>'

娉ㄦ剰锛歎se mono-service to run services that use the 1.0 assemblies and use mono-service2 to run services that use the 2.0 assemblies.
mono-service鍙浠ヨ繍琛.net 1.0镄勭▼搴忛泦锛宫ono-service2鍙浠ヨ繍琛.net 2.0镄勭▼搴忛泦銆