Qifcn


  • 首页

  • 时间轴

  • 关于

经验我网络之间的通顺(1)

发表于 2017-05-11 | 更新于: 2018-02-21
字数统计: 162 | 阅读时长 ≈ 1

#环境
1路由器家用
2交换机百兆
3 PC电脑若干
今天晚上在2楼机房花了几个小时,排查的原因有
几个,网线口环接,路由器已经恢复出厂设置,最终实验结果
网络时断时续。原因ip地址起冲突因为是
路由器上所以无法判断固定ip是否有人在
经排查果然是ip地址起冲突,判断原因如果
在路由器上设置固定ip上网,进行2级小型局
域网搭建获取ip无法上网,网络时断时续结果,ip地址起冲突

centos7搭建dhcp服务器

发表于 2017-05-11 | 更新于: 2018-02-21
字数统计: 595 | 阅读时长 ≈ 3

1、配置DHCP服务
首先当然是配置网卡IP地址了,可以编辑网卡配置文件/etc/sysconfig/network-script/ifcfg-eth0,如下:


TYPE=”Ethernet” //网络
BOOTPROTO=”static” //是否开启dhcp
IPADDR=”192.168.10.254” //ip地址
NETMASK=”255.255.255.0” //掩码
DNS1=”202.98.190.60” //dns1
DNS2=”110.110.110.9” //dns2
GATEWAY=”192.168.10.1” //网关
NAME=”eth0”
DEVICE=”eth0”

ONBOOT=”yes” //是否开机自起

DHCP的配置文件:

位置 /etc/dhcp/dhcpd.conf
DHCP文件的配置语法:
<参数名称> <设定内容> ;
option <参数名称> <设定内容>;

DHCP配置内容:

subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.101 192.168.10.200;
ddns-update-style none;
ignore client-updates;
default-lease-time 86400;
max-lease-time 518400;
option routers 192.168.10.1;
option domain-name-servers 202.98.190.60,110.110.110.9;
}
host xp{ //对于该主机分配一个固定的IP地址给他
hardware ethernet 00:0c:29:5a:f9:c6;
fixed-address 192.168.10.199;
}

当配置完成后,保存退出,这时需要重启一下dhcp服务
systemctl restart dhcpd.service

如果配置文件中有语法错误,在重启dhcp服务时,就会有如下提示
[root@MT ~]# systemctl restart dhcpd.service
Job for dhcpd.service failed because the control process exited
with error code. See “systemctl status dhcpd.service” and “journalctl -xe” for details.
这时我们根据提示命令去查询错误所在

命令journalctl -xe
[root@MT ~]# journalctl -xe
………………………………….
10月 20 16:04:19 MT dhcpd[23672]: Internet Systems Consortium DHCP Server 4.2.5
10月 20 16:04:19 MT dhcpd[23672]: Copyright 2004-2013 Internet Systems Consortium.
10月 20 16:04:19 MT dhcpd[23672]: All rights reserved.
10月 20 16:04:19 MT dhcpd[23672]: For info, please visit https://www.isc.org/software/dhcp/
10月 20 16:04:19 MT dhcpd[23672]: /etc/dhcp/dhcpd.conf line 14: semicolon expected.
10月 20 16:04:19 MT dhcpd[23672]: option domain-name-servers 202.98.190.60 110.
10月 20 16:04:19 MT dhcpd[23672]: ^
10月 20 16:04:19 MT dhcpd[23672]: Configuration file errors encountered – exiting
………………………………….

###########
从上述可知,110前面有误法错误,那这是什么错误呢,
当然是两个DNS地址之间少一个逗号了“,”,我们将其修改后,
再次执行重启服务命令,就不会提示错误了。

如果配置文件都没有错误,重启服务命令将什么也不会提示,然
后可以用命令查看服务端口是否开启;

[root@MT ~]# netstat -tulnp | grep 67
udp 0 0 0.0.0.0:67 0.0.0.0:* 24338/dhcpd

在此DHCP基础配置就完成了,可以去用一台机器进行测试了;

linux 安装zerotier

发表于 2017-05-07 | 更新于: 2018-02-21
字数统计: 252 | 阅读时长 ≈ 1

介绍一下zerotier

一切都是云

ZeroTier可以轻松地将设备,服务器,云虚拟机,容器
和应用程序安全地连接到各地,并对其进行规模化管理。

1下载wget https://download.zerotier.com/zerotier-one-x64.rpm
2安装 yum install zerotier-one-x64.rpm
3加人网络zerotier-cli join 网络ID
4登陆zerotier 官方网站同意加人网络注意是打“钩”注意要允许以太网桥接
5ip a 查看ip地址
6ping ip地址看互通不

