cron的一些细节研究

admin Posted in linux
0

/etc/cron.deny文件就是用于控制不让哪些用户使用Crontab的功能。

More »

postfix master.cf文件中${extension}的意思

admin Posted in linux
3

一直忘记master.cf里面的${extension}代表的意思,今天又再找一次,记录在下方

An example using address extensions (ie user+extension@domain.com (don’t forget to define the proper recipient_delimiter in Postfix’s main.cf)) to deliver to the folder ‘extension’ in your maildir (If you wish to preserve the case of ${extension}, remove the ‘hu’ flags, and be sure to utilize Modifiers in your dovecot.conf for mail locations and other configuration parameters that are expecting lower case):

More »

在安装linux时截屏方法

admin Posted in linux
0
shift+printscreen
 
保存在/root/anaconda_screenshots/目录下
 

ssh只允许指定的用户登陆

admin Posted in linux
0
方法1:
在/etc/pam.d/sshd文件第一行加入
auth required pam_listfile.so item=user sense=allow file=/etc/sshusers
onerr=fail
然后在/etc下建立sshusers文件,编辑这个文件,加入你允许使用ssh服务的用户名,不用重新启动sshd服务。 More »

centos单用户模式:修改 ROOT密码和grub加密

admin Posted in linux
0

Linux 系统处于正常状态时,服务器主机开机(或重新启动)后,能够由系统引导器程序自动引导 Linux 系统启动到多用户模式,并提供正常的网络服务。如果系统管理员需要进行系统维护或系统出现启动异常时,就需要进入单用户模式或修复模式对系统进行管理了。使用单用户模式有一个前提,就是您的系统引导器(grub)能正常工作,否则要进行系统维护就要使用修复模式。特注:进入单用户模式,没有开启网络服务,不支持远程连接 More »

在Linux下关闭系统的蜂鸣器

admin Posted in linux
0
之前在XP的设备管理器下打开隐藏设备可以关闭主板小喇叭发出的蜂鸣器,这次在博友的blog上看到在Linux下关闭系统的主板蜂鸣器,特转之.也许你还没有意识到,这个声音不是来自系统外置的音频输出设备,而是来自机器内部的据我所知是由BIOS控制的发声装置,所以下面我将说明如何将这个小东西关掉。
More »

64位XEN安装32位linux

admin Posted in linux
0
64位XEN安装32位linux
 

yum的时候一定会出错,后来发现解决办法
echo “i686-redhat-linux” > /etc/rpm/platform
这样就能yum32位的软件了 

snmpd 监听tcp端口

admin Posted in linux
0
通过下面的方法使得snmpd侦听在TCP的1161端口。
 

①创建/etc/snmp/snmpd.options,内容如下:

 

OPTIONS=”-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a TCP:1161″

 

②设置selinux允许snmpd侦听1161端口:
sudo /usr/sbin/semanage port -a -t snmp_port_t -p tcp 1161

 

③sudo /sbin/service snmpd restart即可

修改linux系统时间

admin Posted in linux
0
1.重启生效
时区的配置文件是/etc/sysconfig/clock。用tzselect命令就可以修改这个配置文件,根据命令的提示进行修改就好了。
 

2.马上生效
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock

linux 页相关

admin Posted in linux
0
在Linux世界里,分为Page cache,Buffer cache两个层面。其中page cache包含了buffer cache,内存只和page cache交互

标准的LINUX总 是假定处理器有三级页表,分别为页目录表(PGD),中间页目录表(PMD)和页表(PTE)。如果程序在进行物理地址转换的时候,是通过页目录表来索引中间页目录表,再通过中间页目录表来索引页表,从而查找到某页与内存BLOCK块的对应关系。我把书上的图,拍下来了,哈:

More »