Linux源碼安裝memcached,linux源碼memcached

來源:互聯網
上載者:User

Linux源碼安裝memcached,linux源碼memcached

基本步驟:

1、下載壓縮檔(wget 檔案url)

2、解壓(tar -zxvf 檔案名稱)

3、configure (./configure --prefix=安裝目錄)

4、make編譯 (前提是步驟3沒問題,否則轉步驟1)

5、make install 安裝 (安裝完後記得cd到安裝目錄查看相應檔案是否產生)

6、清除安裝過程中產生的臨時檔案和設定檔 (make clean & make distclean)


以下是安裝過程中用到的所有命令

[root@localhost ~]# mkdir test

[root@localhost ~]# cd test

[root@localhost test]# wget http://www.memcached.org/files/memcached-1.4.24.tar.gz

[root@localhost test]# tar -zxvf memcached-1.4.24.tar.gz

[root@localhost test]# mkdir memcached

[root@localhost test]# mkdir libevent

[root@localhost test]# wget https://github.com/downloads/libevent/libevent/libevent-1.4.14b-stable.tar.gz

[root@localhost test]# tar -zxvf libevent-1.4.14b-stable.tar.gz

[root@localhost test]# cd libevent-1.4.14b-stable

[root@localhostlibevent-1.4.14b-stable]# ./configure --prefix=/root/test/libevent

[root@localhost libevent-1.4.14b-stable]# make

[root@localhost libevent-1.4.14b-stable]# make install

[root@localhost libevent-1.4.14b-stable]# cd ../memcached-1.4.24

[root@localhost memcached-1.4.24]# ./configure --prefix=/root/test/memcached --with-libevent=/root/test/libevent

[root@localhost memcached-1.4.24]# make

[root@localhost memcached-1.4.24]# make install

[root@localhost memcached-1.4.24]# cd ../memcached

[root@localhost memcached]# ll


到此可見memcached目錄下的檔案,即安裝成功,注意安裝memcached之前需要libevent,兩者版本要一致,我建立了一個臨時的目錄用於測試,實際安裝過程中可能指定目錄為/root/local/memcached,最好自己指定目錄,便於管理

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.