linux系统:debian
apache 2.2
mysql5.1
python2.6.7
mysql源码安装:
./configure --prefix=/opt/mysql5/ \
--enable-largefile --with-charset=utf8 \
--with-extra-charsets=all \
--with-pthread \
--with-unix-socket-path=/tmp/mysql.sock \
--enable-assembler \
--enable-thread-safe-client \
--without-debug \
--with-atomic-ops=smp \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--with-big-tables --without-ndb-debug \
--with-embedded-server \
--without-docs \
--without-man \
--with-plugins=innobase,innodb_plugin
错误
/usr/local/lib/libz.a: could not read symbols: Bad value(64 位 Linux)
/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
一般是64 位 电脑才会出现。
解决方法如下:
cd zlib-1.2.3 //进入zlib目录
CFLAGS="-O3 -fPIC" ./configure //使用64位元的方法进行编译
apache源码安装:
./configure --prefix=/opt/apache2 \
"--with-included-apr" \
"--enable-so" \
"--with-mpm=worker" \
"--with-z" \
"--enable-mods-shared=all" \
"--enable-deflate=shared" \
"--enable-expires=shared" \
"--enable-rewrite" \
"--disable-userdir" \
"--disable-authn-file" \
"--disable-authn-dbm" \
"--enable-authn-anon"
另django1.1.4做框架
python setup.py build
python setup.py install