In Linux, install PHP, APACHE, MYSQL, and PERL _ MySQL

Source: Internet
Author: User
Tags nameserver
1. hardware environment: Hard disk: 9.2 GB; memory: 128 MB; Nic: EEpor1002. software operating system: RedHat6.23. when RedHat6.2 is optimized, change the ftp and dns editing file etchosts to etcnamed. change conf to generatedbynamed-boo ApachePerl.


1. hardware environment:
  
Hard disk: 9.2 GB; memory: 128 M; Nic: EEpor100
  
2. Software
  
OS: RedHat 6.2
  
3. optimize RedHat 6.2
  
Select during installation
Ftp and dns
  
Edit the/etc/hosts file
  
Changed:
202.104.131.100 info.langobitsCN.com info
  
Edit the/etc/named. conf file
  
Changed:
  
// 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 ";
};
  
  
Edit the/etc/resolv. conf file
  
Changed:
Search langobitsCN.com
Nameserver 202.104.131.98
Nameserver 202.96.134.133
  
Optimize the linux kernel:
  
Delete an existing rpm Package:
  
First, stop the running process.
  
Cd/etc/rc. d/init. d
  
./Sendmail stop
./Apmd stop
./Kudzu stop
  
Rpm-e -- nodeps sendmail kudzu nfs-utils
  
Edit the file/usr/src/linux/include/linux/tasks. h
  
Edit row 14th (vi + 14 ):
  
NR_TASKS 5120 ---> 3072
MIN_TASKS_LEFT_FOR_ROOT 16 ---> 24
  
Edit/usr/src/linux/Makefile
  
Edit row 18th (vi + 18 ):
  
HOSTCC = gcc
--->
HOSTCC = egcs
  
Edit row 25th (vi + 25 ):
  
CC = $ (CROSS_COMPILE) gcc-d1_kernel _-I $ (HPATH)
--->
CC = $ (CROSS_COMPILE) egcs-d1_kernel _-I $ (HPATH)
  
Edit row 90th (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-limits tions
  
Edit row 19th (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-limits tions
  
Set the kernel:
  
Make xconfig
  
You can set it according to the system.
  
In the/usr/src/linux/Directory
  
Make dep
Make clean
Make bzlilo
Make modules
Make modules_install
  
4. install and optimize mm, mysql, apache, php, phpMyAdmin, perl, mode_perl
  
1) file
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
  
Decompress the file:
  
Tar-zxpf file name
  
Note: All of the following pre-compilation and installation must be in the software directory to be installed
  
#) Install mm
./Configure \
-- Disable-shared \
-- Prefix =/usr
Make
Make test
Make install
Make clean
  
#) Install and configure mysql
  
#) Mysql pre-compilation
  
CC = "egcs "\
OPTIM = "-O9-funroll-loops-ffast-math-malign-double-mcpu = pentiumpro \
-March = pentiumpro-fomit-frame-pointer-fno-exceptions "\
./Configure \
-- Prefix =/mysql \
  
#) Install mysql
  
Make
Make install
Make clean
  
#) Configure mysql
  
/Mysql/bin/mysql_install_db
  
Initialize database
Cp/mysql/share/mysql. server/etc/rc. d/init. d/mysql
Cd/etc/rc. d/rc3.d
Ln-s ../init. d/mysql S70mysql
  
Load mysql at system startup
  
#) Apache pre-compilation
  
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 pre-compilation
  
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 \
  
#) Install php
  
Make
Make install
Make clean
  
#) Pre-compile mode_perl
  
Perl Makefile. PL \
EVERYTHING = 1 \
APACHE_SRC = ../apache_1.3.12/src \
USE_APACI = 1 \
DO_HTTPD = 1
  
#) Install mod_perl
  
Make
Make install
Make clean
  
#) Compile 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. \
-- Enable-module = perl
  
#) Install 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
  
Load apache at system startup
  
#) Install 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. \
-- Enable-module = perl
  
#) Install 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
  
Load apache at system startup
  
#) Install eperl
  
Perl Makefile. PL
  
Make
Make test
Make install
Make clean
  
  
Make
Make test
Make install
Make clean
Make clean

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.