来源:自学PHP网 时间:2015-04-17 17:13 作者: 阅读:次
[导读] win7+vmware8+centos6.3安装lamp一、安装vmware8+centos6.3(网络选择nat方式)二、配置ifcfg-eth0(查看vmware ndash;edit-virtual network editor-vmnet8-nat settings)Vi /etc/sysconfig/network-sc......
win7+vmware8+centos6.3安装lamp
一、安装vmware8+centos6.3(网络选择nat方式)
二、配置ifcfg-eth0(查看vmware –>edit->virtual network editor->vmnet8->nat settings)
Vi /etc/sysconfig/network-scripts/ ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE="Ethernet"
UUID="229b524e-7f41-461a-909d-b96e6a4e3706"
HWADDR=00:0C:29:61:25:46
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
IPADDR=192.168.81.10#不要不subnet ip 和gateway 重复
GATEWAY=192.168.81.2#和vmnet8 的 一致
重启:service network restart
三、安装lamp
1、Vi /etc/resolv.conf 添加如下
nameserver 8.8.8.
nameserver 8.8.4.4
2、yum –y install httpd mysql-server php php-devel php-mysql
3、vi /etc/httpd/conf/httpd.conf
#ServerName www.localhost.com:80 打开
重启:/etc/init.d/httpd restart
4、查看防火墙:/etc/init.d/iptables status
开启80端口:
vi /etc/sysconfig/iptables 添加如下
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
重启:/etc/init.d/iptables restart
5、mysql 启动:/etc/init.d/mysqld start
退出:quit
查看:netstat -tuln | grep ':3306'
设置密码:mysqladmin -u root password 'your.password'
6、webroot vi /var/www/html/index.php
四、在win7下打开浏览器访问192.168.81.10
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com