随笔分类 - linux
在使用linux过程中,遇到的问题并解决
摘要:第一步:yum -y install mysql-server第二步:修改配置文件[root@sample ~]#vim /etc/my.cnf ← 编辑MySQL的配置文件[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock# Default to using old password format for compatibility with mysql 3.x# clients (those using the mysqlclient10 compatibility package).old_passwords=1.
阅读全文
摘要:http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xzhttp://ftp.gnu.org/gnu/automake/automake-1.12.3.tar.xzhttp://ftp.gnu.org/gnu/bash/bash-4.2.tar.gzhttp://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.bz2http://ftp.gnu.org/gnu/bison/bison-2.6.2.tar.xzhttp://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gzhttp://
阅读全文
摘要:The important point to understand is that the page structure is associated with physical pages,not virtual pages. If a page is not free, the kernel needs to know who owns the page. Possible owners include user-spaceprocesses, dynamically allocated kernel data, static kernel code, the page cache, a..
阅读全文
摘要:SoftirqsTasklets Tasklets have a simpler interface and relaxed locking rules than softirqs. Tasklets are represented by two softirqs:HI_SOFTIRQ and TASKLET_SOFTIRQ.
阅读全文
摘要:the keyboard controller(the hardware device) =======================> processor=============>operating system an electrical signal signalDifferent devices can be associated with different interrupts by means of a unique value associated with each...
阅读全文
摘要:-rw-r--r-- Access rights to the file.The first character indicated the type of file. a leading dash means a regular file, while a 'd' indicates a directory. the next three characters are the access rights for the file's owner, the next three are for members ...
阅读全文
摘要:Unix-like systems such as linux always have a single file system tree, regardless ofhow many drives or storage devices are attached to the computer.Storage devicesare attached( mounted ) at various points on the tree according to the system administrator.absolute pathnamesan absolute pathname begins
阅读全文
摘要:shell is a program that takes keyword commdands and passes them tothe operating system to carry out.when you use GUI,KDE uses konsole and GNOME usesgnome-terminal. $ is called a shell prompt and it will appear whenever the shell is ready to accept input.# means you logged in as the root us...
阅读全文
摘要:typedef struct { int counter;} atomic_t;#ifdef CONFIG_64BITtypedef struct { long counter;} atomic64_t;#endiflinux 内核使用特殊的数据类型atomic_t来代替直接使用C语言的整型,是出自以下几个原因:(1)关于atomic_t的函数只接受atomic_t类型(2)使用atomic_t类型可以避免编译器的优化,原子操作对于使用正确的内存地址很重视。(3)可以避免CPU的体系结构的问题这里就有个问题,为什么使用结构体就可以避免原因(2),编译器没有优化之,g...
阅读全文
摘要:#! /bin/bashLX=100for i in 1 2 3do c=$(echo "scale=2;$i/$LX"|bc) echo -n "0$c ";doneecho;
阅读全文
摘要:#! /bin/bsh#查找文件中是否有eee如果没有在最后加入 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesexport PATH#echo "`grep -n -e eee lxtest`"#输入要匹配的字符串 查询的文件if [ $# -ne 2 ] then echo "the string and file" exit 1fin1=$1n2=$2n3=`grep -n -e $n1 $n2`n4="eee"echo $
阅读全文
摘要:pthread_key_tThread local storage key (opaque)DeclarationSource position: ptypes.inc line 233typepthread_key_t=cuint;cuintC type: unsigned integer (natural size)DeclarationSource position: ctypes.inc line 40typecuint=cuint32;---------------------------------------------------------------------------
阅读全文
摘要:#define _NSIG 64#define _NSIG_BPW 64#define _NSIG_WORDS (_NSIG / _NSIG_BPW)typedef unsigned long old_sigset_t; /* at least 32 bits */typedef struct { unsigned long sig[_NSIG_WORDS];} sigset_t;
阅读全文
摘要:使用pppoeconf命令拨号启用有线连接:sudo ifconfig eth0 up在终端中输入:sudo pppoeconf一个基于文本菜单的程序会指导你进行下面的步骤:1. 确认以太网卡已被检测到。2. 输入你的用户名(由ISP所提供 注意:输入时请先清除输入框中的“username“,否则可能造成验证错误)。3. 输入你的密码(由ISP所提供)。4. 如果你已经配置了一个PPPoE的连接,会通知你这个连接将会被修改。5. 弹出一个选项:你被询问是否需要'noauth'和'defaultroute'选项和去掉'nodetach',这里选择&
阅读全文