环境:

1
yum -y installgccgcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libtool libtool-ltdl

GD2

1
2
3
4
5
6
cd/usr/local/src
wget https://bitbucket.org/pierrejoye/gd-libgd/get/5551f61978e3.tar.gz
tarxzvf 5551f61978e3.tar.gz
cdpierrejoye-gd-libgd-5551f61978e3/src
./configure
make&& makeinstall
1
2
3
4
5
6
7
8
9
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.17-linux2.6-i686.tar.gz/from/http://mysql.ntu.edu.tw/
wget http://cn.php.net/get/php-5.2.17.tar.gz/from/tw.php.net/mirror
wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
wget http://nginx.org/download/nginx-1.0.4.tar.gz
#rpm -ivh nginx-1.0.8-2.el5.ngx.i386.rpm
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
wget http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0
wget http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?modtime=1194463373&big_mirror=0
wget http://blog.s135.com/soft/linux/nginx_php/mhash/mhash-0.9.9.9.tar.gz

2 安装PHP 5.2.14(FastCGI模式)

1)编译安装PHP 5.2.14所需的支持库:

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
tarzxvf libiconv-1.13.1.tar.gz
cdlibiconv-1.13.1/
./configure--prefix=/usr/local
make
makeinstall
cd../
 
tarzxvf libmcrypt-2.5.8.tar.gz
cdlibmcrypt-2.5.8/
./configure
make
makeinstall
/sbin/ldconfig
cdlibltdl/
./configure--enable-ltdl-install
make
makeinstall
cd../../
 
tarzxvf mhash-0.9.9.9.tar.gz
cdmhash-0.9.9.9/
./configure
make
makeinstall
cd../
 
ln-s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln-s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln-s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln-s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln-s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln-s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln-s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln-s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln-s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln-s /usr/local/bin/libmcrypt-config/usr/bin/libmcrypt-config
 
tarzxvf mcrypt-2.6.8.tar.gz
cdmcrypt-2.6.8/
/sbin/ldconfig
./configure
make
makeinstall
cd../

2)编译安装MySQL 5.5.3-m3

1
2
3
4
5
6
7
8
9
/usr/sbin/groupaddmysql
/usr/sbin/useradd-g mysql -s /sbin/nologinmysql
tarzxvf mysql-5.5.3-m3.tar.gz
cdmysql-5.5.3-m3/
./configure--prefix=/usr/local/mysql/--enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg
make&& makeinstall
chmod+w /usr/local/mysql
chown-R mysql:mysql /usr/local/mysql
cd../

附:以下为附加步骤,如果你想在这台服务器上运行MySQL数据库,则执行以下几步。如果你只是希望让PHP支持MySQL扩展库,能够连接其他服务器上的MySQL数据库,那么,以下两步无需执行。

①、创建MySQL数据库存放目录

1
2
3
4
mkdir-p /var/mysql/data/
mkdir-p /var/mysql/binlog/
mkdir-p /var/mysql/relaylog/
chown-R mysql:mysql /var/mysql/

②、以mysql用户帐号的身份建立数据表:

1
2
/usr/local/mysql/bin/mysql_install_db--basedir=/usr/local/mysql--datadir=/var/mysql/data--user=mysql
/usr/local/mysql/bin/mysql_install_db--basedir=/usr/local/mysql--datadir=/var/mysql/data--user=mysql

③、创建my.cnf配置文件:

1
vi/var/mysql/my.cnf

启动MySQL:

1
/usr/local/mysql/bin/mysqld_safe--user=root

输入以下SQL语句,创建一个具有root权限的用户(admin)和密码(12345678):

1
2
3
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost'IDENTIFIED BY '12345678';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'127.0.0.1'IDENTIFIED BY '12345678';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'root';

MYSQL启动脚本

1
vi/var/mysql/mysql
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
#!/bin/sh
 
mysql_port=3306
mysql_username="root"
mysql_password="root"
 
function_start_mysql()
{
    printf"Starting MySQL...\n"
    /usr/local/mysql/bin/mysqld_safe--defaults-file=/var/mysql/my.cnf 2>&1 > /var/mysql/binlog/start.log &  
}
 
function_stop_mysql()
{
    printf"Stoping MySQL...\n"
    /usr/local/mysql/bin/mysqladmin-u ${mysql_username} -p${mysql_password} -S /tmp/mysql.sock shutdown
}
 
function_restart_mysql()
{
    printf"Restarting MySQL...\n"
    function_stop_mysql
    sleep5
    function_start_mysql
}
 
