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
九、自定義根目錄///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////