a:apache
m:mariadb,mysql,
p:php,perl,python
[[email protected] conf]#yum -y install mysql pgp-mysql mariadb-server php
[[email protected] conf]#rpm -qi mariadb-server
[[email protected] conf]# systemctl start mariadb.service
[[email protected] conf]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 50 *:3306 *:*
LISTEN 0 128 *:111 *:*
LISTEN 0 5 192.168.122.1:53 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 127.0.0.1:631 *:*
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 :::111 :::*
LISTEN 0 128 :::8080 :::*
LISTEN 0 128 :::80 :::*
LISTEN 0 128 :::22 :::*
LISTEN 0 128 ::1:631 :::*
LISTEN 0 100 ::1:25 :::*
[[email protected] conf]# rpm -ql php
[[email protected] conf]#systemctl restart httpd.service
[[email protected] conf]#/vhosts/web1/thdocs/index.php 如果是这样的路径则需要修改配置文件;
<?php
phpinfo();
?>
----
测试php和mysql通信
<?php
$link=mysql_connect(‘127.0.0.1‘,‘mysql‘,‘‘);
if ($link)
echo "Success";
else
echo "Failure";
mysql_close();
?>
---------------------------------------------------------------------
搭建wordpress