您好,欢迎访问一九零五行业门户网

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

apacheperl
1.硬件环境:
硬盘:9.2 g ; 内存:128 m ; 网卡:eepor100
2.软件
操作系统: redhat 6.2
3.优化redhat 6.2
安装时选择
ftp 和 dns
编辑文件 /etc/hosts
改为:
202.104.131.100 info.langobitscn.com info
编辑文件 /etc/named.conf
改为:
// generated by named-bootconf.pl
options {
directory /var/named;
forwarders {202.104.131.98;};
forwards only;
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone . in {
type hint;
file named.ca;
};
zone 0.0.127.in-addr.arpa in {
type master;
file named.local;
};
编辑文件 /etc/resolv.conf
改为:
search langobitscn.com
nameserver 202.104.131.98
nameserver 202.96.134.133
优化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 +14 ) :
nr_tasks 5120 ---> 3072
min_tasks_left_for_root 16 ---> 24
编辑文件 /usr/src/linux/makefile
编辑第十八行 (vi +18 ) :
hostcc =gcc
--->
hostcc =egcs
编辑第二十五行 (vi +25 ) :
cc =$(cross_compile)gcc -d__kernel__ -i$(hpath)
--->
cc =$(cross_compile)egcs -d__kernel__ -i$(hpath)
编辑第九十行 (vi +90 ) :
cflags = -wall -wstrict-prototypes -o2 -fomit-frame-pointer
--->
cflags = -wall -wstrict-prototypes -o9 -funroll-loops -ffast-math -malign-double -mcpu=
pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions
编辑第十九行 (vi +19 ) :
hostcflags =-wall -wstrict-prototypes -o2 -fomit-frame-pointer
--->
hostcflags =-wall -wstrict-prototypes -o9 -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
4.安装和优化mm,mysql,apache,php,phpmyadmin,perl,mode_perl
1) 文件
mm: mm-1.1.3.tar.gz
mysql: mysql-3.22.32.tar.gz
apache: apache_1.3.12.tar.gz
php: php-4.0.0.2.0.5.tar.gz
phpmyadmin: phpmyadmin_2.0.5.tar.gz
mode_perl: mod_perl-1.24.tar.gz
perl-dbi: dbi-1.14.tar.gz
dbd-oracle-1.06.tar.gz
msql-mysql-modules-1.2214.tar.gz
data-dumper-2.101.tar.gz
data-showtable-3.3.tar.gz
eperl: eperl-2.2.14.tar.gz
perl: perl-5.6.0.tar.gz
解压文件:
tar -zxpf 文件名
注意:以下所有的预编译和安装必须在要安装的软件目录下
#) 安装mm
./configure \
--disable-shared \
--prefix=/usr
make
make test
make install
make clean
#) mysql的安装和配置
#) mysql的预编译
cc=egcs \
optim=-o9 -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/rc3.d
ln -s ../init.d/mysql s70mysql
系统启动时加载mysql
#) apache 的预编译
cc=egcs \
optim=-o9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro \
-march=pentiumpro -fomit-frame-pointer -fno-exceptions \
cflags=-ddynamic_module_limit=0 \
./configure \
--prefix=/apache \
#) php的预编译
cc=egcs \
optim=-o9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro \
-march=pentiumpro -fomit-frame-pointer -fno-exceptions \
./configure \
--prefix=/usr \
--with-apache=../apache_1.3.12 \
--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=1 \
apache_src=../apache_1.3.12/src \
use_apaci=1 \
do_httpd=1
#) 安装mod_perl
make
make install
make clean
#) 编译apache
eapi_mm=system \
cc=egcs \
optim=-o9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro \
-march=pentiumpro -fomit-frame-pointer -fno-exceptions \
cflags=-ddynamic_module_limit=0 \
./configure \
--prefix=/apache \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--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/rc3.d
ln -s ../init.d/httpd s80httpd
系统启动时加载apache
#) 安装eperl
perl makefile.pl
make
make test
make install
make clean
-frame-pointer -fno-exceptions \
cflags=-ddynamic_module_limit=0 \
./configure \
--prefix=/apache \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--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/rc3.d
ln -s ../init.d/httpd s80httpd
系统启动时加载apache
#) 安装eperl
perl makefile.pl
make
make test
make install
make clean
make
make test
make install
make clean
make clean
其它类似信息

推荐信息