lemp安装配置mysql-5.5.15、 nginx-1.0.0、php-5.3.8

1:首先下载从官网下载标题中对应软件的版本。

2:安装必须的第三方库

 

  
  
  
  
  1. yum -y install gcc gcc-c++ autoconf make libjpeg libjpeg-devel \
  2. libpng libpng-devel freetype freetype-devel zlib \
  3. zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 \
  4. bzip2-devel ncurses ncurses-devel curl curl-devel \
  5. e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn \
  6. libidn-devel openssl openssl-devel libxml2 libxml2-devel \
  7. patch pcre pcre-devel ImageMagick mhash mhash-devel \
  8. libmcrypt libmcrypt-devel libevent libevent-devel libxslt  \
  9. libxslt-devel libtool libtool-ltdl libtool-ltdl-devel \
  10. bison bison-devel 

 

  
  
  
  
  1. wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz 
  2. wget "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0" 
  3. wget "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?modtime=1194463373&big_mirror=0" 
  4. wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?modtime=1175740843&big_mirror=0" 

 

  
  
  
  
  1. tar zxvf libiconv-1.13.tar.gz 
  2. cd libiconv-1.13
  3. ./configure --prefix=/usr/local 
  4. make 
  5. make install 
  6. cd ../ 
  7.  
  8. tar zxvf libmcrypt-2.5.8.tar.gz  
  9. cd libmcrypt-2.5.8
  10. ./configure 
  11. make 
  12. make install 
  13.  
  14. tar zxvf mhash-0.9.9.9.tar.gz 
  15. cd mhash-0.9.9.9
  16. ./configure 
  17. make 
  18. make install 
  19. cd ../ 
  20.  
  21. ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 
  22. ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 
  23. ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 
  24. ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 
  25. ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 
  26. ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 
  27. ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 
  28. ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 
  29. ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 
  30.  
  31. tar zxvf mcrypt-2.6.8.tar.gz 
  32. cd mcrypt-2.6.8
  33. /sbin/ldconfig 
  34. ./configure 
  35. make 
  36. make install 
  37. cd ../ 

 3:安装mysql

  
  
  
  
  1. tar zxvf mysql-5.5.15.tar.gz   
  2. cd mysql-5.5.15  
  3.   
  4. cmake -DMYSQL_DATADIR=/data0/mysql/3306/data/  \  
  5.       -DWITH_ARCHIVE_STORAGE_ENGINE=on \  
  6.       -DCMAKE_INSTALL_PREFIX=/usr/local/mysql  
  7.   
  8. make  
  9. make install  
  10.   
  11. echo /usr/local/mysql/lib/ >> /etc/ld.so.conf 
  12.  
  13. ldconfig 

 3:安装nginx

 

  
  
  
  
  1. tar zxvf nginx-1.0.0.tar.gz 
  2. cd nginx-1.0.0 
  3. ./configure --user=www --group=www --prefix=/usr/local/nginx \ 
  4.           --with-http_stub_status_module --with-http_ssl_module 
  5. make && make install 
  6. cd ../ 

4:安装php

 

  
  
  
  
  1. tar zxvf php-5.3.8.tar.gz 
  2. cd  php-5.3.8 
  3.  
  4. ./configure \
  5.   --prefix=/usr/local/php \
  6.   --with-config-file-path=/usr/local/php/etc \
  7.   --with-mysql=/usr/local/mysql \
  8.   --with-mysqli=/usr/local/mysql/bin/mysql_config  \
  9.   --with-pdo-mysql=/usr/local/mysql \
  10.   --with-iconv-dir=/usr/local --with-freetype-dir \
  11.   --with-jpeg-dir --with-png-dir --with-zlib \
  12.   --with-libxml-dir=/usr --enable-xml --disable-rpath  \
  13.   --enable-safe-mode --enable-bcmath --enable-shmop \
  14.   --enable-sysvsem --enable-inline-optimization \
  15.   --with-curl --with-curlwrappers --enable-mbregex --enable-fpm \
  16.   --with-fpm-user=www --with-fpm-group=www --enable-mbstring \
  17.   --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
  18.   --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc \
  19.   --enable-zip --enable-soap  --disable-phar
  20.  
  21. make 
  22. make install 

 

你可能感兴趣的:(mysql,nginx,数据库,安装配置,LEMP)