随笔分类 - Linux
About Linux
摘要:http://www.cnblogs.com/vieri122/archive/2009/09/10/1564104.html Windows 临界区,内核事件,互斥量,信号量。 临界区,内核事件,互斥量,信号量,都能完成线程的同步,在这里把他们各自的函数调用,结构定义,以及适用情况做一个总结。 一. 临界区 CRITICAL_SECTION:适用范围:它只能同步一个进程中的线程,不能跨进程同步。一般用它来做单个进程内的代码快同步,效率比较高。相关结构:CRITICAL_SECTION _critical相关方法:// 初始化,最先调用的函数。一般windows编程都有类似初始化的方法I...
阅读全文
摘要:# apt-cache search linux-image|awk '{print $1}' linux-headers-2.6.24-etchnhalf.1-486 linux-headers-2.6.24-etchnhalf.1-686 linux-headers-2.6.24-etchnhalf.1-686-bigmem linux-headers-2.6.24-etchnhalf.1-a...
阅读全文
摘要:安装jdk448 wget http://down1.chinaunix.net/distfiles/jdk-1_5_0_06-linux-i586.bin451 chmod 755 jdk-1_5_0_06-linux-i586.bin 452 ./jdk-1_5_0_06-linux-i586.bin在/etc/profile最后加上:export J2REDIR=/usr/local/jdk...
阅读全文
摘要:Debian 4.0 编译内核 2.6.27.6 1、如果安装Debian 4.0基本系统(不带GUI),执行如下命令(在超级用户下): apt-get install build-essential libncurses5-dev initrd-tools build-essential是编译内核要用到的工具。 ncurse-dev是执行build menuconfig要用到的。 initr...
阅读全文
摘要:ps / ps -A f #查看进程列表
kill ID #杀死指定进程ID
阅读全文
摘要:查看软件xxx安装内容dpkg -L xxx查找软件apt-cache search 正则表达式查找文件属于哪个包dpkg -S filenameapt-file search filename查询软件xxx依赖哪些包apt-cache depends xxx查询软件xxx被哪些包依赖apt-cache rdepends xxx增加一个光盘源apt-cdrom add系统升级apt-get upd...
阅读全文
摘要:LocalDomain:/etc/init.d# update-rc.d bittorrent start 20 1 . stop 20 0 2 3 4 5 6 .System startup links for /etc/init.d/bittorrent already exist.LocalDomain:/etc/init.d# cd /etc/rc3.d怎么停止启动 bittorrent ...
阅读全文
摘要:IptablesdefaultlogfileForexample,ifyoutypethefollowingcommand,itwilldisplaycurrentiptableslogfrom/var/log/messagesfile: #tail-f/var/log/messages Output: Oct401:14:19debiankernel:IN=ra0OUT=MAC=00:17:9a...
阅读全文
摘要:LocalDomain:~# /usr/bin/mysql stopERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)---root 授权问题---SHOW GRANTS for 'debian-sys-maint'@'localhost';show grants for 'root'...
阅读全文
摘要:在Debian下安装MySQL,步骤如下: Debian: /# apt-get install mysql-server 装好之后要缺省root是没有密码的,可以更改. Debian: /# mysqladmin -u root password $(yourpass) 在/etc/mysql/my.conf里面可以修改一些属性。 原来有这么一行:bind-address = 1...
阅读全文
摘要:最近在我管理的 Linux 主機上安裝了 Monitorix 工具,這是一套可以監控系統狀態的工具,可監控的項目非常的多,你也可以自行設定要監控的服務,預設就可以分析 CPU 與記憶體使用率、磁碟存取使用率(Disk I/O Usage)、網路使用率(Network traffic and usage)、各服務使用需求(network services demand)、使用者登入的狀況、....等...
阅读全文
摘要:作者:Hily 原始链接:http://hily.me/blog/2009/02/linux-kernel-iptables-port-mapping/版权声明:可以转载,转载时务必以超链接形式标明文章原始出处和作者信息及版权声明 主机 IP:192.168.1.100目标机 IP:192.168.2.101 要求将到主机 192.168.1.100:11101 的请求映射到内部网目标机的 ssh...
阅读全文
摘要:mkinitrd -o initrd.img-2.6.24.7 /lib/modules/2.6.24.7wget http://www.cnblogs.com/1327/admin/ftp://ftp.netfilter.org/pub/iptables/iptables-1.4.1.1.tar.bz2./configure --with-ksource=/usr/src/linux &...
阅读全文
摘要:1.概述1.1 什么是NAT在传统的标准的TCP/IP通信过程中,所有的路由器仅仅是充当一个中间人的角色,也就是通常所说的存储转发,路由器并不会对转发的数据包进行修改, 更为确切的说,除了将源MAC地址换成自己的MAC地址以外,路由器不会对转发的数据包做任何修改。NAT(Network Address Translation网络地址翻译)恰恰是出于某种特殊需要而对数据包的源ip地址、目的ip地址、...
阅读全文
摘要:http://hi.chinaunix.net/?uid-21782158-action-viewspace-itemid-38145平台:CentOS release 5.3 (Final)内核:2.6.18-128.el5iptables:1.3.51、准备阶段①、kernel-2.6.28:ftp://ftp.kernel.org/pub/linux/kernel/v2.6/li...
阅读全文
摘要:1、修改 /etc/grub.conf 或 /etc/lilo.conf ,删除那些不想来的内核选项。2、删除 /lib/modules/相对应的内核版本的目录3、删除 /boot/相对应的内核版本的文件 /boot/vmlinuz-版本号/boot/initrd-版本号/boot/*-版本号/usr/src/linux-版本号/lib/modules/linux-版本号
阅读全文
摘要:PackageReasonlinux-2.6.24Updated for new kernel for etchnhalflinux-kbuild-2.6.24Updated for new kernel for etchnhalflinux-latest-2.6-etchnhalfNew kernel for etchnhalfxserver-xorg-video-nvSupporting mo...
阅读全文
浙公网安备 33010602011771号