Linux下apache安装
2016-05-17 21:44
645 查看
apache安装Apahce官网:httpd://httpd.apache.org/
一.安装
1.yum安装yum install httpd -y
2. 开启80端口: vi /etc/sysconfig/iptables
3.重启防火墙:service iptables restart
4.系统默认启动:chkconfig httpd on
二.配置apache服务
1.连接时间:
vi /etc/httpd/conf/httpd.conf
Timeout 60 //接收或发送,当持续连接等待超过60秒则该连接就中断
2.网页主目录:yum安装默认的目录路径为:/var/www/html
三.源码包安装
1.# tar zxvf httpd-2.2.*.tar.gz
# cd httpd-*
# ./configure --prefix=/usr/local/apache2 (默认安装位置) (编译时,需要gcc软件)
# make
#make install
2.apache的配置修改
# vi /usr/local/apache2/conf/httpd.conf
将#ServerName www.example.com:80 中的“#”删掉,并将 www.example.com 改为本机的linux的ip地址
设置Apache服务的启动级别:chkconfig --levels 235 httpd on
如果出现it works字样,说明apache安装成功
一.安装
1.yum安装yum install httpd -y
2. 开启80端口: vi /etc/sysconfig/iptables
3.重启防火墙:service iptables restart
4.系统默认启动:chkconfig httpd on
二.配置apache服务
1.连接时间:
vi /etc/httpd/conf/httpd.conf
Timeout 60 //接收或发送,当持续连接等待超过60秒则该连接就中断
2.网页主目录:yum安装默认的目录路径为:/var/www/html
三.源码包安装
1.# tar zxvf httpd-2.2.*.tar.gz
# cd httpd-*
# ./configure --prefix=/usr/local/apache2 (默认安装位置) (编译时,需要gcc软件)
# make
#make install
2.apache的配置修改
# vi /usr/local/apache2/conf/httpd.conf
将#ServerName www.example.com:80 中的“#”删掉,并将 www.example.com 改为本机的linux的ip地址
设置Apache服务的启动级别:chkconfig --levels 235 httpd on
如果出现it works字样,说明apache安装成功
相关文章推荐
- 从源码安装Mysql/Percona 5.5
- Apache Isis 1.4.0 发布,领域驱动开发框架
- 在 AppImage、Flathub 和 Snapcraft 平台上搜索 Linux 应用
- RH436 Day3 课后总结
- Linux快速构建apache web服务器
- Awstats处理多apache日志
- 安装perl模块小窍门
- 解决vc中unable to connect to the MKS:Internal error问题
- Apache静态编译与动态编译的区别
- 杰奇一些安装详细说明文件,比官方更细
- 无线网卡安装DIY
- 网卡安装常见问题精解
- DB2数据库的安装
- CentOS下DB2数据库安装过程详解
- ghost安装系统软件硬盘安装器 安装ghost图文教程
- CentOS 6.3下编译安装Ruby 2.0笔记
- FREEBSD安装POSTGRESQL笔记
- Redis总结笔记(一):安装和常用命令
- FreeBSD 6.2 安装全程图解教程
- PHP+Apache在Windows 9x下的安装和配置