UBUNTU下的LAMP配置
安装系统

##### 安装编译环境 #####

sudo apt-get install build-essential

##### m4 #####

sudo dpkg –i m4*.deb

##### flex #####

sudo dpkg –i flex*.deb

##### zlib-devel #####

sudo apt-get install zlib1g-dev

##### libxml2 #####

sudo apt-get install libxml2 libxml2-dev

##### MySQL #####

tar -zxvf mysql*.tar.gz
sudo mv mysql*/ /usr/local/mysql
cd /usr/local/mysql
sudo groupadd mysql
sudo useradd -g mysql mysql
sudo scripts/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo chgrp -R mysql .
sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
sudo support-files/mysql.server start
sudo bin/mysqladmin -u root password 'mypassword'
sudo support-files/mysql.server stop
sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql.server
cd /etc/init.d
sudo update-rc.d mysql.server defaults

##### Apache #####

tar -zxvf httpd*.tar.gz
cd httpd*
./configure --prefix=/usr/local/apache --enable-mods-shared=all --enable-rewrite=shared --enable-so
make && sudo make install

##### zlib #####

tar -zxvf zlib*.tar.gz
cd zlib*
./configure --prefix=/usr/local/zlib
make && sudo make install

##### OpenSSL #####

tar -zxvf openssl*.tar.gz
cd openssl*
./config --prefix=/usr/local/ssl -openssldir=/usr/local/ssl --shared zlib
make && sudo make install

##### FreeType #####

tar -zxvf freetype*.tar.gz
cd freetype*
./configure --prefix=/usr/local/freetype
make && sudo make install

##### Jpeg #####

tar -zxvf jpeg*.tar.gz
cd jpeg*
sudo mkdir /usr/local/jpeg
sudo mkdir /usr/local/jpeg/bin
sudo mkdir /usr/local/jpeg/lib
sudo mkdir /usr/local/jpeg/include
sudo mkdir /usr/local/jpeg/man
sudo mkdir /usr/local/jpeg/man/man1
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make && sudo make install

##### LibPNG #####

tar -zxvf libpng*.tar.gz
cd libpng*
./configure --prefix=/usr/local/libpng
make && sudo make install

##### GD Library #####

tar -zxvf gd*.tar.gz
cd gd*
./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype --with-png --with-zlib=/usr/local/zlib
make && sudo make install

##### curl #####

tar -zxvf curl*.tar.gz
cd curl*
sudo mkdir -p /usr/local/curl
./configure --prefix=/usr/local/curl --with-ssl
make && sudo make install

##### libmcrypt #####

tar -zxvf libmcrypt*.tar.gz
cd libmcrypt*
./configure --prefix=/usr/local/libmcrypt
make && sudo make install

##### mhash #####

tar -zxvf mhash*.tar.gz
cd mhash*
./configure --prefix=/usr/local/mhash
make && sudo make install

##### php #####

tar -zxvf php*.tar.gz
cd php*
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --enable-magic-quotes --with-openssl=/usr/local/ssl --with-zlib=/usr/local/zlib --with-zlib-dir=/usr/local/zlib --with-curl=/usr/local/curl --enable-ftp --with-openssl-dir=/usr/local/ssl --with-gd=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype --enable-gd-native-ttf --enable-mbstring --with-mcrypt=/usr/local/libmcrypt --with-mhash=/usr/local/mhash --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --enable-soap --enable-sockets --enable-zip
make && sudo make install

相关日志

分类: 电脑技巧 标签:, 作者:countmeon 日期:2009-01-17 at 14:28

1条评论

发表评论
  1. 路过,看不懂

发表评论

[ Ctrl + Enter ]