步驟:
1.安裝CentOS6.5系統:
1.選擇PHP+Mysql環境php
2.關閉防火牆和SeLinux
1.chkconfig --level 35 iptables off
2.vi /etc/selinux/config
SELINUX=disabled
3.重啓html
3.設置靜態IP[可在所有配置完成後設置]:
1.vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 //指出設備名稱
BOOTPROT=static //啓動類型 dhcp|static
BROADCAST=192.168.1.203 //廣播地址
HWADDR=00:06:5B:FE:DF:7C //硬件Mac地址
IPADDR=192.168.0.2 //IP地址
NETMASK=255.255.255.0 //子網掩碼
NETWORK=192.168.0.0 //網絡地址
GATEWAY=192.168.0.1 //網關地址
ONBOOT=yes //是否啓動應用
TYPE=Ethernet //網絡類型
2.service network restart
3.檢查PHP,apache,mysql狀態:
1.php -v
2.service httpd status
3.service mysqld statusmysql
4.啓動服務:
1.service httpd start
2.service mysqld startlinux
5.添加開機啓動
1.chkconfig httpd on
2.chkconfig mysqld on
3.rebootsql
6.測試單文件PHP:
1.cd var/www/html
2.vi test.php
3.<?php phpinfo()?>
4.訪問測試數據庫
7.上傳最新CI框架
1.使用xftp將文件上傳至 /var/www/htmlapache
8.進行數據庫配置
1.容許數據庫遠程鏈接:
grant all PRIVILEGES on *.* to ted@'192.168.1.109' identified by '123456';
flush privileges;
2.使用Navicat for MySQL鏈接數據庫,建庫,執行初始化腳本
3.開啓mysqli擴展:
1.掛載光驅:
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
2.安裝擴展:
cd /mnt/cdrom/Packages
rpm -ivh php-mysql-5.3.3-26.el6.x86_64.rpm
rpm -ivh php-pdo-5.3.3-26.el6.x86_64.rpm
3.重啓服務:
service httpd restart
service mysqld restart
4.賦權:
grant all PRIVILEGES on *.* to ted@'127.0.0.1' identified by '123456';
flush privileges; 網絡
9.修改CI數據庫配置:
1.database.config框架
10.開啓rewrite功能
1.cd /etc/httpd/conf
vi httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
2.重啓服務
service httpd restartide
使用軟件:Xmanager Enterprise 5,Navicat for MySQL
—記於2015-6-11 15:31:31