function_kill_mysql()
{
    kill-9 $(ps-ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')
    kill-9 $(ps-ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
}
 
if"$1""start"]; then
    function_start_mysql
elif"$1""stop"]; then
    function_stop_mysql
elif"$1""restart"]; then
function_restart_mysql
elif"$1""kill"]; then
function_kill_mysql
else
    printf"Usage: /var/mysql/mysql {start|stop|restart|kill}\n"
fi

php安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
tarzxvf php-5.2.17.tar.gz
gzip-cdphp-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1
cdphp-5.2.17
 
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql--with-mysqli=/usr/local/mysql/bin/mysql_config--with-iconv-dir=/usr/local--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib --with-libxml-dir=/usr--enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
makeZEND_EXTRA_LIBS='-liconv'
makeinstall
cpphp.ini-dist /usr/local/php/etc/php.ini
cd../
 
 
 
wget http://blog.s135.com/soft/linux/nginx_php/memcache/memcache-2.2.5.tgz
wget http://blog.s135.com/soft/linux/nginx_php/pcre/pcre-8.10.tar.gz
wget http://blog.s135.com/soft/linux/nginx_php/eaccelerator/eaccelerator-0.9.6.1.tar.bz2
wget http://blog.s135.com/soft/linux/nginx_php/pdo/PDO_MYSQL-1.0.2.tgz
wget http://blog.s135.com/soft/linux/nginx_php/imagick/ImageMagick.tar.gz
wget http://blog.s135.com/soft/linux/nginx_php/imagick/imagick-2.3.0.tgz

4)编译安装PHP5扩展模块

1
2
3
4
5
6
7
tarzxvf memcache-2.2.5.tgz
cdmemcache-2.2.5/
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config
make
makeinstall
cd../

1、安装Nginx所需的pcre库:

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
tarzxvf pcre-8.10.tar.gz
cdpcre-8.10/
./configure
make&& makeinstall
cd../
 
 
tarjxvf eaccelerator-0.9.6.1.tar.bz2
cdeaccelerator-0.9.6.1/
/usr/local/php/bin/phpize
./configure--enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
make
makeinstall
cd../
 
tarzxvf PDO_MYSQL-1.0.2.tgz
cdPDO_MYSQL-1.0.2/
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config--with-pdo-mysql=/usr/local/mysql
make
makeinstall
cd../
 
tarzxvf ImageMagick.tar.gz
cdImageMagick-6.5.1-2/
./configure
make
makeinstall
cd../
 
tarzxvf imagick-2.3.0.tgz
cdimagick-2.3.0/
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config
make
makeinstall
cd../

5)修改php.ini文件

手工修改:查找/usr/local/php/etc/php.ini中的extension_dir = "./"   
修改为extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/" 
并在此行后增加以下几行,然后保存:

1
2
3
extension = "memcache.so"
extension = "pdo_mysql.so"
extension = "imagick.so"

再查找output_buffering = Off 修改为output_buffering = On    
再查找; cgi.fix_pathinfo=0   修改为cgi.fix_pathinfo=0, 
防止Nginx文件类型错误解析漏洞。 
注:若嫌手工修改麻烦,可执行以下shell命令,自动完成对php.ini文件的修改:

1
2
3
4
sed-i 's#extension_dir = "./"#extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"\nextension = "memcache.so"\nextension = "pdo_mysql.so"\nextension = "imagick.so"\n#'/usr/local/php/etc/php.ini
sed-i 's#output_buffering = Off#output_buffering = On#'/usr/local/php/etc/php.ini
sed-i "s#; always_populate_raw_post_data = On#always_populate_raw_post_data = On#g"/usr/local/php/etc/php.ini
sed-i "s#; cgi.fix_pathinfo=0#cgi.fix_pathinfo=0#g"/usr/local/php/etc/php.ini

7)创建www用户和组,以及供book.zhiyin.com和www.zhiyin.com两个虚拟主机使用的目录:

1
2
3
4
5
6
7
8
9
10
/usr/sbin/groupaddwww
/usr/sbin/useradd-g www www
mkdir-p /var/webroot/log
chmod+w /var/webroot/log
chown-R www:www /var/webroot/log
mkdir-p /var/webroot/web
chmod+w /var/webroot/web
chown-R www:www /var/webroot/web
 
chown-R admin:ftpgroup /var/webroot/web

8) 创建Nginx日志目录

1
2
3
mkdir-p /var/log/nginx
chmod+w /var/log/nginx
chown-R www:www /var/log/nginx

4) 创建Nginx配置文件

①在/usr/local/nginx/conf/目录中创建nginx.conf文件:

1
2
rm-f /usr/local/nginx/conf/nginx.conf
vi/usr/local/nginx/conf/nginx.conf

