存档在 ‘linux 系统’ 分类

Lightweight X11 Desktop Environment – 輕量級 X11 桌面環境

2010年1月28日

LXDE 是套使用 GPL 授權的開放原始碼桌面環境,可以使用在 Unix 或是 POSIX 相容的環境中(如 Linux)。其全名是「Lightweight X11 Desktop Environment – 輕量級 X11 桌面環境」。

LXDE 是以在低規格上的電腦運作良好的概念設計,特別適合在最近流行的小筆電(Netbook)以及其他小型電腦上使用,它是個節能快速的桌面環境。LXDE 可以使用在不同的 Linux 發行版本中(例如 Ubuntu 或是 Debian),並且可以為其發行版中多如繁星的應用程式提供桌面環境。LXDE 支援各種處理器架構,包含 Intel 與 MIPS,並且 LXDE 團隊已經計畫將桌面環境移植到如 ARM(常見於嵌入式系統,如手機)等其他硬體架構。

LXDE 計畫在 2006 年開始,當時台灣知名開發者洪任諭(PCMan)推出了第一套元件:PCMan 檔案管理員。現在 LXDE 團隊已經成為國際社群,團隊中有來自世界各地的開發者、設計者與貢獻者。

» 阅读更多: Lightweight X11 Desktop Environment – 輕量級 X11 桌面環境

Linux的快速轻型桌面

2010年1月28日

所谓“快速轻型”是指占用CPURAM资源很少的意思。近几年,这方面有什么进展?

2006年,台湾人Hong Yen Jee(又叫PCMan)提出一项开发快速轻型桌面的计划,叫LXDELightweight X11 Desktop Environment)。近年来,LXDE进展很快,出乎人们的意料。现在,LXDE轻型桌面羽翼逐渐丰满,被数十种Linux发行版(比如:UbuntuFedoraAndroid等)所采用,其中的新学问不少。运行中的LXDE只需占用45MB内存,因而,使得整个系统跑得飞快。在Pentium II(266MHzRAM 192MB)Pentium III(600MHzRAM 512MB)等老式计算机上也能跑得相当快。在AMD Athlon 1.6Intel Atom处理器,512内存、快速硬盘的电脑系统上,LXSE系统跑得更加飞快(原文是very fast)。 » 阅读更多: Linux的快速轻型桌面

find来删除指定大小的文件

2010年1月28日

如何用find命令查找目录中文件大小大于1MB日文件
find / -size +2 -print

删除当前文件夹下字节数为 37154字节的html文件

find . -size 37154c -name “*.html”  -exec  rm -f } \;

有问题请给在月影鹏鹏网页上留言 http://jk.scanmon.com/wp/2010/01/find-batch-delete-file.html

参数介绍

-size N[bcwkMG]    -size<文件大小>  查找符合指定的文件大小的文件。

-exec COMMAND {} + -ok COMMAND ;  假设find指令的回传值为True,就执行该指令。

一台运行服务器下架(系统显示运行了317天)

2010年1月22日

一台运行317天的今天服务器下线维护,在次之前该服务器一直负担这服务器集群调度的工作,系统未出现过任何故障,linux系统一直没有被重启过,本来认为这台服务器可以一直运行下去,但是根据公司要换机房的决定,这台服务器只好在机房下架 。 服务器型号 dell 1850  ,运行系统 debian 5 ,运行业务软件 lvs。

A computer running 317 days of today the server downtime for maintenance, in the second until the server has to pay for the server cluster scheduling work, would have thought that this server can be running forever, but the incumbent, according to the company’s decision room, this server had no choice but room off the shelf. Server model dell 1850, operating system debian 5, run business software lvs。

让Linux操作系统防止syn攻击,屏蔽 SYN_RECV 的连接

2010年1月22日

抵御SYN SYN攻击是利用TCP/IP协议3次握手的原理,发送大量的建立连接的网络包,但不实际建立连接,最终导致被攻击服务器的网络队列被占满,无法被正常用户访问。

» 阅读更多: 让Linux操作系统防止syn攻击,屏蔽 SYN_RECV 的连接

