码迷,mamicode.com
首页 > 其他好文 > 详细

CenOS下LAMP搭建过程

时间:2015-10-08 23:03:35      阅读:269      评论:0      收藏:0      [点我收藏+]

标签:

LAMP: Linux+Apache+MySQL+PHP

 

安装前先关闭防火墙和Selinux

把所有安装包解压到/lamp下(根目录下的lamp目录)

 

依次安装如下

 #install.sh

1
cd /lamp/libxml2-2.6.30 2 ./configure --prefix=/usr/local/libxml2/ 3 make 4 make install 5 6 cd /lamp/libmcrypt-2.5.8 7 ./configure --prefix=/usr/local/libmcrypt/ 8 make 9 make install 10 11 cd /lamp/libmcrypt-2.5.8/libltdl 12 ./configure --enable-ltdl-install 13 make 14 make install 15 16 cd /lamp/zlib-1.2.3 17 ./configure 18 make 19 make install 20 21 cd /lamp/libpng-1.2.31 22 ./configure --prefix=/usr/local/libpng/ 23 make 24 make install 25 26 mkdir /usr/local/jpeg6 27 mkdir /usr/local/jpeg6/bin 28 mkdir /usr/local/jpeg6/lib 29 mkdir /usr/local/jpeg6/include 30 mkdir -p /usr/local/jpeg6/man/man1 31 cd /lamp/jpeg-6b 32 ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static 33 make 34 make install 35 36 cd /lamp/freetype-2.3.5 37 ./configure --prefix=/usr/local/freetype/ 38 make 39 make install 40 41 cd /lamp/autoconf-2.61 42 ./configure 43 make 44 make install 45 46 cd /lamp/gd-2.0.35 47 ./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg6/ --with-freetype=/usr/local/freetype/ 48 make 49 make install 50 51 cd /lamp/httpd-2.2.9 52 ./configure --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd/ --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support 53 make 54 make install 55 56 /usr/local/apache2/bin/apachectl start 57 echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.d/rc.sysinit 58 59 cd /lamp/ncurses-5.6 60 ./configure --with-shared --without-debug --without-ada --enable-overwrite 61 make 62 make install #此步会报错,下载新版本如5.9,重新编译安装 63 64 groupadd mysql 65 useradd -g mysql mysql 66 cd /lamp/mysql-5.0.41 67 ./configure --prefix=/usr/local/mysql/ --with-extra-charsets=all 68 make 69 make install 70 71 cp support-files/my-medium.cnf /etc/my.cnf 72 /usr/local/mysql/bin/mysql_install_db --user=mysql 73 chown -R root /usr/local/mysql 74 chown -R mysql /usr/local/mysql/var 75 chgrp -R mysql /usr/local/mysql 76 77 /usr/local/mysql/bin/mysqld_safe --user=mysql & 78 79 cp /lamp/mysql-5.0.41/support-files/mysql.server /etc/rc.d/init.d/mysqld 80 chown root.root /etc/rc.d/init.d/mysqld 81 chmod 755 /etc/rc.d/init.d/mysqld 82 chkconfig --add mysqld 83 chkconfig --list mysqld 84 chkconfig --levels 245 mysqld off 85 86 cd /lamp/php-5.2.6 87 ./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets 88 make 89 make install 90 91 cp php.ini-dist /usr/local/php/etc/php.ini 92 echo "Addtype application/x-httpd-php .php .phtml" >> /etc/httpd/httpd.conf 93 /usr/local/apache2/bin/apachectl restart

 

CenOS下LAMP搭建过程

标签:

原文地址:http://www.cnblogs.com/roronoa-sqd/p/4862546.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!