锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲综合色7777情网站777,亚洲日韩中文字幕在线播放,极品色天使在线婷婷天堂亚洲http://www.tkk7.com/ideame/闈欒屾濅箣zh-cnSun, 11 May 2025 05:49:28 GMTSun, 11 May 2025 05:49:28 GMT60Docker Registry 瀹夎鍜岃繍琛?/title><link>http://www.tkk7.com/ideame/archive/2018/08/03/433314.html</link><dc:creator>ideame</dc:creator><author>ideame</author><pubDate>Fri, 03 Aug 2018 03:49:00 GMT</pubDate><guid>http://www.tkk7.com/ideame/archive/2018/08/03/433314.html</guid><wfw:comment>http://www.tkk7.com/ideame/comments/433314.html</wfw:comment><comments>http://www.tkk7.com/ideame/archive/2018/08/03/433314.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ideame/comments/commentRss/433314.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ideame/services/trackbacks/433314.html</trackback:ping><description><![CDATA[<h2 id="toc_0">浣跨敤鍦烘櫙</h2> <ul> <li>鍐呴儴緗戠粶錛屾棤娉曡闂?<a >Docker Hub</a></li> <li>鎺у埗 image 鐨勫瓨鍌ㄦ柟寮忓拰瀛樺偍浣嶇疆</li> <li>鎺у埗 image 鐨勯儴緗叉祦紼?/li> <li>鍐呴儴寮鍙戞祦紼嬮渶瑕侀泦鎴愭帶鍒?image 鐨勯儴緗插拰瀛樺偍</li> </ul> <p>搴旂敤閫昏緫紺烘剰鍥撅細</p> <p><img src="http://www.tkk7.com/images/blogjava_net/ideame/15332784526885.png" alt="" style="width:396px;"/>錕?/p> <h2 id="toc_1">瀹夎 Registry 鏈嶅姟</h2> <h3 id="toc_2">姒傝</h3> <p>Docker Registry 鍦?docker hub 鐨勫悕縐版槸 <a >registry</a>銆倂1 鐗堟湰鐨勬簮鐮佸湴鍧 <em>github.com/docker/docker-registry</em> 宸茬粡搴熷純錛寁2 鐗堟湰婧愮爜鍦板潃鍦?<a >github.com/docker/<strong>distribution</strong></a>錛屽搴旂殑 API 鏄?<a >Docker Registry HTTP API V2</a>銆?/p> <p>浠ヤ笅瀹夎娌℃湁浣跨敤 HTTPS 鏂瑰紡錛屽惎鐢?HTTPS 鐩稿叧鐨勮瘉涔﹂厤緗弬鑰冭繖涓枃妗o細</p> <ul> <li><a >Docker Registry 縐佹湁 Docker 绔?/a></li> </ul> <p>瀹樻柟鏂囨。鍙傝冿細</p> <ul> <li><a >Docker Hub 涓婄殑 registry 闀滃儚浠嬬粛鏂囨。</a></li> <li><a >Docker 瀹樻柟 Registry 閮ㄧ講鏂囨。</a></li> <li>Docker 鐩稿叧鍛戒護琛屼粙緇? <ul> <li><a >docker build</a></li> <li><a >docker tag</a></li> <li><a >docker push</a></li> </ul></li> </ul> <h3 id="toc_3">鏈綆瀹夎錛堝惎鍔級</h3> <pre><code>docker run -d -p 5000:5000 --name registry registry:2 </code></pre> <p>浠ヤ笂鍛戒護鏈嬌鐢ㄧ敤鎴峰悕瀵嗙爜鐧誨綍絳栫暐銆?/p> <h3 id="toc_4">鍚敤鐧誨綍瀵嗙爜</h3> <h4 id="toc_5">鐢熸垚瀵嗙爜</h4> <p>鐧誨綍瀵嗙爜鍙互閫氳繃 host 鐨勬枃浠朵紶鍏ワ紝浠ヤ笅鍛戒護璋冪敤瀹瑰櫒鐨?<code>htpasswd</code> 鍛戒護鐢熸垚瀵嗙爜鏂囦歡錛?/p> <pre><code class="language-bash">mkdir auth docker run --entrypoint htpasswd registry:2 \ -Bbn <USER_NAME> <PASSWORD> > auth/auth.htpasswd </code></pre> <h4 id="toc_6">鍚敤瀵嗙爜</h4> <p>閫氳繃 –volume 鍙傛暟浼犲叆瀵嗙爜鏂囦歡錛?/p> <pre><code class="language-bash">docker run -d -p 5000:5000 --restart=always --name registry \ --volume `PWD`/auth:/auth \ --env "REGISTRY_AUTH=htpasswd" \ --env "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \ --env REGISTRY_AUTH_HTPASSWD_PATH=/auth/auth.htpasswd \ registry:2 </code></pre> <h3 id="toc_7">淇敼闀滃儚瀛樺偍</h3> <p>榛樿闀滃儚鏁版嵁瀛樺偍鍦?Docker Volume 涓紝鍙互閫氳繃 bind mount 榪涜淇敼錛屽弬鏁頒俊鎭弬鑰?<a >Volume鏂囨。</a>銆備笅闈㈢殑渚嬪瓙灝嗘湰鏈虹洰褰?<code>PWD</code>/images 緇戝畾鍒板鍣ㄧ殑 /var/lib/registry</p> <pre><code>docker run -d -p 5000:5000 \ --name auth-registry \ -v `PWD`/images:/var/lib/registry \ -e SQLALCHEMY_INDEX_DATABASE=sqlite:////opt/docker-image/docker-registry.db \ -e STORAGE_PATH=/opt/docker-image \ --restart=always \ docker.onestch.com:5000/admin/registry:0.1 </code></pre> <p>榛樿鐨勫瓨鍌ㄥ紩鎿庝負鏈湴鏂囦歡緋葷粺錛屽彲浠ヤ慨鏀規(guī)枃浠剁殑瀛樺偍寮曟搸涓?Amazon S3 bucket銆丟oogle Cloud Platform 鎴栧叾浠栧紩鎿庯紝鍙互閫氳繃閰嶇疆 config.yml 鐨勬柟寮忎慨鏀瑰瓨鍌ㄩ厤緗紝鏇村淇℃伅鍙傝?<a >Docker Registry 瀛樺偍閰嶇疆鏂囨。</a>銆?/p> <h3 id="toc_8">鍋滄鏈嶅姟</h3> <p>鍋滄 registry 瀹瑰櫒騫舵竻鐞嗚繍琛屾暟鎹?/p> <pre><code>docker stop registry && \ docker rm -v registry </code></pre> <h3 id="toc_9">楠岃瘉</h3> <p>鏌ョ湅瀹瑰櫒淇℃伅</p> <pre><code>docker ps --no-trunc </code></pre> <p>鏌ョ湅鍏ㄩ儴閰嶇疆淇℃伅鎴栭儴鍒嗕俊鎭?/p> <pre><code>docker inspect <CONTAINER_ID> docker inspect <CONTAINER_ID> | grep -C3 -e "Volumes\":" docker inspect <CONTAINER_ID> | grep -C2 Binds docker inspect -f '{{ .Mounts }}' <CONTAINER_ID> </code></pre> <p>鏌ョ湅鏄犲皠鐨勮緇嗕俊鎭?/p> <pre><code>docker volume inspect 4496b0a257b966052ef8d0743014a4f63fc9924251c8de0df0e9c70fde4c45e6 </code></pre> <h2 id="toc_10">鍙戝竷闀滃儚</h2> <h3 id="toc_11">鐧誨綍鏈嶅姟</h3> <p>濡傛灉瀹夎錛堝惎鍔級鐨?registry 鏈嶅姟闇瑕佺櫥褰曡闂椂錛屾墽琛岋細</p> <pre><code>docker login <REGISTRY_HOST>:<REGISTRY_PORT> </code></pre> <p>杈撳叆瀹夎鏃惰瀹氱殑鐢ㄦ埛鍚嶅瘑鐮併?/p> <h3 id="toc_12">鐩爣鍦板潃</h3> <p>浣跨敤 docker tag 璁懼畾闀滃儚鐨勭洰鏍囧湴鍧錛岄暅鍍忕殑鐩爣鍦板潃鍖呮嫭涓夐儴鍒?/p> <pre><code><HOST_NAME>[:<HOST_PORT>]/<IMAGE_NAME>:<IMAGE_VERSION> </code></pre> <ul> <li><p>HOST_NAME : HOST_PORT </p> <p>鐩爣 registry 鏈嶅姟鍦板潃錛岀己鐪佹椂浣跨敤瀹樻柟 docker hub 鐨勫湴鍧 registry-1.docker.io錛屼笖涓嶅厑璁稿寘鍚笅鍒掔嚎</p></li> <li><p>IMAGE_NAME 鍙戝竷鐩爣闀滃儚鍚嶇О</p></li> <li><p>IMAGE_VERSION 鍙戝竷鐩爣闀滃儚鐗堟湰</p></li> </ul> <p>渚嬪錛?code>repo.company.com:3456/myapp:0.1</code></p> <h3 id="toc_13">鍙戝竷闀滃儚</h3> <p>鍙戝竷鐨勯暅鍍忔枃浠跺彲浠ヤ粠 docker hub 涓?Pull 鎴栬呮湰鍦頒嬌鐢?Dockerfile build 鑾峰緱</p> <p><strong>Pull</strong></p> <pre><code>docker pull registry </code></pre> <p><strong>Build</strong></p> <pre><code>docker build -t docker.onestch.com:5000/admin/registry:0.1 . </code></pre> <p>棣栧厛闇瑕佸闀滃儚 tag 璁懼畾鐩爣浠撳簱錛屽鏋?build 鐨勬椂鍊欏凡緇忚緗簡鐩爣鍦板潃錛屽彲浠ヤ笉鐢ㄨ繘琛?tag 鎿嶄綔</p> <pre><code>docker tag registry:latest docker.onestch.com:5000/admin/registry:0.1 </code></pre> <p>鐒跺悗 Push</p> <pre><code>docker push docker.onestch.com:5000/admin/registry:0.1 </code></pre> <h3 id="toc_14">楠岃瘉</h3> <p>閲嶆柊浠庣鏈変粨搴撲腑鑾峰彇闀滃儚</p> <pre><code>docker pull localhost:5000/admin/registry:0.1 0.1: Pulling from admin/registry Digest: sha256:d738e358b6910d3a53c9c7ff7bbb5eac490ab7a9b12ffb4c1c27f2c53aae9275 Status: Image is up to date for localhost:5000/admin/registry:0.1 </code></pre> <h2 id="toc_15">瀹夎 Registry UI</h2> <p>閫夋嫨 registry ui錛屽彲閫夌殑鏈?<a >atcol/docker-registry-ui</a>銆?a >hyper/docker-registry-web</a>銆?a >konradkleine/docker-registry-frontend</a>絳?/p> <h3 id="toc_16">瀹夎榪愯</h3> <p>閽堝 hyper/docker-registry-web錛屼嬌鐢?BASIC 璁よ瘉錛屾湭浣跨敤 HTTPS鐨勬儏鍐?/p> <pre><code>docker run -it -p 8080:8080 \ --rm \ --name registry-web \ --link auth-registry \ -e REGISTRY_URL=http://auth-registry:5000/v2 \ -e REGISTRY_AUTH_ENABLED=false \ -e REGISTRY_BASIC_AUTH=YWRtaW46MTIzNDU2 \ -e REGISTRY_NAME=docker.onestch.com:5000 hyper/docker-registry-web </code></pre> <p>鍛戒護涓?<code>auth-registry</code> 鏄嚜瀹氱殑 registry 闀滃儚銆?/p> <blockquote> <p>浣跨敤 HTTPS 鏃墮渶瑕佷紶鍏?/config/auth.key 鏂囦歡錛屾垨鑷畾涔?config.xml 閰嶇疆錛屼緥濡傦細<br/> docker run -it -p 8080:8080 –name registry-web \<br/> –link auth-registry \<br/> -v $(pwd)/config.yml:/conf/config.yml:ro \<br/> hyper/docker-registry-web</p> </blockquote> <h3 id="toc_17">綆$悊鐣岄潰</h3> <p>寤虹珛浜?registry 鏈嶅姟鍚庯紝瀵?registry 鐨勭鐞嗙晫闈㈠湪鏈満鐨勮闂湴鍧鏄?a href="http://localhost:8080%EF%BC%8C%E4%B8%80%E8%88%AC">http://localhost:8080錛屼竴鑸?/a> ui 鏈嶅姟浼氬拰 registry 鏈嶅姟鍚屾牱榪愯鍦ㄧ鏈夌綉緇滐紝鎵浠ユ垜浠彲浠ュ彂甯?registry ui 鍒?registry 鏈嶅姟鍣ㄥ啀榪愯銆?/p> <pre><code>docker tag docker.io/hyper/docker-registry-web docker.onestch.com:5000/admin/docker-registry-web docker push docker.onestch.com:5000/admin/docker-registry-web </code></pre> <p>鏌ョ湅 UI 鐣岄潰濡備笅鍥?/p> <p><img src="http://www.tkk7.com/images/blogjava_net/ideame/15332851482630.jpg" alt="" style="width:783px;"/>錕?/p> <img src ="http://www.tkk7.com/ideame/aggbug/433314.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ideame/" target="_blank">ideame</a> 2018-08-03 11:49 <a href="http://www.tkk7.com/ideame/archive/2018/08/03/433314.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Zookeeper Cli 甯哥敤鍛戒護http://www.tkk7.com/ideame/archive/2016/10/10/431878.htmlideameideameMon, 10 Oct 2016 09:54:00 GMThttp://www.tkk7.com/ideame/archive/2016/10/10/431878.htmlhttp://www.tkk7.com/ideame/comments/431878.htmlhttp://www.tkk7.com/ideame/archive/2016/10/10/431878.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/431878.htmlhttp://www.tkk7.com/ideame/services/trackbacks/431878.html鏈嶅姟綆$悊
  • 鍚姩ZK鏈嶅姟: zkServer.sh start
  • 鏌ョ湅ZK鐘舵? zkServer.sh status
  • 鍋滄ZK鏈嶅姟: zkServer.sh stop
  • 閲嶅惎ZK鏈嶅姟: zkServer.sh restart

