本文簡述了Linux下安裝PHP
APACHE MYSQL PERL的方法和基本步驟
硬件環境 硬盤
G ; 內存 M ; 網卡 EEpor
軟件 操作系統
RedHat
優化RedHat 安裝時選擇
ftp 和 dns編輯文件 /etc/hosts
改為
info langoit com cn info 編輯文件 /etc/named
conf 改為
// generated by named
bootconf pl options {
directory/var/named ;
forwarders {;};
forwards only;
// querysource address * port ;
};//
// a caching only nameserver config
//
zonein {
type hint;
filenamed ca ;
};zone
in addr arpa in {
type master;
filenamed local ;
};
編輯文件 /etc/resolvconf 改為
search langoitcom cn
nameserver
nameserver優化linux 內核
刪除沒有的rpm 包
首先要停止正在運行的進程
cd /etc/rc
d/init d
/sendmail stop /apmd stop /kudzu stop rpm
e nodeps sendmail kudzu nfs utils 編輯文件 /usr/src/linux/include/linux/tasks
h 編輯第十四行 (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)egcsD__KERNEL__ I$(HPATH) 編輯第九十行 (vi +
) : CFLAGS =
Wall Wstrict prototypes O fomit frame pointer >
CFLAGS =Wall Wstrict prototypes O funroll loops ffast math malign double mcpu=
pentiumpromarch=pentiumpro fomit frame pointer fno exceptions 編輯第十九行 (vi +
) : HOSTCFLAGS =
Wall Wstrict prototypes O fomit frame pointer >
HOSTCFLAGS =Wall Wstrict prototypes O funroll loops ffast math malign double mcpu=
pentiumpromarch=pentiumpro fomit frame pointer fno exceptions 設置內核
make xconfig
具體可自己根據系統來設置
在 /usr/src/linux/ 目錄下
make dep
make clean
make bzlilo
make modules
make modules_install
安裝和優化mm mysql apache php phpMyAdmin perl mode_perl
) 文件
mm: mmtar gz
mysql: mysqltar gz
apache: apache_tar gz
php: phptar gz
phpMyAdmin: phpMyAdmin_tar gz
mode_perl: mod_perltar gz
perlDBI: DBI tar gz
DBDOracle tar gz
MsqlMysql modules tar gz
DataDumper tar gz
DataShowTable tar gz
eperl: eperltar gz
perl: perltar gz 解壓文件
tar
zxpf 文件名 注意
以下所有的預編譯和安裝必須在要安裝的軟件目錄下 #) 安裝mm
/configure \ disable shared \ prefix=/usr
make
make test
make install
make clean#) mysql的安裝和配置
#) mysql的預編譯
CC=
egcs \
OPTIM=O funroll loops ffast math malign double mcpu=pentiumpro \ march=pentiumpro fomit frame pointer fno exceptions \ /configure \ prefix=/mysql \ #) 安裝mysql
make
make install
make clean#) 配置mysql
/mysql/bin/mysql_install_db
初始化數據庫
cp /mysql/share/mysql/mysqlserver /etc/rc d/init d/mysql
cd /etc/rcd/rc d
lns /init d/mysql S mysql 系統啟動時加載mysql
#) apache 的預編譯
CC=
egcs \
OPTIM=O funroll loops ffast math malign double mcpu=pentiumpro \ march=pentiumpro fomit frame pointer fno exceptions \
CFLAGS=DDYNAMIC_MODULE_LIMIT= \ /configure \ prefix=/apache \ #) php的預編譯
CC=
egcs \
OPTIM=O funroll loops ffast math malign double mcpu=pentiumpro \ march=pentiumpro fomit frame pointer fno exceptions \ /configure \ prefix=/usr \ with apache= /apache_ \ enable safe mode \ with mm \ enable inline optimization \ enable memory limit \ enable track vars \ with mysql=/mysql \ #) 安裝php
make
make install
make clean#) mode_perl 的預編譯
perl Makefile
PL \
EVERYTHING=\
APACHE_SRC=/apache_ /src \
USE_APACI=\
DO_HTTPD=#) 安裝mod_perl
make
make install
make clean#) 編譯apache
EAPI_MM=SYSTEM \
CC=egcs \
OPTIM=O funroll loops ffast math malign double mcpu=pentiumpro \ march=pentiumpro fomit frame pointer fno exceptions \
CFLAGS=DDYNAMIC_MODULE_LIMIT= \ /configure \ prefix=/apache \ activate module=src/modules/php /libphp a \ enable module=php \ activate module=src/modules/perl/libperl a \ enable module=perl #) 安裝apache
make
make install
make cleancp /apache/bin/apachectl /etc/rc
d/init d/httpd
cd /etc/rcd/rc d
lns /init d/httpd S httpd 系統啟動時加載apache
#) 安裝eperl
perl Makefile
PL make
make test
make install
make cleanframe pointer fno exceptions \
CFLAGS=DDYNAMIC_MODULE_LIMIT= \ /configure \ prefix=/apache \ activate module=src/modules/php /libphp a \ enable module=php \ activate module=src/modules/perl/libperl a \ enable module=perl #) 安裝apache
make
make install
make cleancp /apache/bin/apachectl /etc/rc
d/init d/httpd
cd /etc/rcd/rc d
lns /init d/httpd S httpd 系統啟動時加載apache
#) 安裝eperl
perl Makefile
PL 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/29656.html