输入以下内容:

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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
user  www www;
 
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 65535;
 
 
#user  nobody;
worker_processes  8;
 
#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;
 
error_log /var/log/nginx/nginx_error.log  crit;
 
pid        /usr/local/nginx/nginx.pid;
 
 
events {
    use epoll;
    worker_connections  65535;
}
 
 
http {
    include       mime.types;
    default_type  application/octet-stream;
 
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
 
    access_log  /var/webroot/log/access.log  main;
 
    sendfile        on;
    #tcp_nopush     on;
 
    #keepalive_timeout  0;
 
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 8m;
    tcp_nopush     on;
 
    keepalive_timeout 60;
 
    tcp_nodelay on;
 
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
 
    gzipon;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    gzip_http_version 1.0;
    gzip_comp_level 2;
    gzip_types       text/plainapplication/x-javascripttext/cssapplication/xml;
    gzip_vary on;
 
    #gzip  on;
 
    server {
        listen       80;
        server_name  localhost;
 
        #charset koi8-r;
         
        #access_log  /var/webroot/log/host.access.log  main;
         
        location / {
            root   /var/webroot/web;
            index  index.html index.htm index.php;
        }
 
        #error_page  404              /404.html;
 
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
 
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
 
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           /var/webroot/web;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            #include        fastcgi_params;
        include fcgi.conf;
        }
 
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
            deny  all;
        }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }
 
    location ~ .*\.(js|css)?$
        {
            expires      1h;
        }
    }
 
 
    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;
 
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
 
 
    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_name  localhost;
 
    #    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
 
    #    ssl_session_timeout  5m;
 
    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
    #    ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
    #    ssl_prefer_server_ciphers   on;
 
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
 
}

②、在/usr/local/nginx/conf/目录中创建fcgi.conf文件:

1
vi/usr/local/nginx/conf/fcgi.conf

 输入以下内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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 only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;

5)启动Nginx

1
2
ulimit-SHn 65535
/usr/local/nginx/sbin/nginx

4 配置开机自动启动Nginx + PHP

1
vi/etc/rc.local

在末尾增加以下内容:

1
2
3
4
ulimit-SHn 65535
/usr/local/php/sbin/php-fpmstart
/usr/local/nginx/sbin/nginx
/var/mysql/mysqlstart

5 在不停止Nginx服务的情况下平滑变更Nginx配置

1)修改

/usr/local/nginx/conf/nginx.conf配置文件后,请执行以下命令检查配置文件是否正确:

1
/usr/local/nginx/sbin/nginx-t

如果屏幕显示以下两行信息,说明配置文件正确:

the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

the configuration file /usr/local/nginx/conf/nginx.conf was tested successfully

2) 平滑重启:

①、对于Nginx 0.8.x版本,现在平滑重启Nginx配置非常简单,执行以下命令即可:

1
/usr/local/nginx/sbin/nginx-s reload

②、对于Nginx 0.8.x之前的版本,平滑重启稍微麻烦一些,按照以下步骤进行即可。输入以下命令查看Nginx主进程号:

1
ps-ef | grep"nginx: master process"grep-v"grep"awk-F ' ''{print $2}'

屏幕显示的即为Nginx主进程号,例如:   6302 这时,执行以下命令即可使修改过的Nginx配置文件生效:

1
kill-HUP 6302

或者无需这么麻烦,找到Nginx的Pid文件:

1
kill-HUP `cat/usr/local/nginx/nginx.pid`

6 优化Linux内核参数 (此处内容不推荐使用)

1
vi/etc/sysctl.conf

在末尾增加以下内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Add
net.ipv4.tcp_max_syn_backlog = 65536
net.core.netdev_max_backlog =  32768
net.core.somaxconn = 32768
 
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
 
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
 
net.ipv4.tcp_tw_recycle = 1
#net.ipv4.tcp_tw_len = 1
net.ipv4.tcp_tw_reuse = 1
 
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_max_orphans = 3276800
 
#net.ipv4.tcp_fin_timeout = 30
#net.ipv4.tcp_keepalive_time = 120
net.ipv4.ip_local_port_range = 1024  65535

使配置立即生效:

 
 
1
/sbin/sysctl-p

引用来自“mark35”的答案

之所以YUM安装的PHP会有那么多 --disable参数,那是为了你以后单独安装部件考虑的。你可以通过 YUM install php-??? 来安装需要部件,比如

1
yum installphp-mysql php-gd

相当于只安装了PHP核心,扩展包按需安装

可是我执行了

1
yum installphp-mysql