緇堢鎿嶄綔

浣跨敤 zkCli 鍙互綆鍗曠殑瀵?ZooKeeper 榪涜璁塊棶錛屾暟鎹垱寤猴紝鏁版嵁淇敼絳夋搷浣? 榪炴帴鍛戒護琛屽涓嬶細

zkCli.sh -server 127.0.0.1:2181

鍛戒護琛屽伐鍏峰父鐢ㄦ搷浣滐細

  • 鏄劇ず鏍圭洰褰曚笅鏂囦歡

    ls /              //鏌ョ湅褰撳墠鑺傜偣鏁版嵁
    ls2 /             //鏌ョ湅褰撳墠鑺傜偣鏁版嵁騫惰兘鐪嬪埌鏇存柊嬈℃暟絳夋暟鎹?
  • 鍒涘緩鏂囦歡, 騫惰緗垵濮嬪唴瀹癸細

    create /config "test" //鍒涘緩涓涓柊鐨勮妭鐐瑰茍璁劇疆鍏寵仈鍊?create /config 鈥溾?    //鍒涘緩涓涓柊鐨勭┖鑺傜偣
    
  • 鑾峰彇鏂囦歡鍐呭

    get /brokers      //鑾峰彇鑺傜偣鍐呭
    
  • 淇敼鏂囦歡鍐呭

    set /zk "zkbak"   //瀵?zk 鎵鍏寵仈鐨勫瓧絎︿覆榪涜璁劇疆
    
  • 鍒犻櫎鏂囦歡

    delete /brokers  //鍒犻櫎鑺傜偣
    rmr    /brokers  //鍒犻櫎鑺傜偣鍙婂瓙鑺傜偣
    

