当前位置:  操作系统/服务器>linux
本页文章导读:
    ▪linux下实现web数据同步的四种方式(性能比较)       实现web数据同步的四种方式 ======================================= 1、nfs实现web数据共享2、rsync +inotify实现web数据同步3、rsync+sersync更快更节约资源实现web数据同步4、unison+inotify实现web数据双向同步 =.........
    ▪LAMP&LNMP自动化安装脚本代码       一、脚本的环境介绍二、脚本的介绍三、脚本的功能介绍 一、脚本的环境介绍 此脚本运行在RHEL 6.4版本上运行此脚本需注意:1)、主机需要能够上网,因为博主是搭建的搜狐的外网yum源,.........
    ▪IIS做WEB服务器无法下载某些中文名文件的解决方法       原因:文件名为2个、4个中文字时无法下载,而1个、3个、5个时没有问题 测试环境:中文版Windows 2000 AD.Server SP4 + IIS 5.0 解决方案: 1、修改注册表: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.........

[1]linux下实现web数据同步的四种方式(性能比较)
    来源: 互联网  发布时间: 2013-12-24

实现web数据同步的四种方式

=======================================

1、nfs实现web数据共享
2、rsync +inotify实现web数据同步
3、rsync+sersync更快更节约资源实现web数据同步
4、unison+inotify实现web数据双向同步

=======================================

一、nfs实现web数据共享

 nfs能实现数据同步是通过NAS(网络附加存储),在服务器上共享一个文件,且服务器需要设置文件系统的权限和配置文件设置的权限,权限两者之间取交集,然后客户端把共享的文件挂载到本地,客户端对文件有读写权限,则实现数据的同步。

nfs+web:服务器端的配置:

1)、安装相关软件,httpd提供web服务,nfs-utils提供nfs服务

[root@jie1 ~]# yum -y install httpd nfs-utils

2)、设置web的相关配置,使得web能够提供web服务


代码如下:

[root@jie1 ~]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.1:80
#DocumentRoot "/var/www/html"   #提供虚拟主机,注释默认存放网页文件的路径
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /web/htdocs
</VirtualHost>
#######################################
[root@jie1 ~]# mkdir -pv /web/htdocs   #创建存放网页的目录
[root@jie1 ~]# cd /web/htdocs/
[root@jie1 htdocs]# touch index.html test.html test.php
[root@jie1 htdocs]# ls
index.html  test.html  test.php
[root@jie1 htdocs]# echo "This is Jie1 Web+nfs Server" >index.html
[root@jie1 htdocs]# httpd -t         #检查web的配置文件是否有语法错误
Syntax OK
[root@jie1 htdocs]# service httpd start  #开启web服务
Starting httpd:                                            [  OK  ]

3)、设置nfs的相关配置,共享网页文件

代码如下:

[root@jie1 htdocs]# id apache #安装httpd软件后,系统会创建apache用户,查看apache的id号
uid=48(apache) gid=48(apache) groups=48(apache)
[root@jie1 htdocs]# vim /etc/exports
######################################
/web/htdocs  172.16.22.3(rw,sync,root_squash,anonuid=48,anongid=48)
#nfs是以id号来确定是否能访问共享的文件的,因为两个服务器都安装了httpd软件,都会有apache用户,所以apache用户的id号能访问共享的文件
#/web/htdocs 共享的目录
#172.16.22.3 指定客户端能共享此文件,多个客户端用逗号隔开
#rw,读写权限
#sync,同步方式
#root_squash,压缩root用户的权限
#anonuid=48,指定此用户的id能访问共享文件
#anongid=48指定此组的id能访问共享文件
######################################
[root@jie1 htdocs]# service nfs start  #开启nfs服务
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Stopping RPC idmapd:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
[root@jie1 htdocs]#

web:客户端的配置

1)、安装httpd的软件

代码如下:
[root@jie3 /]# yum -y install httpd

2)、设置web的相关配置,使得web能够提供web服务

代码如下:

[root@jie3 /]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.3:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /website   #存放网页文件的路径
</VirtualHost>
#######################################
[root@jie3 /]# mkdir /website
[root@jie3 /]# httpd -t
Syntax OK
[root@jie3 /]# service httpd start
Starting httpd:                                            [  OK  ]
[root@jie3 ~]# cd /website/
[root@jie3 website]# ls   #现在查看是没有任何文件
[root@jie3 website]#

实现同步:

1)服务器端设置apache用户对共享的文件有读写权限

代码如下:
[root@jie1 htdocs]#setfacl -R -m u:apache:rwx /web/ #设置apache用户对此中所有文件有读写可执行权限

2)客户端挂载服务器的共享文件,查看客户端是否已经同步服务器端的文件

代码如下:

[root@jie3 website]#cd /root
[root@jie3 ~]# mount -t nfs 172.16.22.1:/web/htdocs /website/ #通过nfs挂载服务器端的文件
[root@jie3 /]#echo "172.16.22.1:/web/htdocs  /website       nfs    defaults,_netdev 0 0" >>/etc/fstab  #实现开机挂载
[root@jie3 ~]# cd /website/
[root@jie3 website]# ls  #查看文件已经同步过来
index.html  test.html  test.php
[root@jie3 website]#

3)客户端在共享的文件中新增文件,查看服务器端是否同步文件

代码如下:

[root@jie3 ~]# cd /website/
[root@jie3 website]# ls
index.html  test.html  test.php
[root@jie3 website]# touch website.html  #在客户端创建此文件
[root@jie3 website]# ls
index.html  test.html  test.php  website.html

[root@jie1 htdocs]# ls  #服务器端,可以查看来着客户端上传的文件
index.html  test.html  test.php  website.html

所有的数据其实都保存到了nfs服务器,不论用户访问哪台Web服务器,都要来nfs服务器获取数据,这样势必照成nfs服务器的性能下降,而且客户端对nfs服务器的依赖性较大,如果nfs服务器down掉之后,客户端的web服务器就无法工作了。(动态的那种数据,而且数据量很大的数据,就不要用nfs服务器来实现数据共享了,一般适应于,静态页面和数据较小的文件)