Centos下配置php环境的更多相关文章

  1. CentOS下配置java环境变量classpath

    一. 需要配置的环境变量1. PATH环境变量.作用是指定命令搜索路径,在shell下面执行命令时,它会到PATH变量所指定的路径中查找看是否能找到相应的命令程序.我们需要把 jdk安装目录下的bin ...

  2. centos下配置java环境变量

    一. 需要配置的环境变量1. PATH环境变量.作用是指定命令搜索路径,在shell下面执行命令时,它会到PATH变量所指定的路径中查找看是否能找到相应的命令程序.我们需要把 jdk安装目录下的bin ...

  3. 第一课:Centos下配置java环境变量的两种方式(jdk1.8)

    配置java环境(yum安装) 1.查出java1.8的全部版本 yum list java-1.8* 2.安装你需要的java1.8 版本(安装的名字根据查询出来的结果输入这里只是举例) yum i ...

  4. [ 原创 ]linux centos下配置java环境教程

    一.环境 centos 7.2 二.目标 在CentOS7.2上安装jdk1.8(tar.gz安装包),并配置环境变量 jdk安装在/home/soft/jdk1.8.0-131目录下 具体步骤 1. ...

  5. centos下配置LNMP环境(源码安装)

    准备工作,安装依赖库 yum -y install gcc automake autoconf libtool make gcc-c++ glibc libxslt-devel libjpeg lib ...

  6. Linux|CentOS下配置Maven环境

    1.下载maven包 wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven ...

  7. CentOS下搭建LAMP环境详解

    前言:在这里将介绍如何在CentOS下搭建LAMP环境(全部使用源码编译安装),用于web服务器开发. •LAMP: Linux + Apache + PHP + Mysql. •系统: CentOS ...

  8. CentOS下Web服务器环境搭建LNMP一键安装包

    CentOS下Web服务器环境搭建LNMP一键安装包 时间:2014-09-04 00:50来源:osyunwei.com 作者:osyunwei.com 举报 点击:3797次 最新版本:lnmp- ...

  9. centos 下 搭建 php 环境

    本文详细阐述在 Linux 系统中搭建 PHP 环境,由于 PHP 就是由 C 语言编写的,最初也是运行在 Linux 系统中,所以Linux 是 PHP 的最佳环境. 关于本文中使用到的软件,请点击 ...

随机推荐

  1. hadoop 分布式开发环境搭建

    一,安装java环境 添加java环境变量 vi /etc/profile   # add by tank export JAVA_HOME=/data/soft/jdk/jdk1.7.0_71 ex ...

  2. 服务器SSL不安全漏洞修复方案

    关于SSL POODLE漏洞 POODLE = Padding Oracle On Downgraded Legacy Encryption.是最新安全漏洞(CVE-2014-3566)的代号,俗称“ ...

  3. Kettle系列: 马进举开源的Kettle通用插件 KettleEasyExpand

    扩展Kettle功能, 经常使用 user defined java class 组件, 或者自己开发Java插件. 两种方式都有各自的痛点: 1. 在user defined java class ...

  4. Js点击按钮下载文件到本地(兼容多浏览器)

    实现点击 用纯 js(非jquery)  下载文件到本地 自己尝试,加网上找了好久未果,如: window.open(url)   location.href=url   form表单提交   ifr ...

  5. 21.Buffer Pool与压缩页/CheckPoint/LSN

    一. 思考题解析• 查看Buffer Pool中的Flush List不要在线上操作该SQL语句,开销较大 SELECT pool_id, lru_position, space, page_numb ...

  6. gethostbyname和gethostbyaddr

    一.gethostbyname函数原型 #include <netdb.h> struct hostent *gethostbyname(const char *ghostname); 返 ...

  7. 三十八、Linux 线程——线程属性初始化、销毁、设置和获得分离属性

    38.1 线程属性初始化和销毁 #include <pthread.h> int pthread_attr_init(pthread_attr_t *attr); int pthread_ ...

  8. 新萌渗透测试入门DVWA 教程1:环境搭建

    首先欢迎新萌入坑.哈哈.你可能抱着好奇心或者疑问.DVWA 是个啥? DVWA是一款渗透测试的演练系统,在圈子里是很出名的.如果你需要入门,并且找不到合适的靶机,那我就推荐你用DVWA. 我们通常将演 ...

  9. asp.net写入读取xml的方法

    添加命名空间 using System.Xml; 我自己的代码(添加其中的节点) XmlDocument xmlDoc = new XmlDocument();xmlDoc.Load(Server.M ...

  10. 【51nod 1288】汽油补给

    Description 有(N+1)个城市,0是起点N是终点,开车从0 -> 1 - > 2...... -> N,车每走1个单位距离消耗1个单位的汽油,油箱的容量是T.给出每个城市 ...