硬件環境
硬盤
G ; 內存
M ; 網卡
EEpor
軟件
操作系統
RedHat
優化RedHat
安裝時選擇
ftp 和 dns
編輯文件 /etc/hosts
改為
info
編輯文件 /etc/nf
改為
// generated by named
bootconf
pl
options {
directory
/var/named
;
forwarders {
;};
forwards only;
// query
source address * port
;
};
//
// a caching only nameserver config
//
zone
in {
type hint;
file
named
ca
;
};
zone
in
addr
arpa
in {
type master;
file
named
local
;
};
編輯文件 /etc/nf
改為
search
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)egcs
D__KERNEL__
I$(HPATH)
編輯第九十行 (vi +
) :
CFLAGS =
Wall
Wstrict
prototypes
O
fomit
frame
pointer
>
CFLAGS =
Wall
Wstrict
prototypes
O
funroll
loops
ffast
math
malign
double
mcpu=
pentiumpro
march=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=
pentiumpro
march=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: mm
tar
gz
mysql: mysql
tar
gz
apache: apache_
tar
gz
php: php
tar
gz
phpMyAdmin: phpMyAdmin_
tar
gz
mode_perl: mod_perl
tar
gz
perl
DBI: DBI
tar
gz
DBD
Oracle
tar
gz
Msql
Mysql
modules
tar
gz
Data
Dumper
tar
gz
Data
ShowTable
tar
gz
eperl: eperl
tar
gz
perl: perl
tar
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/mysql
server /etc/rc
d/init
d/mysql
cd /etc/rc
d/rc
d
ln
s
/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 clean
cp /apache/bin/apachectl /etc/rc
d/init
d/httpd
cd /etc/rc
d/rc
d
ln
s
/init
d/httpd S
httpd
系統啟動時加載apache
#) 安裝eperl
perl Makefile
PL
make
make test
make install
make clean
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 clean
cp /apache/bin/apachectl /etc/rc
d/init
d/httpd
cd /etc/rc
d/rc
d
ln
s
/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/29346.html