二、rsync +inotify实现web数据同步

rsync(remote sync)的特性:

   可以镜像保存整个目录树和文件系统
   可以同步增量同步数据,文件传输效率高,因而同步时间很短
   可以保持原有文件的权限、时间等属性
   加密传输数据,保证了数据的安全性
   支持匿名传输
         rsync也能实现同步,但是需要自己手动的去同步数据,当数据量非常的频繁时,无疑是加大了运维人员的工作,inotify是一种强大的、细粒度的、异步的文件系统事件监控机制,inotify-tools工具的出现,解决了这种工作,安装inotify软件的主机会监听服务器端的主机是否数据和本机不一样,(因为在上传数据时,运维人员先上传到安装inotify主机上),不一样就用rsync命令直接把数据传输过去。客户端安装rsync软件是为了调用rsync的命令,安装inotify软件是监听和数据是否发生改变,服务器端安装rsync软件时为了提供rsync服务。

rsync+web服务端的配置:

1)、安装相关软件

代码如下:
[root@jie1 ~]# yum -y install rsync xinetd httpd
#rsync服务通常基于超级守护进程xinetd管理的方式来实现,因此需要事先安装rysnc和xinetd

2)、web的相关配置,使得web能够提供服务


代码如下:

[root@jie1 ~]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.1:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /web/htdocs
</VirtualHost>
#######################################
[root@jie1 ~]# mkdir -pv /web/htdocs
[root@jie1 ~]# cd /web/htdocs   #服务器端,没有任何的网页文件
[root@jie1 ~]# ls
[root@jie1 ~]#

3)、rsync服务的相关配置

*****建立rsync的配置文件和密码文件************
       touch /etc/rsyncd.conf(rsync的配置文件)
       touch /etc/rsyncd.pwd(用户的密码文件) 
       chmod 600 /etc/rsyncd.pwd(权限要设置为600,否则无法备份成功)

代码如下:

[root@jie1 ~]# vim /etc/rsyncd.conf
############vim /etc/rsyncd.conf########################################
uid = nobody                    #备份以什么身份进行,用户ID
gid = nobody                    #备份以什么身份进行,组ID
use chroot = no                 #禁锢在源目录
max connections = 3             #最大连接数,0代表没有限制
strict modes = yes              #是否检查口令文件的权限
pid file = /var/run/rsyncd.pid  #运行进程的pid文件
log file = /var/log/rsyncd.log  #日志记录文件
[htdocs]                        #指定认证的备份模块名
path = /web/htdocs              #需要备份的目录的路径
ignore errors = yes             #忽略一些无关的IO错误
read only = no                  #设置为no,即可以传至服务器的相应目录。
write only = no                 #设置为no,表示客户端可以下载文件
hosts allow = 172.16.22.3       #可以连接rsync服务器的主机的IP地址
hosts deny = *                  #设置禁止连接rsync服务器的主机地址,*表示  拒绝所有除了hosts allow定义的
uid = root
gid = root
auth users = backuper            #连接模块的用户名
secrets file = /etc/rsyncd.pwd   #连接模块用户名的密码文件存放路径
#####################################################################
[root@jie1 ~]#vim  /etc/rsyncd.pwd  #用户的密码文件
#####################################################################
backuper:pwd123        #用户名:密码
#####################################################################
[root@jie1 ~]# chmod 600  /etc/rsyncd.pwd   #权限给600
[root@jie1 ~]# chkconfig rsync on
[root@jie1 ~]# chkconfig xinetd on
[root@jie1 ~]# service  xinetd start
Starting xinetd:                                           [  OK  ]
[root@jie1 ~]# netstat -pant | grep 873
tcp        0      0 :::873                      :::*                        LISTEN      19876/xinetd

rsync+inotify+web客户端的配置:

1)、inotify-tools软件的安装及设置

代码如下:

[root@jie3 ~]#wget http://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz             #下载inotify-tools软件
[root@jie3 ~]# ls
anaconda-ks.cfg            install.log    
inotify-tools-3.14.tar.gz  install.log.syslog
[root@jie3 ~]# tar xf inotify-tools-3.14.tar.gz          #解压软件
[root@jie3 ~]# cd inotify-tools-3.14
[root@jie3 inotify-tools-3.14]# ./configure --prefix=/usr/local/inotify && make && make install                 #编译安装软件
[root@jie3 ~]#cd /usr/local/inotify/
[root@jie3 inotify]# echo "PATH=/usr/local/inotify/bin:$PATH" >>/etc/profile.d/inotify.sh             #设置能与系统关联的path路径
[root@jie3 inotify]# source /etc/profile.d/inotify.sh
[root@jie3 inotify]# echo "/usr/local/inotify/lib" >/etc/ld.so.conf.d/inotify.conf         #设置系统能识别软件的库文件
[root@jie3 inotify]# ldconfig -v | grep inotify
/usr/local/inotify/lib:
    libinotifytools.so.0 -> libinotifytools.so.0.4.1
[root@jie3 inotify]# ln -sv /usr/local/inotify/include/ /usr/include/inotify                      #链接头文件到系统能识别的路径下
`/usr/include/inotify' -> `/usr/local/inotify/include/'
[root@jie3 inotify]#

2)、web的相关配置,使得web能够提供服务

代码如下:

[root@jie3 /]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.3:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /website
</VirtualHost>
#######################################
[root@jie3 /]# mkdir /website
[root@jie3 /]# httpd -t
Syntax OK
[root@jie3 /]# service httpd start
Starting httpd:                                            [  OK  ]
[root@jie3 ~]# cd /website/
[root@jie3 website]#  ls
[root@jie3 website]#
[root@jie3 ~]#

3)、配置能连接rsync的密码文件和传输数据的脚本

