部署论坛Discuz 和 Memcache

  1. 云栖社区>
  2. 博客>
  3. 正文

部署论坛Discuz 和 Memcache

余二五 2017-11-08 15:08:00 浏览660
展开阅读全文

Discuz:

 

  309  unzip Discuz_X3.2_SC_UTF8.zip  ####解压论坛包

  310 yum install unzip -y  ###下载解压软件

  311 unzip Discuz_X3.2_SC_UTF8.zip

  312  ls

  313  cdreadme/

  314  ls

  315  cd

  321  mv upload/  /usr/local/lnmp/nginx/html/bbs

 

  328  cd/ usr/local/lnmp/nginx/html/bbs/

  329  ls

  331 chmod 777 config/ data/ uc_server/ uc_client/   -R

测试出现如图问题:

wKiom1l8iu2jJTcSAADBMWDyaRQ531.png-wh_50

wKioL1l8ioLSyRzxAAKWGwWhFjI832.png-wh_50

wKiom1l8iuygag0IAAJs3s7wgO4975.png-wh_50

  337  cd

  338  cd/usr/local/lnmp/php/   ###解决问题

  339  cdetc/

  340  ls

  341 vim php.ini

如图:

wKioL1l8inzRhL-YAACUh35QEcQ949.png-wh_50

wKiom1l8in3Cud7-AACjqkpRZOc973.png-wh_50

wKioL1l8in6SlsOlAAFKbgb3y_k926.png-wh_50


  342 /etc/init.d/php-fpm reload

 wKiom1l8ivHgTz-3AADd_DEvafY130.png-wh_50

测试出现如图问题:

wKioL1l8iu6A8kv8AACiWOYq1P0226.png-wh_50


  343  cd/usr/local  

  344  cdlnmp/mysql/

  345  ll

  346  cddata

  347  ls

  348  llmysql.sock

  349  ll-d /usr/local/lnmp/mysql/data/

  350  chmod 755 /usr/local/lnmp/mysql/data/    ####出现权限问题解决办法

  351  ll-d /usr/local/lnmp/mysql/data/

  352  cd

  353  cd/usr/local/lnmp/nginx/

  354  cdhtml/

  355  cdbbs

  356  ls

  357  cdinstall

  358  ls

  359  rm -fr index.php    ####防止下次访问进入安装页面

 测试结果:

 wKioL1l8ivDxXg9PAAD4IuxocJw475.png-wh_50

 

wKiom1l8i9fASg91AAFW4OagAQg108.png-wh_50

wKioL1l8i9ig8SdkAAFJwxvZz_0896.png-wh_50

PHP+Memcache

Memcache:

 

  363  php -m | grep memcached  ###查看有没有memcache安装包

  364 tar zxf memcache-2.2.5.tgz

  365  ls

  366  cd memcache-2.2.5

wKiom1l8jTWQQc7_AAJUZloWN1c938.png-wh_50

  367 phpize     ####一定要执行

  368 which phpize

wKioL1l8jTfCVPU8AAD4NR_djgI405.png-wh_50

  369 ./configure   ###添加功能

  375 make       #编译

  376 make install  ###安装

  383  cd/usr/local

  384  cd lnmp/php

  385  cd etc

  387 pwd

  388  ls

  389 vim php.ini

如图:

wKioL1l8jTiTS6XpAAEO-nfXSUk114.png-wh_50

来源;

[root@server1 memcache-2.2.5]# cd/usr/local/lnmp/php/lib/php/extensions/no-debug-non-zts-20131226/

[root@server1 no-debug-non-zts-20131226]#ls

memcache.so  opcache.a  opcache.so



  390 /etc/init.d/php-fpm  reload

  391 php -m | grep memcache

  392 vim php.ini

  393 rpm -qa | grep php

wKiom1l8jyexl8i4AAJrOIYUvo8267.png-wh_50

  394  cd

  395  cdmemcache-2.2.5

  398 yum install -y memcached

  400  /etc/init.d/memcached start

  401 yum install -y telnet

  402 telnet  localhost  11211

  404  cpexample.php  /usr/local/lnmp/nginx/html/

  406  cpmemcache.php  /usr/local/lnmp/nginx/html/

  407  cd/usr/local/lnmp/nginx/html/

  408  ls

  409  vim memcache.php

  截图:

 wKioL1l8jyPSG8XbAAIVequWg-8387.png-wh_50


测试:


wKioL1l8jx_iSY2FAACFhgKQCE0298.png-wh_50

wKiom1l8jyGBQLYkAAGUJ7MeteI675.png-wh_50










本文转自 如何何如  51CTO博客,原文链接:http://blog.51cto.com/12778805/1952014,如需转载请自行联系原作者

网友评论

登录后评论
0/500
评论
余二五
+ 关注