1 wget http://down1.chinaunix.net/distfiles/freetype-2.4.7.tar.bz2 2 tar -jxvf freetype-2.4.7.tar.bz2 3 cd freetype-2.4.7 4 ./configure --prefix=/usr/local/freetype 5 make 6 make install
echo "####################### Install libxml2-2.9.1 #############"
1 wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz 2 tar -zxf libxml2-2.9.1.tar.gz 3 cd libxml2-2.9.1 4 rpm -qa | grep python-devel 5 yum install python-devel 6 make 7 make install
1 #wget http://downloads.sourceforge.net/project/libpng/libpng16/1.6.9/libpng-1.6.9.tar.gz 2 wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.21.tar.gz 3 tar -zxf libpng-1.6.21.tar.gz 4 cd libpng-1.6.21 5 ./configure --prefix=/usr/local/libpng 6 make 7 make install
echo "################## libiconv ##########"
1 wget http://down1.chinaunix.net/distfiles/libiconv-1.14.tar.gz 2 tar -zxf libiconv-1.14.tar.gz 3 cd libiconv-1.14 4 ./configure–prefix=/usr/local/iconv 5 make 6 make install
echo "############ jpegsrc ###########333"
1 wgethttp://www.ijg.org/files/jpegsrc.v9a.tar.gz 2 tar -zxf jpegsrc.v9a.tar.gz 3 cd jpeg-9a/ 4 mkdir -p /usr/local/jpeg 5 mkdir -p /usr/local/jpeg/include 6 mkdir -p /usr/local/jpeg/sibn 7 mkdir -p /usr/local/jpeg/lib 8 mkdir -p /usr/local/jpeg/man/man1 9 ./configure --prefix=/usr/local/jpeg/ 10 make 11 make install
echo "############# libmcrypt ##############
1 wget https://vps.googlecode.com/files/libmcrypt-2.5.8.tar.gz 2 3 tar -zxf libmcrypt-2.5.7.tar.gz 4 cd libmcrypt-2.5.7 5 ./configure --prefix=/usr/local/libmcrypt/ 6 make 7 make install 8 ln -s /usr/local/libmcrypt/lib/libmcrypt.la /usr/lib/libmcrypt.la 9 ln -s /usr/local/libmcrypt/lib/libmcrypt.so /usr/lib/libmcrypt.so 10 ln -s /usr/local/libmcrypt/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 11 ln -s /usr/local/libmcrypt/lib/libmcrypt.so.4.4.7 /usr/lib/libmcrypt.so.4.4.7
echo "################# mhash ############# "
1 wget http://softlayer-ams.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.bz2 2 tar -zxf mhash-0.9.9.tar.gz 3 cd mhash-0.9.9 4 ./configure 5 make 6 make install
echo "############ mcrypt ###############"
#wget https://vps.googlecode.com/files/mcrypt-2.6.8.tar.gz wget http://down1.chinaunix.net/distfiles/mcrypt-2.6.4.tar.gz tar -zxf mcrypt-2.6.4.tar.gz cd mcrypt-2.6.4 ln -s /usr/local/libmcrypt/bin/libmcrypt-config /usr/bin/libmcrypt-config export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH make make install 8)
echo "############ zlib ########"
1 wget http://iweb.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz 2 tar -zxf zlib-1.2.8.tar.gz 3 cd zlib-1.2.8 4 ./configure 5 make 6 make install
echo "############### libgd ##########"
1 yum -y install libXpm-devel 2 tar -zxf libgd-2.1.0.tar.gz 3 cd libgd-2.1.0 4 ./configure --prefix=/usr/local/gd --with-png=/usr/local/libpng/ --with-zlib --with-jpeg=/usr/local/jpeg/ --with-freetype=/usr/local/freetype/ --with-xpm 5 make 6 make install
echo "############# pcre ##########"
1 tar -zxf pcre-8.34.tar.gz 2 cd pcre-8.34 3 ./configure --prefix=/usr/local/pcre 4 make 5 make install
echo "############# Nginx ###########"
1 wget http://nginx.org/download/nginx-1.5.10.tar.gz 2 tar -zxf nginx-1.5.10.tar.gz 3 cd nginx-1.5.10 4 groupadd www 5 useradd www -g www 6 ulimit -SHn 65535
7 yum install gd-devel*
1 ./configure --user=www 2 --group=www 3 --prefix=/usr/local/nginx 4 --with-http_stub_status_module 5 --with-http_ssl_module 6 --with-pcre=/home/download/lnmp-zabbix/pcre-8.34 7 --with-http_realip_module 8 --with-http_image_filter_module
make
make install
1 user www; 2 worker_processes 1; 3 4 #error_log logs/error.log; 5 #error_log logs/error.log notice; 6 #error_log logs/error.log info; 7 8 #pid logs/nginx.pid; 9 10 11 events { 12 worker_connections 1024; 13 } 14 15 16 http { 17 include mime.types; 18 default_type application/octet-stream; 19 20 #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 21 # '$status $body_bytes_sent "$http_referer" ' 22 # '"$http_user_agent" "$http_x_forwarded_for"'; 23 24 #access_log logs/access.log main; 25 26 sendfile on; 27 #tcp_nopush on; 28 29 #keepalive_timeout 0; 30 keepalive_timeout 65; 31 32 #gzip on; 33 34 server { 35 listen 80; 36 server_name localhost; 37 38 #charset koi8-r; 39 40 #access_log logs/host.access.log main; 41 42 location / { 43 root html; 44 index index.html index.htm; 45 } 46 47 #error_page 404 /404.html; 48 49 # redirect server error pages to the static page /50x.html 50 # 51 error_page 500 502 503 504 /50x.html; 52 location = /50x.html { 53 root html; 54 } 55 56 # proxy the PHP scripts to Apache listening on 127.0.0.1:80 57 # 58 #location ~ .php$ { 59 # proxy_pass http://127.0.0.1; 60 #} 61 62 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 63 # 64 location ~ .php$ { 65 root html; 66 fastcgi_pass 127.0.0.1:9000; 67 fastcgi_index index.php; 68 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 69 include fastcgi_params; 70 } 71 72 # deny access to .htaccess files, if Apache's document root 73 # concurs with nginx's one 74 # 75 #location ~ /.ht { 76 # deny all; 77 #} 78 } 79 80 81 # another virtual host using mix of IP-, name-, and port-based configuration 82 # 83 #server { 84 # listen 8000; 85 # listen somename:8080; 86 # server_name somename alias another.alias; 87 88 # location / { 89 # root html; 90 # index index.html index.htm; 91 # } 92 #} 93 94 95 # HTTPS server 96 # 97 #server { 98 # listen 443; 99 # server_name localhost; 100 101 # ssl on; 102 # ssl_certificate cert.pem; 103 # ssl_certificate_key cert.key; 104 105 # ssl_session_timeout 5m; 106 107 # ssl_protocols SSLv2 SSLv3 TLSv1; 108 # ssl_ciphers HIGH:!aNULL:!MD5; 109 # ssl_prefer_server_ciphers on; 110 111 # location / { 112 # root html; 113 # index index.html index.htm; 114 # } 115 #} 116 117 }
1 #echo "make -f objs/Makefile 2 #make[1]: Entering directory `/usr/local/src/nginx-0.8.54′ 3 #cd /usr/local/pcre / 4 # && if [ -f Makefile ]; then make distclean; fi / 5 # && CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " / 6 # ./configure –disable-shared 7 #/bin/sh: line 2: ./configure: No such file or directory 8 #make[1]: *** [/usr/local/pcre/Makefile] Error 127 9 #make[1]: Leaving directory `/usr/local/src/nginx-0.8.54′ 10 #make: *** [build] Error 2" 11 #echo "下意识的google了几下,别人碰到的很少,也么解决好。不怕,好歹之前也玩过嵌入式的皮毛,自己写过makefile。编译nginx怎么会去pcre目录下找makefile呢?那我指定pcre源码目录给它。" 12 #
1 #!/bin/bash 2 3 echo_red(){ 4 echo -e "