ZeroTier One服务将其配置和状态信息保留在其工作目录中。默认情况下在以下位置找到:
视窗: C:\ProgramData\ZeroTier\One
苹果: /Library/Application Support/ZeroTier/One
Linux的: /var/lib/zerotier-one

FreeBSD的/ OpenBSD系统: /var/db/zerotier-one

我搭建时候的环境

1centos7百度云开启了防火墙关闭了SELinux
2win7安装了客户端注意win7要安装net

3手机OPPO

不同的网络端,win7ping手机时ping的回复时间不稳定,win7ping 百度云centos7时ping回话时间稳定。

centos7关闭防火墙和selinux

发表于 2017-05-02 | 更新于: 2018-02-21
字数统计: 106 | 阅读时长 ≈ 1

临时关闭SELinux
setenforce 0
2
临时打开SELinux
setenforce 1
3
开机关闭SELinux
编辑/etc/selinux/config文件,将SELINUX的值设置为disabled,如下图。下次开机SELinux就不会启动了

防火墙(firewalld)
临时关闭防火墙
systemctl stop firewalld
永久防火墙开机自启动
systemctl disable firewalld
临时打开防火墙
systemctl start firewalld
防火墙开机启动
systemctl enable firewalld
查看防火墙状态
systemctl status firewalld

centos7安装webmin

发表于 2017-05-02 | 更新于: 2018-02-21
字数统计: 167 | 阅读时长 ≈ 1

这是官方的安装教程

If you are using the RPM version of Webmin, first download the file from the downloads page , or run the command :
第一步wget http://prdownloads.sourceforge.net/webadmin/webmin-1.831-1.noarch.rpm
then install optional dependencies with :
第二步yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty
and then run the command :
第三步rpm -U webmin-1.831-1.noarch.rpm
The rest of the install will be done automatically to the directory /usr/libexec/webmin, the administration username set to root and the password to your current root password. You should now be able to login to Webmin at the URL访问 http://localhost:10000/. Or if accessing it remotely, replace localhost with your system’s IP address.
If you want to connect from a remote server and your system has a firewall installed, see this page for instructions on how to open up port 10000.

n2nrpm包安装centos 安装

发表于 2017-04-26 | 更新于: 2018-02-21
字数统计: 296 | 阅读时长 ≈ 1

这是官网翻译过来是

该目录包含用于RedHat / CentOS(最新操作系统版本)的64位二进制包的稳定版本(SVN代码)。请使用rpm-stable.ntop.org进行稳定的构建。
为了使用这个存储库做(作为root):
cd /etc/yum.repos.d/
wget http://packages.ntop.org/centos-stable/ntop.repo -O ntop.repo
CentOS 6
wget http://packages.ntop.org/centos-stable/epel-6.repo -O epel.repo
wget https://copr.fedoraproject.org/coprs/saltstack/zeromq4/repo/epel-6/saltstack-zeromq4-epel-6.repo
rpm -ivh http://packages.ntop.org/rpm6/extra/hiredis-0.10.1-3.el6.x86_64.rpm http://packages.ntop.org/rpm6/extra/hiredis-devel-0.10.1-3.el6.x86_64.rpm
CentOS 7
wget http://packages.ntop.org/centos/epel-7.repo -O epel.repo
然后做:
yum erase zeromq3 (这样做一次以确保没有安装zeromq3)
yum clean all
yum update
yum install pfring n2disk nprobe ntopng ntopng-data cento
PF_RING现在打包没有ZC驱动程序,所以你可以选择安装它们:
yum install pfring-drivers-zc-dkms
大多数软件没有许可证。但是有些组件需要许可证。他们包括:
PF_RING ZC / DNA用户空间库
nProbe(NetFlow / IPFIX探针)
n2disk(数据包到磁盘应用程序)
您可以在ntop网站上找到更多信息,或在ntop电子商店获取许可。

唉出错了

发表于 2017-04-24 | 更新于: 2018-02-21
字数统计: 61 | 阅读时长 ≈ 1

经验教训啊,幸亏没有造成太大的损失。xp系统激活,结果造成伪激活,
虽然在不久前无意间看到这个问题,但是还是下意识的忽视了。果然还是太嫩了。

关于主板换固态硬盘装系统无法装起可能原因之一

发表于 2017-04-23 | 更新于: 2018-02-21
字数统计: 57 | 阅读时长 ≈ 1