vsftp日志设置

2010年1月15日
问题描述
昨天刚向实验室的同学公开一个movie帐户,其实是想大家都能telnet,或ssh上,有空玩玩。没想到有人就用这个帐号在ftp上删除了文件。
首 先vsftp默认只有上下传记录,根本没有本地用户的删除或建目录的操做。这个在lastlog里也不会有痕迹。所以对公开账号千万不能同时是本地账号。 如果是本地账号,那也要控制该账号确定文件的删除修改权限。不要让该用户对其他文件有破坏性权限。这种控制会积累很多管理漏洞,所以最好就是给虚拟用户, 或者ftp只能使用匿名账号(当然,这个管理员可以灵活控制自己的使用权限)。
因此在开放用户账号时要考虑日志的决定存在,不能出现这种漏空监控。
出现这种问题的关键就是日志与服务没有绝对一致。比如ftp本来只是用来上传或下载,这里却还给了管理文件的权限,而vsftp对管理文件的却没有监控,太失败了。 » 阅读更多: vsftp日志设置

解决vsftpd日志时间问题

2010年1月15日

最近发现vsftpd的日志记录/var/log/vsftpd.log里显示的文件修改时间与实际的系统时间不一致,一般都差了8个小时。搜索了一下,发现因为默认情况下, vsftpd使用的是GMT标准时间,而不是Local Time。修改也很简单:

# 修改vsftpd 的配置文件 vsftpd.conf
# 不一定是这个路径
vi /etc/vsftpd/vsftpd.conf

在配置文件里加入一行:
use_localtime=YES

保存之后重启 vsftpd 即可。

如果是用 xinetd 的方式来启动,要注意把配置文件中的listen参数值改为NO,否则 vsftpd 重启之后问题依旧。

vsftpd日志格式如下:
Mon Aug 25 08:58:59 2008 1 219.142.129.122 8797 /message.htm b _ o r ftp ftp 0 * c
Mon Aug 25 08:58:59 2008 1 219.142.129.122 3925 /top.htm b _ o r ftp ftp 0 * c
Mon Aug 25 08:58:59 2008 1 219.142.129.122 4257 /welcome.htm b _ o r ftp ftp 0 * c
Mon Aug 25 08:59:14 2008 1 219.142.129.122 9159 /pet.inc.php a _ i r ftp ftp 0 * c
Mon Aug 25 09:01:45 2008 1 219.142.129.122 623 /footer.htm b _ i r ftp ftp 0 * c

redhat 5.2 调整snmp debug级别

2010年1月9日
在用redhat linux 5.2版本后,有一个问题就是有很多snmpd log信息记录在/var/log/messages里,在4u4里是不记录的,导致messages产生大量的重复信息,好多有用的信息很快就会被淹 没,这里通过调整snmp debug级别解决这个问题 » 阅读更多: redhat 5.2 调整snmp debug级别

schroot – chroot for any users

2010年1月7日

From manpages: schroot allows the user to run a command or a login shell in a chroot environment. If no command is specified, a login shell will be started in the user current working directory inside the chroot.

I’ve been trying some virtual machines solutions to execute some programs 32bits in my machine. But it’s take very time, start a xen VM or virtualbox. Often this solutions needs some maintain additional costs to setup a X server to run any X-based program.

» 阅读更多: schroot – chroot for any users

OpenSSH logging with ChrootDirectory

2010年1月7日

Finally following up on the previous article on the subject, I found some time to investigate logging what happens in an internal-sftp session using rsyslog.

Making syslog available in the chroot

Simply create a dev directory in each one of the chosen user chroot directories.

# mkdir /home/user/dev

Configuring rsyslog to probe the new logging source

Simply drop the following contents in /etc/rsyslog.d/sshd.conf :

# Create an additional socket for some of the sshd chrooted users.
$AddUnixListenSocket /var/fileserv/dev/log

# Log internal-sftp in a separate file
:programname, isequal, "internal-sftp" -/var/log/sftp.log
:programname, isequal, "internal-sftp" ~

 » 阅读更多: OpenSSH logging with ChrootDirectory