工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.wdlinux.cn 注册 | 登陆
浏览模式: 标准 | 列表全部文章

centos5 x86_64

yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package gcc.x86_64 0:4.1.2-42.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libgomp = 4.1.2-42.el5 for package: gcc
--> Processing Dependency: cpp = 4.1.2-42.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc
--> Processing Dependency: libgcc >= 4.1.2-42.el5 for package: gcc
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package cpp.x86_64 0:4.1.2-42.el5 set to be updated
---> Package libgomp.x86_64 0:4.1.2-42.el5 set to be updated
---> Package glibc-devel.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package libgcc.x86_64 0:4.1.2-42.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-headers for package: glibc-devel
--> Processing Dependency: glibc = 2.5-24.el5_2.2 for package: glibc-devel
--> Processing Dependency: glibc-headers = 2.5-24.el5_2.2 for package: glibc-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package glibc-headers.x86_64 0:2.5-24.el5_2.2 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-common = 2.5-24.el5_2.2 for package: glibc
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc-common.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package kernel-headers.x86_64 0:2.6.18-92.1.22.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-common = 2.5-18 for package: glibc
Error: No Package Matching glibc.i686


出现Error: No Package Matching glibc.i686的问题解决办法
yum install glibc glibc.i386 --enablerepo=c532*

再yum install gcc
就OK了


c++,g++
yum install gcc-c++


web env
mysql
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/www/servers/mysql --enable-assembler --with-mysqld-ldflags=-all-static --enable-thread-safe-client --with-extra-charsets=gb2312,gbk,utf8,latin1 --with-named-curses-libs=/usr/lib/libncursesw.so.5

err
/usr/lib/libncursesw.so.5: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/home/r00t/mysql-5.0.77/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r00t/mysql-5.0.77'
make: *** [all] Error 2

change
--with-named-curses-libs=/usr/lib64/libncursesw.so.5


php
./configure --prefix=/www/servers/php --with-apxs2=/www/servers/httpd20/bin/apxs --with-mysql=/www/servers/mysql --with-iconv --enable-mbstring --enable-ftp --with-libxml2-dir=/usr

err
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.

yum install libxml2-devel

err
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed.  Please check the config.log for details.


ftp://xmlsoft.org/libxml2/
ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
tar zxvf
./configure --prefix=/usr/local/libxml2
make

collect2: ld returned 1 exit status
make[2]: *** [xmllint] Error 1
make[2]: Leaving directory `/home/r00t/php-5.2.9/libxml2-2.7.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r00t/php-5.2.9/libxml2-2.7.3'
make: *** [all] Error 2


在configure 加上 --without-zlib 可以编译通过

++
--with-libxml2-dir=/usr/local/libxml2

 

 

----------------------------------------------------------------

usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC/usr/local/lib/libz.a: could not read symbols: Bad value解决方法如下:

cd zlib-1.2.3 //进入zlib目录
CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译
make
make installmake clean


错误提示:
/usr/bin/ld: /usr/local/lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

进入Jpeg目录
CFLAGS="-O3 -fPIC" ./configure
make
make install-lib


在Linux-x86_64环境下编译php5
LDFLAGS="-L/usr/lib64 -L/lib64" ./configure --prefix=/

rhel 5.3

 ./configure --prefix=/www/servers/mysql --enable-assembler --enable-thread-safe-client --with-extra-charsets=gb2312,gbk,utf8,latin1

err
checking for termcap functions library... configure: error: No curses/termcap library found

++
--with-named-curses-libs=/usr/lib/libncursesw.so.5

libxml2

nload

http://www.roland-riegel.de/nload/index.html

 

安装 tar zxvf ...,configure

checking for netinet/in.h... yes
configure: error: ncurses library or development files not found. ncurses is required for nload.

安装 ncurses-devel

继续 make;make install,完成

install nload
checking for xlC... no
checking for C++ compiler default output file name...
configure: error: C++ compiler cannot create executables
See `config.log' for more details.

yum install gcc-c++ libstdc++ libstdc++-devel

dns zone 文件说明

第一行是TTL设定,生存时间记录字段。它以秒为单位定义该资源记录中的信息存放在高速缓存中的时间长度。这里定义为604800秒,也就是1周。

  第二行是$ORIGIN设定,说明下面的记录出自何处.请您加倍留意最后的一个小小数点"."

  然后,第三行,是一个 SOA 记录的设定,在这里我们看到一个特殊字符 @ ,它就是 ORIGIN 的意思,也就是刚刚所定义的$ ORIGIN 51099.com. 的内容,您可以写成 51099.com. 也可以用 @ 来代替。

  假如这个文件前面没有定义 $ ORIGIN 的话, 那這个 @ 的值就以 named.conf 里的 zone。

  接着 SOA 后面,指定了这个区域的授权主机和管理者的信箱,这里分别是"51099.com." 和"root.51099.com."。我们平时使用的信箱通常是“user@host”这样的格式,但因为@在 DNS 记录中是个保留字符,所以在 SOA 中就用“.”来代替了@。目前这个信箱是 "root@51099.com."。

  接下来的 SOA 设置,是被括在“( )”之间的 5 组数字,主要作为和 slave 服务器同步 DNS 资料所使用的资料:

  Serial:其格式通常会是“年月日+修改次序”(但也不一定如此,您自己能够记得就行)。当 slave 要进行资料同步的时候,会比较这个号码。如果发现在这里的号码比它那边的数值“大”,就进行更新,否则忽略。不过设 serial 有一个地方您要留意:不能超过 10 位数字!

  Refresh:这里是是告诉 slave 要隔多久要进行资料同步(是否同步要看 Serial 的比较结果)。

  Retry:如果 slave 在进行更新失败后,要隔多久再进行重试。

  Expire:这是记录逾期时间:当 slave 一直未能成功与 master 取得联系,那到这里就放弃 retry,同时这里的资料也将标识为过期(expired )。

  Minimum:这是最小默认 TTL 值,如果您在前面没有用“$TTL”来定义,就会以此值为准。

  请注意:SOA 记录中这对 “( ) ”符号之第一个 “(”括号一定要和 SOA 写在同一行,而不能用 Enter 断行到下一行去,而且其左边最好有一个空格键或 tab 建。而最后一个 “)”括号也不能写在注解符号 “;”的右边。 置 DNS 的 RR 记录档,其格式要求非常严格,我们丝毫不能掉以轻心。比方说:如果句子不是以空格键、Tab 键、 或注解符号 ( ;)开头,也不在 SOA 的 “( ) ”之内, 则表示要定义一个“新记录项 (Entry) ”;如果句子是以空格键或 tab 键开始的话,其设置被视为上一个“记录项”的内容。所以,如果您要为“同一个记录项”定义多个记录设置,而不想重复打字,您倒可以偷懒:在接着它的后面几行用空白或 Tab 来缩排就可以了。

Iotop: I/O 监视器

Iotop 是一个用来监视磁盘 I/O 使用状况的 top 类工具。如下图所示,Iotop 具有与 top 相似的 UI,其中包括 PID、用户、I/O、进程等相关信息。

Iotop 使用 Python 语言编写而成,要求 Python 2.5(及以上版本)和 Linux kernel 2.6.20(及以上版本)。

Iotop 提供有源代码及 RPM 包,可从其官方主页下载。

http://guichaz.free.fr/iotop/

常用JavaScript大全

Linux下如何查看某一进程的CPU占用率

Linux下如何查看某一进程的CPU占用率

http://linux.ccidnet.com/art/9513/20070423/1068127_1.html