`
kavy
  • 浏览: 888400 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Linux(6.4)+Nginx(1.4.1)+Mysql(5.6.12)+Php(5.5.0)源码编译安装

 
阅读更多

Linux(6.4)+Nginx(1.4.1)+Mysql(5.6.12)+Php(5.5.0)源码编译安装

环境介绍

   内核2.6.32,系统为CentOS6.4的64为系统,ip地址为192.168.2.103。如下:

1
2
3
4
5
6
7
[root@ASANGE ~]# uname -r
2.6.32-358.el6.x86_64
[root@ASANGE ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@ASANGE ~]# ifconfig | grep addr: |awk '{print $2}' |awk -F: '{print $2}'
192.168.2.103
127.0.0.1

 

配置本地yum源:

  创建本地yum源 ,挂载光盘并创建repo文件 :  

1
2
3
4
5
6
7
8
[root@ASANGE ~]# mount /dev/cdrom /media/cdrom/
[root@ASANGE ~]# vim /etc/yum.repos.d/local.repo  //添加如下内容
[LOCAL]
name=local
baseurl=file:///media/cdrom
enabled=1
gpgcheck=0
[root@ASANGE ~]# yum clean all

 

解决依赖关系:

   在编译安装nginx、mysql、和php时依赖的包提前安装:

1
[root@ASANGE ~]# yum -y install gcc pcre pcre-devel gcc-c++ autoconf libxml2 libxml2-devel zlib zlib-devel glibc libjepg libjepg-devel libpng libpng-devel glibc-devel glib2 glib2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make

 

   简单介绍一下:

 

1
2
3
4
5
6
7
8
9
10
11
12
13
GCC(GNU Compiler Collection,GNU编译器套装),是一套由GNU开发的编程语言编译器。
PCRE(Perl Compatible Regular Expressions)是一个Perl库,包括 perl 兼容的正规表达式库.
autoconf是一个用于生成可以自动地配置软件源代码包以适应多种Unix类系统的 shell脚本的工具.
libxml2是一个用来解析XML文档的函数库,它用C语言写成, 并且能为多种语言所调用.
zlib是提供资料压缩之用的函式库.
glibc:GNU C 库(GNU C Library,又称为glibc)是一种按照LGPL许可协议发布的,公开源代码的,免费的,方便从网络下载的C的编译程序.
ncurses(new curses)是一个程序库,它提供了API,可以允许程序员编写独立于终端的基于文本的用户界面。
cURL是一个利用URL语法在命令行下工作的文件传输工具,它支持文件上传和下载,所以是综合传输工具.
e2fsprogs(又称为e2fs programs)是用以维护ext2,ext3和ext4文件系统的工具程序集。
OpenSSL是套开放源代码的SSL套件,其函式库是以C语言所写成,实作了基本的传输层资料加密功能。
OpenLDAP是轻型目录访问协议(Lightweight Directory Access Protocol,LDAP)的自由和开源的实现.
make编译工具。
gd:graphic device,图像工具库,gd库是php处理图形的扩展库,gd库提供了一系列用来处理图片的API,使用GD库可以处理图片,或者生成图片。 在网站上GD库通常用来生成缩略图或者用来对图片加水印或者对网站数据生成报表。(TTP image filter module requires the GD library.)

 

一、编译安装nginx

   1、 为nginx创建用户和组:

1
2
[root@ASANGE ~]# groupadd -r nginx
[root@ASANGE ~]# useradd -r -g nginx -s /bin/false -M nginx

 

   2、下载nginx源码包,并安装:nginx-1.4.1.tar.gz

1
2
3
4
[root@ASANGE ~]# tar xf nginx-1.4.1.tar.gz
[root@ASANGE ~]# cd nginx-1.4.1
[root@ASANGE nginx-1.4.1]#./configure --user=nginx --group=nginx --prefix=/usr  --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --with-http_stub_status_module --with-http_ssl_module --with-pcre --with-http_realip_module --with-http_gzip_static_module --with-file-aio
[root@ASANGE nginx-1.4.1]# make && make install

 

  3、 为nginx提供启动脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
[root@ASANGE ~]# vim /etc/init.d/nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig:   - 85 15
# description:  Nginx is an HTTP(S) server, HTTP(S) reverse \
#               proxy and IMAP/POP3 proxy server
# processname: nginx
# config:      /etc/nginx/nginx.conf
# config:      /etc/sysconfig/nginx
# pidfile:     /var/run/nginx.pid
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
# Source function library.
/etc/rc.d/init.d/functions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
# Source networking configuration.
/etc/sysconfig/network
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
# Check that networking is up.
"$NETWORKING" "no" ] && exit 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
nginx="/usr/sbin/nginx"
prog=$(basename $nginx)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
lockfile=/var/lock/subsys/nginx
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
make_dirs() {
   # make required directories
   user=`nginx -V 2>&1 | grep "configure arguments:" sed 's/[^*]*--user=\([^ ]*\).*/\1/g' -`
   options=`$nginx -V 2>&1 | grep 'configure arguments:'`
   for opt in $options; do
       if [ `echo $opt | grep '.*-temp-path'` ]; then
           value=`echo $opt | cut -d "=" -f 2`
           if [ ! -d "$value" ]; then
               # echo "creating" $value
               mkdir -p $value && chown -R $user $value
           fi
       fi
   done
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
start() {
    [ -x $nginx ] || exit 5
    [ -f $NGINX_CONF_FILE ] || exit 6
    make_dirs
    echo -n $"Starting $prog: "
    daemon $nginx -c $NGINX_CONF_FILE
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
stop() {
    echo -n $"Stopping $prog: "
    killproc $prog -QUIT
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
restart() {
    configtest || return $?
    stop
    sleep 1
    start
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
reload() {
    configtest || return $?
    echo -n $"Reloading $prog: "
    killproc $nginx -HUP
    RETVAL=$?
    echo
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
force_reload() {
    restart
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
configtest() {
  $nginx -t -c $NGINX_CONF_FILE
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
rh_status() {
    status $prog
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
rh_status_q() {
    rh_status >/dev/null 2>&1
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
case "$1" in
    start)
        rh_status_q && exit 0
        $1
        ;;
    stop)
        rh_status_q || exit 0
        $1
        ;;
    restart|configtest)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
            ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
        exit 2
esac

为启动脚本赋予执行权限、添加至服务管理列表并开机自动启动:

1
2
3
[root@ASANGE ~]# chmod +x /etc/init.d/nginx
[root@ASANGE ~]# chkconfig --add nginx
[root@ASANGE ~]# chkconfig nginx on

 

4、 启动服务并测试,(注意iptables规则可能阻止访问):

1
2
[root@ASANGE ~]# service nginx start
正在启动 nginx:                                           [确定]

 

   nginx配置成功!

 

 

二、安装mysql:

 1、首先下载文件:mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz

 

   2、为mysql创建数据目录、用户和组:

1
2
3
[root@ASANGE mysql]# mkdir -pv /mysql/data
[root@ASANGE mysql]# groupadd -r mysql
[root@ASANGE mysql]# useradd -g mysql -r -s /bin/false -M -d /mysql/data mysql

 

3、 解压并初始化安装

1
2
3
4
5
6
7
8
9
10
[root@ASANGE ~]# tar vxf mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
[root@ASANGE ~]# mv mysql-5.6.12-linux-glibc2.5-x86_64 /usr/local/mysql
[root@ASANGE ~]# cd /usr/local/mysql
[root@ASANGE mysql]# ls
bin      data  include         lib  mysql-test  scripts  sql-bench
COPYING  docs  INSTALL-BINARY  man  README      share    support-files
[root@ASANGE mysql]# chown mysql:mysql /mysql/data/
[root@ASANGE mysql]# chown mysql:mysql ./*
[root@ASANGE mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/mysql/data
[root@ASANGE mysql]# chown -R root ./*

 安装完成之后,主配置文件为/usr/local/mysql/my.cnf,可根据需要进行文件配置,这里添加如下项:

 

1
2
3
4
5
6
7
8
[root@ASANGE mysql]# mkdir /var/run/mysqld
[root@ASANGE mysql]# vim my.cnf
[mysqld]
datadir = /mysql/data
basedir = /usr/local/mysql
port = 3306
socket = /tmp/mysql.sock
pid_file = /var/run/mysqld/mysqld.pid

 

4、将mysql的头文件连接进系统头文件路径:

1
[root@ASANGE mysql]# ln -sv /usr/local/mysql/include  /usr/include/mysql

 

5、输出mysql库文件:

1
2
[root@ASANGE mysql]# echo '/usr/local/mysql/lib' > /etc/ld.so.conf.d/mysql.conf
[root@ASANGE mysql]# ldconfig

 

6、添加mysql命令的环境变量

 

1
2
3
[root@ASANGE mysql]#  vim /etc/profile
PATH=$PATH:/usr/local/mysql/bin
[root@ASANGE mysql]# . /etc/profile

 

7、为mysql添加启动脚本 ,添加进服务列表并开机自动启动  

 

1
2
3
[root@ASANGE mysql]# cp support-files/mysql.server  /etc/rc.d/init.d/mysqld
[root@ASANGE mysql]# chkconfig --add mysqld
[root@ASANGE mysql]# chkconfig mysqld on

 

至此mysql安装完成,启动mysql服务

 

1
[root@ASANGE mysql]# service mysqld start

 

 

三:编译安装php

php依赖很多库,这里将php依赖的库编译安装进/usr/local/phpextend文件夹里

 

1
[root@ASANGE ~]# mkdir /usr/local/phpextend

 

   1、编译安装jpegsrc,增强对jpeg格式图片的处理功能。jpegsrc.v9.tar.gz

1
2
3
4
[root@ASANGE ~]# tar xf jpegsrc.v9.tar.gz
[root@ASANGE ~]# cd jpeg-9/
[root@ASANGE jpeg-9]# ./configure --prefix=/usr/local/phpextend --enable-shared --enable-static
[root@ASANGE jpeg-9]# make && make install

 

   2、编译安装libpng,增强对png格式图片的处理功能。libpng-1.6.2.tar.gz

1
2
3
4
[root@ASANGE ~]# tar xf libpng-1.6.2.tar.gz
[root@ASANGE ~]# cd libpng-1.6.2
[root@ASANGE libpng-1.6.2]# ./configure --prefix=/usr/local/phpextend
[root@ASANGE libpng-1.6.2]# make && make install

 

   3、编译安装freetype,增强php对字体的处理功能。 freetype-2.4.12.tar.gz

1
2
3
4
[root@ASANGE ~]# tar xf freetype-2.4.12.tar.gz
[root@ASANGE ~]# cd freetype-2.4.12
[root@ASANGE freetype-2.4.12]# ./configure --prefix=/usr/local/phpextend
[root@ASANGE freetype-2.4.12]# make && make install

 

   4、编译安装mhash,使php支持多种哈稀演算法。 mhash-0.9.9.9.tar.gz

1
2
3
4
[root@ASANGE ~]# tar xf mhash-0.9.9.9.tar.gz
[root@ASANGE ~]# cd mhash-0.9.9.9
[root@ASANGE mhash-0.9.9.9]# ./configure --prefix=/usr/local/phpextend
[root@ASANGE mhash-0.9.9.9]# make && make install

 

   5、编译安装libmcrypt,使php支持多种加密算法。libmcrypt-2.5.8.tar.gz

1
2
3
4
[root@ASANGE ~]# tar xf libmcrypt-2.5.8.tar.gz
[root@ASANGE ~]# cd libmcrypt-2.5.8
[root@ASANGE libmcrypt-2.5.8]# ./configure --prefix=/usr/local/phpextend
[root@ASANGE libmcrypt-2.5.8]# make && make install

 

    6、编译安装libevent,支持select、epoll、kqueue等事件调度机制。 libevent-2.0.21-stable.tar.gz

 

1
2
3
4
[root@ASANGE ~]# tar xf libevent-2.0.21-stable.tar.gz
[root@ASANGE ~]# cd libevent-2.0.21-stable
[root@ASANGE libevent-2.0.21-stable]# ./configure --prefix=/usr/local/phpextend
[root@ASANGE libevent-2.0.21-stable]# make && make install

 

   7、编译安装libiconv,实现一个字符编码到另一个字符编码的转换。 libiconv-1.14.tar.gz

 

1
2
3
4
[root@ASANGE ~]# tar xf libiconv-1.14.tar.gz
[root@ASANGE ~]# cd libiconv-1.14
[root@ASANGE libiconv-1.14]# ./configure --prefix=/usr/local/phpextend
[root@ASANGE libiconv-1.14]# make && make install

 

   8、输出库文件

1
2
[root@ASANGE ~]# echo "/usr/local/phpextend/lib" >> /etc/ld.so.conf.d/phpextend.conf
[root@ASANGE ~]# ldconfig

 

   9、编译安装php。   php-5.5.0.tar.bz2

1
2
3
4
5
[root@ASANGE php-5.5.0]# tar xf php-5.5.0.tar.bz2
[root@ASANGE php-5.5.0]# cd php-5.5.0
[root@ASANGE php-5.5.0]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fastcgi --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --disable-debug --disable-ipv6 --with-iconv-dir --with-freetype-dir=/usr/local/phpextend --with-jpeg-dir=/usr/local/phpextend --with-png-dir=/usr/local/phpextend --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring  --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap
[root@ASANGE php-5.5.0]# make       //  如果报错“make: *** [sapi/cli/php] Error 1”  使用命令“make ZEND_EXTRA_LIBS='-liconv' ”进行编译
[root@ASANGE php-5.5.0]# make install

 

   提供php主配置文件:

 

1
[root@ASANGE php-5.5.0]# cp php.ini-development /usr/local/php/etc/php.ini

为php-fpm提供启动脚本,添加至服务列表并开机启动:

 

1
2
3
4
[root@ASANGE php-5.5.0]# cp sapi/fpm/init.d.php-fpm  /etc/rc.d/init.d/php-fpm
[root@ASANGE php-5.5.0]# chmod +x /etc/init.d/php-fpm
[root@ASANGE php-5.5.0]# chkconfig --add php-fpm
[root@ASANGE php-5.5.0]# chkconfig php-fpm on

 

   10、启用fastcgi:

   fastcgi比较重要,这里介绍一下:fastcgi是http server和动态脚本语言间通信的接口,nginx支持fastcgi;同时fastcgi也被许多脚本语言支持,包括php。传统的cgi接口性能很差,每次http server遇到动态程序时,都需要重启脚本解释器来执行解析,然后将结果返回给http server。fastcgi采用C/S架构,将http server和脚本解析器分开,同时在脚本解析器上启动一个或多个脚本解析守护进程,当httt server遇到动态程序时,可以直接交付给fastcgi进程执行,然后将得到的结果返回给浏览器,这样http server只处理静态请求或将动态服务器的结果返回给客户端,从而提高性能。

   nginx通过fastcgi来调用php,而php-fpm是fastcgi的进程管理器。fastcgi的主要作用就是将动态语言和http server分离开来,所以nginx和php/php-fpm经常配置在不同服务器上,各司其职,从而提高性能。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# cd /usr/local/php/etc/
# cp php-fpm.conf.default php-fpm.conf
# vi php-fpm.conf    //一般配置的依据如下
内存小于4G服务器(值可逐级递减):
修改如下参数:
pm=dynamic
pm.max_children=40
pm.start_servers=10
pm.min_spare_servers=10
pm.max_spare_servers=40
 ******************************
内存大于4G服务器(值可逐级递增):
修改如下参数:
pm=static
pm.max_children=100

 

11、配置ngin支持php

编辑nginx的主配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
location / {
            root   html;
            index  index.html index.htm index.php;    //添加index.php
        }
//启用下面的配置
location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            include        fastcgi_params;
        }

   编辑fastcgi_params参数,将里面的内容全部替换为以下内容:

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#vim /etc/nginx/fastcgi_params
fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx;
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;
fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

  启动php-fpm,重启nginx

 

1
2
3
4
5
6
7
[root@ASANGE ~]# service php-fpm start
Starting php-fpm  done
[root@ASANGE ~]# service nginx restart
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
停止 nginx:                                               [确定]
正在启动 nginx:tig

 

   添加php测试页面:

1
2
3
4
[root@ASANGE ~]# vim /usr/html/index.php
<?php
phpinfo();
?>

浏览器上访问:

 

 

 

   12、安装php加速器。

   eaccelerator是一个开源的php加速器,将编译后的php代码opcode缓存进共享内存,下次访问直接调用opcode从而提高速度。

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@ASANGE ~]# unzip eaccelerator-0.9.6.1.zip
[root@ASANGE ~]# cd eaccelerator-0.9.6.1
[root@ASANGE eaccelerator-0.9.6.1]# ls
AUTHORS        control.php  doc                     ea_dasm.c     ea_restore.h  Makefile.in opcodes.h          win32
bugreport.php  COPYING      eaccelerator.c          ea_dasm.h     ea_store.c    mm.c         optimize.c
ChangeLog      dasm.php     eaccelerator.h          ea_info.c     ea_store.h    mm.h         PHP_Highlight.php
config.m4      debug.c      eaccelerator.ini        ea_info.h     fnmatch.c     NEWS         README
config.w32     debug.h      eaccelerator_version.h  ea_restore.c  fnmatch.h     opcodes.c    README.win32
[root@ASANGE eaccelerator-0.9.6.1]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
[root@ASANGE eaccelerator-0.9.6.1]# ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
[root@ASANGE eaccelerator-0.9.6.1]# make && make install

 

到此lnmp的环境搭建完成。

 

本文出自 “阿三哥” 博客,请务必保留此出处http://asange.blog.51cto.com/7125040/1229976

分享到:
评论

相关推荐

    linux+nginx+php+mysql环境配置指南.pdf

    本指南将指导您如何安装和配置 Linux+Nginx+PHP+MySQL 环境,以便于构建一个功能完善的 Web 服务器。 安装 Red Hat Linux 在开始安装 Linux 之前,需要选择语言和键盘布局。然后,选择基本存储设备,重新初始化...

    基于vue+python+flask+uwsgi+nginx+mysql的外包项目网站项目源码.zip

    1、基于vue+python+flask+uwsgi+nginx+mysql的外包项目网站项目源码.zip 2、该资源包括项目的全部源码,下载可以直接使用! 3、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为...

    Web环境搭建:Linux+Nginx+PHP+Mysql+Redis

    ### Web环境搭建:Linux+Nginx+PHP+MySQL+Redis #### 一、环境概述与推荐版本 在构建一个高效且稳定的商城系统时,选择合适的Web环境至关重要。本指南将介绍一套广泛应用于电商平台的技术栈——**Ubuntu + PHP + ...

    lnmp=linux+Nginx+PHP+MySQL

    LNMP(Linux + Nginx + PHP + MySQL)是一套常用的服务器组合,广泛应用于Web开发领域,特别是对于处理高并发和动态内容展示有着卓越的性能。这个组合将Linux操作系统作为基础,结合Nginx作为Web服务器,PHP作为后端...

    redhat6.4+nginx+keepalived__实现双机热备和负载均衡

    redhat6.4+nginx+keepalived__实现双机热备和负载均衡

    linux+nginx+php+mysql环境配置指南.docx

    Linux+Nginx+PHP+Mysql 环境配置指南 Linux+Nginx+PHP+Mysql 环境配置指南是一个完整的服务器配置指南,旨在帮助用户快速搭建一个稳定高效的 Web 服务器环境。本指南涵盖了从安装 Linux 操作系统到配置 Nginx、PHP ...

    zabbix详细安装教程(linux+postgresql+nginx+zabbix)

    ### zabbix详细安装教程(linux+postgresql+nginx+zabbix) #### 环境说明与配置 本教程将指导您如何在Linux环境下安装Zabbix监控系统,并结合PostgreSQL作为数据库服务以及Nginx作为Web服务器。具体环境配置为:...

    Linux+Nginx+Mysql+Php安装教程

    ### Linux+Nginx+Mysql+Php安装教程 #### Linux 安装步骤详解 ##### 1. 开始安装过程 - **选择安装类型**:在安装初始界面选择 "Install or upgrade an existing system",系统将自动运行后续安装流程。 ##### 2...

    Linux+Apache+Nginx+Mysql+PHP完美配置教程

    【Linux+Apache+Nginx+Mysql+PHP完美配置教程】 在配置Linux服务器以支持LAMP(Linux, Apache, MySQL, PHP)环境时,我们需要进行一系列的准备工作和安装步骤。以下是一个详细的步骤指南: **一、准备工作** 1. *...

    Linux+nginx+php+mysql+memcache

    ### Linux+nginx+php+mysql+memcache集成化环境搭建详解 #### 一、引言 随着互联网技术的发展,Web应用越来越复杂,对服务器的要求也越来越高。为了满足高性能、高并发的需求,通常会采用Linux+Nginx+...

    Win+Nginx+PHP+MySQL环境搭建.docx

    Win+Nginx+PHP+MySQL 环境搭建是指在 Windows 操作系统上安装和配置 Nginx、PHP、MySQL 等组件,以便搭建一个完整的 Web 服务器环境。该环境搭建主要涉及到 Nginx、PHP、MySQL 三个组件的安装和配置。 一、Nginx ...

    Linux+nginx+php+mysql+memcache服务器安装,配置与优化.doc

    Linux+nginx+php+mysql+memcache服务器安装,配置与优化

    毕业设计-外包项目网站 -vue+python+flask+uwsgi+nginx+mysql.zip

    -vue+python+flask+uwsgi+nginx+mysql.zip毕业设计-外包项目网站 -vue+python+flask+uwsgi+nginx+mysql.zip毕业设计-外包项目网站 -vue+python+flask+uwsgi+nginx+mysql.zip毕业设计-外包项目网站 -vue+python+flask...

    keepalived+nginx+tomcat+redis+mysql所需的jdk包

    这个压缩包包含了"keepalived+nginx+tomcat+redis+mysql"所需的基础组件,特别是Java Development Kit(JDK)。下面我们将详细探讨这些组件及其在IT领域的应用。 首先,JDK是Java编程语言的基石,它提供了编译、...

    SpringBoot+VUE+Redis+nginx 网上拍卖平台源码.zip

    SpringBoot+VUE+Redis+nginx 网上拍卖平台源码 SpringBoot+VUE+Redis+nginx 网上拍卖平台源码 SpringBoot+VUE+Redis+nginx 网上拍卖平台源码 SpringBoot+VUE+Redis+nginx 网上拍卖平台源码 SpringBoot+...

    Linux+Nginx+MySQL+PHP一体化安装脚本

    LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RadHat/Fedora、Debian/Ubuntu/Raspbian VPS(VDS)或独立主机安装LNMP(Nginx/MySQL/PHP)、LNMPA(Nginx/MySQL/PHP/Apache)、LAMP(Apache/MySQL/PHP)生产环境的...

    Linux源码安装MySQL+MySQL主从+Nginx+Nginx负载均衡+redis+php+phpredis+tomcat

    在本教程中,我们将深入探讨如何在Linux环境中源码安装MySQL、MySQL主从复制、Nginx、Nginx负载均衡、Redis、PHP、phpredis以及Tomcat。这些技术是构建高效、可扩展的Web应用架构的基础。让我们逐一了解安装过程。 ...

    linux+nginx+php+mysql环境配置指南借鉴.pdf

    Linux+nginx+PHP+MySQL 环境配置指南 本文档将指导读者在 Linux 环境下安装和配置 Nginx、PHP 和 MySQL,旨在帮助读者快速搭建一个稳定、安全的 Web 服务器。 一、 Linux 安装和基本配置 在安装 Red Hat Linux ...

Global site tag (gtag.js) - Google Analytics