gentoo初体验

作者 : admin 于 2009年01月17日, 14:37:12
2009
01-17

使用的是 install-x86-minimal-2008.0.iso 这张盘,在vmware6中进行安装。

初次安装异常辛苦,想起了刚买电脑装98那架势。自己格盘,配置文件系统,然后安装,然后%……※×……×(※(

反正很有乐趣。

底下是初次使用常用命令,打包收集一下
passwd #修改root密码
net-setup eth0 #修改网卡信息
/etc/init.d/sshd start #启动sshd服务 底下就可以用ssh登录了

磁盘分区,我习惯用lvm,虽说安全和管理上是偷懒的行为,不过方便么。
fdisk不好用,我用cfdisk,很OK。

创建文件系统的命令

文件系统 创建命令
ext2 mke2fs
ext3 mke2fs -j
reiserfs mkreiserfs
xfs mkfs.xfs
jfs mkfs.jfs

创建swap分区 mkswap /dev/hda2

激活swap分区 swapon /dev/hda2

然后挂载文件,具体看手册 http://gentoo.linuxsir.org/doc/cn/handbook/hb_part1_chap5.html

以后按照手册,我基本建立起了这个系统,而且portage成功。

VIM安装使用

作者 : admin 于 2008年08月03日, 15:37:45
2008
08-3

http://www.vim.org/
VIM,不错的编辑器,安装试试
http://www.vim.org/download.php
下载解压, tar -jxvf **.tar.bz2

./configure  安装

如果报错,需要补充一个库  yum install ncurses

vim手册  http://vcd.gro.clinux.org/

安装后,可以直接使用命令 vim

vim大体上跟vi编辑器一样,但增加了好多命令。

我比较喜欢的是高亮功能。

打造全能优化的Linux+Apache+PHP+Mysql服务器(2)

作者 : admin 于 2008年07月15日, 11:33:13
2008
07-15

MYsql的安装

mysql 编译参数
./configure –enable-thread-safe-client –enable-local-infile –enable-largefile –with-charset=utf8  –with-uca –with-gnu-ld –with-pic –with-mysqld-libs –with-comment –with-query-cache –with-bench –with-big-tables –with-innodb –with-mysqld-use=mysql

/usr/local/bin/mysql_install_db

/usr/local/bin/mysqld_safe  –user mysql

如果安装时候有错误提示,也许是缺少这个组件  http://www.sunboyu.cn/sourse/termcap-1.3.1.tar.gz

Linux安装FMS2

作者 : admin 于 2008年06月23日, 15:01:04
2008
06-23

首先下载 FlashMediaServer2.tar.gz  http://aw.awflasher.com/FMS2/FlashMediaServer2.tar.gz

解压后,检测组件是否完全

#ldd fmscore

[root@localhost FMS_2_0_3_r68_linux]# ldd fmscore
linux-gate.so.1 =>  (0×0032b000)
libssl.so.4 => not found
libpthread.so.0 => /lib/libpthread.so.0 (0×007f7000)
libnspr4.so => /usr/lib/libnspr4.so (0×00b24000)
libplc4.so => /usr/lib/libplc4.so (0×0020c000)
libplds4.so => /usr/lib/libplds4.so (0×00198000)
librt.so.1 => /lib/librt.so.1 (0×002f4000)
libdl.so.2 => /lib/libdl.so.2 (0×001d2000)
libstdc++.so.5 => not found
libm.so.6 => /lib/libm.so.6 (0×009c0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0×001f1000)
libc.so.6 => /lib/libc.so.6 (0×003c6000)
/lib/ld-linux.so.2 (0×0090e000)
libcrypto.so.4 => not found
[root@localhost FMS_2_0_3_r68_linux]#

缺少 libssl.so.4  libstdc++.so.5 libcrypto.so.4

其实这些库是有的,只是名字不是,或者版本比较高,建立一个链接就行

ln -s /usr/lib/libssl.so /usr/lib/libssl.so.4

其他也这样就行。

./installFMS
如果总是提示出错(./installFMS -platformWarnOnly)

这样即可。低下按照提示一步步来就行。

./fmsmgr list   可以查看运行的状态

memcache安装与配置详解

作者 : admin 于 2008年05月19日, 10:44:18
2008
05-19
libevent-1.2.tar.gz
memcache-3.0.1.tgz
memcached-1.2.0.tar.gz

安装 libevent-1.2.tar.gz
./configure
make && make install

chmod 644 /usr/local/lib/libevent.a
PATH=”$PATH:/sbin” ldconfig -n /usr/local/lib
———————————————————————-
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
- use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf’
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-
test -z “/usr/local/include” || mkdir -p — . “/usr/local/include”
/usr/bin/install -c -m 644 ‘event.h’ ‘/usr/local/include/event.h’
/usr/bin/install -c -m 644 ‘evhttp.h’ ‘/usr/local/include/evhttp.h’
/usr/bin/install -c -m 644 ‘evdns.h’ ‘/usr/local/include/evdns.h’
test -z “/usr/local/man/man3″ || mkdir -p — . “/usr/local/man/man3″
/usr/bin/install -c -m 644 ‘./event.3′ ‘/usr/local/man/man3/event.3′
/usr/bin/install -c -m 644 ‘./evdns.3′ ‘/usr/local/man/man3/evdns.3′

安装 memcached-1.2.0.tar.gz
./configure
make && make install

Making install in doc
make[1]: Entering directory `/root/memcached-1.2.0/doc’
make[2]: Entering directory `/root/memcached-1.2.0/doc’
make[2]: Nothing to be done for `install-exec-am’.
/bin/sh ../mkinstalldirs /usr/local/man/man1
/usr/bin/install -c -m 644 ./memcached.1 /usr/local/man/man1/memcached.1
make[2]: Leaving directory `/root/memcached-1.2.0/doc’
make[1]: Leaving directory `/root/memcached-1.2.0/doc’
make[1]: Entering directory `/root/memcached-1.2.0′
make[2]: Entering directory `/root/memcached-1.2.0′
/bin/sh ./mkinstalldirs /usr/local/bin
/usr/bin/install -c memcached /usr/local/bin/memcached
/usr/bin/install -c memcached-debug /usr/local/bin/memcached-debug

启动 -d守护进程 -m内存分配 -u 用户 -l监听地址 -p 端口 -P pid文件
memcached -d -m 100 -u root -l 127.0.0.1 -p 8000 -P /tmp/mem.pid

安装 memcache-3.0.1.tgz
phpize
./configure
make && make install

gcc -shared .libs/memcache.o .libs/memcache_pool.o .libs/memcache_queue.o .libs/memcache_ascii_protocol.o .libs/memcache_binary_protocol.o .libs/memcache_standard_hash.o .libs/memcache_consistent_hash.o .libs/memcache_session.o -Wl,-soname -Wl,memcache.so -o .libs/memcache.so
creating memcache.la
(cd .libs && rm -f memcache.la && ln -s ../memcache.la memcache.la)
/bin/sh /root/memcache-3.0.1/libtool –mode=install cp ./memcache.la /root/memcache-3.0.1/modules
cp ./.libs/memcache.so /root/memcache-3.0.1/modules/memcache.so
cp ./.libs/memcache.lai /root/memcache-3.0.1/modules/memcache.la
PATH=”$PATH:/sbin” ldconfig -n /root/memcache-3.0.1/modules
———————————————————————-
Libraries have been installed in:
/root/memcache-3.0.1/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
- use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf’
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-
Build complete.
Don’t forget to run ‘make test’.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/

php.ini extent 加载 memcache.so
重启使其生效即可