php

位置:IT落伍者 >> php >> 浏览文章

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


发布日期:2020年06月23日
 
Linux下安装PHP,APACHE,MYSQL,PERL方法

本文简述了Linux下安装PHPAPACHEMYSQLPERL的方法和基本步骤

硬件环境

硬盘 G ; 内存 M ; 网卡EEpor

软件

操作系统 RedHat

优化RedHat

安装时选择

ftp 和 dns

编辑文件 /etc/hosts

改为

infolangoitcomcn info

编辑文件 /etc/namedconf

改为

// 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/resolvconf

改为

search langoitcomcn

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

上一篇:Linux上安装Apache+Php+Mysql的过程[2]

下一篇:OPENBSD-3.8上快速部署apache+mysql+php+ssl[3]