国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > Discuz > 正文

Discuz!X2.5和UCenter_1.6.0

2024-09-11 09:02:45
字體:
來源:轉載
供稿:網友

操作系統:CentOS5.5_x64

一、依賴包的安裝

yum -y install gcc gcc-c++ mysql mysql-devel autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel

二、安裝PHP-5.3.17

版本:5.3.17

下載:http://cn2.php.net/get/php-5.3.17.tar.gz/from/a/mirror

1、編譯安裝PHP所需要的支持庫:

  1. tar zxvf libiconv-1.13.1.tar.gz 
  2. cd libiconv-1.13.1/ 
  3. ./configure --prefix=/usr/local 
  4. make 
  5. make install 
  6. cd ../ 
  7.  
  8. tar zxvf libmcrypt-2.5.8.tar.gz 
  9. cd libmcrypt-2.5.8/ 
  10. ./configure 
  11. make 
  12. make install 
  13. /sbin/ldconfig 
  14. cd libltdl/ 
  15. ./configure --enable-ltdl-install 
  16. make 
  17. make install 
  18. cd ../../ 
  19.  
  20. tar zxvf mhash-0.9.9.9.tar.gz 
  21. cd mhash-0.9.9.9/ 
  22. ./configure 
  23. make 
  24. make install 
  25. cd ../ 
  26.  
  27. ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 
  28. ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 
  29. ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 
  30. ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 
  31. ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 
  32. ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 
  33. ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 
  34. ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 
  35. ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 
  36. ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config 
  37.  
  38. tar zxvf mcrypt-2.6.8.tar.gz 
  39. cd mcrypt-2.6.8/ 
  40. /sbin/ldconfig 
  41. ./configure 
  42. make 
  43. make install 
  44. cd ../ 

2、編譯安裝PHP

  1. tar zxvf php-5.3.17tar.gz 
  2. cd php-5.3.17/ 
  3. ./configure --prefix=/app/php –with-mysql --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex  --enable-fpm  --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pdo-mysql   
  4. make ZEND_EXTRA_LIBS='-liconv' 
  5. make install 
  6. cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm 
  7. chmod o+x /etc/init.d/php-fpm 
  8. chkconfig  --add  php-fpm 
  9. cp /app/php/etc/php-fpm.conf.default /app/php/etc/php-fpm.conf 
  10. cp php.ini-development /app/php/etc/php.ini 
  11. cd ../ 

錯誤分析1:在configure的時候會報錯“configure: error: Cannot find ldap libraries in /usr/lib” 解決方法:cp -frp /usr/lib64/libldap* /usr/lib/

錯誤分析2:在configure是也可能出現這樣的錯誤“configure: error: mysql configure failed. Please check config.log for more information”  解決方法:這個libmysqlclient.a library實在/usr/lib64/mysql,不是在/usr/lib/mysql,所以可以這樣做 # export LDFLAGS=-L/usr/lib64/mysql

錯誤分析3:在make的時候會報錯“/app/mysql/include/mysql/my_sys.h:964:27: error: mysql/psi/psi.h: No such file or directory”解決方法:查詢/app/mysql/include/mysql下的文件,找到psi.h文件,我的psi.h文件就在mysql下面,然后vi /app /mysql/include/mysql/my_sys.h   找到“#include ”  把路徑改正確,由于我的psi.h就在mysql下面,所以前面的mysql/psi不需要加入

3、編譯安裝php擴展模塊

  1. tar zxvf memcache-2.2.5.tgz 
  2. cd memcache-2.2.5/ 
  3. /app/php/bin/phpize 
  4. ./configure --with-php-config=/app/php/bin/php-config 
  5. make 
  6. make install 
  7. cd ../ 
  8.  
  9. tar jxvf eaccelerator-0.9.6.1.tar.bz2 
  10. cd eaccelerator-0.9.6.1/ 
  11. /app/php/bin/phpize 
  12. ./configure --enable-eaccelerator=shared --with-php-config=/app/php/bin/php-config 
  13. make 
  14. make install 
  15. cd ../ 
  16.  
  17. tar zxvf PDO_MYSQL-1.0.2.tgz 
  18. cd PDO_MYSQL-1.0.2/ 
  19. /app/php/bin/phpize 
  20. ./configure --with-php-config=/app/php/bin/php-config --with-pdo-mysql=/app/mysql 
  21. make 
  22. make install 
  23. cd ../ 
  24.  
  25. tar zxvf ImageMagick.tar.gz 
  26. cd ImageMagick-6.5.1-2/ 
  27. ./configure 
  28. make 
  29. make install 
  30. cd ../ 
  31.  
  32. tar zxvf imagick-2.3.0.tgz 
  33. cd imagick-2.3.0/ 
  34. /app/php/bin/phpize 
  35. ./configure --with-php-config=/app/php/bin/php-config 
  36. make 
  37. make install 
  38. cd ../ 

4、修改php.ini文件