鍥涘瓧鍛戒護

ZooKeeper 鏀寔鏌愪簺鐗瑰畾鐨勫洓瀛楀懡浠ゅ瓧姣嶄笌鍏剁殑浜や簰錛岀敤鏉ヨ幏鍙栨湇鍔$殑褰撳墠鐘舵佸強鐩稿叧淇℃伅銆傚湪瀹㈡埛绔彲浠ラ氳繃 telnet 鎴?nc 鍚?ZooKeeper 鎻愪氦鐩稿簲鐨勫懡浠ゃ傚懡浠よ濡備笅錛?/p>

echo conf | nc 132.37.3.26 26181

ZooKeeper 甯哥敤鍥涘瓧鍛戒護錛?/p>

  • conf

    杈撳嚭鐩稿叧鏈嶅姟閰嶇疆鐨勮緇嗕俊鎭?/p>

  • cons

    鍒楀嚭鎵鏈夎繛鎺ュ埌鏈嶅姟鍣ㄧ殑瀹㈡埛绔殑瀹屽叏鐨勮繛鎺?/ 浼氳瘽鐨勮緇嗕俊鎭傚寘鎷滄帴鍙?/ 鍙戦佲濈殑鍖呮暟閲忋佷細璇?id 銆佹搷浣滃歡榪熴佹渶鍚庣殑鎿嶄綔鎵ц絳夌瓑淇℃伅

  • dump

    鍒楀嚭鏈粡澶勭悊鐨勪細璇濆拰涓存椂鑺傜偣銆?/p>

  • envi

    杈撳嚭鍏充簬鏈嶅姟鐜鐨勮緇嗕俊鎭紙鍖哄埆浜?conf 鍛戒護錛夈?/p>

  • reqs

    鍒楀嚭鏈粡澶勭悊鐨勮姹?/p>

  • ruok

    嫻嬭瘯鏈嶅姟鏄惁澶勪簬姝g‘鐘舵併傚鏋滅‘瀹炲姝わ紝閭d箞鏈嶅姟榪斿洖鈥?imok 鈥濓紝鍚﹀垯涓嶅仛浠諱綍鐩稿簲

  • stat

    杈撳嚭鍏充簬鎬ц兘鍜岃繛鎺ョ殑瀹㈡埛绔殑鍒楄〃銆?/p>

  • wchs

    鍒楀嚭鏈嶅姟鍣?watch 鐨勮緇嗕俊鎭?/p>

  • wchc

    閫氳繃 session 鍒楀嚭鏈嶅姟鍣?watch 鐨勮緇嗕俊鎭紝瀹冪殑杈撳嚭鏄竴涓笌 watch 鐩稿叧鐨勪細璇濈殑鍒楄〃

  • wchp

    閫氳繃璺緞鍒楀嚭鏈嶅姟鍣?watch 鐨勮緇嗕俊鎭傚畠杈撳嚭涓涓笌 session 鐩稿叧鐨勮礬寰?/p>



ideame 2016-10-10 17:54 鍙戣〃璇勮
]]>
JMH(Java Micro Benchmark) 綆浠?/title><link>http://www.tkk7.com/ideame/archive/2016/08/01/431411.html</link><dc:creator>ideame</dc:creator><author>ideame</author><pubDate>Mon, 01 Aug 2016 09:12:00 GMT</pubDate><guid>http://www.tkk7.com/ideame/archive/2016/08/01/431411.html</guid><wfw:comment>http://www.tkk7.com/ideame/comments/431411.html</wfw:comment><comments>http://www.tkk7.com/ideame/archive/2016/08/01/431411.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ideame/comments/commentRss/431411.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ideame/services/trackbacks/431411.html</trackback:ping><description><![CDATA[     鎽樿: JMH綆浠嬫湰鏂囩敱 ImportNew - hejiani 緲昏瘧鑷?java-performance銆侸MH鏄柊鐨刴icrobenchmark錛堝井鍩哄噯嫻嬭瘯錛夋鏋訛紙2013騫撮嬈″彂甯冿級銆備笌鍏朵粬浼楀妗嗘灦鐩告瘮瀹冪殑鐗硅壊浼樺娍鍦ㄤ簬錛屽畠鏄敱O(jiān)racle瀹炵幇JIT鐨勭浉鍚屼漢鍛樺紑鍙戠殑銆傜壒鍒槸鎴戞兂鎻愪竴涓婣leksey Shipilev鍜屼粬浼樼鐨勫崥瀹㈡枃绔犮侸MH鍙兘涓庢渶鏂扮殑Oracle JRE鍚屾錛屽叾緇撴灉鍙俊搴﹀緢楂樸侸MH...  <a href='http://www.tkk7.com/ideame/archive/2016/08/01/431411.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/ideame/aggbug/431411.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ideame/" target="_blank">ideame</a> 2016-08-01 17:12 <a href="http://www.tkk7.com/ideame/archive/2016/08/01/431411.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>濡備綍灝?SVN 婧愮爜搴撹漿鎹負 Mercurialhttp://www.tkk7.com/ideame/archive/2014/02/28/410445.htmlideameideameFri, 28 Feb 2014 03:25:00 GMThttp://www.tkk7.com/ideame/archive/2014/02/28/410445.htmlhttp://www.tkk7.com/ideame/comments/410445.htmlhttp://www.tkk7.com/ideame/archive/2014/02/28/410445.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/410445.htmlhttp://www.tkk7.com/ideame/services/trackbacks/410445.html濡備綍灝?SVN 婧愮爜搴撹漿鎹負 Mercurial [1]