代码如下:

[root@jie3 ~]# vim /etc/rsyncd.pwd
#############################################
pwd123  #密码与rsync服务器的密码相同
###############################################
[root@jie3 ~]# chmod 600 /etc/rsyncd.pwd
[root@jie3 ~]# vim  rsync.sh
#####################################################################
#!/bin/bash
host=172.16.22.1
src=/website_br/index.html>des=htdocs
inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f%e' -e modify,delete,create,attrib $src \
| while read files
  do
/usr/bin/rsync -vzrtopg  --progress --password-file=/etc/rsyncd.secrets $src backuper@$host::$des
echo "${files} was rsynced" >>/tmp/rsync.log 2>&1
done
####################################################################

验证实现同步:

代码如下:

##1、先开启监控的脚本(inotify主机上)
[root@jie3 ~]# bash -x rsync.sh &
#不放在后台可以查看同步的详细过程,生成环境中,建议把此脚本放到后台执行,此脚本会监控客户端数据是否方式变化,如果变化脚本就运行,数据不变化,脚本就会等待着用户的输入
##2、在开一个终端,在此目录创建文件(inotify主机上)
[root@jie3 ~]# cd /website/
[root@jie3 website]# touch index.html test.php testdb.php  inotify.php
[root@jie3 website]# ls
index.html  testdb.php  test.php inotify.php
[root@jie3 website]#
##3、看服务器端,数据是否已经同步过去
[root@jie1 ~]# cd /web/htdocs/
[root@jie1 htdocs]# ls
index.html  testdb.php  test.php inotify.php  #数据已经被同步过来
[root@jie1 htdocs]#

rsync +inotify这种能实现数据的同步,但是当网络很繁忙,且文件变化比较频繁时,而且需要同步的rsync服务器端比较多时,rsync+inotify肯定是满足不了需求的,于是rsync+sersync这种更快更节约资源实现web数据同步可以弥补rsync+inotify带来的不足,rsync+inotify还有一个重大的缺点就是数据传输只是单向的,当运维人员由于“粗心”把数据直接传输rsync服务器端时,inotify主机是得不到rsync服务器端的数据,于是unison+inotify实现web数据双向同步,解决了rsync+inotify的这一缺点。

三、rsync+sersync更快更节约资源实现web数据同步



 

sersync与inotify相比有以下优点:
sersync是使用c++编写,而且对linux系统文件系统产生的临时文件和重复的文件操作进行过滤,所以在结合rsync同步的时候,节省了运行时耗和网络资源。因此更快。
sersync配置起来很简单,其中bin目录下已经有基本上静态编译的2进制文件,配合bin目录下的xml配置文件直接使用即可。
sersync使用多线程进行同步,尤其在同步较大文件时,能够保证多个服务器实时保持同步状态。
sersync有出错处理机制,通过失败队列对出错的文件重新同步,如果仍旧失败,则按设定时长对同步失败的文件重新同步。
sersync自带crontab功能,只需在xml配置文件中开启,即可按您的要求,隔一段时间整体同步一次。无需再额外配置crontab功能。

rsync+web服务器端的配置:

1)、安装相关软件

代码如下:

[root@jie1 ~]# yum -y install rsync xinetd httpd
#rsync服务通常基于超级守护进程xinetd管理的方式来实现,因此需要事先安装rysnc和xinetd

2)、web的相关配置,使得web能够提供服务

代码如下:

[root@jie1 ~]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.1:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
ServerName www.jie.com
DocumentRoot  /web/htdocs
</VirtualHost>
#######################################
[root@jie1 ~]# mkdir -pv /web/htdocs
[root@jie1 ~]# cd /web/htdocs   #服务器端,没有任何的网页文件
[root@jie1 ~]# ls
[root@jie1 ~]#

3)、rsync服务的相关配置

代码如下:

###====此配置文件的解释,在rsync+inotify中已经解释了=====####
[root@jie1 ~]# vim /etc/rsyncd.conf
############vim /etc/rsyncd.conf###############
uid = nobody
gid = nobody
use chroot = no
max connections = 3
strict modes = yes
pid file= /var/run/rsyncd.pid
log file= /var/log/rsyncd.log
[htdocs]
path = /web/htdocs
ignore errors = yes
readonly = no
write only = no
hosts allow = 172.16.22.3
hosts deny = *
list = false
uid = root
gid = root
auth users= backuper
secrets file= /etc/rsyncd.pwd
##############################################
[root@jie1 ~]#vim /etc/rsyncd.pwd
backuper:pwd123
[root@jie1 ~]# chmod 600 /etc/rsyncd.pwd
[root@jie1 ~]# chkconfig rsync on
[root@jie1 ~]# chkconfig xinetd on
[root@jie1 ~]# service  xinetd start
Starting xinetd:                                           [  OK  ]
[root@jie1 ~]# netstat -pant | grep 873
tcp        0      0 :::873                      :::*                        LISTEN      19876/xinetd

sersync+web客户端的配置:

1)、先下载安装sersync软件,做初始设置

代码如下:

[root@jie3 ~]#wget --no-check-certificate https://sersync.googlecode.com/files/sersync2.5_64bit_binary_stable_final.tar.gz
[root@jie3 ~]# ls
anaconda-ks.cfg  install.log.syslog
install.log      sersync2.5_64bit_binary_stable_final.tar.gz
 mkdir /usr/local/sersync
