lamp环境搭建步骤
1、服务器
2、下载工具
3、使用工具连接服务器
4、安装mysql
5、安装apache
6、安装php5.6版本
7、测试环境
8、配置httpd.conf文件
9、自定义根目录
10、配置完成
一、服务器///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1、centos6.8 64位
二、下载工具///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1、Xmanager Enterprise 5 完整版
2、地址:https://www.netsarang.com/download/down_form.html?code=525
3、图示:
4、安装完毕,桌面会出现一个文件夹
三、使用工具连接服务器///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
四、安装mysql///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
yum install mysql-server -y
service mysqld restart
/usr/bin/mysqladmin -u root password 'scenewood'
五、安装apache///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
yum install httpd -y
service httpd start
六、安装php5.6///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1、追加centos的epel个remi源
rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-gd
七、测试环境///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
八、解决不解析php代码的问题,配置httpd.conf文件///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
3、保存退出重启apache
九、自定义根目录///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////