背景:
阅读新闻
Debian 5 快速建立Linux + Nginx + MySQL + PHP服务器
[日期:2011-01-10] 来源:Debian 作者:Debian [字体:]
1. 安装依赖的编译工具
apt-get update 更新源
apt-get install gcc make gdb autoconf g++ libncurses5-dev curl libssl-dev libcurl4-gnutls-dev libjpeg62-dev libpng12-dev libfreetype6-dev libsasl2-dev libperl-dev libtool libxml2-dev libtidy-dev libpcre3 libpcre3-dev libmcrypt-dev libmhash-dev install build-essential bison chrpath debhelper flex freetds-dev libapr1-dev libbz2-dev libc-client-dev libexpat1-dev libfreetype6-dev libgcrypt11-dev libgd2-xpm-dev libjpeg62-dev libkrb5-dev libldap2-dev libmcrypt-dev libmhash-dev libMySQLclient15-dev libncurses5-dev libpam0g-dev libpcre3-dev libpng12-dev libpq-dev libpspell-dev librecode-dev libsnmp9-dev libsqlite0-dev libt1-dev libtidy-dev libwrap0-dev libxmltok1-dev libxml2-dev libxslt1-dev re2c unixodbc-dev
apt-get install build-essential
2. 安装所需工具
libiconv
wget
tar -zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure –prefix=/usr/local/libiconv
make && make install
libxml2
wget
tar -zxvf libxml2-2.7.3.tar.gz
cd libxml2-2.7.3
./configure –prefix=/usr/local/libxml2
make && make install
curl
wget
tar -zxvf curl-7.19.6.tar.gz
cd curl-7.19.6
./configure –prefix=/usr/local/curl
openssl
wget
tar -zxvf openssl-0.9.8k.tar.gz
cd openssl-0.9.8k
./config
make && make install
zlib
wget
tar -zxvf zlib-1.2.3.tar.gz
cd zlib/1.2.3
./configure –prefix=/usr/local/zlib
3.安装mysql
groupadd mysql
useradd -g mysql mysql
wget
tar -zxvf mysql-5.1.41.tar.gz
cd mysql-5.1.41
./configure –prefix=/usr/local/mysql/ –without-debug –without-bench –enable-thread-safe-client –enable-assembler –with-mysqld-ldflags=-all-static –with-client-ldflags=-all-static –with-charset=latin1 –with-extra-charset=utf8,gbk –with-innodb –with-cvs-storage-engine –with-federated-storage-engine –with-mysqld-user=mysql –without-embedded-server –with-server-suffix=-community –with-unix-socket-path=/usr/local/mysql/sock/mysql.sock
make && make install
cp support-files/my-medium.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysql
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
export PATH=/usr/local/mysql/bin/:$PATH
bin/mysql_install_db –user=mysql
chown -R root .
chown -R mysql var
chown -R mysql var/.
chown -R mysql var/mysql/.
chgrp -R mysql .
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
chmod 777 /etc/init.d/mysql
bin/mysqld_safe –user=mysql &
相关资讯 Debian
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