棣栧厛寰楀畨瑁?Subversion 搴撳嚱鏁?/p>

				    wget http://mirrors.hust.edu.cn/apache/subversion/subversion-1.8.8.tar.gz

    tar xzf subversion-1.8.8.tar.bz2 

    cd subversion-1.8.8

    subversion-1.8.8 aliang$ ./autogen.sh 
        buildcheck: checking installation...
        buildcheck: autoconf not found.
                    You need autoconf version 2.59 or newer installed.

    brew install autoconf
        ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/autoconf-2.69.mavericks.bottle.tar.gz
        #################################################### 100.0%
        ==> Pouring autoconf-2.69.mavericks.bottle.tar.gz
        馃嵑 /usr/local/Cellar/autoconf/2.69: 69 files, 2.0M

    ./autogen.sh 
        buildcheck: checking installation...
        buildcheck: autoconf version 2.69 (ok)
        buildcheck: autoheader version 2.69 (ok)
        buildcheck: libtool not found.
        You need libtool version 1.4 or newer installed

    brew install libtool
        Warning: A newer Command Line Tools release is available
        Update them from Software Update in the App Store.
        ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libtool-2.4.2.mavericks.bottle.2.tar.gz
        ##################################################### 100.0%
        ==> Pouring libtool-2.4.2.mavericks.bottle.2.tar.gz
        ==> Caveats
        In order to prevent conflicts with Apple''s own libtool we have prepended a "g"
        so, you have instead: glibtool and glibtoolize.
        ==> Summary
        馃嵑  /usr/local/Cellar/libtool/2.4.2: 66 files, 2.2M

    ./autogen.sh 
        buildcheck: checking installation...
        buildcheck: autoconf version 2.69 (ok)
        buildcheck: autoheader version 2.69 (ok)
        buildcheck: libtool version 2.4.2 (ok)
        Copying libtool helper: /usr/local/share/aclocal/libtool.m4
        Copying libtool helper: /usr/local/share/aclocal/ltoptions.m4
        Copying libtool helper: /usr/local/share/aclocal/ltsugar.m4
        Copying libtool helper: /usr/local/share/aclocal/ltversion.m4
        Copying libtool helper: /usr/local/share/aclocal/lt~obsolete.m4
        Creating build-outputs.mk...
        Creating svn_private_config.h.in...
        Creating configure...

        You can run ./configure now.

        Running autogen.sh implies you are a maintainer.  You may prefer
        to run configure in one of the following ways:

        ./configure --enable-maintainer-mode
        ./configure --disable-shared
        ./configure --enable-maintainer-mode --disable-shared
        ./configure --disable-optimize --enable-debug
        ./configure CUSERFLAGS='--flags-for-C' CXXUSERFLAGS='--flags-for-C++'

        Note:  If you wish to run a Subversion HTTP server, you will need
        Apache 2.x.  See the INSTALL file for details.

    brew install swig
        ==> Downloading http://downloads.sourceforge.net/project/swig/swig/swig-2.0.11/swig-2.0.11.tar.gz
        ######################################################################## 100.0%
        ==> ./configure --prefix=/usr/local/Cellar/swig/2.0.11
        ==> make
        ==> make install
        馃嵑  /usr/local/Cellar/swig/2.0.11: 597 files, 6.2M, built in 10.1 minutes 

    ./configure --with-swig=/usr/local/bin/swig
        configure: Configuring Subversion 1.8.8
        ... ...
        ==================================================================
        WARNING: You have chosen to compile Subversion with a different
                 compiler than the one used to compile Apache.

            Current compiler:  gcc
           Apache's compiler:  /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc

        This could cause some problems.
        ==================================================================
        ... ...

    make swig-py
    make install
    make check-swig-py        
    sudo make install-swig-py

    sudo cp -r /usr/local/lib/svn-python/ /Library/Python/2.7/site-packages/

		

鎵ц杞崲鍛戒護

				    mkdir hgpath

    cd hgpath

    hg init

    hg convert -s svn -d hg ${local_path} ./hgpath

		

娉ㄦ剰錛岃繖閲岃漿鎹㈢殑 SVN 鐩綍鍙兘鏄粨搴撶洰褰曡屼笉鏄伐浣滅洰褰?/p>



ideame 2014-02-28 11:25 鍙戣〃璇勮
]]>
ditaahttp://www.tkk7.com/ideame/archive/2013/11/03/405942.htmlideameideameSun, 03 Nov 2013 07:21:00 GMThttp://www.tkk7.com/ideame/archive/2013/11/03/405942.htmlhttp://www.tkk7.com/ideame/comments/405942.htmlhttp://www.tkk7.com/ideame/archive/2013/11/03/405942.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/405942.htmlhttp://www.tkk7.com/ideame/services/trackbacks/405942.html

ditaa is a small command-line utility written in Java, that can
convert diagrams drawn using ascii art ('drawings' that contain
characters that resemble lines like | / - ), into proper
bitmap graphics. This is best illustrated by the following
example -- which also illustrates the benefits of using ditaa in
comparison to other methods :)

    +--------+   +-------+    +-------+
    |        | --+ ditaa +--> |       |
    |  Text  |   +-------+    |diagram|
    |Document|   |!magic!|    |       |
    |     drhnpjb|   |       |    |       |
    +---+----+   +-------+    +-------+
        :                         ^
        |       Lots of work      |
        +-------------------------+
After conversion using ditaa, the above
file becomes:
round 		corner demo

ditaa interprets ascci art as a series of open and closed
shapes, but it also uses special markup syntax to increase the
possibilities of shapes and symbols that can be rendered.

ditaa is open source and free software (free as in free
speech), since it is released under the GPL license.

BUT WHY? Does this thing have any real use?

There are several reasons why I did this:

  1. Simply for hack value. I wanted to know if/how it could be
    done and how easily.
  2. Aesthetic reasons and legacy formats: there are
    several old FAQs with ascii diagrams lying out there. At this
    time and age ascii diagrams make my eyes hurt due to their
    ugliness. ditaa can be used to convert them to something
    nicer. Although ditaa would not be able to convert all of them
    (due to differences in drawing 'style' in each case), it could
    prove useful in the effort of modernising some of those
    documents without too much effort. I also know a lot of people
    that can make an ascii diagram easily, but when it gets to using
    a diagram program, they don't do very well. Maybe this utility
    could help them make good-looking diagrams easily/quickly.
  3. Embedding diagrams to text-only formats: There is a
    number of formats that are text-based (html, docbook, LaTeX,
    programming language comments), but when rendered by other
    software (browsers, interpreters, the javadoc tool etc), they
    can contain images as part of their content. If ditaa was
    intergrated with those tools (and I'm planning to do the javadoc
    bit myself soon), then you would have readable/editable diagrams
    within the text format itself, something that would make things
    much easier. ditaa syntax can currently be embedded to HTML.
  4. Reusability of "code": Suppose you make a diagram in
    ascii art and you render it with version 0.6b of ditaa. You keep
    the ascii diagram, and then version 0.8 comes out, which
    features some new cool effects. You re-render your old diagram
    with the new version of ditaa, and it looks better, with zero
    effort! In that sense ditaa is a diagram markup language, with
    very loose syntax.


Download

(((-intro-))) (((-download-))) (((-usage and syntax-))) (((-friends-))) (((-contact-)))

The latest version of ditaa can be obtained from its SourceForge project page.

You can checkout the code using:

聽聽聽svn co https://ditaa.svn.sourceforge.net/svnroot/ditaa ditaa

You can also browse the code online.


Usage and syntax

