简明过程
1. 参考
但是,实际上可以不用这么复杂。而且由于nginx配置php比较费劲,最后用apache解决了。
[root@discuz ~]# rpm -ivh Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
[root@discuz ~]# wget
[root@discuz ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@discuz ~]# wget
[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
[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/www/html/
start in Firefox
./config 不可写
./data 不可写
./uc_client 不可写
./uc_server 不可写
mysql_connect() 不支持 请检查 mysql 模块是否正确加载
[root@discuz ~]# chown -R apache:apache /var/www/html/discuz/data
[root@discuz ~]# chown -R apache:apache /var/www/html/discuz/config
[root@discuz ~]# chown -R apache:apache /var/www/html/discuz/uc_client
[root@discuz ~]# chown -R apache:apache /var/www/html/discuz/uc_server
[root@discuz ~]# yum install php-mysql
[root@discuz ~]# service httpd restart
实际过程:
2. EPEL
[root@discuz ~]# rpm -ivh
Retrieving
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
--2012-12-24 10:36:28--
正在解析主机 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 "Zend Optimizer"
Memcache php-pecl-memcache
Memcached memcached
Libiconv wget
libevent Package libevent-1.4.13-4.el6.x86_64 already installed and latest version
4.下载安装Libiconv
[root@discuz ~]# wget
[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