群集 Haproxy web群集

來源:互聯網
上載者:User

標籤:設定檔   源碼包安裝haproxy   

首先使用yum安裝好,環境需求

yum -y install pcre-devel bzip2-devel gcc gcc-c++ make 

然後解壓源碼包

tar xf haproxy-1.4.24.tar.gz

接下來我們就可以源碼包安裝了

首先看一下自己的系統版本

[[email protected] ~]# uname -r

2.6.32-358.el6.i686

cd haproxy-1.4.24

make TARGET=linux26 && make install (這裡的26是系統版本的前兩位2.6.32-358.el6.i686)

[[email protected] haproxy-1.4.24]# cd examples/

在etc下建立haporxy的配置目錄 mkdir /etc/haproxy/

[[email protected] examples]# cp haproxy.cfg /etc/haproxy/haproxy.conf (將配置文集拷貝過去作為設定檔)

cp haproxy.init /etc/init.d/haproxy (把 haproxy添加為系統服務)

chmod +x /etc/init.d/haproxy   (添加執行許可權)

[[email protected] examples]# ln -s /usr/local/sbin/haproxy /usr/sbin/ (為haproxy最佳化路徑做軟串連)

[[email protected] examples]# /etc/init.d/haproxy start

OK!!! haproxy服務已經裝好了。



群集 Haproxy web群集

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.