查找/app/php/etc/php.ini中的extension_dir = "./"修改為extension_dir = "/app/php/lib/php/extensions/no-debug-non-zts-20060613/",并在此行后增加以下幾行,然后保存:

extension = "memcache.so"

extension = "pdo_mysql.so"

extension = "imagick.so"

再查找output_buffering = Off,修改為output_buffering = On,再查找; cgi.fix_pathinfo=1,修改為cgi.fix_pathinfo=0,防止Nginx文件類型錯誤解析漏洞。

5、配置eAccelerator加速PHP:

mkdir -p /app/eaccelerator_cache

vi /app/php/etc/php.ini

按shift+g鍵跳到配置文件的最末尾,加上以下配置信息:

  1. 引用 
  2. [eaccelerator] 
  3. zend_extension="/app/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so" 
  4. eaccelerator.shm_size="64" 
  5. eaccelerator.cache_dir="/app/eaccelerator_cache" 
  6. eaccelerator.enable="1" 
  7. eaccelerator.optimizer="1" 
  8. eaccelerator.check_mtime="1" 
  9. eaccelerator.debug="0" 
  10. eaccelerator.filter="" 
  11. eaccelerator.shm_max="0" 
  12. eaccelerator.shm_ttl="3600" 
  13. eaccelerator.shm_prune_period="3600" 
  14. eaccelerator.shm_only="0" 
  15. eaccelerator.compress="1" 
  16. eaccelerator.compress_level="9" 

6、php啟動

/etc/init.d/php-fpm start

三、Nginx-1.2.4的安裝

版本:nginx-1.2.4

下載:http://nginx.org/en/download.html

  1. #tar –zxvf  nginx-1.2.4.tar.gz 
  2. #./configure  --prefix=/app/nginx   --with-pcre 
  3. #make 
  4. #make  install 
  5. #vi  /app/nginx/conf/nginx.conf 
  6. location / { 
  7. root   /app/forum/; 
  8. index  index.php; 
  9. location ~ /.php$ { 
  10. root           /app/forum; 
  11. fastcgi_pass   127.0.0.1:9000; 
  12. fastcgi_index  index.php; 
  13. fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name; 
  14. include        fastcgi.conf; 
  15. #/app/nginx/sbin/nginx      啟動NGINX 

四、論壇的安裝

本論壇采用最新的Discuz!X2.5和UCenter_1.6.0版本,建立用于bbs論壇的數據庫及用戶:

  1. mysql –u root –p 
  2. create database bbsdb; 
  3. grant all on bbsdb.* to runbbs@localhost identified by ‘mypassword’; 
  4. quit; 

解壓兩個安裝包:unzip Discuz_X2.5_SC_UTF8.zip –d discuz

  1. cd discus 
  2. mv upload /app/forum/bbs 
  3. unzip UCenter_1.6.0_SC_UTF8.zip –d ucenter 
  4. cd  ucenter 
  5. mv upload /app/forum/ucenter 

修改權限和所屬組:cd /app/forum/

  1. chown –R nobody:nobody ./ucenter/ 
  2. chown –R nobody:nobody ./bbs/ 
  3. chmod –R 700 ./ucenter/ 
  4. chmod –R 700 ./bbs/ 

1、ucenter的安裝

進入ucenter的安裝界面:輸入 http://本機IP/ucenter/install/index.php 進入編輯界面,點擊我同意,進入下一步,這一步是對于環境、目錄文件的權限以及函數依賴性檢查,下一步,數據庫密碼為password,及grant all on bbsdb.* to runbbs@localhost identified by ‘mypassword’中單引號引起來的內容,下一步:安裝用戶中心成功,點擊進入下一步,如果驗證碼不清楚,請多刷新幾次,登錄

2、Discuz的安裝

輸入http://本地IP/bbs/install/index.php 進入discuz的安裝界面

目錄文件權限的檢查結果,必須每個都可以寫,下一步

如果你沒有安裝過discuz,選擇全新安裝,如果僅bbs升級,要保存原有的ucenter庫,手工指定UCenter Server的路徑

輸入相應的信息進入下一步

安裝過程,直接進入下一面一步

登錄界面,輸入用戶名:admin  密碼時你剛設置的密碼進入管理中心

點擊首頁,出現Please delete install/index.php via FTP,意思是讓刪除install/index.php這個安裝文件  #rm –rf /app/forum/bbs/install/index.php  /app/nginx/sbin/nginx –s reload

論壇首頁  http://本地IP/bbs/forum.php

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 印江| 池州市| 驻马店市| 和政县| 新宁县| 霍州市| 天门市| 东安县| 兰西县| 皋兰县| 新干县| 固阳县| 长宁区| 孟津县| 库车县| 延津县| 志丹县| 疏勒县| 吉安县| 永康市| 玛沁县| 嘉祥县| 平顶山市| 伊吾县| 沙河市| 昔阳县| 沐川县| 屯门区| 化德县| 西平县| 石泉县| 江西省| 安仁县| 连南| 固镇县| 宁陕县| 巫溪县| 邵阳市| 临颍县| 定西市| 安多县|