欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > 数据库 >内容正文

数据库

lampapache+mysql+php

发布时间:2025/5/22 数据库 158 豆豆
生活随笔 收集整理的这篇文章主要介绍了 lampapache+mysql+php 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

l 就是linux ,a就是apache,m就是apache,p就是php


apache

安装apache

yum insatll httpd -y

开启apache服务

service httpd start

设置235运行级别开机启动

chkconfig --levels 235 httpd on

配置httpd文件

vi /etc/httpd/conf/httpd.conf

ServerName去掉#

重启httpd服务

service httpd restart


mysql

安装mysql数据库

yum install mysql mysql-sever -y

开启mysql数据库

service mysqld start

chkconfig --levels 235 mysqld on

设置mysql数据库密码

mysql_secure_installation

2y其余回车

登陆数据库

mysql -u root -p


Php

安装php

yum install php* -y

开启php

service httpd restart

编写php测试页面

vi /var/www/html/info.php

输入

<?php

phpinfo();

?>

重启httpd服务

service httpd restart


转载于:https://blog.51cto.com/12372297/1927682

总结

以上是生活随笔为你收集整理的lampapache+mysql+php的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。