-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathAutoNProxy-v0.0.3.sh
99 lines (81 loc) · 2.89 KB
/
AutoNProxy-v0.0.3.sh
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
#!/bin/bash
clear
echo "========================================================================="
echo "Welcome to AutoNProxy (Nginx-proxy)"
echo ""
echo ""
echo "AutoNProxy v0.0.3 by badb0y "
echo "Default Install PATH:/usr/local/{nginx}"
echo ""
echo "========================================================================="
echo ""
echo "For more information please visit http://code.google.com/p/autosetup/"
echo ""
read -p "If the OK! Press any key to start..."
base() {
echo "EVN Initialization..."
if [ "`uname -m`" == "x86_64" ]; then
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
elif [ "`uname -m`" == "i686" ]; then
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
fi
yum -y install patch make gcc gcc-c++ libtool libtool-libs libart_lgpl libart_lgpl-devel autoconf libjpeg libjpeg-devel libpng libpng-devel fontconfig fontconfig-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-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
}
download() {
echo "Download soft..."
wget http://nginx.org/download/nginx-1.1.4.tar.gz
wget http://sourceforge.net/projects/pcre/files/pcre/8.12/pcre-8.12.tar.gz/download
wget http://autosetup1.googlecode.com/files/proxy.conf
wget http://autosetup1.googlecode.com/files/run.sh
wget http://autosetup1.googlecode.com/files/stop.sh
wget http://autosetup1.googlecode.com/files/nginx1.conf
}
nginx() {
echo "Installtion NGINX..."
groupadd webadm
useradd -g webadm webadm
tar zxvf pcre-8.12.tar.gz
cd pcre-8.12/
./configure
make ;make install
cd ../
tar zxvf nginx-1.1.4.tar.gz
cd nginx-1.1.4
./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make; make install
cd ../
}
config() {
echo "Configuration..."
echo "nginx config"
rm -rf /usr/local/nginx/conf/nginx.conf
cp -a proxy.conf /usr/local/nginx/conf/
cp -a nginx1.conf /usr/local/nginx/conf/nginx.conf
cp -a run.sh /root/
cp -a stop.sh /root/
sed -i '3d' /root/run.sh
sed -i '2d' /root/stop.sh
chmod 755 /root/*.sh
}
msg() {
echo "========================================================================="
echo "Welcome to AutoNProxy (Nginx-proxy)"
echo ""
echo ""
echo "AutoNProxy v0.0.3 by badb0y "
echo "Default Install PATH:/usr/local/{nginx}"
echo ""
echo "========================================================================="
echo ""
}
main() {
echo "Installtion AutoNProxy..."
base
download
nginx
config
msg
}
main