您现在的位置是:首页 > cms教程 > Discuz教程Discuz教程
在CentOS6上怎么安装Discuz! X2.5
凌香2025-07-13Discuz教程已有人查阅
导读简明过程1. 参考但是,实际上可以不用这么复杂。而且由于nginx配置php比较费劲,之后用apache解决了。
简明过程
1. 参考
但是,实际上可以不用这么复杂。而且由于nginx配置php比较费劲,之后用apache解决了。
2. EPEL
正在连接 dl.fedoraproject.org|209.132.181.26|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1649 (1.6K) [text/plain]
正在保存至:“RPM-GPG-KEY-EPEL-6”
1. 参考
但是,实际上可以不用这么复杂。而且由于nginx配置php比较费劲,之后用apache解决了。
[root@discuz ~]# rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
[root@discuz ~]# wget http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
[root@discuz ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@discuz ~]# wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
[root@discuz ~]# tar zxvf libiconv-1.14.tar.gz
[root@discuz ~]# cd libiconv-1.14
[root@discuz libiconv-1.14]# ./configure --prefix=/usr/local
[root@discuz libiconv-1.14]# make
[root@discuz libiconv-1.14]# make install
[root@discuz ~]# setenforce 0
[root@discuz ~]# yum install nginx php mysql-server php-pecl-memcache memcached
[root@discuz ~]# chkconfig --level 345 memcached on
[root@discuz ~]# chkconfig --level 345 mysqld on
[root@discuz ~]# vi /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="256"
OPTIONS=""
[root@discuz ~]# service memcached start
[root@discuz ~]# service mysqld start
[root@discuz ~]# mysqladmin -u root password 'your_password'
[root@discuz ~]# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[root@discuz ~]# reboot
[root@discuz ~]# wget http://download2.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_UTF8.zip
[root@discuz ~]# yum install unzip
[root@discuz ~]# mkdir discuz
[root@discuz ~]# unzip Discuz_X2.5_SC_UTF8.zip -d discuz
[root@discuz ~]# yum erase nginx
[root@discuz ~]# chkconfig --level 345 httpd on
[root@discuz ~]# service httpd start
[root@discuz ~]# cp -r /opt/discuz /var/ /html/
start http://discuz-test/discuz/install in Firefox
./config 不可写
./data 不可写
./uc_client 不可写
./uc_server 不可写
mysql_connect() 不支持 请检查 mysql 模块是否正确加载
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/data
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/config
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/uc_client
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/uc_server
[root@discuz ~]# yum install php-mysql
[root@discuz ~]# service httpd restart
实际过程:2. EPEL
http:// .ha97.com/4052.html
http://fedoraproject.org/wiki/EPEL
http://mirrors.ustc.edu.cn/fedora/epel/6/i386/repoview/epel-release.html
http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
[root@discuz ~]# rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.a3BNwE: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
[root@discuz ~]# rpm -qa |grep epel
epel-release-6-8.noarch
[root@discuz ~]#
[root@discuz ~]# wget http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
--2012-12-24 10:36:28-- http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
正在解析主机 dl.fedoraproject.org... 209.132.181.26, 209.132.181.27, 209.132.181.23, ...正在连接 dl.fedoraproject.org|209.132.181.26|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1649 (1.6K) [text/plain]
正在保存至:“RPM-GPG-KEY-EPEL-6”
100%[======================================>] 1,649 --.-K/s in 0s
2012-12-24 10:36:29 (141 MB/s) - 已保存 “RPM-GPG-KEY-EPEL-6” [1649/1649])
[root@discuz ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@discuz ~]#
[root@discuz ~]# ll /etc/yum.repos.d/
总用量 24
-rw-r--r--. 1 root root 1926 6月 26 17:30 CentOS-Base.repo
-rw-r--r--. 1 root root 637 6月 26 17:30 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 626 6月 26 17:30 CentOS-Media.repo
-rw-r--r--. 1 root root 2593 6月 26 17:30 CentOS-Vault.repo
-rw-r--r--. 1 root root 957 11月 5 11:52 epel.repo
-rw-r--r--. 1 root root 1056 11月 5 11:52 epel-testing.repo
[root@discuz ~]#
3.必须的软件包
Nginx nginx
PHP php
PHP-FPM PHP-FPM is now included in PHP core as of PHP 5.3.3.
Mysql mysql-server
Zend php-ZendFramework-full or http:// .zend.com/products/guard/downloads "Zend Optimizer"
Memcache php-pecl-memcache
Memcached memcached
Libiconv http:// .gnu.org/software/libiconv/ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
libevent Package libevent-1.4.13-4.el6.x86_64 already installed and latest version
4.下载安装Libiconv
[root@discuz ~]# wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
[root@discuz ~]# tar zxvf libiconv-1.14.tar.gz
[root@discuz ~]# cd libiconv-1.14
[root@discuz libiconv-1.14]# ./configure --prefix=/usr/local
[root@discuz libiconv-1.14]# make
[root@discuz libiconv-1.14]# make install
5.关闭 SELINUX
[root@discuz ~]# setenforce 0
6.安装服务端软件包
[root@discuz ~]# yum install nginx php mysql-server php-pecl-memcache memcached
......
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
memcached x86_64 1.4.4-3.el6 base 68 k
mysql-server x86_64 5.1.66-2.el6_3 updates 8.6 M
nginx x86_64 1.0.15-3.el6 epel 379 k
php x86_64 5.3.3-14.el6_3 updates 1.1 M
php-pecl-memcache x86_64 3.0.5-4.el6 base 60 k
Installing for dependencies:
GeoIP x86_64 1.4.8-1.el6 epel 620 k
apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k
fontconfig x86_64 2.8.0-3.el6 base 186 k
freetype x86_64 2.3.11-6.el6_2.9 base 359 k
gd x86_64 2.0.35-10.el6 base 142 k
httpd x86_64 2.2.15-15.el6.centos.1 base 813 k
httpd-tools x86_64 2.2.15-15.el6.centos.1 base 70 k
libX11 x86_64 1.3-2.el6 base 582 k
libX11-common noarch 1.3-2.el6 base 188 k
libXau x86_64 1.0.5-1.el6 base 22 k
libXpm x86_64 3.5.8-2.el6 base 59 k
libjpeg x86_64 6b-46.el6 base 134 k
libpng x86_64 2:1.2.49-1.el6_2 base 182 k
libxcb x86_64 1.5-1.el6 base 100 k
libxslt x86_64 1.1.26-2.el6_3.1 updates 452 k
mailcap noarch 2.1.31-2.el6 base 27 k
mysql x86_64 5.1.66-2.el6_3 updates 885 k
mysql-libs x86_64 5.1.66-2.el6_3 updates 1.2 M
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
perl-DBI x86_64 1.609-4.el6 base 705 k
php-cli x86_64 5.3.3-14.el6_3 updates 2.2 M
php-common x86_64 5.3.3-14.el6_3 updates 523 k
php-pear noarch 1:1.9.4-4.el6 base 393 k
Transaction Summary
================================================================================
Install 28 Package(s)
Total download size: 20 M
Installed size: 62 M
Is this ok [y/N]:
7.查看php版本
[root@discuz ~]# php -v
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@discuz ~]#
【ZendOptimizer? 只有Zend Optimizer (Runtime for PHP 5.2 and earlier),是不是php5.3不用Zend Optimizer了??】
8.配置服务
[root@discuz ~]# chkconfig --level 345 memcached on
[root@discuz ~]# chkconfig --level 345 nginx on
[root@discuz ~]# chkconfig --level 345 mysqld on
[root@discuz ~]# vi /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="256"
OPTIONS=""
[root@discuz ~]# service memcached start
Starting memcached:
[root@discuz ~]# service nginx start
Starting nginx: [ OK ]
[root@discuz ~]# service mysqld start
Initializing MySQL database: WARNING: The host 'discuz.flysky.intra' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h discuz.flysky.intra password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld: [ OK ]
[root@discuz ~]# mysqladmin -u root password 'your_password'
[root@discuz ~]# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[root@discuz ~]# reboot
9.Discuz! X2.5下载配置
[root@discuz ~]# wget http://download2.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_UTF8.zip
[root@discuz ~]# yum install unzip
[root@discuz ~]# mkdir discuz
[root@discuz ~]# unzip Discuz_X2.5_SC_UTF8.zip -d discuz
[root@discuz ~]# ll discuz
总用量 12
drwxr-xr-x. 2 root root 4096 10月 31 15:43 readme
drwxr-xr-x. 12 root root 4096 10月 31 15:43 upload
drwxr-xr-x. 4 root root 4096 10月 31 15:43 utility
[root@discuz ~]# cp -r discuz/upload /opt/discuz
[root@discuz ~]# cp /etc/nginx/conf.d/default.conf .
[root@discuz ~]# vi /etc/nginx/conf.d/default.conf
location / {
#root /usr/share/nginx/html;
#index index.html index.htm;
root /opt/discuz;
index index.html index.htm;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
[root@discuz ~]# service nginx restart
10.Cannot enable php for nginx,try apache2 !!!!
[root@discuz ~]# yum erase nginx
[root@discuz ~]# chkconfig --level 345 httpd on
[root@discuz ~]# service httpd start
[root@discuz ~]# cp -r /opt/discuz /var/ /html/
start http://discuz-test/discuz/install
./config 不可写
./data 不可写
./uc_client 不可写
./uc_server 不可写
mysql_connect() 不支持 请检查 mysql 模块是否正确加载
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/data
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/config
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/uc_client
[root@discuz ~]# chown -R apache:apache /var/ /html/discuz/uc_server
[root@discuz ~]# yum install php-mysql
[root@discuz ~]# service httpd restart
本文标签:
很赞哦! ()
上一篇:Discuz目录结构分析
相关教程
- android4.4+linuxdeploy+centos7+php-fpm+mysql+frp安装shopxo
- Centos7搭建discuz论坛步骤教程
- Centos7环境怎么部署搭建discuz论坛
- centos7环境搭建Discuz论坛的方法
- centos7搭建discuz的方法
- Centos搭建Discuz论坛的方法
- centos7安装部署Discuz论坛的方法
- CentOs7搭建论坛Discuz_X3.2的步骤方法
- linux centos8安装php+nginx+mysql运行phpcms网站的方法步骤
- centos7上安装phpcms的步骤方法
- CentOS8+Nginx安装部署WordPress的步骤方法
- 基于Centos7详细安装wordpress的方法
图文教程
Discuz!NT控件剖析ColorPicker(颜色拾取) 和Calendar(日历)开发
继上篇文章之后(链接),大家给了一些反馈和意见,有些BUG和不当之处我已修正,将会在2.0正式版本中提供给大家。希望大家能继续支持我们这个开源项目。
discuz实现自动注册登录的方法
1.从原有系统进入论坛自动登录和注册2.实现弹框在本页面,不进行跳转3.js在页面加载时直接发起注册请求这个功能之前使用的uc_user_register这个函数来处理的,但是今天在开发用户空间时就会出现问题。
discuz功能列表说明
导航旁边的+就可以把其加入到常用操作上首页管理中心首页 文件校验,在线成员,管理团队留言。系统信息。开发团队介绍。常用操作管理 名称和URL全局站点信息 站点名称。网
解决Discuz百度小程序搜索排名不佳的问题
面对Discuz百度小程序搜索排名不佳的问题,我们需要从多个角度来进行深入分析和优化。搜索排名不佳可能涉及到小程序的SEO、用户体验、内容质量以及百度算法的变化等多个方面。
相关源码
-
响应式艺考培训学校机构pbootcms模板html5源码基于PbootCMS免费开源内核开发,为艺考培训学校与艺术机构设计,替换图文即可快速适配全行业需求。响应式布局兼容手机/PC端,数据实时同步,运维效率提升300%。查看源码 -
pbootcms模板(PC+WAP)微信小程序开发公司网站本模板为微信小程序开发代理、软件开发公司等企业设计,基于PbootCMS内核开发,支持PC+WAP双端响应式布局,数据实时同步,适用于多行业快速建站。查看源码 -
(自适应)科技产品设备技术作品pbootcms网站模板带下载和招聘基于PbootCMS内核开发的高端科技企业模板,采用响应式布局技术,适配各类移动终端设备。模板设计聚焦科技行业特性,通过模块化结构实现企业形象展示、技术成果发布与人才招募等核心需求查看源码 -
(响应式H5)帝国cms7.5文章新闻博客模板带会员中心本模板基于帝国CMS内核开发,为新闻资讯、个人博客及作品展示类网站设计。采用响应式布局技术,确保在手机、平板和电脑等不同设备上都能获得良好的浏览体验。查看源码 -
工商注册财务代理记账类自适应pbootcms网站工商注册、财务代理记账企业打造的数字化门户模板,基于PbootCMS内核深度开发。采用前沿响应式架构,无缝适配手机端触控交互与PC端展示需求查看源码 -
(自适应)证书授权书防伪查询系统pbootcms模板本模板基于PbootCMS系统开发,为各类证书查询机构设计,可快速构建高效安全的证书核验平台。采用响应式布局技术,自动适配手机端操作,支持批量导入证书数据,提供便捷的查询接口,满足机构证书管理及用户在线核验需求。查看源码
| 分享笔记 (共有 篇笔记) |
