vps上安装lnmp全程记录
时间:2010-09-02 来源:cclang2009
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers |
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.46.tar.gz/from/http://mysql.cdpa.nsysu.edu.tw/ |
groupadd mysql |
./configure --prefix=/usr/local/mysql --without-debug --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8 --with-unix-socket-path=/tmp/mysql.sock --with-plugins=partition,innobase,myisammrg --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-big-tables --with-read-line --with-ssl --with-embedded-server --with-pthread --enable-thread-safe-client --enable-local-infile --enable-assembler |
mkdir -p /data/mysql/data |
/usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql/data/ --user=mysql |
在/etc/my.cnf中加入路径配置
datadir = /data0/mysql/3306/data |