Linux 下配置 apache+mysql+php
1所需軟件
httpd-2.2.11.tar.gz
mysql-5.0.18.tar.gz
php-5.2.9.tar.gz
apr-1.3.3.tar.gz
apr-util-1.3.4.tar.gz
libxml google搜索一下吧
2安裝
2.1安裝apache
安裝apr
#cd srclib/apr
#./configure --prefix=/usr/local/apr
#make
#make install
./configure --prefix=/usr/local/server/apache2.2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/bin
make
make install
2.2安裝mysql
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
這樣安裝的mysql不知道gb2312,gbk變量
./configure --prefix=/usr/local/mysql
--with--charset=gb2312 "
--with-extra-charsets=" gb2312 gbk big5 utf8""
make
make install
2.3 安裝 php
可能需要先安裝libxml
#tar -zxvf libxml2-2.6.26.tar.gz
#./configure --prefix=/usr/local/libxml
#make
#make install
進(jìn)入php的解壓目錄
./configure --prefix=/usr/local/server/php5 --with-apxs2=/usr/local/apache2.2/bin/apxs --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/lcoal/mysql --with-libxml-dir=/usr/local/libxml
好了,基本上完工了,還有一些小小的配置技巧稍后再寫(xiě)吧
httpd-2.2.11.tar.gz
mysql-5.0.18.tar.gz
php-5.2.9.tar.gz
apr-1.3.3.tar.gz
apr-util-1.3.4.tar.gz
libxml google搜索一下吧
2安裝
2.1安裝apache
安裝apr
#cd srclib/apr
#./configure --prefix=/usr/local/apr
#make
#make install
再安裝apr-util
#cd srclib/apr-util
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install
./configure --prefix=/usr/local/server/apache2.2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/bin
make
make install
2.2安裝mysql
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
這樣安裝的mysql不知道gb2312,gbk變量
./configure --prefix=/usr/local/mysql
--with--charset=gb2312 "
--with-extra-charsets=" gb2312 gbk big5 utf8""
make
make install
2.3 安裝 php
可能需要先安裝libxml
#tar -zxvf libxml2-2.6.26.tar.gz
#./configure --prefix=/usr/local/libxml
#make
#make install
進(jìn)入php的解壓目錄
./configure --prefix=/usr/local/server/php5 --with-apxs2=/usr/local/apache2.2/bin/apxs --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/lcoal/mysql --with-libxml-dir=/usr/local/libxml
好了,基本上完工了,還有一些小小的配置技巧稍后再寫(xiě)吧
posted on 2009-04-12 17:18 草原上的駱駝 閱讀(159) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): Linux