(((-intro-))) (((-download-))) (((-usage and syntax-))) (((-friends-))) (((-contact-)))

Command line

You need the latest Java runtimes (JRE) to use ditaa. The best
anti-aliasing can be achieved using Java 1.5 or higher.

To start from the command line, type (where XXX is the version number):

java -jar ditaaXXX.jar

You will be presented with the command-line options help:

 -A,--no-antialias          Turns anti-aliasing off.
 -d,--debug                 Renders the debug grid over the resulting
                            image.
 -E,--no-separation         Prevents the separation of common edges of
                            shapes. You can see the difference below:
+---------+
| cBLU    |
|         |
|    +----+
|    |cPNK|
|    |    |
+----+----+
			
Before processingCommon edge
separation (default)
No separation
(with the -E option)
 -e,--encoding <ENCODING>   The encoding of the input file.
 -h,--html                  In this case the input is an HTML file. The
                            contents of the <pre class="textdiagram"> tags
                            are rendered as diagrams and saved in the
                            images directory and a new HTML file is
                            produced with the appropriate <img> tags.
                            See the HTML section.
    --help                  Prints usage help.
 -o,--overwrite             If the filename of the destination image
                            already exists, an alternative name is chosen.
                            If the overwrite option is selected, the image
                            file is instead overwriten.
 -r,--round-corners         Causes all corners to be rendered as round
                            corners.
 -s,--scale <SCALE>         A natural number that determines the size of
                            the rendered image. The units are fractions of
                            the default size (2.5 renders 1.5 times bigger
                            than the default).
 -S,--no-shadows            Turns off the drop-shadow effect.
 -t,--tabs <TABS>           Tabs are normally interpreted as 8 spaces but
                            it is possible to change that using this
                            option. It is not advisable to use tabs in
                            your diagrams.
 -v,--verbose               Makes ditaa more verbose.

Syntax

Round corners

If you use / and \ to connect corners, they are rendered as
round corners:

/--+
|  |
+--/
		  
round corner demo
Before processingRendered

Color

Color codes can be used to add color to the diagrams. The
syntax of color codes is

cXXX

