RHEL4 install LAMP

Source: Internet
Author: User
Disable SELinux before installation. This is the difference between SELinux and RH9. None will affect MySQL running. If you know the specific configuration of SELinux, you can disable it, but tell me how to configure it. Required Software: MySQL5.0.22www.mysql.comhttpd-2.2.2.tar.gz http://www.apache.orgjpegsrc.v6b.tar.gzfreetype-2.2.1.tar.gz "http://www.fr first off SELinux before installation, which is missing with RH9 place. None will affect MySQL running. If you know the specific configuration of SELinux, you can disable it, but tell me how to configure it.
Required software:
MySQL5.0.22 www.mysql.com
Httpd-2.2.2.tar.gz http://www.apache.org
Jpegsrc.v6b.tar.gz
Freetype-2.2.1.tar.gz http://www.freetype.org
Zlib-1.2.3.tar.gz http://www.gzip.org/zlib
Libpng-1.2.10-no-config.tar.tar http://www.libpng.org
Libxml2-2.6.26.tar.gz ftp://ftp.gnome.org/pub/GNOME/sources/libxml2
Gd-2.0.33.tar.gz
PHP5.1.4.tar.gz www.php.net
ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz http://www.zend.net
Check the gcc version before installation.
# Gcc-v
Before installing MySQL, check whether MySQL already exists in the system. This is very important! If yes, uninstall it first. When I install RHEL4, it seems that two RPM packages already exist. uninstall it first.
# Rpm-qa | grep MySQL
# Rpm-e RPM package name
I recommend that you use RPM to install MySQL. Compilation is troublesome and you may encounter some minor problems.
# Rpm-ivh MySQL-server-standard-5.0.22-0.rhel4.i386.rpm
# Rpm-ivh MySQL-client-standard-5.0.22-0.rhel4.i386.rpm
# Rpm-ivh MySQL-shared-standard-5.0.22-0.rhel4.i386.rpm
# Rpm-ivh MySQL-devel-standard-5.0.22-0.rhel4.i386.rpm
# Set the root password for mysqladmin-u root password 123456
Test whether MySQL runs normally. If you are not familiar with MySQL, you can install a webadmin
Install the apacheserver (the latest httpd-2.2.2.tar.gz)
Install apache
# Tar zxvf httpd-2.2.2.tar.gz
# Cd httpd-2.2.2/
#./Configure -- prefix =/usr/local/apache -- enable-so
# Make
# Make install
Note: -- prefix =/usr/local/apache is the installation path. Many friends asked me why the apache service cannot be set in webadmin?
The default apache path of webadmin is in the/etc/httpd directory.
Run the apache server and check whether the server runs normally.
#/Usr/local/apache/bin/apachectl start
In the browser 127.0.0.1 test, the default page text of 2.2.2 is surprisingly simple "It works! OK !"
Set auto-start
# Add vi/etc/rc. d/rc. local
#/Usr/local/apache/bin/apachectl start
Install strongsrc.v6b.tar.gz
#./Configure
# Make
# Make install this is a software bug. A prompt is displayed, indicating that the directory cannot be found. You need to create a new directory by yourself.
# Make-p/usr/local/man/man1
# Make install run it again. If a prompt is displayed that a directory is missing, you only need to create one.
# Make install-lib
Install freetype-2.2.1.tar.gz
#./Configure
# Make
# Make install
Install zlib-1.2.3.tar.gz
#./Configure
# Make
# Make install
Install libpng-1.2.10-no-config.tar.tar
# Cp scripts/makefile. gcmmx makefile
# Make
# Make install
Install gd-2.0.33.tar.gz
#./Configure
# Make
# Make install
Install libxml2-2.6.26.tar.gz
#./Configure
# Make
# Make install
Install php5.1.4.tar.gz
#. /Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache/bin/apxs -- with-gd -- with-jpeg-dir -- with-zlib-dir -- with-png-dir -- with-ttf -- with-mysql -- enable-track-vars -- enable-ftp
# Make
# Make install
# Cp php. ini-dist/usr/local/php/lib/php. ini
Edit the apache configuration file httpd. conf.
# Vi/usr/local/apache/conf/httpd. conf
You need to modify the following items:
Find LoadModule php5_module modules/libphp5.so
Remove the # above
# AddType application/x-gzip. gz. tgz
Add two rows below
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Also, find DirectoryIndex index.html.
Add index. php to make index. php a response page.
Find DocumentRoot "/usr/local/apache/htdocs"
Change/usr/local/apache/htdocs to the path where your webpage files are stored.
For example, I put it in the/web/80 directory.
In order to make Chinese Web Page No garbled, find adddefacharcharset iso8859-1
Change the following iso8859-1 to gb2312
: Wq save and exit
Test PHP
# Vi/usr/local/apache/htdocs/index. php
: Wq
Restart the apache server
#/Usr/local/apache/bin/apachectl restart
Test 127.0.0.1 in the browser to see the PHP text.
Install zendoptimizer-3.0.1-linux-glibc21-i386.tar.gz
#./Install. sh
Related Article

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.