1、打開apache配置文件,添加AddType。找到DirectoryIndex並添加index.php AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps 2、重啟apache ,創建php文件,用於測試 > /data/apache/bin/apachectl restart 3、在/data/php/lib下並沒有找到php的配置文件,我們創建php配置文件。

> cp php-5.6.11/php.ini-development php/lib/php.ini 4、重啟apache,php配置文件被正確加載。 5、創建session路徑,找到session.save_path session.save_path = "/data/php/tmp" 6、修改date.timezone date.timezone = PRC 7、配置mysql、apache開機啟動 打開/etc/rc.local,linux系統每次啟動后都會自動執行這個文件 /data/apache/bin/apachectl start /data/mysql/bin/mysql_safe --user=mysql & 8、配置apache、mysql管理命令,通過創建鏈接來管理命令 > ln -s /data/apache/bin/apachectl /sbin/apachectl > ln -s /data/mysql/support-files/mysql.server /sbin/mysqlctl