where XXX is a hex number. The first digit of the number
represents the red compoment of the color, the second digit
represents green and the third blue (good ol' RGB). See below for
an example of use of color codes:

/----\ /----\
|c33F| |cC02|
|    | |    |
\----/ \----/

/----\ /----\
|c1FF| |c1AB|
|    | |    |
\----/ \----/
		  
color demo
Before processingRendered

This can become a bit tedious after a while, so there are (only
some for now) human readable color codes provided:

Color codes
/-------------+-------------\
|cRED RED     |cBLU BLU     |
+-------------+-------------+
|cGRE GRE     |cPNK PNK     |
+-------------+-------------+
|cBLK BLK     |cYEL YEL     |
\-------------+-------------/
color code
Before processingRendered

As you can see above, if a colored shape contains any text, the
color of the text is adjusted according to the underlying
color. If the undelying color is dark, the text color is changed
to white (from the default black).

Note that color codes only apply if they are within closed
shapes, and they have no effect anywhere outside.

Tags

ditaa recognises some tags that change the way a rectangular
shape is rendered. All tags are between { and }. See the table below:

NameOriginalRenderedComment
Document
+-----+
|dnrxrtr  |
|     |
|     |
+-----+
		  
Symbol representing a document.
Storage
+-----+
|{s}  |
|     |
|     |
+-----+
		  
Symbol representing a form of storage,
like a
database or a hard disk.
Input/Output
+-----+
|{io} |
|     |
|     |
+-----+
		  
Symbol representing input/output.

Dashed lines

Any lines that contain either at least one = (for horizontal
lines) or at least one : (for vertical lines) are rendered as
dashed lines. Only one of those characters can make a whole line
dashed, so this feature "spreads". The rationale behind that is
that you only have to change one character to switch from normal
to dashed (and vice versa), rather than redrawing the whole
line/shape. Special symbols (like document or storage symbols) can
also be dashed. See below:

----+  /----\  +----+
    :  |    |  :    |
    |  |    |  |{s} |
    v  \-=--+  +----+
Before processingRendered

Point markers

If * is encountered on a line (but not at the end of the
line), it is rendered as a special marker, called the point
marker (this feature is still experimental). See below:

*----*
|    |      /--*
*    *      |
|    |  -*--+
*----*
point marker demo
Before processingRendered

Text handling

(This section is still being written)

If the pattern ' o XXXXX' is encountered, where XXXXX is any
text, the 'o' is interpreted and rendered as a bullet point. Note
that there must be a space before the 'o' as well as after it. See
below:

/-----------------\
| Things to do    |
| cGRE            |
| o Cut the grass |
| o Buy jam       |
| o Fix car       |
| o Make website  |
\-----------------/
bullet point demo
Before processingRendered

HTML mode

When ditaa is run using the --html option, the input
is an HTML file. The contents of the <pre
class="textdiagram">
tags are rendered as diagrams and
saved in the images directory and a new HTML file is
produced with the appropriate <img> tags.

If the id parameter is present in the
<pre> tag, its value is used as the filename of the
rendered png. Otherwise a filename of the form
ditaa_diagram_X.png is used, where X is a
number. Similarly, if there is no output filename specified, the
converted html file is named in the form of
xxxx_processed.html, where xxxx is the filename of the
original file.

In this mode, files that exist are not generated again, they
are just skipped. You can force overwrite of the files using the
--overwrite option.



ideame 2013-11-03 15:21 鍙戣〃璇勮
]]>
How to install ZXing in Xcode 4http://www.tkk7.com/ideame/archive/2013/11/03/405939.htmlideameideameSun, 03 Nov 2013 06:45:00 GMThttp://www.tkk7.com/ideame/archive/2013/11/03/405939.htmlhttp://www.tkk7.com/ideame/comments/405939.htmlhttp://www.tkk7.com/ideame/archive/2013/11/03/405939.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/405939.htmlhttp://www.tkk7.com/ideame/services/trackbacks/405939.html
  • April 2011
  • Posted By Yannick Loriot
  • 81 Comments
  • After an upgrading to Xcode 4, I have been having trouble compiling my own ZXing iOS project. That鈥檚 why I decided to explain you how to install easily ZXing with Xcode 4.

    First of all (for those who don鈥檛 know), ZXing is an open-source library to read the 1D/2D barcodes. This library is available on many platforms such as the iOS, Android, Blackberry, ect. You can find it here: http://code.google.com/p/zxing/.

    Before to start, be sure that you have the latest version of ZXing on your computer. If you don鈥檛, you must download it via a SVN client here: http://zxing.googlecode.com/svn/trunk/.

    To use ZXing into your project in Xcode 4 follow these steps:

    1. Firstly go to the 鈥?strong>zxing/iphone/ZXingWidget/鈥?and drag and drop the ZXingWidget.xcodeproj file onto your Xcode 鈥淧roject navigator鈥?sidebar. If a dialog appears uncheck the 鈥淐opy items鈥?and verify that the 鈥淩eference Type鈥?is 鈥淩elative to Project鈥?before clicking 鈥淎dd鈥?

    2. Now we are going to add ZXingWidget as a dependency of your project to allow Xcode to compile it whenever you compile the main project:
      1. First select your project file in the 鈥淧roject navigator鈥?
      2. Then select the corresponding target.
      3. After choose the 鈥?strong>Build Phases鈥?tab and expand the 鈥?strong>Target Dependencies鈥?section.
      4. Click the 鈥?鈥?(add) button to display a dialog.
      5. To finish add the 鈥?strong>ZXingWidget鈥?target as shown above.

    3. Now we are going to link the ZXingWidget static library (libZXingWidget.a) to the project:
      1. Firstly choose the 鈥?strong>Build Phases鈥?tab and expand the 鈥?strong>Link Binary With Libraries鈥?section.
      2. Then click the 鈥?鈥?(add) button to display a dialog.
      3. To finish add the 鈥?strong>libZXingWidget.a鈥?which is located in the 鈥淲orkspace鈥?category as shown above.
      4. By the way add the following iOS frameworks too:
        • AddressBook
        • AddressBookUI
        • AudioToolbox
        • AVFoundation
        • CoreMedia
        • CoreVideo
        • libiconv.dylib

    4. Then you must configure the header search path of your project to allow Xcode to find the ZXingWidget headers. To do that:
      1. In the 鈥淧roject navigator鈥?select the main project (not the target).
      2. Go to the 鈥?strong>Build Settings鈥?tab and search the 鈥?strong>Header Search Paths鈥?
      3. Double-click on it and add:
        • The full path of the 鈥?strong>zxing/iphone/ZXingWidget/Classes鈥?directory. Check the 鈥?strong>recursive path鈥?
        • The full path of the 鈥?strong>zxing/cpp/core/src/鈥?directory. Uncheck the 鈥?strong>recursive path鈥?

    Now you just have to import the 鈥?strong>ZXingWidgetController.h鈥?and the 鈥?strong>QRCodeReader.h鈥?to your project and use them.
    Attention: Make sure that the files in which you are using the ZXing headers have the .mm extension because they use c++ library files.

    Voil脿! Now all should be ok. I hope it鈥檒l help you!

    1 Star 2 Stars 3 Stars 4 Stars 5 Stars (33 votes, average: 4.55 out of 5)

    http://yannickloriot.com/2011/04/how-to-install-zxing-in-xcode-4/



    ideame 2013-11-03 14:45 鍙戣〃璇勮
    ]]>
    MySQL-python 瀹夎鐨勯棶棰?/title><link>http://www.tkk7.com/ideame/archive/2013/07/22/401813.html</link><dc:creator>ideame</dc:creator><author>ideame</author><pubDate>Sun, 21 Jul 2013 17:59:00 GMT</pubDate><guid>http://www.tkk7.com/ideame/archive/2013/07/22/401813.html</guid><wfw:comment>http://www.tkk7.com/ideame/comments/401813.html</wfw:comment><comments>http://www.tkk7.com/ideame/archive/2013/07/22/401813.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ideame/comments/commentRss/401813.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ideame/services/trackbacks/401813.html</trackback:ping><description><![CDATA[鍦∕ac涓嬪畨瑁匨ySQL-python涓鐩存湁闂錛屼笉綆℃槸鐢╬ip榪樻槸鐢╯etup.py錛岄兘鏄繑鍥炲涓嬮敊璇細<br /><br /><div style="background-color: rgb(0, 0, 0);"><font color="#F5F5DC" face="Courier New"><br />sudo python setup.py install<br /><br />running install<br />running bdist_egg<br />running egg_info<br />writing MySQL_python.egg-info/PKG-INFO<br />writing top-level names to MySQL_python.egg-info/top_level.txt<br />writing dependency_links to MySQL_python.egg-info/dependency_links.txt<br />reading manifest file 'MySQL_python.egg-info/SOURCES.txt'<br />reading manifest template 'MANIFEST.in'<br />writing manifest file 'MySQL_python.egg-info/SOURCES.txt'<br />installing library code to build/bdist.macosx-10.7-x86_64/egg<br />running install_lib<br />running build_py<br />copying MySQLdb/release.py -> build/lib.macosx-10.7-x86_64-2.7/MySQLdb<br />running build_ext<br />building '_mysql' extension<br />/ A p p l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p e r / T o o l c h a i n s / X c o d e D e f a u l t . x c t o o l c h a i n / u s r / b i n / c l a n g聽聽 - f n o - s t r i c t - a l i a s i n g聽聽 - f n o - c o m m o n聽聽 - d y n a m i c聽聽 - I / u s r / l o c a l / i n c l u d e聽聽 - I / u s r / l o c a l / o p t / s q l i t e / i n c l u d e聽聽 - i s y s r o o t聽聽 / A p p l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p e r / P l a t f o r m s / M a c O S X . p l a t f o r m / D e v e l o p e r / S D K s / M a c O S X 1 0 . 7 . s d k聽聽 - I / A p p l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p e r / P l a t f o r m s / M a c O S X . p l a t f o r m / D e v e l o p e r / S D K s / M a c O S X 1 0 . 7 . s d k / S y s t e m / L i b r a r y / F r a m e w o r k s / T k . f r a m e w o r k / V e r s i o n s / 8 . 5 / H e a d e r s聽聽 - D N D E B U G聽聽 - g聽聽 - f w r a p v聽聽 - O 3聽聽 - W a l l聽聽 - W s t r i c t - p r o t o t y p e s聽聽 -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/local/Cellar/mysql/5.6.10/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-x86_64-2.7/_mysql.o -Os -g -fno-strict-aliasing<br />unable to execute /: Permission denied<br />error: command '/' failed with exit status 1</font></div><br /><br />緇忚繃Google錛屽彂鐜板師鏉ユ槸XCode娌℃湁瀹夎Command line Tools鐨勯棶棰橈紝鍙傝冿細http://sourceforge.net/p/mysql-python/bugs/333/<br /><img src ="http://www.tkk7.com/ideame/aggbug/401813.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ideame/" target="_blank">ideame</a> 2013-07-22 01:59 <a href="http://www.tkk7.com/ideame/archive/2013/07/22/401813.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>杞歡綰ц礋杞藉潎琛″櫒(LVS/HAProxy/Nginx)鐨勭壒鐐瑰拰瀵規(guī)瘮http://www.tkk7.com/ideame/archive/2013/07/16/401636.htmlideameideameTue, 16 Jul 2013 07:52:00 GMThttp://www.tkk7.com/ideame/archive/2013/07/16/401636.htmlhttp://www.tkk7.com/ideame/comments/401636.htmlhttp://www.tkk7.com/ideame/archive/2013/07/16/401636.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/401636.htmlhttp://www.tkk7.com/ideame/services/trackbacks/401636.htmlLVS鐨勭壒鐐規(guī)槸錛?/h2>
    1. 鎶楄礋杞借兘鍔涘己銆佹槸宸ヤ綔鍦ㄧ綉緇?灞備箣涓婁粎浣滃垎鍙戜箣鐢紝娌℃湁嫻侀噺鐨勪駭鐢燂紝榪欎釜鐗圭偣涔熷喅瀹氫簡瀹冨湪璐熻澆鍧囪 杞歡閲岀殑鎬ц兘鏈寮虹殑錛?/li>
    2. 閰嶇疆鎬ф瘮杈冧綆錛岃繖鏄竴涓己鐐逛篃鏄竴涓紭鐐癸紝鍥犱負娌℃湁鍙お澶氶厤緗殑涓滆タ錛屾墍浠ュ茍涓嶉渶瑕佸お澶氭帴瑙︼紝澶уぇ鍑忓皯浜嗕漢涓哄嚭閿欑殑鍑犵巼錛?/li>
    3. 宸ヤ綔紼沖畾錛岃嚜韜湁瀹屾暣鐨勫弻鏈虹儹澶囨柟妗堬紝濡侺VS+Keepalived鍜孡VS+Heartbeat錛屼笉榪囨垜浠湪欏圭洰瀹炴柦涓敤寰楁渶澶氱殑榪樻槸LVS/DR+Keepalived錛?/li>
    4. 鏃犳祦閲忥紝淇濊瘉浜嗗潎琛″櫒IO鐨勬ц兘涓嶄細鏀跺埌澶ф祦閲忕殑褰卞搷錛?/li>
    5. 搴旂敤鑼冨洿姣旇緝騫匡紝鍙互瀵規(guī)墍鏈夊簲鐢ㄥ仛璐熻澆鍧囪 錛?/li>
    6. 杞歡鏈韓涓嶆敮鎸佹鍒欏鐞嗭紝涓嶈兘鍋氬姩闈欏垎紱伙紝榪欎釜灝辨瘮杈冮仐鎲句簡錛涘叾瀹炵幇鍦ㄨ澶氱綉绔欏湪榪欐柟闈㈤兘鏈夎緝寮虹殑闇姹傦紝榪欎釜鏄疦ginx/HAProxy+Keepalived鐨勪紭鍔挎墍鍦ㄣ?/li>
    7. 濡傛灉鏄綉绔欏簲鐢ㄦ瘮杈冨簽澶х殑璇濓紝瀹炴柦LVS/DR+Keepalived璧鋒潵灝辨瘮杈冨鏉備簡錛岀壒鍒悗闈㈡湁Windows Server搴旂敤鐨勬満鍣ㄧ殑璇濓紝濡傛灉瀹炴柦鍙婇厤緗繕鏈夌淮鎶よ繃紼嬪氨姣旇緝澶嶆潅浜嗭紝鐩稿鑰岃█錛孨ginx/HAProxy+Keepalived灝辯畝鍗曞浜嗐?/li>

    Nginx鐨勭壒鐐規(guī)槸錛?/h2>
    1. 宸ヤ綔鍦ㄧ綉緇滅殑7灞備箣涓婏紝鍙互閽堝http搴旂敤鍋氫竴浜涘垎嫻佺殑絳栫暐錛屾瘮濡傞拡瀵瑰煙鍚嶃佺洰褰曠粨鏋勶紝瀹冪殑姝e垯瑙勫垯姣擧AProxy鏇翠負寮哄ぇ鍜岀伒媧伙紝榪欎篃鏄澶氭湅鍙嬪枩嬈㈠畠鐨勫師鍥犱箣涓錛?/li>
    2. Nginx瀵圭綉緇滅殑渚濊禆闈炲父灝忥紝鐞嗚涓婅兘ping閫氬氨灝辮兘榪涜璐熻澆鍔熻兘錛岃繖涓篃鏄畠鐨勪紭鍔挎墍鍦紱
    3. Nginx瀹夎鍜岄厤緗瘮杈冪畝鍗曪紝嫻嬭瘯璧鋒潵姣旇緝鏂逛究錛?/li>
    4. 涔熷彲浠ユ壙鎷呴珮鐨勮礋杞藉帇鍔涗笖紼沖畾錛屼竴鑸兘鏀拺瓚呰繃鍑犱竾嬈$殑騫跺彂閲忥紱
    5. Nginx鍙互閫氳繃绔彛媯嫻嬪埌鏈嶅姟鍣ㄥ唴閮ㄧ殑鏁呴殰錛屾瘮濡傛牴鎹湇鍔″櫒澶勭悊緗戦〉榪斿洖鐨勭姸鎬佺爜銆佽秴鏃剁瓑絳夛紝騫朵笖浼氭妸榪斿洖閿欒鐨勮姹傞噸鏂版彁浜ゅ埌鍙︿竴涓妭鐐癸紝涓嶈繃鍏朵腑緙虹偣灝辨槸涓嶆敮鎸乽rl鏉ユ嫻嬶紱
    6. N1.ginx浠呰兘鏀寔http鍜孍mail錛岃繖鏍峰氨鍦ㄩ傜敤鑼冨洿涓婇潰灝忓緢澶氾紝榪欎釜瀹冪殑寮卞娍錛?/li>
    7. N1.ginx涓嶄粎浠呮槸涓嬈句紭縐鐨勮礋杞藉潎琛″櫒/鍙嶅悜浠g悊杞歡錛屽畠鍚屾椂涔熸槸鍔熻兘寮哄ぇ鐨刉eb搴旂敤鏈嶅姟鍣ㄣ侺NMP鐜板湪涔熸槸闈炲父嫻佽鐨剋eb鏋舵瀯錛屽ぇ鏈夊拰浠ュ墠鏈嫻佽鐨凩AMP鏋舵瀯鍒嗗涵鎶椾簤涔嬪娍錛屽湪楂樻祦閲忕殑鐜涓篃鏈夊緢濂界殑鏁堟灉銆?/li>
    8. Nginx鐜板湪浣滀負Web鍙嶅悜鍔犻熺紦瀛樿秺鏉ヨ秺鎴愮啛浜嗭紝寰堝鏈嬪弸閮藉凡鍦ㄧ敓浜х幆澧冧笅鎶曞叆鐢熶駭浜嗭紝鑰屼笖鍙嶆槧鏁堟灉涓嶉敊錛岄熷害姣斾紶緇熺殑Squid鏈嶅姟鍣ㄦ洿蹇紝鏈夊叴瓚g殑鏈嬪弸鍙互鑰冭檻鐢ㄥ叾浣滀負鍙嶅悜浠g悊鍔犻熷櫒銆?/li>

    HAProxy鐨勭壒鐐規(guī)槸錛?/h2>
    1. HAProxy鏄敮鎸佽櫄鎷熶富鏈虹殑錛屼互鍓嶆湁鏈嬪弸璇磋繖涓笉鏀寔铏氭嫙涓繪満錛屾垜榪欓噷鐗規(guī)鏇存涓涓嬨?/li>
    2. 鑳藉琛ュ厖Nginx鐨勪竴浜涚己鐐規(guī)瘮濡係ession鐨勪繚鎸侊紝Cookie鐨勫紩瀵肩瓑宸ヤ綔
    3. 鏀寔url媯嫻嬪悗绔殑鏈嶅姟鍣ㄥ嚭闂鐨勬嫻嬩細鏈夊緢濂界殑甯姪銆?/li>
    4. 瀹冭窡LVS涓鏍鳳紝鏈韓浠呬粎灝卞彧鏄竴嬈捐礋杞藉潎琛¤蔣浠訛紱鍗曠函浠庢晥鐜囦笂鏉ヨHAProxy鏇翠細姣擭ginx鏈夋洿鍑鴻壊鐨勮礋杞藉潎琛¢熷害錛屽湪騫跺彂澶勭悊涓婁篃鏄紭浜嶯ginx鐨勩?/li>
    5. HAProxy鍙互瀵筂ysql璇昏繘琛岃礋杞藉潎琛★紝瀵瑰悗绔殑MySQL鑺傜偣榪涜媯嫻嬪拰璐熻澆鍧囪 錛屼笉榪囧湪鍚庣鐨凪ySQL slaves鏁伴噺瓚呰繃10鍙版椂鎬ц兘涓嶅LVS錛屾墍浠ユ垜鍚戝ぇ瀹舵帹鑽怢VS+Keepalived銆?/li>

    HAProxy鐨勭畻娉曠幇鍦ㄤ篃瓚婃潵瓚婂浜嗭紝鍏蜂綋鏈夊涓?縐嶏細

    1. roundrobin錛岃〃紺虹畝鍗曠殑杞錛岃繖涓笉澶氳錛岃繖涓槸璐熻澆鍧囪 鍩烘湰閮藉叿澶囩殑錛?/li>
    2. static-rr錛岃〃紺烘牴鎹潈閲嶏紝寤鴻鍏蟲敞錛?/li>
    3. leastconn錛岃〃紺烘渶灝戣繛鎺ヨ呭厛澶勭悊錛屽緩璁叧娉紱
    4. source錛岃〃紺烘牴鎹姹傛簮IP錛岃繖涓窡Nginx鐨処P_hash鏈哄埗綾諱技錛屾垜浠敤鍏朵綔涓鴻В鍐硈ession闂鐨勪竴縐嶆柟娉曪紝寤鴻鍏蟲敞錛?/li>
    5. ri錛岃〃紺烘牴鎹姹傜殑URI錛?/li>
    6. rlparam錛岃〃紺烘牴鎹姹傜殑URl鍙傛暟'balance urlparam' requires an URL parameter name錛?/li>
    7. hdr(name)錛岃〃紺烘牴鎹瓾TTP璇鋒眰澶存潵閿佸畾姣忎竴嬈TTP璇鋒眰錛?/li>
    8. rdp-cookie(name)錛岃〃紺烘牴鎹嵁cookie(name)鏉ラ攣瀹氬茍鍝堝笇姣忎竴嬈CP璇鋒眰銆?/li>


    ideame 2013-07-16 15:52 鍙戣〃璇勮
    ]]>Git on Windowshttp://www.tkk7.com/ideame/archive/2011/11/12/363571.htmlideameideameSat, 12 Nov 2011 03:27:00 GMThttp://www.tkk7.com/ideame/archive/2011/11/12/363571.htmlhttp://www.tkk7.com/ideame/comments/363571.htmlhttp://www.tkk7.com/ideame/archive/2011/11/12/363571.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/363571.htmlhttp://www.tkk7.com/ideame/services/trackbacks/363571.html涓嬭澆鏂囦歡 http://msysgit.googlecode.com/files/PortableGit-1.7.7.1-preview20111027.7z

    瑙e帇鑷?D:\JavaSoft\git-1.7.7.1

    澧炲姞緋葷粺鐜璺緞錛欴:\JavaSoft\git-1.7.7.1\bin;D:\JavaSoft\git-1.7.7.1\cmd;

    璁劇疆緋葷粺灞炴э細
    git config --global user.name "your.name" git config --global user.email git.mail.name@gmail.com

    鍒涘緩瀵嗛挜錛?/p>

    mkdir /.ssh

    ssh-keygen -f D:\JavaSoft\git-1.7.7.1\.ssh\id_rsa -t rsa -C 'git.mail.name@gmail.com' -t rsa

    澶嶅埗 id_rsa.pub 鐨勫唴瀹癸紝鍒癵ithub.com澧炲姞鍏挜錛岀劧鍚庣矘璐翠繚瀛樸?/p>

    嫻嬭瘯錛歡it -v -T git@github.com

    Hi your.name! You've successfully authenticated, but GitHub does not provide shell access.



    ideame 2011-11-12 11:27 鍙戣〃璇勮
    ]]>
    yum 涓婃搗浜ら氬ぇ瀛?Repositoryhttp://www.tkk7.com/ideame/archive/2011/05/18/350516.htmlideameideameWed, 18 May 2011 09:36:00 GMThttp://www.tkk7.com/ideame/archive/2011/05/18/350516.htmlhttp://www.tkk7.com/ideame/comments/350516.htmlhttp://www.tkk7.com/ideame/archive/2011/05/18/350516.html#Feedback0http://www.tkk7.com/ideame/comments/commentRss/350516.htmlhttp://www.tkk7.com/ideame/services/trackbacks/350516.html
    [base]
    name
    =CentOS-5聽-聽Base
    repo
    =os
    baseurl
    =http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
    gpgcheck
    =1
    gpgkey
    =http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5

    #released聽updates
    [update]
    name
    =CentOS-5聽-聽Updates
    baseurl
    =http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
    gpgcheck
    =1
    gpgkey
    =http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5

    #packages聽used/produced聽in聽the聽build聽but聽not聽released
    [addons]
    name
    =CentOS-5聽-聽Addons
    baseurl
    =http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
    gpgcheck
    =1
    gpgkey
    =http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5

    #additional聽packages聽that聽may聽be聽useful
    [extras]
    name
    =CentOS-5聽-聽Extras
    baseurl
    =http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
    gpgcheck
    =1
    gpgkey
    =http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5

    #additional聽packages聽that聽extend聽functionality聽of聽existing聽packages
    [centosplus]
    name
    =CentOS-5聽-聽Plus
    baseurl
    =http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
    gpgcheck
    =1
    enabled
    =0
    gpgkey
    =http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5

    #contrib聽-聽packages聽by聽Centos聽Users
    [contrib]
    name
    =CentOS-5聽-聽Contrib
    baseurl
    =http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
    gpgcheck
    =1
    enabled
    =0
    gpgkey
    =http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5



    ideame 2011-05-18 17:36 鍙戣〃璇勮
    ]]>
    主站蜘蛛池模板: 国产99久久久国产精免费| 综合一区自拍亚洲综合图区| 亚洲免费在线观看| 亚洲高清免费视频| 一级毛片免费在线| 免费一级特黄特色大片在线 | 欧美色欧美亚洲另类二区| 永久免费毛片在线播放| 亚洲国产激情在线一区| 在线精品免费视频无码的| 亚洲中文字幕无码亚洲成A人片| 最近免费最新高清中文字幕韩国| 久久亚洲国产精品成人AV秋霞| 足恋玩丝袜脚视频免费网站| 亚洲在成人网在线看| 成人人观看的免费毛片| 欧洲亚洲综合一区二区三区| 亚洲日韩中文在线精品第一| 青柠影视在线观看免费高清| 亚洲一区中文字幕久久| 亚洲免费在线视频播放| 在线观看亚洲AV每日更新无码| 国产精品极品美女免费观看| 一级毛片免费播放男男| 亚洲影院在线观看| 无码av免费毛片一区二区| 人人狠狠综合久久亚洲| 亚洲综合色自拍一区| 精品国产sm捆绑最大网免费站| 亚洲日韩久久综合中文字幕| 亚洲真人日本在线| 亚洲免费观看网站| 美女免费精品高清毛片在线视| 国产亚洲AV无码AV男人的天堂| 亚洲精品在线免费观看| 美女露100%胸无遮挡免费观看| 亚洲国产天堂久久综合网站| 永久免费观看的毛片的网站| baoyu116.永久免费视频| 中国亚洲呦女专区| 亚洲va中文字幕无码久久不卡|