原因:2003换成win7,主板不兼容固态硬盘,要在bios设置ACHL模式不然装不起系统,
就是不设置这个模式的话主板认不到固态硬盘,纯手打,麻烦好评9星

linux安装btsync

发表于 2017-04-23 | 更新于: 2018-02-21
字数统计: 528 | 阅读时长 ≈ 2

这个软件安装完后通过网页浏览器设置共享目录并生成同步Secret
,异地的客户端可以通过这个同步Secret访问共的目录,其中有读
写和只读两种同步方式选择,以点对点的形式传送数据,其实可以
理解为一种新型的P2P分享方式。
这里我们可以用这个软件来同步备份下载盒子上的指定目录的所有
文件,下面的内容是盒子端的配置过程。
linux系统下的安装与配置(使用root用户登录)

1.首先要下载应用程序解压,根据系统的字长选择
32位系统
wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz tar zxvf btsync_i386.tar.gz -C /root

64位系统
wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_x64.tar.gz tar zxvf btsync_x64.tar.gz -C /root
2.运行程序输出配置模板文件
./btsync –dump-sample-config > btsync.conf
3.编辑上一步输出的btsync.conf //配置文件
vi btsync.conf
将下面的<>部分改为你自己的服务器的信息。
例如“<设备名>”改为“My BT Server”.
端口不要设置成80、8112、9091、443之类的,避免与其他软件应用冲突。
{ “device_name”: “<设备名>”, “listening_port” : 0, // 0 - randomize port “storage_path” : “/home/root/.sync”, // uncomment next line if you want to set location of pid file // “pid_file” : “/var/run/syncapp/syncapp.pid”, “check_for_updates” : true, “use_upnp” : true, // use UPnP for port mapping “download_limit” : 0, “upload_limit” : 0, “webui” : { “listen” : “<服务器的IP地址>:<端口>”, “login” : “<登陆用户名>”, “password” : “<登陆密码>” } // Advanced preferences can be added to config file. // Info is available in BitTorrent Sync User Guide. }
4.运行BT sync,此时系统会新增一个btsync进程
./btsync –config btsync.conf
如果想关闭BT sync可以使用killall命令关闭
killall btsync
5.把BT sync加入开机启动
vi /etc/rc.local
exit 0 前一行加入
cd /root ./btsync –config btsync.conf
通过本地浏览器打开<服务器的IP地址>:<端口>/gui 登陆以后即可设置同步目录。
下载链接:https://download-cdn.getsync.com/stable/linux-x64/BitTorrent-Sync_x64.tar.gz
原文链接:[链接地址][1]
[1] http://www.ldisp.com/a/linux/2013/CentOS-BitTorrent-Sync.shtml

CentOS7.0下载各版本说明

发表于 2017-04-23 | 更新于: 2018-02-21
字数统计: 239 | 阅读时长 ≈ 1

CentOS-7.0-1406-x86_64-DVD.iso 标准安装版,一般下载这个就可以了
CentOS-7.0-1406-x86_64-NetInstall.iso 网络安装镜像
CentOS-7.0-1406-x86_64-Everything.iso 对完整版安装盘的软件进行补充,集成所有软件。
CentOS-7.0-1406-x86_64-GnomeLive.iso GNOME桌面版
CentOS-7.0-1406-x86_64-KdeLive.iso KDE桌面版
CentOS-7.0-1406-x86_64-livecd.iso 光盘上运行的系统,类拟于winpe
(1)CentOS-xxxx-LiveCD.ios 和CentOS-xxxx-bin-DVD.iso有什么区别?前者只有700M,后者有3.8G。其差别不仅仅在大小上,其更本质的差别是,CentOS-xxxx-LiveCD.ios只能加载到内存里运行,不能安装。CentOS-xxx-bin-DVD1.iso才可以安装到硬盘上。
(2)CentOS-xxx-bin-DVD1.iso,CentOS-xxx-bin-DVD2.iso分别是干什么的?前者是3.8G,后者是500M。其差别是DVD1是CentOS的安装文件,DVD2是CentOS的一些软件(就简单实用CentOS来说是不需要的)。
大笑

1…345
白墨

白墨

44 日志
21 标签
GitHub E-Mail
links
  • 亦寒疏
  • Ponderl|鱼秋
  • 宇の博客
  • 盒子的博客
  • Ehlxr Blog
  • MoeYi Blog
© 2018 白墨 | 坚强的写了: 12.2k
由 Hexo 暴力驱动
|
主题 — NexT.Muse v5.1.3
共 位极客到访
0%