记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
ROS 批量绑定ARP脚本 以上脚本可以在ROS中实现批量绑定ARP,再也不用一个一个的COPY到手软了。ROS2.9.27:foreach i in [/ip arp find dynamic yes ] do={/ip arp add copy-from $i}以上脚本适用ROS2.9.27版,理论上说在2.9.6版也是通用的,但是在2.9.6版执行却没有效果。修改如下脚本即可实现绑定:ROS2.9.6:foreach i in [/ip arp find dynamic=yes ] do={/ip arp add copy-from=$i}自动删除绑定:1、:foreach i in [/ip arp find] do={/ip arp remove $i} 2、:foreach i in= [/ip arp find] do=[/ip arp remove $i]
ROS的ARP绑定 先了解ARP欺骗,从百度找了一些资料给大家看: 第一种ARP欺骗的原理是——截获网关数据。它通知路由器一系列错误的内网MAC地址,并按照一定的频率不断进行,使真实的地址信息无法通过更新保存在路由器中,结果路由器的所有数据只能发送给错误的MAC地址,造成正常PC无法收到信息。 第二种ARP欺骗的原理是——伪造网关。它的原理是建立假网关,让被它欺骗的PC向假网关发数据,而不是通过正常的路由器途径上网。在PC看来,就是上不了网了,“网络掉线了”。 一般来说,ARP欺骗攻击的后果非常严重,大多数情况下会造成大面积掉线。有些网管员对此不甚了解,出现故障时,认为PC没有问题,交换机没掉线的“本事”,电信也不承认宽带故障。而且如果第一种ARP欺骗发生时,只要重启路由器,网络就能全面恢复,那问题一定是在路由器了。为此,宽带路由器背了不少“黑锅”。 作为网吧路由器的厂家,对防范ARP欺骗不得已做了不少份内、份外的工作。一、在宽带路...
Installing RPMforgeRPMforge is a collaboration of Dag and other packagers. They provide over 5000 packages for CentOS, including wine, vlc, mplayer, xmms-mp3, and other popular media tools. It is not part of Red Hat or CentOS but is designed to work with those distributions. See also Using RPMforge and Repoforge. Note: Because this repository is NOT part of CentOS, you should direct support questions to its maintainers at the Repoforge Users mailing list. Packages are supplied in RPM format and in most cases are ready to use. The default RPMforge repository does not replace official CentOS base packages. ContentsRPMforge for CentOS 6RPMforge for CentOS 5RPMforge for CentOS 4 1. RPMforge for CentOS 6The default RPMforge repository does not replace any CentOS base packages. In the past it used to, but those packages are now in a separate repository (rpmforge-extras) which is disabled by default. You can find a complete listing of the RPMforge package packages at http://packages.sw.b...
解决CentOS/linux系统时间不对 时钟设置的问题本身比较简单,但是它涉及到几个基本的配置文件:/etc/rc.d/rc.sysinit/etc/sysconfig/clock/etc/localtime/usr/share/zoneinfo解决办法:cp /etc/localtime /etc/localtime.bakcp /usr/share/zoneinfo/Asia/Shanghai /etc/localtimentpdate pool.ntp.orghwclock –systohc
Linux MySQL定时自动备份 Linux MySQL ncftp+crontab定时备份所有mysql数据库到FTP空间首先,安装ncftp ,在这里可以看到最新版本:http://ftp.ncftp.com/download/下面的安装过程以3.2.4版为例,如果版本更新了也只需要把3.2.4替换掉即可,在centos中,ncftp是不可以通过yum来安装的123456789cd /usr/srcwget ftp://ftp.ncftp.com/ncftp/ncftp-3.2.4-src.tar.gztar zxvf ncftp-3.2.4-src.tar.gzcd ncftp-3.2.4./configure --prefix=/usr/local/ncftpmakemake && make installln -s /usr/local/ncftp/bin/ncftpget /usr/bin/ncftgetln -s /usr/local/ncftp/bin/ncftpput /usr/bin/ncftput接着编写备份脚本,这里是压缩为tar.gz包的方式上传到远程ftp服务器备份。这里要使用notepad++或者UE,保存时要选择UNIX换行符。另外,事先需要创建/backup/day/这个文件夹。1234567891011121314151617#!/bin/bashrm -rf /backup/day/*cd /backup/day/cp -rf /usr/local/mysql/var/ /backup/day/sql_db_$(date +%Y%m%d)echo "ready to tar in 10s ."sleep 10tar zcvf `hostname`_sqldata_$(date +%Y%m%d).tar.gz sql_db_$(date +%Y%m%d)echo "ready to upl...
Centos/RHEL安装没setup命令 最小化装完centos 5.5/RHEL系统后,发现用setup的配置命令没有了.12[root@localhost ~]# setup-bash: setup: command not found这时就要手动去安装这个快速配置程序了.1[root@localhost ~]# yum install setuptool ntsysv system-config-network system-config-keyboard# yum install setuptool发现setup命令可以用了,可是系统服务,网络配置,键盘配置,时区配置不见了.安装下这几个配置程序安装系统服务配置# yum install ntsysv安装网络配置# yum install system-config-network安装键盘时区配置# yum install system-config-keyboardsystem-config-network system-config-keyboard这两个包的依赖很多,能手工改就手动改吧,没特殊应用就不用装了.本方法适用于centos/redhat 5.x
linux 多网卡同网段IP配置方法 linux 多网卡同网段IP配置方法 普通方法会导致一个通一个不通,两个网卡不能同时使用,只要像windows那样加上跳点就行了,命令如下,加到 /etc/rc.local里12345678ifconfig eth0 IP地址1 netmask 子网掩码 upifconfig eth1 IP地址2 netmask 子网掩码 uproute del defaultip route add default via 网关ip route add default via 网关 dev eth0 src IP地址1 table 100ip route add default via 网关 dev eth1 src IP地址2 table 200ip rule add from IP地址1 table 100ip rule add from IP地址2 table 200
Squid3.0缓存服务器配置全记录 Squid3.0缓存服务器配置一台缓存服务器对多台虚拟主机 第一步: 123wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE25.tar.gztar zxvf squid-3.0.STABLE25.tar.gzcd squid-3.0.STABLE25123456789101112131415161718192021222324252627./configure --prefix=/usr/local/squid3 \--enable-async-io=100 \--with-pthreads \--enable-storeio="aufs,diskd,ufs" \--enable-removal-policies="heap,lru" \--enable-icmp \--enable-delay-pools \--enable-useragent-log \--enable-referer-log \--enable-kill-parent-hack \--enable-arp-acl \--enable-default-err-language=Simplify_Chinese \--enable-err-languages="Simplify_Chinese English" \--disable-poll \--disable-wccp \--disable-wccpv2 \--disable-ident-lookups \--disable-internal-dns \--enable-basic-auth-helpers="NCSA" \--enable-stacktrace \--with-large-files \--disable-mempools \--with-filedescriptors=65536 \--enable-ssl \--enable-x-accelerator-varmakemake install第二步...
ESXi 5 and VNCHello, I have configured my ESXi 5 VMs for VNC - to enable me to VNC to the console for each of the VMs. But I cannot work out how to obfuscate the password, I wonder if anyone can help? I have set it up as follows: Stop each VMLog in to the ESXi host using SSHAdd the following to the VM's .vmx file: RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.port = "5901"RemoteDisplay.vnc.password = "password"When I restart the VM, I see that the following line has been added to the .vmx file RemoteDisplay.vnc.key = "long random string blah blah blah......." Now, when I try to connect to the server using a VNC client, I am not being allowed in. It is not asking for a password, it is showing me a blank screen.You configuration works, but you need to open the firewall on ESXi... First step is build a new rule like this:~ # cat /etc/vmware/firewall/vnc.xml
<!-- Firewall configuration information for VNC ...
Linux VPS Nginx+PHP 安装ionCube 今天下载了一个whmcs,在自己的VPS上测试一下,但是提示:Site error: the file /home/test/whmcs/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.上面的提示是没有安装ionCube的原因。首先,执行uname -a 查看系统是32位还是64位,打开http://www.ioncube.com/loaders.php页面根据Linux是32位还是64位下载适当的软件包,比如我的是32位的,切换到/usr/local/目录,执行cd /usr/local ,wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz 下载,再执行tar zxvf ioncube_loaders_lin_x86.tar.gz 解压软件包。修改/usr/local/php/etc/php.ini 在文件尾部添加如下代码:[ionCube Loader]zend_extension="/usr/local/ioncube/ioncube_loader_lin_5.2.so"如果以前装有Zend Optimizer,安装ionCube会和Zend Optimizer发生冲突,再执行/usr/local/php/php-fpm reload 时会发生如下错误:The Loader must appear as the first entry in the php.ini file in Unknown on line 0须将Zend Optimizer的代码删除,如LNMP中是如下代码...
最新评论