[root@jie3 ~]#mkdir -pv /usr/local/sersync/{conf,bin,log}
mkdir: created directory `/usr/local/sersync'
mkdir: created directory `/usr/local/sersync/conf'
mkdir: created directory `/usr/local/sersync/bin'
mkdir: created directory `/usr/local/sersync/log'
[root@jie3 ~]# tar xf sersync2.5_64bit_binary_stable_final.tar.gz
[root@jie3 ~]# cd GNU-Linux-x86/
[root@jie3 GNU-Linux-x86]# ls
confxml.xml  sersync2
[root@jie3 GNU-Linux-x86]# mv confxml.xml /usr/local/sersync/conf/
[root@jie3 GNU-Linux-x86]# mv sersync2  /usr/local/sersync/bin/
[root@jie3 GNU-Linux-x86]# cd /usr/local/sersync/
[root@jie3 sersync]# echo "PATH=/usr/local/sersync/bin:$PATH" >>/etc/profile.d/sersync.sh
[root@jie3 sersync]# source /etc/profile.d/sersync.sh
[root@jie3 sersync]# echo "pwd123" >/usr/local/sersync/sersync.pwd
[root@jie3 sersync]# chmod 600 /usr/local/sersync/sersync.pwd

2)、修改sersync的配置文件

代码如下:

[root@jie3 sersync]# vim /usr/local/sersync/conf/confxml.xml
#########################################################################<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.5">
  #设置本地的ip地址和监听的端口
    <host hostip="172.16.22.3" port="8008"></host>
  #debug模式是否开启
    <debug start="false"/>
  #xfs文件系统是否开启
    <fileSystem xfs="false"/>
  #同步时,是否支持正则表达式,默认关闭
    <filter start="false">
    <exclude expression="(.*)\.svn"></exclude>
    <exclude expression="(.*)\.gz"></exclude>
    <exclude expression="^info/*"></exclude>
    <exclude expression="^static/*"></exclude>
    </filter>
  # 设置要监控的事件
    <inotify>
    <delete start="true"/>
    <createFolder start="true"/>
    <createFile start="false"/>
    <closeWrite start="true"/>
    <moveFrom start="true"/>
    <moveTo start="true"/>
    <attrib start="false"/>
    <modify start="false"/>
    </inotify>
  #同步的设置
    <sersync>
  #同步的路径,本地的目录
    <localpath watch="/website">
  #rsync服务器的ip地址和rsync配置文件里面定义的模块
        <remote ip="172.16.22.1" name="htdocs"/>
  #<!-- -->括起来表示注释
        <!--<remote ip="192.168.8.39" name="tongbu"/>-->
        <!--<remote ip="192.168.8.40" name="tongbu"/>-->
    </localpath>
    <rsync>
  #rsync指令参数
        <commonParams params="-artuz"/>
  #rsync同步认证设置的内容,user指定用户名,password指定存放密码的文件路径
        <auth start="true" users="backuper" passwordfile="/usr/local/sersync/sersync.pwd"/>
  #设置rsync远程服务端口
        <userDefinedPort start="false" port="874"/><!-- port=874 -->
  #设置超时时间
       <timeout start="true" time="100"/><!-- timeout=100 -->
  #设置ssh加密传输模式,默认关闭
        <ssh start="false"/>
    </rsync>
  #设置sersync传输失败日志脚本路径
    <failLog path="/tmp/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
  #设置rsync+crontab定时传输,默认关闭
    <crontab start="false" schedule="600"><!--600mins-->
        <crontabfilter start="false">
        <exclude expression="*.php"></exclude>
        <exclude expression=\'#\'" /*"></exclude>
        </crontabfilter>
    </crontab>
  #设置sersync传输后调用name指定的插件脚本,默认关闭
    <plugin start="false" name="command"/>
    </sersync>
  #插件脚本范例
    <plugin name="command">
    <param prefix="/bin/sh" suffix="" ignoreError="true"/>    <!--prefix /opt/tongbu/mmm.sh suffix-->
    <filter start="false">
        <include expression="(.*)\.php"/>
        <include expression="(.*)\.sh"/>
    </filter>
    </plugin>
</head>
#######################################################################

验证实现同步:


代码如下:

###sersync客户端的,开启同步机制,进行监控,然后创建文件
[root@jie3 website]# sersync2 -r -d &
[root@jie3 ~]# cd /website/
[root@jie3 website]# touch index.html  testdb.php  test.html  test.php
###rsync服务器端,查看可以来着sersync客户端的同步文件
[root@jie1 ~]# cd /web/htdocs/
[root@jie1 htdocs]# ls
index.html  testdb.php  test.html  test.php
[root@jie1 htdocs]#

四、unison+inotify实现web数据双向同步

Unison是一款跨平台的文件同步对象,不仅支撑本地对本地同步,也支撑经由过程SSH、RSH和Socket等收集和谈进行同步。
Unison支撑双向同步操纵,你既可以从A同步到B,也可以从B同步到A,这些都不须要额外的设定。

1)、两个服务器都编译安装这三个源码包:(在此我只写一台服务器的编译安装过程)

代码如下:

[root@jie1 ~]#wget ftp://distro.ibiblio.org/slitaz/sources/packages-2.0/o/ocaml-3.10.2.tar.gz
[root@jie1~]#wget  http://freebsd.ntu.edu.tw/FreeBSD/ports/distfiles/unison-2.32.52/unison-2.32.52.tar.gz
[root@jie1~]#wget http://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
[root@jie1 ~]# ls
anaconda-ks.cfg            install.log         ocaml-3.10.2.tar.gz
inotify-tools-3.14.tar.gz  install.log.syslog  unison-2.32.52.tar.gz
[root@jie1 ~]# tar xf inotify-tools-3.14.tar.gz
[root@jie1 ~]# tar xf ocaml-3.10.2.tar.gz
[root@jie1 ~]# tar xf unison-2.32.52.tar.gz
##编译安装inotify
[root@jie1 ~]# cd inotify-tools-3.14
[root@jie1 inotify-tools-3.14]# ./configure --prefix=/usr/local/inotify && make && make install
[root@jie1 inotify-tools-3.14]# cd /usr/local/inotify/
##修改PATH环境变量
[root@jie1 inotify]# echo "PATH=/usr/local/inotify/bin:$PATH" >/etc/profile.d/inotify.sh
[root@jie1 inotify]# source /etc/profile.d/inotify.sh
##添加库文件到系统识别的路径
[root@jie1 inotify]# echo "/usr/local/inotify/lib" >/etc/ld.so.conf.d/inotify.conf
[root@jie1 inotify]# ldconfig -v | grep inotify
/usr/local/inotify/lib:
    libinotifytools.so.0 -> libinotifytools.so.0.4.1
