Home mail me! Syndicate this site using RSS

Archive for Ubuntu


High Availability with DRBD and Heartbeat Presentation

这是Chris Barber 发布在Twin Cities MySQL and PHP User Group上的演讲,演讲内容很不错,关于采用DRBD和Heartbeat结束架构的高可用性集群,非常适合数据库应用,感兴趣的朋友可以看看。

原文地址:http://www.cb1inc.com/2008/06/10/high-availability-with-drbd-and-heartbeat-presentation

Ubuntu 7.10 (Gutsy Gibbon) Final released

The latest releases of Ubuntu 7.10 for desktop and server are available today for download.

Download it now

DVD image: http://cdimage.ubuntu.com/releases/gutsy/release/

期待已久的Ubuntu 7.10终于发布了,准备改天抽个时间把自己本本的系统换成Ubuntu 7.10!

MySQL集群(NDB)安装脚本

Jim Dowling为我们写了一个安装和管理MySQL集群(MySQL Cluster)的BASH脚本,支持安装本地集群和分布式集群,提问式的安装方式,非常方便,相信每个人都很容易上手。

http://www.jimdowling.info/ndbinstaller-trac/wiki/DetailedLocalhostInstall这里以图文的方式介绍了这个脚本的整个安装过程。

更多资料请访问:http://www.jimdowling.info/ndbinstaller-trac/

安装脚本下载(右键另存为)

wget http://www.jimdowling.info/ndbinstaller/ndbinstaller.sh
# or
svn co http://www.jimdowling.info/ndbinstaller/

推荐Wine软件安装管理包–Wine-Doors

Wine-Doors是一款基于Gnome桌面的Windows软件安装管理包,使用非常方便,只需在软件列表中选择要安装的软件,Wine-Doors就会帮你搞定一切,不再需要自己动手来配置。

最新版本为:Wine-Doors 0.1 (Vinegar Finger)
Read more…

Google提供的Linux软件仓库

搜索巨头Google为大家提供了几个Linux发布版的仓库。不管如何,偶支持他。

目前提供以下几个:
* Ubuntu 7.04 (Feisty)
* Debian GNU/Linux 4.0
* openSUSE 10.2

官方网址:http://www.google.com/linuxrepositories/index.html

Find命令技巧

find命令功能其实很强,针对某些特定条件的日志文件特别有效,下面列举几个技巧:

1.查找90天以前的文件,并用LS列出全名

# find /data/webdata -mtime +90 -type f -exec ls -l -h {} \;

2.查找修改时间超过90天的文件

# find /data/webdata -mtime +90

3.查找修改时间超过90天,并且不包含click_15和click_16目录的文件

# find /data/webdata -mtime +90 \( -path /data/webdata/click_15 -o -path /data/webdata/click_16 \) -prune -o -print

4.查找修改时间超过90天,并需确认删除

# find /data/webdata -mtime +90 -ok rm -R {} \;

Upgrade SQLite2 to SQLite3

很简单的一条命令:

sqlite2 mydb.db .dump | sqlite3 mydb-new.db

如果需要很多数据库,写个简单的脚本即可。

#!/bin/bash
#
# description: Upgrade SQLite2 to SQLite3
#
 
DBPATH="/data/db"
 
for oldfile in $(find ${DBPATH} -name "*.db"); do
        newfile="${oldfile}.bak"
        sqlite2 $oldfile .dump | sqlite3 $newfile
        mv -f $newfile $oldfile
        echo $newfile
        echo $oldfile

自行编译安装PHP

实际上这种文章已经很多了,网上也到处都是,之所以写这篇文章,目的是为了解决其中一个问题。

# cd /usr/local/src
# wget http://cn.php.net/distributions/php-5.2.3.tar.gz
# tar -zxvf php-5.2.3.tar.gz
# cd php-5.2.3
# ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-exec-dir=/usr/bin --with-freetype-dir --with-png-dir=/usr/local --with-gd=shared --enable-gd-native-ttf --with-iconv --with-jpeg-dir=/usr/local --with-openssl --with-png --with-pcre-regex --with-zlib --with-layout=GNU --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-memory-limit --enable-shmop --with-mime-magic=/usr/share/file/magic.mime --with-apxs2=/usr/sbin/apxs --with-sqlite --with-pdo-sqlite --without-pear --disable-xmlwriter --disable-xmlreader --disable-xml --disable-simplexml --disable-libxml --disable-dom --disable-ipv6 --disable-json --disable-hash --with-mysql --with-pdo-mysql

很多人在执行到这一步的时候,会出现以下问题:
Read more…

NTFS-3G – Read & Write NTFS in Ubuntu Dapper

2007年7月25日更新:最新的Ubuntu 7.04已经包含了ntfs-3g,并且加了个ntfs-config自动配置安装包,非常方便!

虽然在2001年LINUX就支持NTFS格式文件的读取,但是在写文件方面一直不尽人意,近日发布的这款新软件NTFS-3G可在LINUX下安全读写NTFS分区的文件,虽然还是beta版,不过试用了一下,感觉非常棒。

安装步骤如下:

1. 先安装FUSE

# wget http://flomertens.keo.in/debian/ntfs-3g/binary-i386/fuse-utils_2.5.3-1_i386.deb
# wget http://flomertens.keo.in/debian/ntfs-3g/binary-i386/libfuse2_2.5.3-1_i386.deb
# sudo dpkg -i libfuse2_2.5.3-1_i386.deb fuse-utils_2.5.3-1_i386.deb

2. 再安装NTFS-3G

# wget http://flomertens.keo.in/debian/ntfs-3g/binary-i386/ntfs-3g_20070714-BETA-1_i386.deb
# sudo dpkg -i ntfs-3g_20070714-BETA-1_i386.deb

Read more…

CVS server on Ubuntu 6.0.6

1. Edit /etc/apt/sources.list

# sudo vi /etc/apt/sources.list

uncomment the following two lines:
deb http://cn.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ dapper universe

update package:

# sudo apt-get update

2. Install CVS
install CVS files:

sudo apt-get install cvs

install CVS server:

sudo apt-apt install cvsd

When prompted in the cvsd installation process for Repository, type in “/cvsroot“.

Read more…