rsync 客户端同步的时候报错
已经做过好几台服务器的rsync配置了,可是有遇到了一个怪异的问题rsync客户机同步的时候报错:[root@tonykorn02 test]# /usr/bin/rsync -vzrtopg --progress --delete 192.168.1.250::test /testrsync: connection unexpectedly closed (0 bytes received so far) [receiver]rsync error: error in rsync protocol data stream (code 12) at io.c(463) [receiver=2.6.8][@more@]服务端配置[root@tonykorn ~]# uname -aLinux tonykorn 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux[root@tonykorn ~
一台AppManager服务器断电后,启动Mysql报错
一台AppManager服务器断电后,启动Mysql报错:[root@RedHat5 AppManager7]# ./startApplicationsManager.sh ./bin/mysqladmin: connect to server at 'localhost' failederror: 'Can't connect to local MySQL server through socket '/opt/AdventNet/ME/AppManager7/working/mysql/mysql.sock' (111)'Check that mysqld is running and that the socket: '/opt/AdventNet/ME/AppManager7/working/mysql/mysql.sock' exists![root@RedHat5 AppManager7]# [@more@]把mysql.sock改名[root@RedHat5 AppManager7]# mv /opt/AdventNet/ME/AppMa
mount by example
重新加载mount -o remount,rw /dev/sda3 /mount NFS文件系统mkdir /mnt/server1mount -t nfs server1:/var/ftp/pub /mnt/server1Mount iso文件mount -t iso9660 -o loop /iso/documents.iso /mnt/cdimage[@more@]
tune2fs和dumpe2fs 命令用法
tune2fs是linux下面重要的文件系统调整工具,其中的几个选项解释如下:[@more@]-c:表示文件系统在mount次数达到设定后,需要运行fsck检查文件系统。-i:文件系统的检查间隔时间。系统在达到时间间隔时,自动检查文件系统。-l:显示文件系统的很多参数。-j:转换为ext3文件系统。-m: Set the percentage of reserved filesystem blocks。 设置保留的空间百分比-o: Set or clear the indicated default mount options in the filesystem.设置默认加载参数通常如果使用ext3文件系统的话,使用-c 0关掉mount次数达到后的文件系统检查。t
e2label
[root@tsm04 /]# e2label /dev/sda5 disk5[root@tsm04 /]# e2label /dev/sda5disk5[root@tsm04 /]# e2label /dev/sda4e2label: No such file or directory while trying to open /dev/sda4Couldn't find valid filesystem superblock.[root@tsm04 /]# mkdir /sda5[root@tsm04 /]# mount LABEL=disk5 /sda5[@more@]
partprobe命令
Red Hat Enterprise Linux 3上,在安装系统之后,可否创建分区并且在不重新启动机器的情况下系统能够识别这些分区? 解决方法:解决方法:[@more@] 你可以使用一个叫做partprobe的工具。它包含在parted的rpm软件包中。在Red Hat Enterprise Linux 3上他的版本是parted-1.6。 partprobe 是一个可以修改kernel中分区表的工具。可以使kernel重新读取分区表。如下命令可以查看你的系统是否安装了parted软件包 rpm -q parted举例来说: # rpm -q parted parted-1.6.3-29你可以使用up2date命令安装这个软件包,如果在你的系统已经正确地注
seliunx的一些简单命令
还原文件上下文restorecon /root/*[@more@]其他的一些命令ls -Z /etc/shadow /etc/aliasesls -Zd /etc/ etc/hostsps -ZC syslogd,bashgetenforcesetenforce 0|1system-config-securitylevelsystem-config-selinuxchcon -t etc_t install.logchcon --reference /etc/shadow anaconda-ks.cfg
access control lists (ACLs)
Grant rwx access to files and directories for multiple users or groupsmount -o acl /directory查看aclgetfack file|directory设置aclsetfacl -m u:gandolf:rwx file|directorysetfacl -m g:nazgul:rw file|directorysetfacl -m d:u:frodo:rw directory删除aclsetfacl -x u:samwise file|directory[@more@]
Linux ACL学习笔记(zt)
1. 为什么要使用ACL先让我们来简单地复习一下Linux的file permission. 在linux下,对一个文件(或者资源)可以进行操作的对象被分为三类: file owner(文件的拥有者), group(组,注意不一定是文件拥有者所在的组), other (其他)而对于每一类别又分别定义了read, write and execute/search permission (这里不讨论SUID, SGID以及Sticky bit的设置)通过ls -l命令就我们就可以列出一个文件的permission[@more@]代码:# ls -l[leonard@localhost ~]$ ls -l-rw-rw---- 1 leonard admin 0 Jul 3 20:12 test.txt在这里说明了对于test.txt这个文件leona
Linux文件特殊权限 SUID/SGID/Sticky Bit (zt)
前面一直提到文件的重要权限,就是rwx这3个读、写、执行的权限。但是,怎么 /tmp权限有些奇怪?还有, /usr/bin/passwd也有些奇怪,怎么回事呢? [root@linux ~]# ls -ld /tmp ; ls -l /usr/bin/passwddrwxrwxrwt 5 root root 4096 Jul 20 10:00 /tmp-r-s--x--x 1 root root 18840 Mar 7 18:06 /usr/bin/passwd [@more@] 不是只有rwx吗?为什么还有其他的特殊权限呢?不要担心,我们这里先不谈这两个权限,只是先介绍一下而已。因为必须要有账号的ID概念,以及程序的进程(process)概念后,才能够进一步了解这些特殊权限所表示
如何强制定期更改Linux密码(zt)
口令时效是一种系统机制,用于强制口令在特定的时间长度后失效。对用户来说,这可能带来了一些麻烦,但是它确保了口令会定期进行更改,是一项很好的安全措施。默认情况下,绝大多数的Linux分装版本并没有打开口令时效,不过要想打开却非常简单。 [@more@]通过编辑/etc/login.defs,你可以指定几个参数,来设置口令实效的默认设定: PASS_MAX_DAYS 99999PASS_MIN_DAYS 0PASS_WARN_AGE 7 当设置口令时效的天数为99999时,实际上相当于关闭了口令时效。一个更明智的设定一般是60天——每2个月强制更改一次密码。 PASS_MIN_DAYS参数则设定了在本
Linux / Unix Command: logger
NAMElogger - a shell command interface to the syslog(3) system log module SYNOPSISlogger [-isd ] [-f file ] [-p pri ] [-t tag ] [-u socket ] [message ... ] DESCRIPTIONLogger makes entries in the system log. It provides a shell command interface to the syslog(3) system log module. Options: [@more@]-i Log the process id of the logger process with each line. -s Log the message to standard error, as well as the system log. -f file Log the specified file. -p pri Enter the message with the specifi
把日志写到其他服务器上的操作步骤
1,first, on the log server set up syslogd to accept remote memmages. a, EDIT /etc/sysconfig/syslog; YSSLOGD_OPTIONS="-r -m 0 " b, restart syslogd; # service syslog restart[@more@]2, on the log client set up syslogd to send messages from the user facility to the log server. a, Append in /etc/syslog.conf the following line: user.* @172.25.1.114 b, restart syslogd #service syslog restart3, test the new setup by using logger to generate a syslog mess
anacron
anacron 是和 cron 相似的任务调度器,只不过它并不要求系统持续运行。它可以用来运行通常由 cron 运行的每日、每周、和每月的作业。[@more@]要使用 anacron 服务,你必须安装了 anacron RPM 软件包,而且 anacron 服务必须在运行。要判定该软件包是否被安装,使用 rpm -q anacron 命令。要判定该服务是否在运行,使用 /sbin/service anacron status 命令。配置 anacron 任务anacron 任务被列在配置文件 /etc/anacrontab 中。文件中的每一行都代表一项任务,格式是:period delay job-identifier command period — 命令执行的频率(
用 Logwatch 工具监控 Linux 系统 Log 日志(zt)
作者: Fenng | 可以转载, 转载时务必以超链接形式标明文章原始出处和作者信息及版权声明网址: http://www.dbanotes.net/opensource/logwatch_linux_log.html 如果要想迅速的得到 Linux 环境中的日志报告信息, Logwatch 是一个很好的工具. [@more@]一般的 Linux 系统中可能都默认安装了这个工具.几乎不需要额外的配置就可以简单的用起来.# logwatch --print这条命令将会把昨天的日志信息简要的打印出来. 比如用户登录失败信息、SSH 登录信息、磁盘空间使用等.单独查看某个服务,比如 SSH 登录信息:# logwatch --service sshd --print这条命
我们来聊聊syslogd和logrotate吧 (zt)
放假这几天看书,了解了一下syslogd和logrotate,就想把自己看明白的总结一下:加深自己的理解;以资大家讨论。 ------------- 文档目录 ------------- 1 什么是syslogd 2 配置syslogd的说明 3 syslogd和系统中服务配置中日志的关系 4 什么是logrotate 5 配置logrotate的说明[@more@] ------------- 文档正文 ------------- 1 什么是syslogd syslogd可以简单地被称为记录系统活动的一个daemons。比如可以记录谁,在什么时间,在哪里,做了什么事情(像是在写记叙文啊);也可以记录您的系统曾经发
tmpwatch命令详解
功能说明:删除暂存文件。语 法:tmpwatch [-afqv][--test][超期时间][目录...][@more@]补充说明:执行tmpwatch指令可删除不必要的暂存文件,您可以设置文件超期时间,单位以小时计算。参 数: -a或--all 删除任何类型的文件。 -f或--force 强制删除文件或目录,其效果类似rm指令的"-f"参数。 -q或--quiet 不显示指令执行过程。 -v或--verbose 详细显示指令执行过程。 -test 仅作测试,并不真的删除文件或目录。例如:[root@tonykorn97 ~]# tmpwatch -afv --mtime 2 /tmpremoving file /tmp/mapping-r
cron相关
syntaxcrontab [-u user] filecrontab [-l | -r | -e ] -l list crontab -r removes crontab -e edits crontab using $EDITOR[@more@]controlling access to cronrestrict / allow user access to cron /etc/cron.allow /etc/cron.denysystem crontab filesdifferent format than user crontab filesmaster crontab file /etc/crontab runs executables in /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly/etc/cron.d/ directory contains additoonal system crontab filesdaily cron jobstmpwatch cl
使用 Linux 操作系统: Dell PowerVault RD1000 附录
概览 Linux 兼容性 在 Linux 上使用 RD1000 故障排除[@more@]--------------------------------------------------------------------------------概览本文档说明了在 Linux 操作系统上如何使用 RD1000 可拆卸式硬盘驱动器。RD1000 设备有两种型号:一个内置 SATA 版本以及一个外置 USB版本。SATA 和 USB 这两种型号都支持 Linux。--------------------------------------------------------------------------------Linux 兼容性有大量可能的 Linux 发行版本会为 Dell PowerVault RD1000 设备提供本地支持。在下表中列出的 Linux 发行版
XAMPP安装(zt)
XAMPP一个很好的WEB服务器安装包,使用方便功能强大。这里介绍一下它,还有安装配置的心得。到这里首先要介绍的就是XAMPP,因为我很多LINUX的工作和文档都基于XAMPP的.下载和介绍的网址: http://sourceforge.net/proj...