标签:
参考百度经验,有小修改(http://jingyan.baidu.com/article/870c6fc31218e8b03fe4be16.html)
搭建LAMP环境
linux + apache + mysql + php
(参考百度教程:http://jingyan.baidu.com/article/870c6fc31218e8b03fe4be16.html)
实验环境:默认关闭防火墙 和 SELinux
==================以下为具体实验步骤==========================
yum install httpd
systemctl start httpd
systemctl enable httpd
安装mariadb (与Mysql兼容)
yum install mariadb-server mariadb-client
设置密码:mysql_secure_installation (一路回车)
yum install php
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt
apache默认网站目录:/var/www/html
cd /var/www/html
vim index.php
<?php
phpinfo();
?>
常识:
apache默认网站目录是/var/www/html
Linux的包管理器通常安装开源版本的软件,比如JDK安装OpenJDK,mysql安装MariaDB (开源替代品)
MariaDB:完全兼容MySQL
标签:
原文地址:http://www.cnblogs.com/longwaytogo/p/5521143.html