##链接库文件到系统识别的路径
[root@jie1 inotify]# ln -sv /usr/local/inotify/include/ /usr/include/inotify
`/usr/include/inotify' -> `/usr/local/inotify/include/'
##编译安装ocaml,unison依赖于ocaml
[root@jie1 inotify]#cd /root/ocaml-3.10.2
[root@jie1 ocaml-3.10.2]#./configure
[root@jie1 ocaml-3.10.2]#make world opt
[root@jie1 ocaml-3.10.2]#make install
##编译安装unison
[root@jie1 ocaml-3.10.2]# cd /root/unison-2.32.52
##安装依赖性包
[root@jie1 unison-2.32.52]#yum -y install ctags-etags
[root@jie1 unison-2.32.52]# make UISTYLE=text
##make install会提示错误,此错误就是要你cp unison /usr/local/bin,复制即可
[root@jie1 unison-2.32.52]# make install
[root@jie1 unison-2.32.52]# cp unison /usr/local/bin

2)、服务器A生成的公钥传到服务器B上:

代码如下:

##把服务器A生成的公钥传到服务器B上####
[root@jie1 ~]# ssh-keygen -t rsa   #生成ssh的密钥对
[root@jie1 ~]# scp ~/.ssh/id_rsa.pub  172.16.22.3:/root  #生成的密钥在家目录的ssh文件中,ssh文件为隐藏文件,通过scp复制到服务器B上
[root@jie3 ~]# mv id_rsa.pub .ssh/authorized_keys  #在服务器B上把服务器A传来的公钥文件改名并存放到ssh目录下
[root@jie3 ~]# chmod 600 .ssh/authorized_keys  #给公钥文件改权限为600
[root@jie1 ~]# service sshd restart  #重启sshd服务
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]
[root@jie1 ~]#

3)、服务器B生成的公钥传到服务器A上:

代码如下:

##把服务器B生成的公钥传到服务器A上####
[root@jie3 ~]# ssh-keygen -t rsa   #生成ssh的密钥对
[root@jie3 ~]# scp ~/.ssh/id_rsa.pub  172.16.22.1:/root  #生成的密钥在家目录的ssh文件中,ssh文件为隐藏文件,通过scp复制到服务器B上
[root@jie1 ~]# mv id_rsa.pub .ssh/authorized_keys  #在服务器A上把服务器B传来的公钥文件改名并存放到ssh目录下
[root@jie1 ~]# chmod 600 .ssh/authorized_keys  #给公钥文件改权限为600
[root@jie3 ~]# service sshd restart  #重启sshd服务
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]
[root@jie3 ~]#

4)、分别搭建web服务,服务器A的网页文件存放路径为/web/htdocs,服务器B的网页存放路径为/website

代码如下:

##服务器A搭建web的配置
[root@jie1 /]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.1:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /web/htdocs
</VirtualHost>
#######################################
[root@jie1 ~]# mkdir -pv /web/htdocs
[root@jie1 ~]# cd /web/htdocs/
[root@jie1 htdocs]# ls
[root@jie1 htdocs]#
##服务器B搭建web的配置
[root@jie3 /]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.3:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /website
</VirtualHost>
#######################################
[root@jie3 /]# mkdir /website
[root@jie3 /]# httpd -t
Syntax OK
[root@jie3 /]# service httpd start
Starting httpd:                                            [  OK  ]
[root@jie3 ~]# cd /website/
[root@jie3 website]# ls
[root@jie3 website]#

5)、编unison同步的脚本进行测试

代码如下:

##服务器A的脚本
[root@jie1 ~]# vim serA.sh
######################################################################
#/bin/bash
ipB="172.16.22.3"
srcA="/web/htdocs"
dstB="/website"
/usr/local/inotify/bin/inotifywait -mrq -e create,delete,modify,move $srcA | while read line; do
/usr/local/bin/unison -batch $srcA ssh://$ipB/$dstB
echo -n "$line " >> /var/log/inotify.log
echo `date | cut -d " " -f1-4` >> /var/log/inotify.log
done
#####################################################################
##服务器B的脚本
[root@jie3 ~]# vim serB.sh
#####################################################################
#/bin/bash
ipA="172.16.22.1"
srcB="/website"
dstA="/web/htdocs"
/usr/local/inotify/bin/inotifywait -mrq -e create,delete,modify,move $srcB | while read line; do
/usr/local/bin/unison -batch $srcB ssh://$ipA/$dstA
echo -n "$line " >> /var/log/inotify.log
echo `date | cut -d " " -f1-4` >> /var/log/inotify.log
done
#####################################################################
##服务器A的测试
[root@jie1 ~]# sh -x serA.sh  #先运行unison同步脚本,查看过程
[root@jie1 ~]# cd /web/htdocs/
[root@jie1 htdocs]# touch serA.txt SerA.html SerA.php  #然后创建文件
[root@jie1 htdocs]# ls
SerA.html  SerA.php  serA.txt  SerB.html  SerB.php  SerB.txt
##服务器B的测试
[root@jie3 ~]# sh -x serB.sh
[root@jie3 ~]# cd /website/
[root@jie3 website]# touch SerB.txt SerB.html SerB.php
[root@jie3 website]# ls
SerA.html  SerA.php  serA.txt  SerB.html  SerB.php  SerB.txt
###=====可以把脚本设置开机自启,放到rc.local文件中,且放在后台运行

本文出自 “技术之路---桀” 博客,请务必保留此出处http://litaotao.blog.51cto.com/6224470/1286871


    
[2]LAMP&LNMP自动化安装脚本代码
    来源: 互联网  发布时间: 2013-12-24

