-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.txt
More file actions
80 lines (68 loc) · 1.78 KB
/
deploy.txt
File metadata and controls
80 lines (68 loc) · 1.78 KB
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
cd /home/www/myweb
tar zxvf pcre-7.7.tar.gz
cd pcre-7.7
./configure
make
sudo make install
cd ..
rm -rf pcre-7.7
tar zxvf nginx-1.4.7.tar.gz
cd nginx-1.4.7
./configure --user=www --group=www --prefix=/usr/local/nginx
make
sudo make install
cd ..
rm -rf nginx-1.4.7
sudo mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.orig
sudo cat > /usr/local/nginx/conf/nginx.conf << "EOF"
user www www;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 40M;
server {
listen 1001;
server_name localhost;
root /home/www/fcgipic;
location ~ \.(html|fcgi) {
fastcgi_pass 127.0.0.1:10001;
fastcgi_index index.html;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
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 HTTP_COOKIE $http_cookie;
}
}
}
EOF
tar zxvf spawn-fcgi-1.6.4.tar.gz
cd spawn-fcgi-1.6.4
./configure --prefix=/usr/local/spawn-fcgi
make
sudo make install
cd ..
rm -rf spawn-fcgi-1.6.4
tar zxvf fcgi2-2.4.1.1.tar.gz
cd fcgi2-2.4.1.1
./autogen.sh
./configure
make
sudo make install
cd ..
rm -rf fcgi2-2.4.1.1
unzip fcgipic-master.zip
mv fcgioj-master /home/www/fcgipic
cd /home/www/fcgioj/src
cc -L/usr/local/lib -lfcgi -o index.fcgi snowflake.c param_lib.c index.c -D_GNU_SOURCE
sudo vi /etc/ld.so.conf
/usr/local/lib
sudo ldconfig
sudo /usr/local/nginx/sbin/nginx
/usr/local/spawn-fcgi/bin/spawn-fcgi -a 127.0.0.1 -p 10001 -u www -f /home/www/fcgipic/index.fcgi
ps -A |grep fcgi
curl http://127.0.0.1:1001/index.html