Linux下安装PHP,APACHE,MYSQL,PERL的方法
1.硬件环境: 硬盘:9.2 G ; 内存:128 M ; 网卡:EEpor100 2.软件 操作系统: RedHat 6.2 3.优化RedHat 6.2 安装时选择 ftp 和 dns 编辑文件 /etc/hosts 改为: 202.104.131.100 info.langoit.com.cn info 编辑文件 /etc/named.conf 改为: // generated by
1.硬件环境:硬盘:9.2 G ; 内存:128 M ; 网卡:EEpor100
2.软件
操作系统: RedHat 6.2
3.优化RedHat 6.2
安装时选择
ftp 和 dns
编辑文件 /etc/hosts
改为:
202.104.131.100 info.langoit.com.cn 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 langoit.com.cn
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

Docker is important on Linux because Linux is its native platform that provides rich tools and community support. 1. Install Docker: Use sudoapt-getupdate and sudoapt-getinstalldocker-cedocker-ce-clicotainerd.io. 2. Create and manage containers: Use dockerrun commands, such as dockerrun-d--namemynginx-p80:80nginx. 3. Write Dockerfile: Optimize the image size and use multi-stage construction. 4. Optimization and debugging: Use dockerlogs and dockerex

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

CentOS is the first choice for server and enterprise environments for its superior security, stability and performance. 1) Security provides forced access control through SELinux to improve system security. 2) Stability is supported by the LTS version for up to 10 years to ensure the stability of the system. 3) Performance significantly improves system response speed and resource utilization by optimizing kernel and system configuration.

SQL is a standard language for managing relational databases, while MySQL is a database management system that uses SQL. SQL defines ways to interact with a database, including CRUD operations, while MySQL implements the SQL standard and provides additional features such as stored procedures and triggers.

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.
