HTTP://192.168.24.6:9080xoxoxo/

当前访客身份:游客 [
专注于开源技术,服务负载均衡高可用
:引用来自“long-e”的评论 您好,有没有遇到安装...
:您好,有没有遇到安装了salt后,服务器上ssh连接...
:您好,有没有遇到安装了salt后,服务器上ssh连接...
:引用来自“daliu8529”的评论 执行:salt -v "da...
:执行:salt -v "data*" cmd.run "/etc/init.d/ha...
:引用来自“daliu8529”的评论 在namenode主服务器...
:在namenode主服务器(192.168.1.1)格式化hdfs时报...
:将两台zk服务stop后重新start, 链接成功,但dat...
:看到日志了:
17:13:24,472 [myid:1]...
今日访问:2
昨日访问:15
本周访问:111
本月访问:290
所有访问:20674
Hadoop (CDH4发行版)集群部署
发表于2年前( 12:46)&&
阅读(4549)&|&评论()
0人收藏此文章,
折腾了一段时间hadoop的部署管理,写下此系列博客记录一下。
为了避免各位做部署这种重复性的劳动,我已经把部署的步骤写成脚本,各位只需要按着本文把脚本执行完,整个环境基本就部署完了。部署的脚本我放在了开源中国的git仓库里()。
本文的所有部署都基于cloudera公司的CDH4,CDH4是cloudera公司包装好的hadoop生态圈一系列yum包,把CDH4放到自己的yum仓库中,能极大的提高hadoop环境部署的简易性。
本文的部署过程中涵盖了namenode的HA实现,hadoop管理的解决方案(hadoop配置文件的同步,快速部署脚本等)。
一共用5台机器作为硬件环境,全都是centos 6.4
namenode & resourcemanager 主服务器: 192.168.1.1
namenode & resourcemanager 备服务器: 192.168.1.2
datanode & nodemanager 服务器: 192.168.1.100 192.168.1.101 192.168.1.102
zookeeper 服务器集群(用于namenode 高可用的自动切换): 192.168.1.100 192.168.1.101
jobhistory 服务器(用于记录mapreduce的日志): 192.168.1.1
用于namenode HA的NFS: 192.168.1.100
一、加入CDH4的YUM仓库
1.最好的办法是把cdh4的包放到自建的yum仓库中,如何自建yum仓库请看
2.如果不想自建yum仓库,在所有的hadoop机器执行以下操作加入cdn4的yum仓库
wget /cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm
sudo yum --nogpgcheck localinstall cloudera-cdh-4-0.x86_64.rpm
二、创建用于namenode HA的NFS服务器
1.登录192.168.1.100,执行以下脚本 createNFS.sh
#!/bin/bash
yum -y install rpc-bind nfs-utils
mkdir -p /data/nn_ha/
echo "/data/nn_ha
*(rw,root_squash,all_squash,sync)" && /etc/exports
/etc/init.d/rpcbind start
/etc/init.d/nfs
--level 234 rpcbind
-level 234 nfs
三、Hadoop Namenode & resourcemanager 主服务器 环境部署
1.登录192.168.1.1,创建脚本目录,把脚本从git仓库复制下来
yum –y install git
mkdir –p /opt/
git clone http://git.oschina.net/snake1361222/hadoop_scripts.git
/etc/init.d/iptables stop
2.修改hostname
sh /opt/hadoop_scripts/deploy/AddHostname.sh
3.修改部署脚本的配置文件
vim /opt/hadoop_scripts/deploy/config
#添加master服务器的地址,也就是namenode主服务器
master="192.168.1.1"
#添加nfs服务器地址
nfsserver="192.168.1.100"
4.编辑hosts文件(此文件会同步到hadoop集群所有机器)
vim /opt/hadoop_scripts/share_data/resolv_host
localhost localhost.localdomain localhost4 localhost4.localdomain4
localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.1 nn.
192.168.1.2 nn2.
192.168.1.100 dn100.
192.168.1.101 dn101.
192.168.1.102 dn102.
5.执行部署脚本CreateNamenode.sh
sh /opt/hadoop_scripts/deploy/CreateNamenode.sh
6.搭建saltstack master
PS:类似于puppet的服务器管理开源工具,比较轻量,在这里用于管理hadoop集群,调度datanode,关于saltstack的详细请看
yum -y install salt salt-master
b.修改配置文件`/etc/salt/master`,下面标志的是需要修改的项
修改监听IP:
interface: 0.0.0.0
多线程池:
worker_threads: 5
开启任务缓存:(官方描叙开启缓存能承载5000minion)
开启自动认证:
auto_accept: True
c.开启服务
/etc/init.d/salt-master start
salt-master on
7.部署过程中已经把我的sample配置复制过去了,所以只需要修改部分配置文件
a. /etc/hadoop/conf/hdfs-site.xml (其实就是按实际修改主机名地址)
&property&
&name&dfs.namenode.rpc-address.mycluster.ns1&/name&
&value&nn.:8020&/value&
&description&定义ns1的rpc地址&/description&
&/property&
&property&
&name&dfs.namenode.rpc-address.mycluster.ns2&/name&
&value&nn2.:8020&/value&
&description&定义ns2的rpc地址&/description&
&/property&
&property&
&name&ha.zookeeper.quorum&/name&
&value&dn100.:2181,dn101.:2181,dn102.:2181,&/value&
&description&指定用于HA的ZooKeeper集群机器列表&/description&
&/property&
b. mapred-site.xml
&property&
&name&mapreduce.jobhistory.address&/name&
&value&nn.:10020&/value&
&/property&
&property&
&name&mapreduce.jobhistory.webapp.address&/name&
&value&nn.:19888&/value&
&/property&
c. yarn-site.xml
&property&
&name&yarn.resourcemanager.resource-tracker.address&/name&
&value&nn.:8031&/value&
&/property&
&property&
&name&yarn.resourcemanager.address&/name&
&value&nn.:8032&/value&
&/property&
&property&
&name&yarn.resourcemanager.scheduler.address&/name&
&value&nn.:8030&/value&
&/property&
&property&
&name&yarn.resourcemanager.admin.address&/name&
&value&nn.:8033&/value&
&/property&
三、Hadoop Namenode & resourcemanager 备服务器 环境部署
1.登录192.168.1.2,创建脚本目录,从主服务器把脚本同步过来
/etc/init.d/iptables stop
mkdir –p /opt/hadoop_scripts
rsync –avz 192.168.1.1::hadoop_s
/opt/hadoop_scripts
2.修改hostname
sh /opt/hadoop_scripts/deploy/AddHostname.sh
2.执行部署脚本CreateNamenode.sh
sh /opt/hadoop_scripts/deploy/CreateNamenode.sh
3.同步hadoop配置文件
rsync –avz 192.168.1.1::hadoop_conf
/etc/hadoop/conf
4.部署saltstack客户端
sh /opt/hadoop_scripts/deploy/salt_minion.sh
四、zookeeper服务器集群部署
zookeeper是一个开源分布式服务,在这里用于namenode 的auto fail over功能。
yum install zookeeper zookeeper-server
2.修改配置文件/etc/zookeeper/conf/zoo.cfg
maxClientCnxns=50
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/var/lib/zookeeper
# the port at which the clients will connect
clientPort=2181
#这里指定zookeeper集群内的所有机器,此配置集群内机器都是一样的
server.1=dn100. :
server.2=dn101.:
3.指定当前机器的id,并开启服务
#譬如当前机器是192.168.1.100(dn100.),它是server.1,id是1,SO:
echo "1" &
/var/lib/zookeeper/myid
chown -R zookeeper.zookeeper /var/lib/zookeeper/
service zookeeper-server init
/etc/init.d/zookeeper-server start
chkconfig zookeeper-server on
#如此类推,部署192.168.1.101
五、datanode & nodemanager 服务器部署
1.登录datanode机器,创建脚本目录,从主服务器把脚本同步过来
/etc/init.d/iptables stop
mkdir –p /opt/hadoop_scripts
rsync –avz 192.168.1.1::hadoop_s
/opt/hadoop_scripts
2.修改hostname,执行部署脚本 CreateDatanode.sh
sh /opt/hadoop_scripts/deploy/AddHostname.sh
sh /opt/hadoop_scripts/deploy/CreateDatanode.sh
集群初始化
到这里,hadoop集群的环境已部署完毕,现在开始初始化集群
一、namenode的HA高可用初始化
1.把zookeeper集群服务启动(192.168.1.100 192.168.1.101 )
/etc/init.d/zookeeper-server start
2.在namenode主服务器(192.168.1.1)执行zookeeper的failover功能格式化
sudo –u hdfs hdfs zkfc –formatZK
3.把namenode主备服务器的zkfc服务起来(192.168.1.1 192.168.1.2)
/etc/init.d/hadoop-hdfs-zkfc start
4.在namenode主服务器(192.168.1.1)格式化hdfs
#确保是用hdfs用户格式化
sudo -u hdfs hadoop namenode –format
5.第一次搭建namenode高可用,需要把name.dir下面的数据复制到namenode备服务器(此坑花了好多时间)
a.在主服务器(192.168.1.1)执行
tar -zcvPf /tmp/namedir.tar.gz /data/hadoop/dfs/name/
nc -l 9999 & /tmp/namedir.tar.gz
b.在备服务器(192.168.1.2)执行
wget 192.168.1.1:9999 -O /tmp/namedir.tar.gz
tar -zxvPf /tmp/namedir.tar.gz
6.主从服务都启动
/etc/init.d/hadoop-hdfs-namenode start
/etc/init.d/hadoop-yarn-resourcemanager start
7.查看hdfs的web界面
http://192.168.1.1:9080
http://192.168.1.2:9080
#如果在web界面看到两个namenode都是backup状态,那就是auto fail over配置不成功
#查看zkfc日志(/var/log/hadoop-hdfs/hadoop-hdfs-zkfc-nn.dg.s.kingsoft.net.log)
#查看zookeeper集群的日志(/var/log/zookeeper/zookeeper.log)
8.现在可以尝试关闭namenode主服务,看是否能主从切换
二、hdfs集群开启
到这里,所有hadoop部署已完成,现在开始把集群启动,验证效果
1.把所有datanode服务器启动
#还记得之前搭建的saltstack管理工具不,现在开始发挥它的作用,登录saltstack master(192.168.1.1)执行
salt -v "dn*" cmd.run "/etc/init.d/hadoop-hdfs-datanode start"
2.查看hdfs web界面,看是否都成为live nodes
3.如果没有问题,现在可以尝试hdfs操作
#创建一个tmp目录
sudo -u hdfs hdfs dfs -mkdir /tmp
#创建一个10G大小的空文件,计算它的MD5值,并放入hdfs
dd if=/dev/zero of=/data/test_10G_file bs=1G count=10
md5sum /data/test_10G_file
sudo -u hdfs hdfs dfs -put /data/test_10G_file
sudo -u hdfs hdfs dfs -ls /tmp
#现在可以尝试关闭一台datanode,然后把刚才的测试文件拉取出来,再算一次MD5看是否一样
sudo -u hdfs hdfs dfs -get /tmp/test_10G_file /tmp/
md5sum /tmp/test_10G_file
三、yarn集群开启
hadoop除了hdfs用于大数据的分布式存储,还有更重要的组件,分布式计算(mapreduce)。现在我们来把mapreducev2 yarn集群启动
1.在主服务器把resourcemanager服务起来(192.168.1.1)
/etc/init.d/hadoop-yarn-resourcemanager start
2.把所有nodemanager服务启动
#还是登陆saltstack master,执行
salt -v "dn*" cmd.run "/etc/init.d/hadoop-yarn-nodemanager start"
3.查看yarn 任务追踪界面(),看是否所有nodes都已加入
4.hadoop自带有基准测试的mapreduce实例,我们利用它来测试yarn环境是否正常
#TestDFSIO测试HDFS的读写性能,写10个文件,每个文件1G.
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-jobclient-2.0.0-cdh4.2.1-tests.jar TestDFSIO
-write -nrFiles 10 -fileSize 1000
#Sort测试MapReduce
##向random-data目录输出数据
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar randomwriter
random-data
##运行sort程序
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar sort random-data sorted-data
##验证sorted-data 文件是否排好序
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-client-jobclient-2.0.0-cdh4.2.1-tests.jar testmapredsort -sortInput random-data \
-sortOutput sorted-data
Hadoop集群的管理
一、datanode & nodemanager 节点加入
1.修改hosts表,譬如有节点192.168.1.103需要加入
vim /opt/hadoop_scripts/share_data/resolv_host
localhost localhost.localdomain localhost4 localhost4.localdomain4
localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.1 nn.
192.168.1.2 nn2.
192.168.1.100 dn100.
192.168.1.101 dn101.
192.168.1.102 dn102.
192.168.1.103 dn103.
2.修改hostname,同步脚本目录,并执行部署
mkdir –p /opt/hadoop_scripts
rsync –avz 192.168.1.1::hadoop_s
/opt/hadoop_scripts
sh /opt/hadoop_scripts/deploy/CreateDatanode.sh
sh /opt/hadoop_scripts/deploy/AddHostname.sh
3.开启服务
/etc/init.d/hadoop-hdfs-datanode start
/etc/init.d/hadoop-yarn-nodemanager start
二、修改hadoop配置文件
一般在一个hadoop集群中维护一份hadoop配置,这份hadoop配置需要分发到集群中各个成员。这里的做法是 salt + rsync
#修改namenode主服务器的hadoop配置文件
/etc/hadoop/conf/,然后执行以下命令同步到集群中所有成员
sync_h_conf
#脚本目录也是需要维护的,譬如hosts文件/opt/hadoop_scripts/share_data/resolv_host,修改后执行以下命令同步到集群中所有成员
sync_h_script
#其实这两个命令是我自己定义的salt命令的别名,查看这里/opt/hadoop_scripts/profile.d/hadoop.sh
比较普遍的方案是,ganglia和nagios监控,ganglia收集大量度量,以图形化程序,nagios在某度量超出阀值后报警.ganglia监控以后补充一下文档
其实,hadoop自带有接口提供我们自己写监控程序,而且这个接口还是比较简单,通过这样便可以访问,返回值是JSON格式,其中的内容也非常详细。但是每次查询都返回一大串的JSON也是浪费,其实接口还提供更新详细的查询 譬如我只想查找系统信息,可以这样调用接口
。qry参考后跟的就是整个JSON的“name”这个key的值
在折腾hadoop集群的部署是还是遇到了很多坑,打算下篇写自己所遭遇的问题。通过本文部署遇到问题的可以联系一下我,互相交流一下。QQ:。当然也欢迎大家一起修改部署的脚本,git地址为:
1)">1)">1" ng-class="{current:{{currentPage==page}}}" ng-repeat="page in pages"><li class='page' ng-if="(endIndex<li class='page next' ng-if="(currentPage
相关文章阅读MAC MAC (Media Access Control, Medium Access Control ) MAC address is burning in the Network Interface Card (NIC, NIC) inside. MAC address, also known as the hardware address is 48 bits long (6 bytes), 16 hex .0-23 bit numbers assigned by the manufac
IPv4地址分为A.B.C.D.E五类,出去特殊作用的D.E两类,剩下的A.B.C三类地址是我们常见的IP地址段.A类地址的容量最大,可以容纳个主机,B类地址可以容纳65534个主机,C类地址可以容纳254个主机. 在这三类地址中,绝大多数的IP地址都是 公有地址,需要向国际互联网信息中心申请注册.但是在IPv4地址协议中预留了3个IP地址段,作为 私有地址,供组织机构内部使用. 这三个地址段分别位于A.B.C三类地址内: A类地址:10.0.0.0--10.255.255.25
Today, the reverse with the power designer mysql database and found that actually can not establish 192.168.1.22 mysql odbc data source, reports: Connection Fialed: [HY000] [MySQL] [ODBC 5.1 Driver] Access denied for user 'xxx' @ '192 .168. 19.105 '(
Authorized to resolve Host '192 .168.1.180 'is not allowed to connect to this MySQL server GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY' mypassword 'WITH GRANT OPTION
This is a mysql permissions not reported on a solution: 1, landing mysql, mysql-uroot-hlocalhost-p 2, use mysql (must be the library system) 3, update user set host = '%' where user = 'root'; (can be anonymous and no password will be able to clear the lan
如题 在ubuntu下svn 连接本来好好的,后来svn迁移,切换到https下面的,然后在添加新资源库的时候报ssl shake hands fail....RA错误 等错误吧. 解决办法 :windon-&preferences-&Team-&SVN ,SVN 接口处 Client 选择 SVNKit(Pure Java) ..... .原来此处选择的subclipse推荐的javaHL(JNI).... ..OK 确定 再次添加新资源库即可 .
题记: Linux网络配置 #执行重启网络命令 [root@node2 桌面]# service network restart 显示如下信息: 解决方案: 1.在Linux ip配置文件中添加如下语句: ARPCHECK=no 2.重启网络,解决问题.
For Linux, high-availability cluster server environment to build the program varied, because there are too many good software for the mechanism of our choosing. Today, we come to know keepalived. Keepalived Profile: keepalived forwarding mechanism is
Linux common commands to use a large plunder 1. # Express permission users (eg: root), $ that ordinary users the boot prompt: Login: user name password: enter the password the user is registered with the system after the user successfully login, you
1. # Express permission to the user (eg: root), $ that ordinary users the boot prompt: Login: user name password: enter the password the user is registered with the system after the user successfully login, you can enter the appropriate user environm
1. # Express permission users (eg: root), $ that ordinary users the boot prompt: Login: user name password: enter the password the user is registered with the system after the user successfully login, you can enter the appropriate user environment. E
Unix Toolbox This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing. Unix T
FEDERATED storage engine to access the remote database table data, not the local table. This feature brings to certain development and application of traverse, you can directly build a federated table to the local connect to a remote data table, afte
Of the problem: Consider the following SQL statement: select * from (select rownum r_id, t_tmp.* from (select p.*, o.NAME_ZH, o.NAME_EN, o.NAME_JP, o.ORG_DESC_ZH, o.ORG_DESC_EN, o.ORG_DESC_JP, c.name_zh city_name_zh, c.name_en city_name_en, c.name_jp
Recent application to use loadrunner to test a php concurrency (equivalent to the Forum). Customer requirements. Concurrent requests per second to . Lenovo provides a PC .. 4G 8 sets of memory, dual-core CPU. And no optical drive, they can n
Cluster installation in order to TOMCAT5 container SESSION copy available, you must complete the following steps: ● In order to cluster to work, you must use your system to use multicast to some use SESSION ● copy, all routines must also configure TO
Understand the network configuration command is generally necessary technology and technical personnel, after a period of research and learning, summarizes some commonly used commands and examples for future reference. Tradition of 1 - 3 points, ip r
1, I downloaded the oracle10g the iso file, and then, I extract the iso file to generate database folder on the / home below. 2, and then into the database folder, and execute permissions for all files modified: groupadd oracle useradd-g oracle oracler ch
A, log4j What is it? Log4j is an open source logging component, and its products are quite mature, and the use of very broad. In engineering to use, convenient and so instead of System.out to print statements. Log4j goal: it allows developers to fine
As often encountered in such work, or be tracked, or &supernatural& situation: WebSphere, after a certain time can not start a stop, deploy the application on the cluster can access through IHS, application update and restart the server sends ro
1: Shuffle Error: Exceeded MAX_FAILED_UNIQUE_FETCHES; bailing-out Answer: Procedures which need to open multiple files for analysis, the system usually the default number is 1024 (you can see with the ulimit-a) is enough for normal use, but the progr
1, I downloaded the iso file oracle10g, and then I extract the iso file to generate database folder in / home below. 2, then into the database folder, change all the file execute permissions: groupadd oracle useradd-g oracle oracler chown-R oracler. (to m
前言: 本文主要介绍了在linux使用squid和squidGuard配置代理服务器,以www代理服务为例介绍如何过滤有害站点和限制用户对internet的访问. 一.??介绍 Squid是Linux下最为流行的代理服务器软件,它功能强大,支持对HTTP,FTP,Gopher,SSL和WAIS等协议的代理:设置简单,只需对配置文件中稍稍改动就可使代理服务器运转起来.而且Squid具有页面缓存功能,它接收用户的下载申请,并自动处理所下载的数据.也就是说,当一个用户象要下载一个主页时,它向Squid
机器配置: 核心:P4\1.7G 主板:MSI845 内存:金士顿256*2 硬盘:迈拓40G 显卡:ATI Radeon 7500 显板:Samsung SyncMaster 753DFX 声卡:Creative Sound Blaster Live! 一.安装FreeBSD5.4Release 从http://www.freebsd.org/releases/5.4R/announce.html选择一个FTP服务器下载,然后刻成光盘.接下来从光盘安装,我的几点选项: 1.选择软件包时选择最小
其实DHCP一般都有地址保留地址功能,可以让客户端分配到一个固定的IP地址,在网络使用DHCP的情况下,这能给内网管理带来了极大的方便 在大家印象中,DHCP获取到的地址是有个租约的,租约一到是,客户端就会重新获取的IP地址,这时获取到的IP地址跟原来相比可能会改变的,这对网络管理很不利.用静态IP的话,不去动的话地址不会变,不过修改起来就要每台要每台机去划有点麻烦,容易出错. 其实DHCP一般都有地址保留地址功能,可以让客户端分配到一个固定的IP地址,在网络使用DHCP的情况下,这能给内网管理
在Cisco catalyst 2950交换机上,通过配置extended ACL来实现端口与IP的绑定. 配置如下: 2950#show run Current configuration : 5396 bytes ! version 12.1 no service pad service timestamps debug uptime servicetimestamps log uptime no service password-encryption ! hostname 2950 ! e
本文来自:/JeffreyZhao/archive//talk-about-language-arguing.html 关注--或&专注&于多语言编程之后,老赵对于语言的关注也越来越多,对于语言在编程中所带来的&美感&也有了越来越深的体会,还在博客的标题中加上&追求编程之美&.关注语言多了,关注纯粹的编程实践多了,自会有所比较,然后写出了引人注目的&为啥老赵不喜欢Java*语言
我的问题就是如何给每个VLAN 指定各自的DHCP 域.比如vlan 2 对应dhcp test2 vlan3 对应dhcp test3. 假如: 情况1: 现在有一个router 上做了多个DHCP 域. 然后在switch 上划VLAN .那么那个交换机上的ip help-address 的IP 是什么呢?是router 上哪个口的IP 呢? 如:在router 上的配制: ip dhcp excluded-address 10.0.199.200 10.0.199.254 ! ip dhc
懂得网络配置命令是一般技术人员必备的技术,经过一段时间的研究和学习,总结了一些常用的命令和示例以便日后查阅. 传统的在1--3点,ip高级路由命令在4--12点,两者部分可以通用,并达到同样的目的,但ip的功能更强大,可以实现更多的配置目的. 首先,先了解传统的网络配置命令: 1. 使用ifconfig命令配置并查看网络接口情况 示例1: 配置eth0的IP,同时激活设备: # ifconfig eth0 192.168.4.1 netmask 255.255.255.0 up 示例2: 配置e
Linux 常用命令: 1.# 表示权限用户(如:root),$ 表示普通用户 开机提示:Login:输入用户名 password:输入口令 用户是系统注册用户成功登陆后,可以进入相应的用户环境. 退出当前shell,输入:exit 2.useradd netseek 添加一个netseek用户 passwd netseek 给netseek这个用户设置密码. (/etc/passwd /etc/group) userdel netseek 删除账号 userdel -r netseek 删除账
以下是来自 http://wiki./IptablesHowTo 上的配置说明 可以通过/sbin/iptables -F清除所有规则来暂时停止防火墙: (警告:这只适合在没有配置防火墙的环境中,如果已经配置过默认规则为deny的环境,此步骤将使系统的所有网络访问中断) 如果想清空的话,先执行 /sbin/iptables -P INPUT ACCEPT 然后执行 /sbin/iptables -F 通过iptables -L 看到如下信息 Chain INPUT (p
下面对SIP协议产生NAT穿透问题,作一些解释:及提出解决的办法. 1.大致有4种类型的NAT. a) Full Cone 完全圆锥体 b) restricted cone 受限制的圆锥体 c) port restricted 端口受限制的圆锥体 d) symmetric 对称的 其中a,b,c 也称作非对称的NAT. 2.SIP终端在NAT后面,其工作有可能出现问题.原因是SIP信令走的路径,和媒体流走的路径不一样. 3.Full Cone 完全圆锥体NAT 因特网上的任何PC,可以发送数据包
http://cb.vu/unixtoolbox_zh_CN.xhtml UNIX TOOLBOX - 中文版 这是一份收集Unix/Linux/BSD命令和任务的文档,它有助于高级用户或IT工作.它是一份简明扼要的实用指南,当然读者应该知道他/她在干什么. Unix Toolbox 版本:12 你可以到 http://cb.vu/unixtoolbox.xhtml 找到本文档的最新版.PDF版本可以替换链接中的.xhtml为 .pdf ,小册子版本可以替换成 .book.pdf . 用双面打印
linux 下route命令 为了让设备能访问另一个子网,需要在设备里增加路由到子网络,下面是一些资料.基本操作如下: 一般来说,都是为了能访问别的子网才设置路由的,比如说,你的主机处于192.168.10.0/24,而你想访问192.168.20.0/24网的主机,当然你知道一个网关IP,例如192.168.10.1(必须和你主机处于同一子网),那么,你可以这样配置路由. 添加路由 route add -net 192.168.20.0 netmask 255.255.255.0 gw 192
最近有台服务器需要安装ssd卡,因为安装驱动需要内核2.6.32,而debian5机器默认还是2.6.18,所有首先需要升级内核. 1.安装2.6.32内核需要debian6的源 root@10.1.1.200:~# uname -a Linux 10.1.1.200 2.6.18-6-amd64 root@10.1.1.200:~# vim /etc/apt/sources.list deb /debian squeeze main non-free
查看iptables 设置 iptables -L -n 2.添加22T和80端口 iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A INPUT -p tcp --sport 22 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --sport 80 -j ACCEPT 3.保存配置 /etc/rc.d/init.d/
Iptables实现限制网络访问功能探讨 ( 18:26:21) 转载▼ 标签: android iptables 网络访问 it 分类: 孤星小安随笔 情景一: 终端只能访问特定网站和IP 方案:添加白名单 命令:# iptables -A OUTPUT -d 192.168.1.211 -j ACCEPT # iptables -A OUTPUT -d 192.168.1.209 -j ACCEPT -- # iptables –P OUTPUT DROP 这样就只能访问
1:Shuffle Error: Exceeded MAX_FAILED_UNIQUE_FETCHES; bailing-out Answer: 程序里面需要打开多个文件,进行分析,系统一般默认数量是1024,(用ulimit -a可以看到)对于正常使用是够了,但是对于程序来讲,就太少了. 修改办法: 修改2个文件. /etc/security/limits.conf vi /etc/security/limits.conf 加上: * soft nofile 102400 * hard nof
一.项目需求: 1.从指定的RTSP服务器(可使用live555)下载多媒体文件. 2.需将RTSP服务器返回的RTP数据包解析出来存成文件. 3.存成的文件可以使用VLC的播放器正常播放. 二.所需知识: 1.网络编程异步通讯. 2.RTSP协议交互. 3.RTP协议包的格式(RTCP暂不考虑). 三.要求: 1.使用C语言实现,不得使用第三方库. 2.源码不可以使用单一文件尽可能按功能模块下函数,存为多个文件. 四.解题思路 仔细分析了题目的要求后,得知,这就是一个socket 网络编程.而
12. 改变程序执行的优先级 nice 设置优先权 nice -n -5 vi & 用root给一个nice值为-5,用于执行vi renice 调整已存在优先权 13. chkconfig chkconfig --list 显示各种服务的状态,利用chkconfig可以轻松管理init脚本. 14. 改变启动模式运行级别 vi /etc/inittab 将5改成3,启动后就可以变成字符模式. startx 或者 init 5 就可以进入图形化界面. runlevel 显示当前运行级别 如何切换
编写一个automation case的流程 http://192.168.20.105/projects/automation-test/wiki/Automation_DB_Management 1.在testlink 里添加一个manual test case, 2. 将这个case 添加到test plan 3. 将test case 添加到Automation DB 里面,然后通过 页面 http://192.168.20.108/am/automation_case_list.php
from optparse import OptionParser from pprint import pprint from selenium import webdriver from timed_job import Timed_Job, do_GUI_validator_test import os import re import select import signal import subprocess import sys import time #from runner._s
redis.conf配置文件参数说明: 1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 daemonize no 2. 当Redis以守护进程方式运行时,Redis默认会把pid写入/var/run/redis.pid文件,可以通过pidfile指定 pidfile /var/run/redis.pid 3. 指定Redis监听端口,默认端口为6379,作者在自己的一篇博文中解释了为什么选用6379作为默认端口,因为6379在手机按键上MERZ对应的号
Nginx详解及lnmp环境架构 一.Nginx详解以及优点 在当前互联网环境下,一般高端的服务前端都采用nginx作为web前端,而更多的都是采用lnmp架构,真正的后端服务器才会采用apache. 为什么这么做,要取决于nginx和apache两者之间的优缺性.: nginx与apache相比有以下优势:在性能上,nginx占用很少的系统资源,能支持更多的并发链接,达到更高的访问率;在功能上,Nginx是优秀的代理服务器和负载均衡器;在安装配置上,简单灵活. nginx模块基本都是静态编译,
第一部分:RTSP协议 一. RTSP协议概述 RTSP(Real-TimeStream Protocol )是一种基于文本的应用层协议,在语法及一些消息参数等方面,RTSP协议与HTTP协议类似. RTSP被用于建立的控制媒体流的传输,它为多媒体服务扮演&网络远程控制&的角色.尽管有时可以把RTSP控制信息和媒体数据流交织在一起传送,但一般情况RTSP本身并不用于转送媒体流数据.媒体数据的传送可通过RTP/RTCP等协议来完成. 一次基本的RTSP操作过程是:首先,客户端连接到流服务
import java.io.BufferedR import java.io.IOE import java.io.InputStreamR import java.io.PrintS import java.net.InetSocketA import java.net.S import java.util.ArrayL import java.util.HashM import java.util
1. 操作系统 CentOS 6.4 x86_64 2.软件版本 Nginx 1.4.2 3.实验拓扑 注,实验拓扑见下文. 4.安装yum源 1 2 3 [root @nginx ~]# rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [root@web1 ~]# rpm -ivh http://download.fedoraproject.org/pub/epel
大纲 一.前言 二.环境准备 三.安装与配置Nginx 四.Nginx之反向代理 五.Nginx之负载均衡 六.Nginx之页面缓存 七.Nginx之URL重写 八.Nginx之读写分离 注,操作系统为 CentOS 6.4 x86_64 , Nginx 是版本是最新版的1.4.2,所以实验用到的软件请点击这里下载:/QXIgqMmVmuZrm 一.前言 在前面的几篇博文中我们主要讲解了Nginx作为Web服务器知识点,主要的知识点有nginx的理论详解.ngin
computer network 基础知识 bps = bits per second 所以1Mbps的下载速度只有2^7=128k/s 实时网络攻击图,很有趣! / nslookup命令 查看主机所在IP,以及域名的IP.主机只有一个?但是域名有很多? 如何快速找到谷歌可用IP /archives/3878.html ping http telnet 连接https 到443端口 how to
一.前言 二.环境准备 三.安装与配置Nginx 四.Nginx之反向代理 五.Nginx之负载均衡 六.Nginx之页面缓存 七.Nginx之URL重写 八.Nginx之读写分离 注,操作系统为 CentOS 6.4 x86_64 , Nginx 是版本是最新版的1.4.2,所以实验用到的软件请点击这里下载:/QXIgqMmVmuZrm 一.前言 在前面的几篇博文中我们主要讲解了Nginx作为Web服务器知识点,主要的知识点有nginx的理论详解.nginx作为
Copyright (C) , All Rights Reserved.
版权所有 黔ICP备号-1
processed in 0.222 (s). 10 q(s)}

我要回帖

更多关于 www.fjptycw.com 9080 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信