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
[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/www/html/