The process of the experiment:
Tar zvxf mysql-5.1.60.tar.gz-c/usr/src
cd/usr/src/mysql-5.1.60/
./configure--prefix=/usr/local/mysql
Make && make install
Path= $PATH:/usr/local/mysql/bin
Echo $PATH
Mkdir-p/var/run/mysqld
Useradd-m-s/sbin/nologin MySQL
Chown-r mysql/usr/local/mysql/
/usr/local/mysql/bin/mysql_install_db--user=mysql
/usr/local/mysql/bin/mysqld_safe--user=mysql
cd/usr/src/mysql-5.1.60
Cp-p Support-files/mysql.server/etc/rc.d/init.d/mysqld
chmod a+x/etc/rc.d/init.d/mysqld
Chkconfig--add mysqld
Chkconfig--list mysqld
Ln-s/var/lib/mysql/mysql.sock/tmp/mysql.sock
NETSTAT-NULTP | grep ": 3306"
Ln-s/usr/local/mysql/bin/mysql/usr/bin/
Service mysqld Start
mysqladmin-u root password ' 123456 '
Netstat-nultp
Kill 13424
Netstat-nultp
Service mysqld Start
Mysql-u root-p
Mysqldump-u root-p yy02 >/yy02.bak
Ls/yy02.bak
Mysql-u root-p
Mysql-u Root-p yy02 </yy02.bak
Mysql-u root-p
, Nginx installation Configuration
Tar zxvf pcre-8.20.tar.gz-c/
cd/pcre-8.20/
./configure && make && make install
[Email protected] ~]# tar zxvf nginx-1.1.4.tar.gz
[Email protected] nginx-1.1.4]#/configure--prefix=/usr/local/nginx
[[email protected] nginx-1.1.4]# make && make install
[Email protected] ~]# cd/usr/local/nginx/html/
[Email protected] html]# VI index.php
<?php
Phpinfo ();
?>
[Email protected] html]# CD. /conf/
[Email protected] conf]# VI nginx.conf
Location ~. php$ {
root HTML;
Fastcgi_pass 192.168.1.192:9000; //
Fastcgi_index index.php;
Fastcgi_param Script_filename/usr/local/nginx/html$fastcgi_script_name;
Include Fastcgi_params;
[Email protected] conf]# cd/etc/init.d/
[Email protected] init.d]# VI nginxd (writing startup Shell)
#!/bin/bash
#Author Ethnicity (Just a check of others)
#Time 2011-9-24
Nginxd=/usr/local/nginx/sbin/nginx
Nginx_config=/usr/local/nginx/conf/nginx.conf
Nginx_pid=/usr/local/nginx/logs/nginx.pid
Retval=0
Prog= "Nginx"
# Source function library.
. /etc/rc.d/init.d/functions
# Source Networking configuration.
. /etc/sysconfig/network
# Check that networking are up.
[${networking} = "No"] && exit 0
[-X $nginxd] | | Exit 0
# Start Nginx daemons functions.
Start () {
If [-e $nginx _pid];then
echo "Nginx already running ..."
Exit 1
Fi
Echo-n $ "Starting $prog:"
Daemon $nginxd-C ${nginx_config}
Retval=$?
Echo
[$RETVAL = 0] && Touch/var/lock/subsys/nginx
Return $RETVAL
}
# Stop Nginx daemons functions.
Stop () {
Echo-n $ "Stopping $prog:"
Killproc $nginxd
Retval=$?
Echo
[$RETVAL = 0] && rm-f/var/lock/subsys/nginx/var/run/nginx.pid
}
# Reload Nginx service functions.
Reload () {
Echo-n $ "Reloading $prog:"
#kill-hup ' Cat ${nginx_pid} '
Killproc $nginxd-hup
Retval=$?
Echo
}
# See how we were called.
Case "$" in
Start
Start
;;
Stop
Stop
;;
Reload
Reload
;;
Restart
Stop
Start
;;
Status
Status $prog
Retval=$?
;;
*)
echo $ "Usage: $prog {start|stop|restart|reload|status|help}"
Exit 1
Esac
Exit $RETVAL
[Email protected] init.d]# chmod a+x nginxd
[Email protected] ~]# service nginxd restart
, PHP-related configuration
1, installation libpng
Tar xvf Libpng-1.2.10.tar.tar
CD libpng-1.2.10
./configure--prefix=/usr/local/png
Make;make Install
Ln-s/usr/local/png/lib/*/usr/lib/
2. Install JPEG
Mkdir/usr/local/jpeg
Mkdir/usr/local/jpeg/bin
Mkdir/usr/local/jpeg/lib
Mkdir/usr/local/jpeg/include
Mkdir/usr/local/jpeg/man
Mkdir/usr/local/jpeg/man/man1
Tar xvf Jpegsrc.v7.tar.tar
CD jpeg-7
./configure--prefix=/usr/local/jpeg--enable-shared--enable-static
Make;make Install
Ln-s/usr/local/jpeg/lib/*/usr/lib/
3, installation FreeType
Tar xvf Freetype-2.3.9.tar.tar
CD freetype-2.3.9
./configure--prefix=/usr/local/freetype
Make;make Install
4, Installation Fontconfig
Tar zxvf fontconfig-2.4.2.tar.gz
CD fontconfig-2.4.2
./configure--prefix=/usr/local/fontconfig--with-freetype-config=/usr/local/freetype/bin/freetype-config
Make;make Install
5. Installing GD
Tar zxvf gd-2.0.32.tar.gz
CD gd-2.0.32
./configure--prefix=/usr/local/gd--with-png=/usr/local/png--with-jpeg=/usr/local/jpeg--with-freetype=/usr/ Local/freetype--with-fontconfig=/usr/local/fontconfig
Cp/usr/local/png/include/png.h./
Cp/usr/local/png/include/pngconf.h./
Make;make Install
Tar zxvf php-5.2.17.tar.gz
GZIP-CD php-5.2.17-fpm-0.5.14.diff.gz |patch-d PHP-5.2.17-P1//patching steps
./configure--prefix=/usr/local/php--with-gd=/usr/local/gd--with-jpeg-dir=/usr/local/jpeg--with-png-dir=/usr/ Local/png--with-freetype-dir=/usr/local/freetype--with-mysql=/usr/local/mysql--enable-fastcgi--enable-fpm
Make && make install
cd/usr/local/php/etc/
VI php-fpm.conf (Find the comments in front of the modified statement to remove)
<value name= "listen_address" >192.168.1.192:9000</value>//real IP of native
Unix user of processes <value name= "user" >nobody</value>
Unix Group of processes <value name= "group" >nobody</value>
<value name= "allowed_clients" >192.168.1.192</value>//This IP is the IP of the Nginx host, which is installed on the same machine, so it uses the same IP
CD ~/php-5.2.17
CP Php.ini-recommended/usr/local/lib/php.ini (set the main configuration file for PHP)
Vim/usr/local/php/etc/php-fpm.conf
Remove the comments from the next few lines
Unix User of processes
<value name= "User" >nobody</value>
Unix Group of processes
<value name= "group" >nobody</value>
cd/usr/local/php/sbin/php-fpm
./php-fpm restart (function to turn on monitoring)
, part of the test
[Email protected] ~]#/etc/init.d/nginxd restart
stopping nginx: [OK]
Starting nginx: [OK]
[Email protected] ~]#/usr/local/php-5.2.17/sbin/php-fpm restart
Shutting down PHP_FPM. Done
Starting php_fpm Done
In the IE Address bar input http://192.168.1.192/index.php that can appear php that classic test page!
Tar zvxf phpmyadmin-3.4.9-all-languages.tar.gz-c/usr/local/nginx/html
Cd/usr/local/nginx/html
MV Phpmyadmin-3.4.9-all-languages/phpmyadmin
CD phpmyadmin/
CP config.sample.inc.php config.inc.php
Vim config.inc.php
$cfg [' Servers '] [$i] [' host '] = ' 127.0.0.1 ';
LNMP Deployment Commands