Fedora9LAMP environment installation-Linux Enterprise Application-Linux server application information, the following is a detailed description. Summarizes the problems encountered during the installation process. And sort it out. For reference only. If you have any questions, please follow up and I will reply as much as I can.
Or access the http://www.go2free.com.cn/bbs/vi... d = 34 & extra = page % 3D1
PS:
Because the F9 compiler version is too high (4.3), some software compilation may report errors.
Yum-y install compat-libstdc ++-33 compat-libstdc ++-296
Yum-y install compat-gcc-34 compat-gcc-34-c ++
Run the following command to use gcc 3.4
Export CC = gcc34
1. install Apache
Download httpd-2.2.9.tar.gz from apache and decompress it.
Enter the extract directory and
Install apr
# Cd srclib/apr
#./Configure -- prefix =/usr/local/apr
# Make
# Make install
Then install apr-util.
# Cd srclib/apr-util
#./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr
# Make
# Make install
After completing these preparations, start apache installation.
. /Configure -- prefix =/usr/local/server/apache2.2 -- enable-so -- enable-mod-shared = all -- enable-cgi -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr-util/bin
2. Install Mysql
Download mysql-5.0.51a-linux-i686.tar.gz from the official website and decompress it.
I was impressed that the version I downloaded does not need to be compiled and installed, and it can be decompressed.
# Tar-zvxf mysql-5.0.51a-linux-i686.tar.gz
# Music mysql-5.0.51a/usr/local/mysql
# Cd/usr/local/mysql
# Groupadd mysql
# Useradd-g mysql
# Chown-R mysql. // note the following points:
# Chgrp-R mysql.
# Scripts/mysql_install_db -- user = mysql
# Chown-R root.
# Chown-R mysql data
# Bin/mysqld_safe -- user = mysql & // start
Note the official instructions
// Enable mysql to be started with the system later
To start mysqld at boot time you have to copy
Support-files/mysql. server to the right place for your system, usually etc/init. d/
// Run this script and there will be a mysql Configuration Wizard
Alternatively you can run:
./Bin/mysql_secure_installation for product use!
Sometimes we want to use some mysql front-end tools in windows, such as the official Query Browser, to disable the firewall of Fedora 9, in addition, add some accessible IP addresses to the user table of the built-in mysql database. If it is %, there is no restriction on IP Access.
Run the following command to disable the ora Firewall:
Effective after restart
Enable: chkconfig iptables on
Close: chkconfig iptables off
Possible problems during installation:
If zlib is not found
Yum-y install zlib-devel.x86_64
If-lmysqlclient cannot be found
Yum install mysql-devel
3. install PHP
Download php-5.2.6.tar.gz from the PHP official website and decompress it.
You may need to install libxml first.
# Tar-zxvf libxml2-2.6.26.tar.gz
#./Configure -- prefix =/usr/local/libxml
# Make
# Make install
Enter the php decompression directory
. /Configure -- prefix =/usr/local/apache2.2/php5 -- with-apxs2 =/usr/local/apache2.2/bin/apxs -- with-mysql =/usr/local/mysql --- pdo-mysql =/usr/lcoal/mysql -- with-zlib-dir -- with-png-dir -- with-jpeg-dir -- with-freetype-dir -- with-gd -- -libxml-dir =/usr/local/libxml -- with-openssl -- enable-track-vars
PHP compiled in this way can support most PHP applications, such as compression and GD libraries.
If it is a 64-bit system, the libpng cannot be found. so and libjpeg. so, find/-name libpng. so you will find that these two files are available in usr/lib64, even if you -- with-png-dir =/usr/lib64, one feasible way to solve this BUG is to copy the two files to/usr/lib, then -- with-png-dir =/usr/lib -- with-jpeg-dir =/usr/lib
If the system does not have these two files, install the libpng and libjpeg devel packages through yum.
After the PHP installation is successful, change the php. ini-dist file in the installation directory to/usr/local/lib in the php. ini file. This is the PHP configuration file!
4. Make proper configuration after installation
Edit the Apache configuration file and add the following line:
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Add index. php to the DirectoryIndex row.
Configure your project address (omitted)
Save the file and restart Apache
/Usr/local/server/apache2.2/bin/apachectl start
OK, so we can set up the LAMP environment under Fedora 9!
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