![学习wolrdPress - Edison - 飞 学习wolrdPress - Edison - 飞](https://i-blog.csdnimg.cn/blog_migrate/dd68002a724e0c95f39a0362ce1275f6.gif)
这里因为是做测试,把密码设为了root[root@localhost]#mysql -uroot
mysql>set password for 'root'@'localhost'=password('root');
4.2 安装php## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ## rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm ## CentOS 6 and
Red Hat (RHEL) 6 ## rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi,remi-test install php php-common
yum --enablerepo=remi,remi-test install php-mysql
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #允许80端口通过防火墙-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT #允许3306端口通过防火墙
加入红字部分vi /etc/httpd/conf/httpd.conf
AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
8. 测试一下DirectoryIndex index.html index.html.var index.php
<?php
phpinfo();
?>
然后localhost:80/test.php查看,应该出现的是PHP信息。
然后登录localhost:80/phpMyadmin[root@localhost html]# ls -Z drwxr-xr-x. root root unconfined_u:object_r:user_tmp_t:s0 phpMyadmin -rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 test.php
[root@localhost html]#chcon -R -t httpd_sys_content_t phpMyadmin
[root@localhost html]# ls -Z
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 phpMyadmin
-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 test.php
chcon -R -t httpd_sys_content_t wordpress