1.å¦ä½å¨Androidä¸å¯å¨JAVAç¨åº
2.å¦ä½å®è£
nginx
3.linuxç³»ç»å为åªå ç±»
å¦ä½å¨Androidä¸å¯å¨JAVAç¨åº
ããå¨Androidä¸å¯å¨JAVAç¨åºå ¶å®æå¾å¤ç§æ¹å¼ï¼ç°æ»ç»å¦ä¸
ããä¸ãå¨Androidåºç¨ç¨åºä¸åéIntentå¯å¨Androidåºç¨ç¨åº
ããè¿ä¸ªæ¹å¼æç®å,源码地方分类信息网源码æ常ç¨ãå¨æ¤ä¸å¨ç´¯è¿°ãå ³äºIntentçæ´å¤å 容请é 读ãIntentææ¯ç®ä»ã
ããäºãå¨shellæ§å¶å°éè¿amå½ä»¤åéIntentæ¥å¯å¨Androidåºç¨ç¨åº
ããå¨Androidçshellæ§å¶å°éè¿amå½ä»¤åéIntentæ¥å¯å¨Androidåºç¨ç¨åº
ããå ³äºæ¤ç详ç»å 容请åèãAndroidå½ä»¤am详解ã
ããä¸ãå¨shellæ§å¶å°ç´æ¥éè¿davlikvmå½ä»¤å¯å¨ä¸ä¸ªJAVAç¨åºã
ãã该æ¹å¼æ个天çç缺ç¹ï¼å³å¨å ¶ä¸ï¼å¾å¤AndroidçJNIæ æ³è°ç¨ãå 为Androidçå¾å¤JNIå ¶å®æ¯éè¦æå¨æ³¨åçã
ããå ³äºè¯·åèãåºæ¬Dalvik VMè°ç¨ã
ããåãå¨shellæ§å¶å°ç´æ¥éè¿è¿è¡app_processç¨åºå¯å¨ä¸ä¸ªJAVAç¨åº
ããå¨app_processç¨åºä¸ï¼ä»ä¼å¯¹AndroidçJNIè¿è¡æå¨æ³¨åçï¼è½å¾å¥½ç使ç¨AndroidçAPIï¼å æ¤éè¿è¿è¡app_processç¨åºå¯å¨ä¸ä¸ªJAVAç¨åºï¼æ¯ä¸ä¸ªæ¯è¾å®ç¾çæ¹å¼ãapp_processç¨åºæ¯ä¸ä¸ªCç¨åºï¼å®çæºç ä½äºframeworks\base\cmds\app_processã
ããå ³äºå®ç使ç¨è¯·åèãAndroidå½ä»¤am详解ã以åshellèæ¬frameworks\base\cmds\am\amåframeworks\base\cmds\pm\pm
ããamèæ¬æ件å¦ä¸ï¼
ãã# Script to start "am" on the device, which has a very rudimentary# shell.#base=/systemexport CLASSPATH=$base/framework/am.jarexec app_process $base/bin com.android.commands.am.Am "$@"pmèæ¬æ件å¦ä¸ï¼
ãã# Script to start "pm" on the device, which has a very rudimentary# shell.#base=/systemexport CLASSPATH=$base/framework/pm.jarexec app_process $base/bin com.android.commands.pm.Pm "$@"CLASSPATHæå®äºä½ çç¨åºçä½ç½®ï¼com.android.commands.pm.Pmå说æäºç¨åºçå ¥å£ä¸ºcom.android.commands.pm.Pmï¼å³å ¥å£å½æ°main()æå¨çç±»ï¼"$@"å°±æ¯ä¼ éç»mainï¼ï¼å½æ°çåæ°ï¼åªæ¯è¿é"$@"æ¬èº«åæ¯ä¸ªshellä¼ å ¥çåæ°èå·²
ããéè¦æ³¨æçæ¯CLASSPATHä¸çæä»¶å¿ é¡»æ¯dalvikæä»¶æ ¼å¼çï¼å ³äºæ¤ç转æ¢è¯·åèãåºæ¬Dalvik VMè°ç¨ãå½ç¶CLASSPATHä¸çæ件å¯ä»¥æ¯apkæ件ï¼åªæ¯ä½ çapkä¸è³å°åºè¯¥æ个æ¥æmain()å ¥å£å½æ°çç±»ã
转载
å¦ä½å®è£ nginx
nginx
windowsç
v1..3å è´¹ç/softdown/.htm
nginx
windowså®è£ é ç½®æ¹æ³
第ä¸æ¥ãå®è£ æ¹æ³
ä¸ãä¸è½½å¥½åï¼ænginx
windowsç软件解åå°cçæ ¹ç®å½ã
äºãåå»nginx.exeå¾æ ï¼å¯è§é»çªå£ä¸éªèè¿ï¼å¯å¨å®æ¯ã
ä¸ãæä¸win+Rå¿«æ·é®ï¼è¾å ¥cmdæå¼å½ä»¤è¡ã
åãå½ä»¤è¡å°nginxç®å½ï¼è¾å ¥nginxå¯å¨ãï¼æ³¨ï¼æ¤æ¹å¼å½ä»¤è¡çªå£æ ä»»ä½æ示ï¼ä¸è¢«éå®ï¼
äºãæå¼æµè§å¨ï¼è¾å ¥http://.0.0.1ï¼å¦æçå°ä¸å¾çåå®è£ æåã
å ã以åå¯å¨è½¯ä»¶ç´æ¥åå»å¾æ å³å¯ã
ä¸ãå¯å¨åï¼é»è®¤æ åµä¸ï¼æ ä¿®æ¹é ç½®ï¼ï¼å¯è§å°æ两个nginxçè¿ç¨ï¼ä¸ä¸ªæ¯master
processï¼ä¸ä¸ªæ¯worker
processesæµè¯ã
第äºæ¥ãé ç½®æ¹æ³
é ç½®ç®æ ï¼è½æ£å¸¸è¿è¡PHPèæ¬ç¨åº
大é¨åæ åµä¸ï¼æ们éè¦ä¿®æ¹çé ç½®æ件åªæä¸ä¸ªï¼é£å°±æ¯nginx.confï¼è¯¥æ件ä½äºconfç®å½ä¸ãå ·ä½é 置项ç®ä¸ºï¼
1.
server_tokens
off;
åºäºå®å ¨æ¹é¢çèèï¼æ好æ¯éènginxçæ¬å·ä¿¡æ¯
2.
listen
;
为çå¬ç«¯å£ï¼æ ¹æ®éè¦å¯ä»¥å¡«åå ¶å®ç«¯å£å·
3.
server_name
localhost;
localhost为æå¡å¨è®¿é®å称ï¼ä¹å°±æ¯æ们å¨æµè§å¨éè¾å ¥çé£ä¸ªurlå°å
4.
charset
utf-8;
å符éç¼ç
5.
å·¥ä½ç®å½
å°å¦ä¸é ç½®
ä¿®æ¹ä¸ºï¼
root
å®ä¹äºå·¥ä½ç©ºé´ï¼ä¹å°±æ¯æ们php项ç®æå¨çç®å½ã
å å ¥index.phpæ¯ä¸ºäºè®©nginxè½å¤è¯å«phpèæ¬ï¼å¦åï¼å¨è®¿é®phpæ件æ¶ï¼ä¼åºç°ç´æ¥ä¸è½½çæ åµã
6.
æ´åphp
å°location
~
\.phpé ç½®é¨åç注éå ¨é¨å»æï¼æç»é ç½®å¦ä¸ï¼
注æè¿éé¢ç$document_rootåéï¼å®å¯¹åºçå 容就æ¯rootåæ°å¼ï¼å¦ææ们没æå®ä¹rootåæ°æè æroot注éæï¼å¨è®¿é®phpçæ¶åï¼é¡µé¢ä¸å°±ä¼åºç°No
input
file
specified.æ示ã
7.
å¯å¨php-cgi
æå¼cmdå½ä»¤çªå£ï¼åæ¢å°phpçå®è£ ç®å½ï¼æ§è¡php-cgi
-b
.0.0.1:ï¼å³å¯å¯å¨php-cgiï¼å¯å¨å®æåï¼cmdçªå£åå¿å ³éï¼å¦åphp-cgiä¹ä¼è¢«å ³æçã
ç¹å«æéï¼åªæå¨å¼å¯php-cgiçæ åµä¸ï¼nginxæè½æ£å¸¸è®¿é®phpã
8.
éå¯nginx
æå¼cmdå½ä»¤çªå£ï¼åæ¢å°nginxæå¨ç®å½ï¼æ§è¡nginx
-s
reloadå³å¯éå¯nginxãå ¶å®ç¸å ³nginxç¸å ³å½ä»¤å¦ä¸ï¼
å¯å¨ï¼start
nginx
åæ¢ï¼nginx
-s
stop
éåºï¼nginx
-s
quit
linuxç³»ç»å为åªå ç±»
第ä¸ç±»ï¼rootï¼è¶ 级管çåï¼ï¼UID为0ï¼è¿ä¸ªç¨æ·ææ大çæéï¼å¯ä»¥ç´æ¥æ è§å¾å¤çéå¶ï¼å æ¬è¯»åæ§è¡çæéã
第äºç±»ï¼ç³»ç»ç¨æ·ï¼UID为1ï½ãä¸è¬æ¯ä¸ä¼è¢«ç»å ¥çã
第ä¸ç±»å°±æ¯æ®éç¨æ·ï¼UIDèå´ä¸è¬æ¯ï½ãè¿ç±»ç¨æ·çæéä¼åå°åºæ¬æéçéå¶ï¼ä¹ä¼åå°æ¥èªç®¡çåçéå¶ãä¸è¿è¦æ³¨ænobodyè¿ä¸ªç¹æ®çå¸å·ï¼UID为ï¼è¿ä¸ªç¨æ·çæéä¼è¿ä¸æ¥çåå°éå¶ï¼ä¸è¬ç¨äºå®ç°æ¥å®¾å¸å·ã
å½åå¸é¢ä¸æµè¡çLinuxç³»ç»ä¸»è¦å为ReadhatåDebian两大系åï¼èandroidåºå±ç´æ¥ç¨linuxåçå æ ¸ã
ä¸ãRedhatç³»å
Redhatï¼ä¸»è¦æ¯æå¡å¨åLinuxï¼åç¨æ¶è´¹ï¼RHELæ¯Red Hat Enterprise Linuxç缩åã
CentOSï¼Redhatç%å¤å¶çæ¬ï¼ä¸æ¶çæè´¹ç¨ã
äºãDebianç³»å
Debianï¼ä¸»è¦æ¯æ¡é¢åLinuxï¼ä»£è¡¨ä¸ºUbuntuãè¿åªæ¯ç®åçæ¦æ¬ï¼ä¸æ´è¯¦ç»çåç±»æ»ç»åLinuxç¥è¯ä»ç»ååºç¨å¯ä»¥ççç¸å±å ³ä¹¦ç±åèµæï¼æ¨èä¸æ¬Linux书ç±ãLinux就该è¿ä¹å¦ãã
CentOSï¼å¯é çæå¡å¨åè¡çãæ¯ä¸ä¸ªéæ°ç¼è¯å¯å®è£ çRed Hat Enterprise Linux(RHEL)代ç ï¼å¹¶æä¾åæ¶çå®å ¨æ´æ°çææå¥è£ 软件å级为ç®æ ç社åºé¡¹ç®ãç®åå¾å¤äºèç½ä¼ä¸å¨ç¨çåè¡çæ¬ã
Red Hat(红帽)ï¼å¹è®ãå¦ä¹ ãåºç¨ãç¥å度æ¯è¾é«çLinuxåè¡çæ¬ãå¯¹ç¡¬ä»¶å ¼å®¹æ§æ¥è¯´ä¹æ¯è¾ä¸éï¼çæ¬æ´æ°å¾å¿«ï¼å¯¹æ°ç¡¬ä»¶åæ°ææ¯æ¯æè¾å¥½ãRed Hatçå¼æ¾æºç 模å¼æä¾è·¨ç©çãèæåäºç«¯ç¯å¢çä¼ä¸è¿ç®è§£å³æ¹æ¡ï¼ä»¥å¸®å©ä¼ä¸éä½ææ¬å¹¶æåæè½ã稳å®æ§ä¸å®å ¨æ§ã
Ubuntuï¼æµè¡çæ¡é¢Linuxåè¡çãæçåå±ä¸ç§âæç¨åå è´¹âçæ¡é¢æä½ç³»ç»ååºäºæ大çåªååè´¡ç®ï¼è½å¤ä¸å¸åºä¸ä»»ä½ä¸æ¬¾ä¸ªäººæä½ç³»ç»ç¸ç«äºãUbuntuçä¼å¿æ¯åºå®çåå¸å¨æåæ¯ææéãæäºåå¦è å¦ä¹ ãå ·æ丰å¯çææ¡£ã
SUSEï¼æ¥æ让ç¨æ·æ»¡æçæ¼äº®çæ¡é¢ç¯å¢ï¼ä¼ç§çç³»ç» ç®¡çå·¥å ·ï¼åæ¶ä¸ºé£äºè´ä¹°çè£ ççç¨æ·æä¾æ好çå°å·åä¸ä»»ä½å¯ç¨çææ¡£ã
Debianï¼ä¼å¿æ¯é常稳å®ãæ¥æåè¶çè´¨éæ§å¶ãè¶ è¿,æ°éç软件ãæ¯ä»»ä½å ¶ä»çLinuxåè¡æ¯ææ´å¤çå¤çå¨æ¶æã