Apache2的安装
Apache2的安装
1.执行:sudo apt-get install apache2。
2.sudo vim /etc/apache2/apache2.conf在最后加上:ServerName localhost。
3.sudo /etc/init.d/apache2 start启动apache服务。
4.启动浏览器,并输入http://localhost即可看到安装成功界面。
5.停止:sudo /etc/init.d/apache2 stop
Apache2实现文件的下载:
1.vim /etc/apache2/sites-available/000-default.conf,增加如下配置
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html <Directory /var/www>
options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory> ServerName localhost:80
2.在/var/www/html下删除index.html,然后新建要下载的text.txt文件
3.修改目录权限:sudo chmod 775 /var/www
4.启动apache2:/etc/init.d/apache2 start
5.打开本机浏览器,输入http://localhost,查看是存在text.txt文件
6.记录apache2所在的机器的Ip地址为192.168.131.138,在同一局域网的另一台电脑cd /tmp/,然后执行wget http://192.168.131.138/text.txt
使用tcpdump抓取记录并存入文件
1.在/var/www/html下使用命令生成指定大小的文件:dd if=/dev/urandom of=/var/www/html/filename bs=1M count=1
2.启动apache2服务器
TcpDump的安装:
1.http://www.tcpdump.org/下载tcpdump和libpcap压缩包并解压。
2.安装c编译所需包:apt-get install build-essential
3.安装libcap的前置包:apt-get install flex,apt-get install bison
4.安装libcap:进入解压目录,
./configure
make
make install
5.安装tcpdump:进入解压目录
./configure
make
make install
6.测试是否安装成功,直接在命令行输入tcpdump
Apache2的安装的更多相关文章
- 【环境配置】php5.5 + apache2.4 安装配置【转+修改】
转自 http://my.oschina.net/lilinzero/blog/180509 [转+修改][环境配置]php5.5.10 + apache2.4 安装配置 根据自己的实践所得,稍微修改 ...
- tilecache2.11在windows apache2.22安装部署
tilecache2.11在windows apache2.22安装部署 蔡建良 2013-09-03 一.安装环境 操作系统: Windows7 32位 Apache2.22 Python2.5 m ...
- Apache2.2安装图解
Apache2.2安装图解 2010-12-14 15:32:44| 分类: 不学无术之杂 | 标签:安装 端口 httpd apache2.2 服务器 |字号 订阅 Apache音译 ...
- php5.5 + apache2.4 安装配置
php5.5 做了大量的更新,在与apache搭配的时候如何选择也很有讲究,这里我们以64位 php5.6 和 Apache2.4为例介绍如何配置. 工具/原料 Win7/8 64位 php5.5.6 ...
- win7下Apache2.4安装、配置及服务自启动
为了测试微信平台接口,在电脑上安装的Apache服务器,把安装步骤记下来以后备用 第一篇文章,不好请见谅 Apache2.4.17下载地址:http://www.apachelounge.com/do ...
- ubuntu中apache2的安装与卸载
一.装apache2 安装命令:sudo apt-get install apache2 启动/停止/重启apache2: service apache2 start/stop/restart 二. ...
- php7+apache2.4 安装(window)
一.下载 需要下载 php7.apache2.4.vc2015(VC库) PHP7下载地址:http://windows.php.net/download/ Apache 下载地址:https://h ...
- window XP下 php5.5+mysql+apache2+phpmyadmin安装
学了将近大半年的php了,还没有装过独立的php环境,一直用的集成的.记得刚学时,一头雾水,不知改怎么搭配环境,就觉得特别复杂,各种看不懂,今天还是自己在XP环境下搭配了一个. 首先,下载php5.5 ...
- Ubuntu下Apache2+Tomact7安装、配置及整合
安装Apache2 命令:apt-get install apache2 cd /etc/apache2 打开apache.conf 加入 ServerName localhostDirectory ...
随机推荐
- C++中类型强制转换
C++中强制类型转换有四种: 1.static_cast 格式:static_cast<Type>(Value); --用于基本类型间的转换,但不能用于基本类型指针间的转换: int i ...
- elasticsearch深度分页问题
elasticsearch专栏:https://www.cnblogs.com/hello-shf/category/1550315.html 一.深度分页方式from + size es 默认采用的 ...
- Atm 测试
Account.java package ATM;//信1705-1 20173628 赵路仓 public class Account { private int balance;//余额 priv ...
- Git初始化项目 和 Gitignore
初始化init: git init git status git add . git commit -am "init projrct" 添加远程仓库: git remote ad ...
- Spring MVC-从零开始-如何访问静态资源
转(Spring MVC静态资源处理) 优雅REST风格的资源URL不希望带 .html 或 .do 等后缀.由于早期的Spring MVC不能很好地处理静态资源,所以在web.xml中配置Dis ...
- Ubuntu 启动zookeeper报错
在启动zk客户端连接server时报错: 2019-03-30 23:06:24,915 [myid:localhost:2181] - INFO [main-SendThread(localhost ...
- mysql 对返回字段进行拼接
使用concat函数进行拼接:示例如下: select id,username,concat( id, '-' , username) as idName from user;
- JS/Jquery 表单方式提交总结
1. submit提交 (1). submit 按钮式提交 缺点:在提交前不可修改提交的form表单数据 // 1. html <form method="post" act ...
- 一条SQL查询语句是如何执行的?
本篇文章将通过一条 SQL 的执行过程来介绍 MySQL 的基础架构. 首先有一个 user_info 表,表里有一个 id 字段,执行下面这条查询语句: select * from user_inf ...
- 死磕 java线程系列之线程模型
问题 (1)线程类型有哪些? (2)线程模型有哪些? (3)各语言使用的是哪种线程模型? 简介 在Java中,我们平时所说的并发编程.多线程.共享资源等概念都是与线程相关的,这里所说的线程实际上应该叫 ...