一、脚本的环境介绍
二、脚本的介绍
三、脚本的功能介绍


一、脚本的环境介绍

此脚本运行在RHEL 6.4版本上
运行此脚本需注意:
1)、主机需要能够上网,因为博主是搭建的搜狐的外网yum源,此yum源由两部分组成,一个是光盘里面的所有软件包,一个是epel源。
2)、需了解软件之间的相互依赖性。


二、脚本的介绍

脚本是由函数组成,每一个函数实现一个功能

代码如下:

function  create_yum             #此函数是搭建sohu的yum仓库
function  download               #此函数是下载全部所需的软件包
function  install_apache         #此函数是安装apache软件包
function config_apache           #此函数是修改apache的服务脚本和开启
                                  apache服务    
function  install_nginx          #此函数是安装nginx软件包
function  install_mysql          #此函数是安装mysql软件包
function config_mysql            #此函数是初始化mysql和开启mysql的服务
function  install_php            #此函数是安装php软件包
function config_php              #此函数提供php的配置文件
function  install_php_fpm       #此函数是安装php-fpm软件包提供fastcgi服务
function config_php_fpm          #此函数是修改php-fpm的配置文件盒开启
                                 php-fpm的服务
function  install_xcache         #此函数是安装为php代码加速的软件包
function  install_memcache       #此函数是安装连接memcached的软件包
function  install_memcached      #此函数是安装memcached软件包
function  install_lamp        #此函数里面只包含了apache,mysql,php的函数
function config_lamp
function  install_lammp          #此函数里面只包含了apache,mysql,
                                 memcached,php的函数
function config_lammp
function  install_lnmp         #此函数里面只包含了nginx,mysql,php的函数
function config_lnmp
function  install_lnmmp          #此函数里面只包含了nginx,mysql,
                                 memcached,php的函数
function config_lnmmp

如果各位博友觉得配置文件的路径存放数据的路径与各位博友所要求的结果不一样,那请各位博友只需小小的自行修改一下

三、脚本的功能介绍

1)、支持某台机器单独安装某一个软件,如apache、nginx、mysql、php-fpm,memcached
2)、支持某台机器直接安装lamp、lnmp、lammp、lnmmp架构
3)、如果想一个一个的安装lamp(lnmp)架构,请注意安装顺序:apache(nginx)-->
mysql-->php
4)、php与php-fpm其实都是安装php源码软件包,但是提供的功能不一样
如果你的apache与php安装在不同的机器上,那么php的那台主机安装的是
php-fpm;
如果你的php与mysql安装在不同的机器上,那么php的那台主机也是安装
php-fpm;
php-fpm与memcached安装在不同的机器上,那么php-fpm的那台主机必须安装memcache,用于连接memcached。
5)、安装完每个脚本后,会把源码包生成的文件与系统能识别的头文件、库文件、二进制中
6)、会为服务提供system V 脚本文件
7)、会自行的把服务开启,并加入到开机自动启动的服务列表中


整个脚本

代码如下:

