linux CentOs64 配置apache服务器的步骤
2018-12-28 14:12 枫丹之梦 阅读(295) 评论(0) 编辑 收藏 举报linux CentOs64 配置apache服务器的步骤:
1、准备环境
关闭防火墙:#service iptables stop(chkconfig iptables off)
关闭selinux:#setenforce 0 (SELINUX=disabled)
配置ip:
网卡使用桥接模式
#vim /etc/sysconfig/network-scripts/ifcfg-eth0:
ONBOOT=yes
IPADDR=50.208.190.190
NETMASK=255.255.255.0
GATEWAY=50.208.190.98
BOOTPROTO=static
DNS=50.208.190.190
2、安装软件包
#yum install httpd -y
3、修改配置文件
#vim /etc/httpd/conf/httpd.conf
listen 80 修改监听端口
DocumentRoot "/var/www/html" 网站文件存放位置
4、重启服务
#service httpd restart
5、测试
#hostname
#hostname www.mqk.com
#service httpd restart