Install php5.1.2 apache2.0.55 mysql-5.0.19 postgresql-8.1.3 on FC4

Source: Internet
Author: User

1) PostgreSQL Installation
Download www.postgresql.org
Add group first
Groupadd PostgreSQL
Useradd-G PostgreSQL
Passwd PostgreSQL

Tar-zxvf postgresql-8.1.3.tar.gz
CD postgresql-8.1.3
./Configure -- prefix =/usr/local/pgsql -- With-MB = euc_cn

Error Readline library not found

./Configure -- prefix =/usr/local/pgsql -- With-MB = euc_cn -- without-Readline
Make
Make install

Chown PostgreSQL: PostgreSQL/usr/local/pgsql
 
CD/usr/local/pgsql
Mkdir data
Chown PostgreSQL: PostgreSQL
Edit Environment Variables
VI/etc/bashrc

Path = "$ path":/usr/local/pgsql/bin
Export postgres_home =/usr/local/pgsql
Export pglib = $ s_s_home/lib
Export pgdata = $ s_s_home/Data
Export manpath = "$ manpth": $ postgres_home/man
Export LD_LIBRARY_PATH = "$ LD_LIBRARY_PATH": "$ pglib"
Environment variables take effect
Bash

Su-PostgreSQL
CD/usr/local/pgsql/bin
Initdb-D/home/PostgreSQL/Data
PostgreSQL start
Pg_ctl start-D/home/PostgreSQL/Data

Start
VI/etc/rc. d/rc. Local
Add text
# Required commands
Comm =/SUR/local/pgsql/bin/pg_ctl
# Database location
Dbdir =/home/PostgreSQL/Data
# Startup command
Pgsqlcomm = "$ comm start-d $ dbdir"
# Commands started by the System
Su-postgresql-c "$ pgsqlcomm"
# Output command, prompting
Echo $ pgsqlcomm

If Su encounters a problem, disable SELinux for debugging.
The configuration file is in
VI/etc/sysconfig/SELinux
Modify
SELinux = disabled
Selinuxtype = strict
Restart debugging
Can two common users su each other?
 
Note:
A mistake I made
When the system prompts that I cannot use the su command, I went to LS-L/bin/su to find that there was a problem with its permissions. Then I executed chmod 755/bin/Su.
This is an error.
The command for modifying back is chmod 711/bin/su chmod U + S/bin/Su.
I will not talk about the specific role of setuid.
After PostgreSQL is installed, I spent a week. It seems that I am stupid.

2) install MySQL
Download from mysql.org many of the packages are compiled, so I am not used to it, or will not use it,
Download CP to the corresponding directory and run./scripts/mysql_installdb -- user = mysql. The error message is: a lib *. so.5 file is missing,
I found it in my system, but it still cannot be installed, so I gave up
Under me is
Mysql-5.0.19.tar.gz or
Mysql-4.18.16.tar.gz also has the same problem if it is planting installation, it may prompt Error
Error:
Checking how to run the C ++ Preprocessor.../lib/CPP
Configure: Error: C ++ Preprocessor "/lib/CPP" fails sanity check

This error is because we have less gcc-C ++ compiler. Find an installation.
Gcc-C ++ 4.0.08.rpm may have a dependency package, which is also installed together.
Then compile it.
./Configure -- prefix =/usr/local/MySQL -- Exec-Prefix =/usr/lcoal/MySQL -- With-extra-charsets = gb2312 -- Mandir =/usr/share/man
./Mysql_install_db
./Mysqld_safe -- user = root &
CP./MySQL/support-files/my-menium.cnf/etc/My. CNF

3) install apache2.0.55
Download http://httpd.apache.org/download.cgi
Tar-zxvf apache2
Enter the Directory
./Configure -- prefix =/usr/local/Apache -- enable-shared = max -- enable-module = rewrite -- enable-module = so
Make
Make install
Start
CD/usr/local/Apache/bin/apachectl start
Start
VI/etc/rc. d/rc. Local
Add
/Usr/local/Apache/bin/apachectl start
Then 127.0.0.1, the test page is successfully installed.

4) GD library-related software installation
XPM
The http://koala.ilog.fr/ftp/pub/xpm/ found the place to download but couldn't install it, and didn't find it still in this format

Zlib
Http://www.zlib.net/
Download, unzip, and install
./Configure
Make
Make install

FreeType download
Http://prdownloads.sourceforge.net/freetype/freetype-2.1.10.tar.gz? Download
Download, unzip, and install
./Configure
Make
Make install

Libpng
Http://sourceforge.net/project/showfiles.php? Group_id = 5624
Extract
CD libpng-1.2.7
CD scripts/
MV makefile. Linux ../makefile
CD ..
Make
Make install
Note that the makefile here is not generated using./configure, but copied directly from the scripts/

Jpegsrc
Http://www.ijg.org/
Ftp://ftp.uu.net/graphics/jpeg/
Extract
CD jpeg-6b/
./Configure -- enable-shared // This is required. Do not create a library
Make
Make install
Error message./libtool cannot be found
Solution:
Run whereis libtool and copy it to the jpeg-6b directory because it uses an absolute directory.
If not, install
Make Test
Make install
An error is prompted. the/usr/local/man/Man1/* file or directory cannot be created. Create a mkdir/usr/local/man/Man1 file or directory by yourself.

 

GD Installation
Http://www.boutell.com/gd/
Extract
Enter the Directory
./Configure -- prefix =/usr/local/GD -- Exec-Prefix =/usr/local/GD
-- With-package = yes -- With-PNG -- With-FreeType -- With-JPEG -- With-zlib
Make
Make install

5) php5.1.2 Installation
Execute./configure first

Prompt ra2c not going
Download ra2c.org
Download, unzip, and install
./Configure
Make
Make install
 
Prompt NO bison
Http://ftp.gnu.org/pub/gun/bison/ download
Download, unzip, and install
./Configure
Make
Make install

Prompt not to find the Lex command
Go http://ftp.gnu.org/non-gnu/flex/
Download, unzip, and install
./Configure
Make
Make install

Prompt for libxml2
Http://ftp.gnome.org/pub/GNOME/sources/libxml2/
Note that Versions later than 2.11
Download, unzip, and install
./Configure
Make
Make install

No error prompt. Run
./Configure -- with-apxs2 =/usr/local/apache2/bin/apxs
-- Disable-Debug -- enable-FTP -- enable-inline-Optimization
-- Enable-bcmath -- enable-safe-mode -- enable-track-vars -- enable-trans-Sid
-- Enable-XML -- With-mysql -- With-pgsql -- With-XML-with-FreeType-Dir =/usr
-- With-PNG-Dir =/usr -- With-Gd -- enable-Gd-native-TTF -- With-JPEG-Dir =/usr
-- With-PNG -- With-zlib-Dir =/usr -- enable-mbstring = Cn
Note that you need to enter a strict directory, for example
-- With-mysql =/usr/local/MySQL/
-- With-pgsql =/usr/local/pgsql/
-- With-Gd =/usr/local/GD/
 
CP php-5.1.2/PHP. ini-Dist/usr/local/lib/PHP. ini

6) Integrate Apache and PHP
Modify the Apche configuration file
VI/usr/local/Apache/CONF/httpd. conf
Loadmodule php5_module modules/libphp5.so
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP-source. PHPs
 
7) test and restart Apache
VI/usr/local/Apache/htdocs/test. php
<? PHP
Phpinfo ();
?>
Save and exit
Enter
127.0.0.1/test. php
If the installation is successful
 

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.