#!/bin/bash
#discripte:frist,you linux server must be surf Internet because we use http://mirrors.sohu.com/  yum source and epel source
function create_yum {
dir=/etc/yum.repos.d/
mv $dir/*.repo /tmp
cat >> $dir/sohu.repo <<EOF
[centos]
name=sohu-centos
baseurl=http://mirrors.sohu.com/centos/\$releasever/os/\$basearch
gpgcheck=1
enable=0
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
[epel]
name=sohu-epel
baseurl=http://mirrors.sohu.com/fedora-epel/\$releasever/\$basearch/
enable=1
gpgcheck=0
EOF
yum clean all &>/dev/null
}
function download {
yum -y install wget
cd /root
echo -e "\033[32m=========download about web server source package==========\033[0m"
wget http://mirror.esocc.com/apache/apr/apr-1.4.6.tar.bz2
wget http://mirror.esocc.com/apache/apr/apr-util-1.5.2.tar.bz2
wget http://mirror.esocc.com/apache/httpd/httpd-2.4.6.tar.bz2
wget http://nginx.org/download/nginx-1.4.2.tar.gz
echo -e "\033[32m=========download about php or php-fpm soure package========\033[0m"
wget http://xcache.lighttpd.net/pub/Releases/3.0.3/xcache-3.0.3.tar.bz2
wget http://pecl.php.net/get/memcache-2.2.7.tgz
wget http://downloads.php.net/stas/php-5.4.19.tar.bz2
echo -e "\033[32m======download about memcached source package========\033[0m"
wget http://nchc.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.21-stable.tar.gz
wget http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz
echo -e "\033[32m======download about mysql source package=========\033[0m"
wget http://mysql.llarian.net/Downloads/MySQL-5.5/mysql-5.5.33.tar.gz
}
function install_apache {
cd /root
yum -y install pcre-devel
tar xf apr-1.4.6.tar.bz2
tar xf apr-util-1.5.2.tar.bz2
tar xf httpd-2.4.6.tar.bz2
cd /root/apr-1.4.6
./configure --prefix=/usr/local/apr && make && make install
echo -e "\033[32m=========apr is ok========\033[0m"
cd /root/apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr && make && make install
echo -e "\033[32m=========apr-util is ok========\033[0m"
cd /root/httpd-2.4.6
./configure --prefix=/usr/local/apache --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib \
--with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most \
--enable-mpms-shared=all --with-mpm=event && make && make install
echo -e "\033[32m=========httpd is ok========\033[0m"
}
function config_apache {
echo -e "\033[32m frist,Associated system path \033[0m"
echo "PATH=/usr/local/apache/bin/:$PATH" >/etc/profile.d/httpd.sh
source /etc/profile.d/httpd.sh
ln -sv /usr/local/apache/include/  /usr/include/httpd
echo -e "\033[32m second,Modify configuration files and provided systemV scripts \033[0m"
IP=`ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk -F: '{print $2}' | cut -d' ' -f1`
cp /root/httpd-2.4.6/build/rpm/httpd.init  /etc/rc.d/init.d/httpd
sed -i '/httpd/s/usr\/sbin\/httpd/usr\/local\/apache\/bin\/httpd/g' /etc/rc.d/init.d/httpd
sed -i '/^httpd/a\prog=httpd' /etc/rc.d/init.d/httpd
sed -i '/^pidfile/s/var\/run/usr\/local\/apache\/logs/g' /etc/rc.d/init.d/httpd
sed -i 's/etc\/httpd\/conf\/httpd.conf/usr\/local\/apache\/conf\/httpd.conf/g' /etc/rc.d/init.d/httpd
sed -i '$a ServerName '$IP':80' /usr/local/apache/conf/httpd.conf
chkconfig --add httpd
chkconfig --level 35 httpd on
service httpd start
}
function install_nginx {
cd /root
yum -y install pcre-devel
tar xf nginx-1.4.2.tar.gz
groupadd nginx
useradd -r -g nginx nginx
cd /root/nginx-1.4.2
./configure \
--prefix=/usr \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/tmp/nginx/client/ \
--http-proxy-temp-path=/var/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \
--http-scgi-temp-path=/var/tmp/nginx/scgi \
--with-pcre && make && make install
echo -e "\033[32m=========nginx is ok========\033[0m"
}
function install_mysql {
cd /root
yum -y install cmake bison
useradd -r mysql
tar xf mysql-5.5.33.tar.gz
cd /root/mysql-5.5.33
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data  -DSYSCONFDIR=/etc \
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0  -DMYSQL_UNIX_ADDR=/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
make  && make install
echo -e "\033[32m=========mysqld is ok========\033[0m"
}
function config_mysql {
echo -e "\033[32m frist,Associated system path,and Initialization database \033[0m"
cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server  /etc/rc.d/init.d/mysqld
chown -R root.mysql /usr/local/mysql/
mkdir -pv /mydata/data
chown -R mysql:mysql /mydata/data/
sed -i '/thread_concurrency/a\ datadir = /mydata/data' /etc/my.cnf
sed -i '/datadir/a\ innodb_file_per_table = 1' /etc/my.cnf
/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/mydata/data/  --basedir=/usr/local/mysql
service mysqld start
echo "PATH=/usr/local/mysql/bin:$PATH" >/etc/profile.d/mysqld.sh
source /etc/profile.d/mysqld.sh
echo "/usr/local/mysql/lib" >/etc/ld.so.conf.d/mysqld.conf
ldconfig -v | grep mysql
ln -sv /usr/local/mysql/include/ /usr/include/mysqld
chkconfig --add mysqld
chkconfig --level 35 mysqld on
}
function install_php {
yum -y install libxml2-devel bzip2-devel curl-devel  libmcrypt-devel  mhash-devel
tar xf php-5.4.19.tar.bz2
cd /root/php-5.4.19
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config \
--enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr \
--enable-xml  --enable-sockets --with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt --with-curl \
--with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2  --enable-maintainer-zts
make && make install
echo -e "\033[32m=========php is ok========\033[0m"
}
function config_php {
cp /root/php-5.4.19/php.ini-production /etc/php.ini
}
function install_php_fpm {
yum -y install libxml2-devel bzip2-devel curl-devel  libmcrypt-devel  mhash-devel
tar xf php-5.4.19.tar.bz2
cd /root/php-5.4.19
./configure --prefix=/usr/local/php  --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd \
--with-openssl  --enable-sockets --enable-sysvshm --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir \
--with-zlib-dir --with-libxml-dir=/usr --enable-xml  --with-mhash --with-mcrypt  --with-config-file-path=/etc  \
--with-config-file-scan-dir=/etc/php.d --with-bz2 --with-curl --enable-maintainer-zts --enable-fpm && make && make install
echo -e "\033[32m=========php-fpm is ok========\033[0m"
}
function config_php_fpm {
echo -e "\033[32m frist,Associated system path \033[0m"
IP2=`ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk -F: '{print $2}' | cut -d' ' -f1`
cp /root/php-5.4.19/php.ini-production /etc/php.ini
echo "PATH=/usr/local/php/bin:/usr/local/php/sbin:$PATH" >/etc/profile.d/php-fpm.sh
source /etc/profile.d/php-fpm.sh
echo -e "\033[32m second,Modify configuration files and provided systemV scripts \033[0m"
mv /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
sed -i 's/127\.0\.0\.1/'$IP2'/g' /usr/local/php/etc/php-fpm.conf
cp /root/php-5.4.19/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm
chmod +x /etc/rc.d/init.d/php-fpm
service php-fpm start
chkconfig --add php-fpm
chkconfig --level 35 php-fpm on
}
function install_xcache {
cd /root
tar xf xcache-3.0.3.tar.bz2
if [ -d /usr/local/php ];then
   cd /root/xcache-3.0.3
   /usr/local/php/bin/phpize
   ./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config
   make && make install
else
    install_php_fpm
   cd /root/xcache-3.0.3
   /usr/local/php/bin/phpize
   ./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config
   make && make install
   echo -e "\033[32m=========xcache is ok========\033[0m"
fi
}
function install_memcache {
cd /root
tar xf memcache-2.2.7.tgz
if [ -d /usr/local/php ];then
   cd /root/memcache-2.2.7
   /usr/local/php/bin/phpize
   ./configure --with-php-config=/usr/local/php/bin/php-config --enable-memcache   && make && make install
else
    install_php_fpm
    cd /root/memcache-2.2.7
    /usr/local/php/bin/phpize
   ./configure --with-php-config=/usr/local/php/bin/php-config --enable-memcache   && make && make install
   echo -e "\033[32m=========memcache is ok========\033[0m"
fi
}
function install_memcached {
cd /root
tar xf libevent-2.0.21-stable.tar.gz
tar xf memcached-1.4.15.tar.gz
cd /root/libevent-2.0.21-stable
./configure --prefix=/usr/local/libevent && make && make install
echo -e "\033[32m=========libevent is ok========\033[0m"
cd /usr/local/libevent/
echo "/usr/local/libevent/lib" >/etc/ld.so.conf.d/libevent.conf
ldconfig -v | grep libevent
ln -sv /usr/local/libevent/ /usr/include/libevent
cd /root/memcached-1.4.15
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/
make && make install
echo -e "\033[32m=========memcached is ok========\033[0m"
}
function install_lamp {
install_apache
install_mysql
install_php
install_xcache
}
function config_lamp {
config_apache
config_mysql
config_php
}
function install_lnmp {
install_nginx
install_mysql
install_php
install_xcache
}
function config_lnmp {
config_mysql
config_php
}
function install_lammp {
install_apache
install_mysql
install_php
install_xcache
install_memcache
install_memcached
}
function config_lammp {
config_apache
config_mysql
config_php
config_php_fpm
}
function install_lnmmp {
install_nginx
install_mysql
install_php
install_xcache
install_memcache
install_memcached
}
function config_lnmmp {
config_mysql
config_php
config_php_fpm
}
echo -e "\033[32m====make sure yum is ok=========\033[0m"
#create_yum
echo -e "\033[32m====now,download all package====\033[0m"
#download
echo -e "\033[32m====install development packages====\033[0m"
#yum -y groupinstall "Development tools" "Server Platform Development"
 echo -e "\033[32m=========you can choice you need install package==========\033[0m"
cat <<EOF
apache|A)        install apache source package.
nginx|N)         install nginx source package.
mysql|M)         install mysql source package.
php|P)           install php source package.
php-fpm|PF)      install php-fpm source package.
xcache|X)         install xcahe source package.
memcache|ME)     install memcache source package.
memcached|MD)    install memcached source package.
lamp)            install lamp source package.
lammp)           install lammp source package.
lnmp)            install lnmp source package.
lnmmp)           install lnmmp source package.
q|Q)             quit
EOF
read -p "Please choose to install: " Choice
echo -e "\033[32m=====start install $Choice====\033[0m"
until [ $Choice == q -o $Choice == Q ];do
 case $Choice in
apache|A)    
   install_apache
   config_apache ;;
nginx|N)
   install_nginx ;;
mysql|M)      
   install_mysql
   config_mysql ;;
php|P)
   install_php
   config_php ;;
php-fpm|PF)
   install_php_fpm
   config_php_fpm ;;
xcache|X)      
   install_xcache ;;
memcache|ME)  
   install_memcache ;;
memcached|MD) 
   install_memcached ;;
lamp)
   install_lamp
   config_lamp ;;
lammp)        
   install_lammp
   config_lammp ;;
lnmp)         
   install_lnmp
   config_lnmp ;;
lnmmp)        
   install_lnmmp
   config_lnmmp ;;
q|Q)       
    break
esac
  read -p "Have any choice agin, if you no,q|Q is quit: " Choice
  done

这个脚本和nginx systemV,memcached system V的脚本以附件的形式上传了,点此下载

缺陷:

1)、没能为nginx提供自动化system V脚本,但是nginx的system V脚本我会以附件的方式上传,各位博友需要 vim /etc/rc.d/init.d/nginx 然后copy我提供的system V脚本然后添加权限,就可以service nginx start了
2)、也没能为memcached提供自动化system V脚本,但是memcached的system V脚本会以附件方式上传,各位博友需要 vim /etc/rc.d/init.d/memcached 然后copy我提供的system V脚本然后添加权限,就可以service memcached start了

本文出自 “技术之路---桀” 博客


    
[3]IIS做WEB服务器无法下载某些中文名文件的解决方法
    来源: 互联网  发布时间: 2013-12-24
原因:文件名为2个、4个中文字时无法下载,而1个、3个、5个时没有问题

测试环境:中文版Windows 2000 AD.Server SP4 + IIS 5.0

解决方案:

1、修改注册表:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Inetinfo\Parameters\FavorDbcs

设置值为0,之后重新启动IIS即可。

2、在客户端修改IE设置把“总是以UTF-8发送URL”设置为不选中。

    
最新技术文章:
▪linux系统中的列出敏感用户的脚本代码
▪a10 config backup for aXAPI
▪一键备份gitolite服务器的Shell脚本
▪nagios 分发文件实现代码
▪阿里云云服务器Linux系统更新yum源Shell脚本
▪一个监控LINUX目录和文件变化的Shell脚本分享
▪Linux下实现SSH免密码登录和实现秘钥的管理、...
▪Shell正则表达式之grep、sed、awk实操笔记
▪3个备份系统文件并邮件发送的Shell脚本分享
▪CentOS 6.3下给PHP添加mssql扩展模块教程
▪监控网站是否可以正常打开的Shell脚本分享
▪shell脚本编程之if语句学习笔记
▪shell脚本编程之循环语句学习笔记
▪shell脚本编程之case语句学习笔记
▪Shell脚本实现的阳历转农历代码分享
▪Shell脚本实现复制文件到多台服务器的代码分...
▪Shell脚本实现批量下载网络图片代码分享
▪Shell脚本实现检测文件是否被修改过代码分享
▪Shell脚本数组用法小结
▪Shell脚本批量重命名文件后缀的3种实现
▪C语言实现的ls命令源码分享
▪Linux下查找后门程序 CentOS 查后门程序的shell脚...
▪Shell 函数参数
▪linux shell 自定义函数方法(定义、返回值、变...
▪Shell实现判断进程是否存在并重新启动脚本分...
▪Shell脚本break和continue命令简明教程
▪Shell脚本函数定义和函数参数
▪让代码整洁、过程清晰的BASH Shell编程技巧
▪shell常用重定向实例讲解
▪awk中RS、ORS、FS、OFS的区别和联系小结
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3