标签:
1. Install mod
yum install php-pdo.x86_64
yum install php-mysql.x86_64
yum install php-ldap.x86_64
2. Create User and Grant privileges of database(admin always have the root user, but he will not give you this user and username)
create user ‘stadmin‘@‘%‘ identified by ‘stadmin‘;
grant all privileges on *.* to ‘stadmin‘@‘%‘;
3. create db and import db( prepare the database of your website or web app)
4. update main.php in db section( you may change the config file )
username: stadmin
password: *****
5. update /etc/php.ini (you may change the config file of this new server environment)
date.timezone = PRC
6. restart httpd (after change, don’t forget to restart the servers)
/etc/init.d/httpd restart
/etc/init.d/mysqld restart
7: Set the local server can use the network and use the database.(maybe you will encounter this situation, try this)
错误提示:CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2003] Can‘t connect to MySQL server on ‘10.196.19.73‘
setsebool -P httpd_can_network_connect=1
setsebool -P httpd_can_network_connect_db =1
8: may have problem of url rewrite
标签:
原文地址:http://www.cnblogs.com/gaoqin-web/p/5126348.html