爱死你了 发表于 2015-8-19 09:05:13

【运维网】干货来袭!Linux小白最佳实践:《超容易的Linux系统管理入门书》(连载七)LAMP集成安装

  学Linux做程序开发也好,做系统管理也好,做网络管理员也好,做系统运维也好,不会LAMP和LNMP,那就等于连皮毛都不会!本篇是文字版的LAMP集成安装,下次连载我们要介绍LNMP的文字版安装。有喜欢的持续关注了。
  想每天能听到小妞的语音播报,想学更多学校里和书本上学不大的IT技术或技能,欢迎关注微信公众号:xiniubook2008。或加微博:我的图书我做主,参加活动,免费获书。

  
  【示例15-33】
  #安装MySQL
  # tar xvfmysql-5.1.49.tar.gz
  # cd mysql-5.1.49
  # useradd mysql
  # groupadd mysql
  # cd mysql-5.1.49
  # ./configure --prefix=/usr/local/mysql/ --enable-local-infile--with-extra-charsets=all--with-plugins=innobase
  # make
  # make install
  #安装SSL
  #解压源码包
  # tar xvf openssl-1.0.0c.tar.gz
  # cd openssl-1.0.0c
  #配置编译选项
  # ./config--prefix=/usr/local/ssl --shared
  #编译
  # make
  # make install
  #将动态库路径加入系统路径中
  # echo /usr/local/ssl/lib/ >>/etc/ld.so.conf
  #加载动态库以便系统共享
  # ldconfig
  #安装curl,以便可以在PHP中使用curl相关的功能
  #tar xvf curl-7.15.1.tar.gz
  # cd curl-7.15.1
  # chmod-R a+x .
  # ./configure --prefix=/usr/local/curl --enable-shared
  # make
  # make install
  #安装libxml
  # tar xvf libxml2-2.7.7.tar.gz
  # cd libxml2-2.7.7
  # chmod-R a+x .
  # ./configure --prefix=/usr/local/libxml2 --enable-shared
  # make
  # make install
  # cd /data/soft
  #安装zlib
  # tar xvfzlib-1.2.3.tar.gz
  #cd zlib-1.2.3/
  #./configure--prefix=/usr/local/zlib --enable-shared
  # make
  # make install
  #
  # cd /data/soft
  #安装freetype
  #tar xvf freetype-2.1.10.tar.gz
  #cd freetype-2.1.10/
  #./configure--prefix=/usr/local/freetype --enable-shared
  # make
  # make install
  #
  # cd /data/soft
  #安装libpng
  #tar xvflibpng-1.2.8-config.tar.gz
  #cd libpng-1.2.8-config/
  #./configure--prefix=/usr/local/libpng --enable-shared
  # make
  # make install
  #
  # cd /data/soft
  #安装jpeg支持
  #tar xvf jpegsrc.v6b.tar.gz
  #cd jpeg-6b/
  #cp /usr/bin/libtool .
  #./configure--enable-shared
  # make
  # make install
  #
  # cd /data/soft
  #安装gd库支持
  # tar xvf gd-2.0.33.tar.gz
  #cd gd-2.0.33/
  #./configure-prefix=/usr/local/gd-with-jpeg-with-png -with-zlib=/usr/local/zlib -with-freetype=/usr/local/freetype
  # make
  # make install
  # cd /data/soft
  #安装PHP
  # tar xvf php-5.2.17.tar.gz
  # cdphp-5.2.17
  # './configure' '--prefix=/usr/local/php' '--with-config-file-scan-dir=/etc/php.d''--with-apxs2=/usr/local/apache2/bin/apxs''--with-mysql=/usr/local/mysql' '--enable-mbstring' '--enable-sockets''--enable-soap' '--enable-ftp' '--enable-xml' '--with-iconv' '--with-curl''--with-openssl' '--with-gd=yes' '--with-freetype-dir=/usr/local/freetype''--with-jpeg-dir=/usr/local/jpeg' '--with-png-dir=/usr/local/libpng''--with-zlib=yes' '--enable-pcntl' '--enable-cgi' '--with-gmp''--with-libxml-dir=/usr/local/libxml2' '--with-curl=/usr/local/curl'
  #
  # make
  # make install
  # cd /data/soft
  #安装APC
  # tar xvf APC-3.1.9.tgz
  # cd APC-3.1.9
  # /usr/local/php/bin/phpize
  # ./configure --with-apxs=/usr/local/apache2/bin/apxs--enable-apc--enable-shared --with-php-config=/usr/local/php/bin/php-config
  # make
  # make install
  #设置环境变量
  # echo "export PATH=/usr/local/php/bin:\$PATH:.">>/etc/profile
  经过以上的步骤,Apache、MySQL和PHP环境需要的软件已经安装完毕。

  喜欢可以购买《超容易的Linux系统管理入门书》。写书评得奖品。
页: [1]
查看完整版本: 【转载】干货来袭!Linux小白最佳实践:《超容易的Linux系统管理入门书》(连载七)LAMP集成安装