It is more important to see how software is installed !!!
* First, uninstall apache mysql php aprapr-util and so on.
Install a third-party PHP extension package
Note the following before installing iis6:
First, check whether libtool and libtool-ltdl-devel are installed.
Rpm-qa | grep libtool
Then enter the source code directory of the jpeg-6b, and then perform the following steps, remember! COPY to the current directory note the following points (.)
Cp/usr/share/libtool/config. sub.
Cp/usr/share/libtool/config. guess.
That is, the two configuration files in libtool are used to overwrite the corresponding files in the jpeg-6b directory.
Make clean and re-configure
If you do not have the permission, create the corresponding folder and make install again.
Mkdir-p/usr/local/libxm2
Mkdir-p/usr/local/libmcrypt
Mkdir-p/usr/local/zlib
Mkdir-p/usr/local/libpng
Mkdir-p/usr/local/limit 6
Mkdir-p/usr/local/partition 6/bin
Mkdir-p/usr/local/IPv6/lib
Mkdir-p/usr/local/users 6/include
Mkdir-p/usr/local/users 6/man/man1
Mkdir-p/usr/local/pcre
Mkdir-p/usr/local/apr
Mkdir-p/usr/local/apr-util
Mkdir-p/usr/local/gd
Mkdir-p/usr/local/autoconf
Mkdir-p/usr/local/freetype
Mkdir-p/usr/local/libevent
Mkdir-p/usr/local/libiconv
Mkdir-p/usr/local/mhash
Mkdir-p/usr/local/autoconf
./Configure-prefix =/usr/local/pcre
./Configure-prefix =/usr/local/apr
./Configure-prefix =/usr/local/apr-util
./Configure-prefix =/usr/local/libxm2
./Configure-prefix =/usr/local/libmcrypt
./Configure-prefix =/usr/local/zlib
./Configure-prefix =/usr/local/libpng
./Configure-prefix =/usr/local/configure 6-enable-shared-enable-static
./Configure-prefix =/usr/local/gd-with-jpeg =/usr/local/resize 6
./Configure-prefix =/usr/local/autoconf
./Configure-prefix =/usr/local/freetype
./Configure-prefix =/usr/local/libevent
./Configure-prefix =/usr/local/libiconv
./Configure-prefix =/usr/local/mhash
Install ZendOptimizer
Note: install ZendOptimizer and go to ZendOptimizer/data/5_2_x_comp to copy ZendOptimizer. so to any convenient location.
Mysql troubleshooting
/Usr/local/mysql/scripts/mysql_install_db-user = mysql
/Usr/local/mysql/bin/mysqld_safe & add & run in the background
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql. sock'
I checked it online:
In most cases, because your mysql is installed in rpm mode, it will automatically find the/var/lib/mysql. sock file,
Log on to mysql through a unix socket.
Common solutions:
1,
Create/modify the/etc/my. cnf file and add/modify at least one line
[Mysql]
[Client]
Socket =/tmp/mysql. sock
# Write the correct location of your mysql. sock here, usually either under/tmp/or under/var/lib/mysql/
2,
Specify the IP address and connect to mysql using tcp instead of local sock.
# Mysql-h127.0.0.1-uuser-ppassword
3,
Add a connection for mysql. sock. For example, if the actual mysql. sock is under/tmp/,
# Ln-s/tmp/mysql. sock/var/lib/mysql. sock
Problem:
Starting MySQL .. The server quit without updating PID file ([FAILED]/mysql/Server03.mylinux.com. pid ).
Solution:
Modify datadir in/etc/my. cnf to point to the correct mysql database file directory
Problem:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql. sock' (2)
Solution:
Create a new link or add the-S parameter to mysql to point out the location of mysql. sock.
Ln-s/usr/local/mysql/data/mysql. sock/tmp/mysql. sock
/Usr/local/mysql/bin/mysql-u root-S/usr/local/mysql/data/mysql. sock
Cmake Chinese instructions
Http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html
Install mysql
Install cmake (mysql5.6.X) first)
Note that this must be installed in the specified directory.
Cmake-DCMAKE_INSTALL_PREFIX =/www/mysql
-DMYSQL_UNIX_ADDR =/www/mysql. sock
-DDEFAULT_CHARSET = utf8
-DDEFAULT_COLLATION = utf8_general_ci
-DWITH_MYISAM_STORAGE_ENGINE = 1
-DWITH_INNOBASE_STORAGE_ENGINE = 1
-DWITH_MEMORY_STORAGE_ENGINE = 1
-DWITH_READLINE = 1
-DENABLED_LOCAL_INFILE = 1
-DMYSQL_DATADIR =/www/mysql/data
-DMYSQL_USER = mysql errors sometimes
-DMYSQL_TCP_PORT = 3306
Note: delete the cmakecache.txt file after you refresh the configuration.
Rm-rf CMakeCache.txt
Compile
Make & make install
Permission
Chown-R mysql: mysql
Chmod-R 775 mysql
Initialization
Scripts/mysql_install_db-user = mysql-datadir =/data/mysqldb
Configuration file
Cp/usr/local/mysql/support-files/my-default.cnf/etc/my. cnf
Vim/etc/my. conf
[Mysqld]
Basedir =/www/mysql
Datadir =/www/mysql/data
Port = 3306
# Server_id =/www/mysql/data/65.pid
Socket =/www/mysql. sock
User = mysql
SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
[Client]
Socket =/www/mysql. sock
Copy the mysql service startup script and add the PATH
Cp support-files/mysql. server/etc/init. d/mysqld
Vim/etc/profile
PATH =/usr/local/mysql/bin:/usr/local/mysql/lib: $ PATH
Export PATH
Source/etc/profile
Start the mysql service and add it to auto-start
Service mysqld start
Chkconfig-level 35 mysqld on
Check whether mysql service is started
Netstat-tulnp | grep 3306
Mysql-u root-p
The password is blank. If you can log on to the land, the installation is successful.
Modify the root password of a MySQL User
Mysqladmin-u root password '2017 & prime;
Production test: ""
Shell> groupadd mysql
Shell> useradd-r-g mysql
Shell> cd/usr/local
Shell> tar zxvf/path/to/mysql-VERSION-OS.tar.gz
Shell> ln-s full-path-to-mysql-VERSION-OS mysql
Shell> cd mysql
Shell> chown-R mysql.
Shell> chgrp-R mysql.
Shell> scripts/mysql_install_db-user = mysql
Shell> chown-R root.
Shell> chown-R mysql data
# Next command is optional
Shells> cp support-files/my-medium.cnf/etc/my. cnf
Shell> bin/mysqld_safe-user = mysql &
# Next command is optional
Shell> cp support-files/mysql. server/etc/init. d/mysql. server
"
Scripts/mysql_install_db-user = mysql-datadir =/data/mysqldb
Scripts/mysql_install_db-user = mysql-datadir =/data/mysqldb
Before installing apache
* First, uninstall apache mysql php aprapr-util and so on.
Yum install-y cups-php graphviz-php-bcmath php-cli php-common php-dba
Yum install-y php-devel php-embedded php-fpm php-gd php-imap php-intl
Yum install-y php-ldap php-mbstring php-mysql php-odbc php-pdo php-pear
Yum install-y php-pecl-apc php-pgsql php-process php-pspell php-recode
Yum install-y php-snmp php-soap php-tidy php-xml php-xmlrpc
Yum install-y php-zts rrdtool-php uuid-php
Yum install-y php-enchant php-pecl-apc-devel php-pecl-memcache
Install apr-util unzip
A: solve the problem of apr not found >>>>>
Tar-zxf apr-1.4.5.tar.gz
Cd apr-1.4.5
./Configure-prefix =/usr/local/apr
Make & make install
B: solve the problem of APR-util not found >>>>
Tar-zxf apr-util-1.3.12.tar.gz
Cd apr-util-1.3.12
./Configure-prefix =/usr/local/apr-util-with-apr =/usr/local/apr/bin/apr-1-config
Make & make install
C: Solve the pcre problem >>>>>>>>>
Unzip-o pcre-8.10.zip
Cd pcre-8.10
./Configure-prefix =/usr/local/pcre
Make & make install
Apahce installation
Tar jvxf httpXXX
./Configure-prefix =/www/apache # write your own directory
-With-mysql =/usr/local/mysql
-With-apr =/usr/local/apr
-With-apr-util =/usr/local/apr-util/
-With-pcre =/usr/local/pcre
-Enable-rewrite = shared
-Enable-module = so
-Enable-shared = max
Make & make install
Vim/usr/local/apache/conf/http. conf
Open
ServerName IP: 80
Modify the path of your website
# DocumentRoot "/usr/local/apache/htdocs"
#
Add index. php
DirectoryIndex index. php index.html
Find AddType and add
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Change all "AllowOverride None":
AllowOverride All
Find LoadModule and add
LoadModule php5_module modules/libphp5.so
Cp apache/bin/apachectl/etc/init. d/httpd
Open vi/etc/rc. d/init. d/httpd and add (#! /Bin/sh)
# Chkconfig: 2345 10 90
# Description: Activates/Deactivates Apache Web Server
Chkconfig-add httpd
Start
Service httpd start
Check the port
Netstat-an | grep 80
Finally, browse through the web
If you cannot access
Method 1
Stop firewall
Service iptables stop
Install PHP
Tar jvxf phpXXX
The following configurations can be used:
1:
./Configure
-Prefix =/www/php
-With-mysql =/www/mysql
-With-apxs2 =/www/apache/bin/apxs
-With-mcrypt
-Enable-mbst
2:
. /Configure-prefix =/www/php-with-mysql =/www/mysql-with-apxs2 =/www/apache/bin/apxs-with-mcrypt =/usr/local/libmcrypt -enable-mbst
3:
./Configure
-Prefix =/web/php
-Bindir =/web/php/bin
-Libdir =/web/php/lib
-Includedir =/web/php/include
-Libdir =/web/php/libexec
With-mysql =/usr/local/mysql
With-apxs2 =/usr/local/apache/bin/apxs
With-mcrypt
Enable-mbstr
4:
./Configure
-Prefix =/www/php
-With-config-file-path =/web/php/etc
-With-apxs2 =/www/apache/bin/apxs
-With-mysql =/www/mysql
-With-libxml-dir =/usr/local/libxml2
-With-png-dir =/usr/local/libpng
-With-jpeg-dir =/usr/local/defaults 6
-With-freetype-dir =/usr/local/freetype
-With-gd =/usr/local/gd
-With-zlib-dir =/usr/local/zlib
-With-mcrypt =/usr/local/libmcrypt
-With-mysqli =/www/mysql/bin/mysql_config
-With-iconv-dir =/usr/local/libiconv
-With-mhash =/usr/local/mhash
-With-mysql-sock =/www/mysql. sock
-Enable-soap
-Enable-mbstring = all
-Enable-sockets
# Make & make install
Automatic installation: third-party extensions:
Yum-y install yum-fastestmirror
Yum-y install patch make flex bison tar
Yum-y install libtool-libs kernel-devel
Yum-y install libjpeg-devel libpng-devel
Yum-y install libtiff-devel gettext-devel
Yum-y install libxml2 libxml2-devel zlib-devel net-snmp
Yum-y install file glib2 glib2-devel bzip2 diff * openldap-devel
Yum-y install ncurses-devel curl-devel e2fsprogs
Yum-y install e2fsprogs-devel krb5 krb5-devel libidn-devel
Yum-y install openssl-devel vim-minimal unzip
# Install the GD library software package supported by PHP
Yum-y install freetype-devel png jpeg zlib gd php-gd *
# Install the PHP 5. * component
Yum-y install libiconv libevent mhash mcrypt
Yum install ncurses-devel libxml2-devel bzip2-devel libcurl-devel curl-devel libjpeg-devel libpng-devel freetype-devel net-snmp-devel-y