熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> MySQL >> 正文

Linux下安PHP,APACHE,MYSQL,PERL方法

2013-11-23 20:57:40  來源: MySQL 

  硬件環境
  
  硬盤 G ; 內存 M ; 網卡EEpor
  
  軟件
  
  操作系統 RedHat
  
  優化RedHat
  
  安裝時選擇
  ftp 和 dns
  
  編輯文件 /etc/hosts
  
  改為
   info
  
  編輯文件 /etc/nf
  
  改為
  
  // generated by namedbootconfpl
  
  options {
  directory /var/named;
  forwarders {;};
  forwards only;
  // querysource address * port ;
  };
  
  //
  // a caching only nameserver config
  //
  zone in {
  type hint;
  file namedca;
  };
  
  zone inaddrarpa in {
  type master;
  file namedlocal;
  };
  
  
  編輯文件 /etc/nf
  
  改為
  search
  nameserver
  nameserver
  
  優化linux 內核
  
  刪除沒有的rpm 包
  
  首先要停止正在運行的進程
  
  cd /etc/rcd/initd
  
  /sendmail stop
  /apmd stop
  /kudzu stop
  
  rpm e nodeps sendmail kudzu nfsutils
  
  編輯文件 /usr/src/linux/include/linux/tasksh
  
  編輯第十四行 (vi + ) :
  
  NR_TASKS >
  MIN_TASKS_LEFT_FOR_ROOT >
  
  編輯文件 /usr/src/linux/Makefile
  
  編輯第十八行 (vi + ) :
  
  HOSTCC =gcc
  >
  HOSTCC =egcs
  
  編輯第二十五行 (vi + ) :
  
  CC =$(CROSS_COMPILE)gcc D__KERNEL__ I$(HPATH)
  >
  CC =$(CROSS_COMPILE)egcs D__KERNEL__ I$(HPATH)
  
  編輯第九十行 (vi + ) :
  
  CFLAGS = Wall Wstrictprototypes O fomitframepointer
  >
  CFLAGS = Wall Wstrictprototypes O funrollloops ffastmath maligndouble mcpu=
  pentiumpro march=pentiumpro fomitframepointer fnoexceptions
  
  編輯第十九行 (vi + ) :
  
  HOSTCFLAGS =Wall Wstrictprototypes O fomitframepointer
  >
  HOSTCFLAGS =Wall Wstrictprototypes O funrollloops ffastmath maligndouble mcpu=
  pentiumpro march=pentiumpro fomitframepointer fnoexceptions
  
  設置內核
  
  make xconfig
  
  具體可自己根據系統來設置
  
  在 /usr/src/linux/ 目錄下
  
  make dep
  make clean
  make bzlilo
  make modules
  make modules_install
  
  安裝和優化mmmysqlapachephpphpMyAdminperlmode_perl
  
  ) 文件
  mm: mmtargz
  mysql: mysqltargz
  apache: apache_targz
  php: phptargz
  phpMyAdmin: phpMyAdmin_targz
  mode_perl: mod_perltargz
  perlDBI: DBItargz
  DBDOracletargz
  MsqlMysqlmodulestargz
  DataDumpertargz
  DataShowTabletargz
  eperl: eperltargz
  perl: perltargz
  
  解壓文件
  
  tar zxpf 文件名
  
  注意以下所有的預編譯和安裝必須在要安裝的軟件目錄下
  
  #) 安裝mm
  /configure \
  disableshared \
  prefix=/usr
  make
  make test
  make install
  make clean
  
  #) mysql的安裝和配置
  
  #) mysql的預編譯
  
  CC=egcs \
  OPTIM=O funrollloops ffastmath maligndouble mcpu=pentiumpro \
  march=pentiumpro fomitframepointer fnoexceptions \
  /configure \
  prefix=/mysql \
  
  #) 安裝mysql
  
  make
  make install
  make clean
  
  #) 配置mysql
  
  /mysql/bin/mysql_install_db
  
  初始化數據庫
  cp /mysql/share/mysql/mysqlserver /etc/rcd/initd/mysql
  cd /etc/rcd/rcd
  ln s /initd/mysql Smysql
  
  系統啟動時加載mysql
  
  #) apache 的預編譯
  
  CC=egcs \
  OPTIM=O funrollloops ffastmath maligndouble mcpu=pentiumpro \
  march=pentiumpro fomitframepointer fnoexceptions \
  CFLAGS=DDYNAMIC_MODULE_LIMIT= \
  /configure \
  prefix=/apache \
  
  #) php的預編譯
  
  CC=egcs \
  OPTIM=O funrollloops ffastmath maligndouble mcpu=pentiumpro \
  march=pentiumpro fomitframepointer fnoexceptions \
  /configure \
  prefix=/usr \
  withapache=/apache_ \
  enablesafemode \
  withmm \
  enableinlineoptimization \
  enablememorylimit \
  enabletrackvars \
  withmysql=/mysql \
  
  #) 安裝php
  
  make
  make install
  make clean
  
  #) mode_perl 的預編譯
  
  perl MakefilePL \
  EVERYTHING= \
  APACHE_SRC=/apache_/src \
  USE_APACI= \
  DO_HTTPD=
  
  #) 安裝mod_perl
  
  make
  make install
  make clean
  
  #) 編譯apache
  
  EAPI_MM=SYSTEM \
  CC=egcs \
  OPTIM=O funrollloops ffastmath maligndouble mcpu=pentiumpro \
  march=pentiumpro fomitframepointer fnoexceptions \
  CFLAGS=DDYNAMIC_MODULE_LIMIT= \
  /configure \
  prefix=/apache \
  activatemodule=src/modules/php/libphpa \
  enablemodule=php \
  activatemodule=src/modules/perl/libperla \
  enablemodule=perl
  
  #) 安裝apache
  
  make
  make install
  make clean
  
  cp /apache/bin/apachectl /etc/rcd/initd/httpd
  cd /etc/rcd/rcd
  ln s /initd/httpd Shttpd
  
  系統啟動時加載apache
  
  #) 安裝eperl
  
  perl MakefilePL
  
  make
  make test
  make install
  make clean
  framepointer fnoexceptions \
  CFLAGS=DDYNAMIC_MODULE_LIMIT= \
  /configure \
  prefix=/apache \
  activatemodule=src/modules/php/libphpa \
  enablemodule=php \
  activatemodule=src/modules/perl/libperla \
  enablemodule=perl
  
  #) 安裝apache
  
  make
  make install
  make clean
  
  cp /apache/bin/apachectl /etc/rcd/initd/httpd
  cd /etc/rcd/rcd
  ln s /initd/httpd Shttpd
  
  系統啟動時加載apache
  
  #) 安裝eperl
  
  perl MakefilePL
  
  make
  make test
  make install
  make clean
  
  
  make
  make test
  make install
  make clean
  make clean
From:http://tw.wingwit.com/Article/program/MySQL/201311/29346.html
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.