Solaris10 x86下安裝memcached

          Posted on 2008-09-18 19:07 puras 閱讀(1423) 評論(1)  編輯  收藏 所屬分類: Other
          項目中需要用到Memcached,前期的測試,都是在Win上做的.而我們的服務(wù)器卻是Solaris的.為了測試在Solaris上的性能.則需要在服務(wù)器上安裝Memcached.因為之前沒有弄過這個東西,所以安裝的過程也遇到了很多的問題.
              
          還好在Solaris下,有一個專門的工具Cool Stack,它是一個Apache,PHP,MySql的簡易安裝包.現(xiàn)在的版本是1.3.1.很慶幸,在這個安裝包中,同樣也包含Memcached.

          http://cooltools.sunsource.net/coolstack/下載Cool Stack的運行環(huán)境和Memcached的安裝包.
          分別是:CSKruntime_1.3.1_i386.pkg.bz2和CSKmemcached_1.3.1_i386.pkg.bz2.
          下載后上傳到Solaris上.
          之后進(jìn)行解壓.
          bunzip2 CSKruntime_1.3.1_i386.pkg.bz2
          bunzip2 CSKmemcached_1.3.1_i386.pkg.bz2
          解壓后,
          使用Root賬號登錄.
          之后使用pkgadd來安裝兩個包,記住要加-d.
          pkgadd -d CSKruntime_1.3.1_i386.pkg
          pkgadd -d CSKmemcached_1.3.1_i386.pkg

          很容易的就安裝成功了.

          之后進(jìn)入到目錄:/opt/coolstack/bin中.
          你就會看到目錄里有一個memcached了.

          執(zhí)行./memcached -h
          如果你能看到像下面的內(nèi)容一樣,就證明你安裝成功了.
           1memcached 1.2.5
           2-<num>      TCP port number to listen on (default: 11211)
           3-<num>      UDP port number to listen on (default: 0, off)
           4-<file>     unix socket path to listen on (disables network support)
           5-<mask>     access mask for unix socket, in octal (default 0700)
           6-<ip_addr>  interface to listen on, default is INDRR_ANY
           7-d            run as a daemon
           8-r            maximize core file limit
           9-<username> assume identity of <username> (only when run as root)
          10-<num>      max memory to use for items in megabytes, default is 64 MB
          11-M            return error on memory exhausted (rather than removing items)
          12-<num>      max simultaneous connections, default is 1024
          13-k            lock down all paged memory.  Note that there is a
          14              limit on how much memory you may lock.  Trying to
          15              allocate more than that would fail, so be sure you
          16              set the limit correctly for the user you started
          17              the daemon with (not for -<username> user;
          18              under sh this is done with 'ulimit -S -l NUM_KB').
          19-v            verbose (print errors/warnings while in event loop)
          20-vv           very verbose (also print client commands/reponses)
          21-h            print this help and exit
          22-i            print memcached and libevent license
          23-b            run a managed instanced (mnemonic: buckets)
          24-<file>     save PID in <file>, only used with -d option
          25-<factor>   chunk size growth factor, default 1.25
          26-<bytes>    minimum space allocated for key+value+flags, default 48
          27-L            Try to use large memory pages (if available). Increasing
          28              the memory page size could reduce the number of TLB misses
          29              and improve the performance. In order to get large pages
          30              from the OS, memcached will allocate the total item-cache
          31              in one large chunk.
          32-<num>      number of threads to use, default 4

          哈.現(xiàn)在你可以將Memcached啟動起來進(jìn)行測試?yán)?

          ./memcached -d -m 2048 -l 10.10.13.240 -P 11211   

          關(guān)于Memcached的使用.網(wǎng)上有很多教程.
          可以參見.

          PS:這兩天被這個問題給郁悶壞了.
          新裝的Solaris服務(wù)器.
          要安裝Memcached,首先要安裝libevent.
          網(wǎng)上提供的都是需要自己編譯,安裝的.
          這就需要在系統(tǒng)中安裝gcc和make.
          裝這兩個東西倒沒有什么問題.
          可是在安裝libevent的時候,遇到了好多的問題.
          做C的同事也幫著弄了好久,才勉強將它安裝上,其間還改了源代碼....
          可是Memcached卻始終提示找不到libevent.
          無論你是否指定libevent的路徑.都不行.
          我在自己的Ubuntu上裝了一下,一點問題也沒有.
          快要放棄的時候,在Sun的網(wǎng)站上看到了可以使用Cool Stack來安裝Memcached.
          才讓自己看了希望.

          還好,功夫不負(fù)有心人.
          現(xiàn)在已經(jīng)開始進(jìn)行Memcached的測試了.

          終于把這個狗屎問題解決了.

          Feedback

          # re: Solaris10 x86下安裝memcached  回復(fù)  更多評論   

          2009-10-09 15:30 by 元石
          您好!我也通過CSKmemcached安裝的 memcache ,請問安裝過后還需要修改php.ini文件嗎,我直接安裝完過后任然無法使用

          posts - 47, comments - 124, trackbacks - 0, articles - 0

          Copyright © puras

          主站蜘蛛池模板: 买车| 沙洋县| 石景山区| 藁城市| 交城县| 普兰县| 日喀则市| 崇义县| 罗江县| 翁牛特旗| 毕节市| 乌鲁木齐市| 勐海县| 嘉义市| 彭水| 铜川市| 惠水县| 濮阳市| 凤凰县| 调兵山市| 济阳县| 绥芬河市| 伊金霍洛旗| 青浦区| 明星| 红安县| 芜湖市| 宜君县| 谷城县| 陵水| 淅川县| 尼木县| 土默特右旗| 广南县| 股票| 抚松县| 黑龙江省| 云霄县| 广昌县| 璧山县| 汨罗市|