【workerman】CentOS下的workerman對應的環境配置

來源:互聯網
上載者:User

一、系統內容說明

其實只要知道是32位或者64位就行,但是還是帖出來吧,這裡用的是自己的虛擬機器裡的伺服器,公司的就不貼出來了

[root@yuServer ~]# uname -aLinux yuServer.localdomain 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
二、開始安裝1、php-posix
上面是啟動的時候的錯誤,所以這個必須要裝的呦。1)安裝
yum -y install php-process
2)驗證
[root@yuServer ~]# php -m|grep posixposix
2、修改設定檔中的地址把設定檔中的地址改成你現在伺服器的地址,不然就會出現下面的錯誤哦
[root@yuServer workerman]# vi conf/conf.d/GameGateway.conf
[root@yuServer workerman]# vi conf/conf.d/GameWorker.conf
3、安裝memcached1).CentOS memcached安裝前需要先安裝libevent
wget http://www.monkey.org/~provos/libevent-2.0.4-alpha.tar.gztar xzvf libevent-2.0.4-alpha.tar.gzcd libevent-2.0.4-alpha./configure --prefix=/usrmakemake install
2)安裝memcached-1.4.5
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gztar xzvf memcached-1.4.5.tar.gzcd memcached-1.4.5./configure --with-libevent=/usr/  makemake install
3)啟動memcached
/sbin/ldconfig/usr/local/bin/memcached -d -m 200 -u root -l 127.0.0.1 -p 11211 -c 256 -P /var/memcache.pid
4)查看是否啟動
# ps -ef | grep memcached
5)安裝可能遇到的問題
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
解決方案
yum install zlib-devel或rpm -ihv zlib-devel-1.2.3-3.x86_64.rpm
4、CentOS環境PHP安裝memcache擴充1)安裝Memcached用戶端庫
yum install libmemcached
2)PHP安裝Memcache擴充
wget -c http://pecl.php.net/get/memcache-3.0.8.tgztar -zxvf memcache-3.0.8.tgzcd memcache-3.0.8phpize./configure  - --enable-memcache --with-zlib-dirmake && make installvim /usr/local/php/etc/php.ini   extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcache.so   session.save_handler = memcache   session.save_path = "tcp://127.0.0.100:11211"service httpd restart
5、安裝libevent和php擴充1)安裝libevent
yum -y install libevent-devel
2)安裝lib的php擴充
pecl install channel://pecl.php.net/libevent-0.1.0
3)修改php.ini並重啟apache
vim /etc/php.ini #添加一行  extension=libevent.so
5、完成
三、後記在這裡十分感謝 walkor、皺皮豬,希望workerman越來越好!好久沒寫技術部落格了,看來以後要多更新了。 

相關文章

聯繫我們

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