Java321技术网

 找回密码
 立即注册
搜索
热搜: centos
查看: 12370|回复: 0
打印 上一主题 下一主题

centos完美apache+php+mysql环境搭建

[复制链接]

126

主题

126

帖子

815

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
815
跳转到指定楼层
楼主
发表于 2017-12-31 16:29:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
安装Apache
yum install httpd httpd-devel
遇到有Y/N的地方选择y安装就是
安装完成后,用/etc/init.d/httpd start 启动apache
设为开机启动:chkconfig httpd on
启动httpd:service httpd start




安装对应版本的mysql

http://www.java321.com/forum.php ... 767&highlight=mysql

设置开机启动:chkconfig mysqld on

启动httpd:service mysqld start

修改远程登录密码以及本地密码

http://www.java321.com/thread-1596-1-1.html






安装php
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
/etc/init.d/httpd start

测试一下
在/var/www/html/新建个test.php文件,将以下内容写入,然后保存。
<?
phpinfo();
?>




回复

使用道具 举报

QQ|Archiver|手机版|小黑屋|Java321技术网   蜀ICP备15030946号-1

GMT+8, 2024-4-19 14:54 , Processed in 0.052701 second(s), 19 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表