hwl198212 发表于 2015-8-20 12:13:04

搭建LAMP环境(二)

  
  1.安装GD2
  下载地址: http://www.libgd.org/Downloads
  按照上篇的约定
  #cd /usr/local/src
  #wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
  #tar zxvf gd-2.0.35.tar.gz
  #cd gd-2.0.35.tar.gz
  #./configure --prefix=/usr/local/gd2
  #make
  我在make的时候出现了一个错误。
  “configure.ac:64: error: possibly undefined macro: AM_ICONV”
  google了下都说 gettext没有安装。最简单的方法还是用yum安装
  #yum install gettext
  再次make 正常了。
  #make install
  
   2.安装LibXML2
  下载网站地址:ftp://xmlsoft.org/libxml2/
  #cd /usr/local/src
  #wget ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
  #cd libxml2-2.7.3
  #./configure --prefix=/usr/local/libxml2

  #make
  #make install
  
  3.Apache日志截断程序

  下载网站地址:http://cronolog.org/download/index.html
  #cd /usr/local/src
  #wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
  #tar zxvf cronolog-1.6.2.tar.gz
  #cd cronolog-1.6.2
  #./configure --prefix=/usr/local/cronolog
  #make
  #make install

  4.升级OpenSSL和OpenSSH

  #cd /usr/local/src
  #wget http://www.openssl.org/source/openssl-0.9.8k.tar.gz
  #wget http://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/openssh-5.2p1.tar.gz
  这一步没有弄明白
  原有的系统里面安装了 Openssl ,用yum update更新了,但不是最新版本。
  系统自带的Openssl又不敢轻易用 yum remove。没有弄明白,只能暂时跳过。

  下面是 http://www.phpchina.com/batch.viewlink.php?itemid=12233里提到的升级ssl和ssh的方法。
      # cd/usr/local/src
    # wgethttp://download.discuz.net/env/openssl-0.9.7j.tar.gz
    # wgethttp://download.discuz.net/env/openssh-4.2p1.tar.gz
    # tar xzvfopenssl-0.9.7j.tar.gz
    # cd openssl-0.9.7j
    # ./config--prefix=/usr/local/openssl
    # make
    # maketest
    # make install
    # cd..
    # tar xzvfopenssh-4.2p1.tar.gz
    # cd openssh-4.2p1
#./configure\
"--prefix=/usr" \
"--with-pam"\
"--with-zlib" \
"--with-ssl-dir=/usr/local/openssl"\
"--with-md5-passwords"
    #make
    # make install
   禁止root直接登录,此处先建立一个普通系统用户:
    # useradd username
    # passwd username
    # echo 'Protocol 2' >>/etc/ssh/sshd_config
    # echo 'Protocol 2' >>/usr/etc/sshd_config
    # echo 'PermitRootLogin no' >>/etc/ssh/sshd_config
    # echo 'PermitRootLogin no' >>/usr/etc/sshd_config
    # /etc/rc.d/init.d/sshd restart

  
  
  
  
  
  
  
页: [1]
查看完整版本: 搭建LAMP环境(二)