源码编译安装lamp(linux+apache+mysql+php)
2012-11-02 17:44
1081 查看
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --prefix=/usr/
make
make install
cd ..
tar zxvf freetype-2.4.10.tar.gz
cd freetype-2.4.10
./configure --prefix=/usr/
make
make install
cd ..
tar jxvf libxml2-2.6.30.tar.bz2
cd libxml2-2.6.30
./configure --prefix=/usr/
make
make install
tar jxvf httpd-2.2.23.tar.bz2
cd httpd-2.2.23/srclib/apr
./configure --prefix=/usr/local/apr
make ; make install
cd ../apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make ; make install
cd ../../
./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-so
make
make install
groupadd mysql
useradd -g mysql mysql
tar zxvf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure --prefix=/usr/local/mysql/ --enable-assembler \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--with-big-tables \
--with-readline \
--with-ssl \
--with-embedded-server \
--enable-local-infile \
--with-plugins=partition,innobase,myisammrg
make
make install
cp support-files/my-medium.cnf /usr/local/mysql/my.cnf
mkdir /usr/local/mysql/data
chown -R mysql.mysql /usr/local/mysql/data/
vim /usr/local/mysql/my.cnf
在[mysql]标签下添加如下两行:
basedir=/usr/local/mysql --定义mysql的目录位置
datadir=/usr/local/mysql/data --定义mysql数据目录的位置
/usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql --初始化mysql 数据库
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --user=mysql & --开启mysql服务
tar zxvf php-5.4.7.tar.gz
cd php-5.4.7
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql/ --with-libxml-dir --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir=/usr --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-sockets --enable-exif --disable-ipv6
make
make install
【apache结合php】
Apache主配置文件为:/usr/local/apache/conf/httpd.conf
# vim /usr/local/apache/conf/httpd.conf
找到:
AddType application/x-gzip .gz .tgz
在该行下面添加
AddType application/x-httpd-php .php
找到:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
将该行改为
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php
</IfModule>
本文出自 “Jtao'Blog” 博客,请务必保留此出处http://hyjtao.blog.51cto.com/2385891/1048484
cd libmcrypt-2.5.8
./configure --prefix=/usr/
make
make install
cd ..
tar zxvf freetype-2.4.10.tar.gz
cd freetype-2.4.10
./configure --prefix=/usr/
make
make install
cd ..
tar jxvf libxml2-2.6.30.tar.bz2
cd libxml2-2.6.30
./configure --prefix=/usr/
make
make install
tar jxvf httpd-2.2.23.tar.bz2
cd httpd-2.2.23/srclib/apr
./configure --prefix=/usr/local/apr
make ; make install
cd ../apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make ; make install
cd ../../
./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-so
make
make install
groupadd mysql
useradd -g mysql mysql
tar zxvf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure --prefix=/usr/local/mysql/ --enable-assembler \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--with-big-tables \
--with-readline \
--with-ssl \
--with-embedded-server \
--enable-local-infile \
--with-plugins=partition,innobase,myisammrg
make
make install
cp support-files/my-medium.cnf /usr/local/mysql/my.cnf
mkdir /usr/local/mysql/data
chown -R mysql.mysql /usr/local/mysql/data/
vim /usr/local/mysql/my.cnf
在[mysql]标签下添加如下两行:
basedir=/usr/local/mysql --定义mysql的目录位置
datadir=/usr/local/mysql/data --定义mysql数据目录的位置
/usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql --初始化mysql 数据库
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --user=mysql & --开启mysql服务
tar zxvf php-5.4.7.tar.gz
cd php-5.4.7
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql/ --with-libxml-dir --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir=/usr --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-sockets --enable-exif --disable-ipv6
make
make install
【apache结合php】
Apache主配置文件为:/usr/local/apache/conf/httpd.conf
# vim /usr/local/apache/conf/httpd.conf
找到:
AddType application/x-gzip .gz .tgz
在该行下面添加
AddType application/x-httpd-php .php
找到:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
将该行改为
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php
</IfModule>
本文出自 “Jtao'Blog” 博客,请务必保留此出处http://hyjtao.blog.51cto.com/2385891/1048484
相关文章推荐
- wdOS系统下源码编译安装LAMP环境(linux+apache+php+mysql)
- 我的LAMP源码编译安装linux+Apache+mysql+php
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- 编译安装LAMP:linux apache mysql php
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- linux应用之Lamp(apache+mysql+php)的源码安装(centos)
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- wdOS系统下源码编译安装LNAMP(linux+nginx+apache+mysql+php)
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 6.3 源码安装LAMP(Linux+Apache+Mysql+Php)环境
- Red Hat Linux 9下的Mysql5.0.19+Apache 2.2.0 + PHP 5.1.2+GD库源码编译安装过程
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)运行环境步骤
- CentOS 6.5下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- CentOS 5.X 源码编译安装LAMP(Apache+MySQL+PHP)
- 纯源码编译安装LAMP,linux,httpd,php,mysql源码编译安装