CentOs下搭建Lamp环境

1.最简单的方式
yum -y install httpd mysql mysql-server php php-mysql

启动apache
service httpd start
aparch主要目录结构
/var/www 放置网站文件
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/log
/etc/httpd/modules
/etc/httpd/run

启动mysql
/etc/rc.d/init.d/mysqld start
检查启动结果: netstat -tulnp | grep :3306
或者service mysqld status

你可能感兴趣的:(centos)