├── AutoAPP-v0.0.1.sh ├── AutoBind-v0.0.1.sh ├── AutoCA-0.0.1.sh ├── AutoCProxy-v0.0.1.sh ├── AutoIM_Porxy for WIN v1.0.1.rar ├── AutoIM_Porxy-1.0.1.tar.gz ├── AutoMAP-0.1.11.tar.gz ├── AutoMAP-v0.1.12.sh ├── AutoMAP-v0.2.4.sh ├── AutoMPN-0.0.1.tar.gz ├── AutoMPN-v0.0.4.sh ├── AutoMPN-v0.0.5.sh ├── AutoMPN-v0[1].0.3.sh ├── AutoMail-el5-v0.0.1.sh ├── AutoMail-el5-v0.0.2.sh ├── AutoMail-el6-v0.0.3.sh ├── AutoMail-el7-v0.0.4.sh ├── AutoMiniMail-0.0.2.tar.gz ├── AutoMiniMail-el6-v0.0.3.sh ├── AutoMiniMail-el7-v0.0.4.sh ├── AutoNProxy-v0.0.1.sh ├── AutoNProxy-v0.0.2.sh ├── AutoNProxy-v0.0.3.sh ├── AutoOVPN-1.5.2.tar.gz ├── AutoPPN-el5-v0.0.6.sh ├── AutoPPN-el5-v0.0.7.sh ├── AutoPPN-el5-v0.0.8.sh ├── AutoPPN-el5-v0.0.9.sh ├── AutoPPN-el5-v0.1.0.sh ├── AutoPPN-el6-v0.0.6.sh ├── AutoPPN-el6-v0.0.7.sh ├── AutoPPN-el6-v0.0.8.sh ├── AutoPPN-v0.0.1.sh ├── AutoPPN-v0.0.2.sh ├── AutoPPN-v0.0.3.sh ├── AutoPPN-v0.0.4.sh ├── AutoPPN-v0.0.5.sh ├── AutoSNMP-v0.0.1.sh ├── AutoSNMP-v0.0.2.sh ├── AutoSS5-1.0.1.tar.gz ├── AutoSVN-0.0.1.tar.gz ├── AutoSVN-0.1.1.tar.gz ├── AutoStack-v0.0.1.sh ├── AutoStack-v0.0.2.sh ├── AutoStack-v0.0.3.sh ├── AutoVPN-0.0.1.tar.gz ├── AutoVPN-1.0.0-el5.tar.gz ├── AutoVPN-1.0.1-el6.tar.gz ├── README.md ├── RPM-build-tree.txt ├── Win-Ecdn-Manager-v0.1.zip ├── Win-Ecdn-Manager-v0.2.zip ├── Win-Ecdn-v0.1.zip ├── ansible ├── README.md └── k8s │ ├── 1.11.2 │ ├── 01.cert.yml │ ├── 02.etcd.yml │ ├── 03.docker.yml │ ├── 04.master.yml │ ├── 05.node.yml │ ├── README.md │ ├── cls.sh │ ├── group_vars │ │ └── all.yml │ ├── hosts │ └── roles │ │ ├── cert │ │ ├── files │ │ │ ├── admin-csr.json │ │ │ ├── config.json │ │ │ ├── csr.json │ │ │ └── kube-proxy-csr.json │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ ├── etcd-csr.json.j2 │ │ │ └── kubernetes-csr.json.j2 │ │ ├── docker │ │ ├── files │ │ │ ├── daemon.json │ │ │ ├── docker-dns.conf │ │ │ ├── docker-options.conf │ │ │ ├── docker.service │ │ │ ├── flannel-0.10.0-1.x86_64.rpm │ │ │ ├── flannel.conf │ │ │ └── iptables.conf │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ ├── add.sh.j2 │ │ │ ├── flanneld.j2 │ │ │ └── hosts.j2 │ │ ├── etcd │ │ ├── files │ │ │ └── down.sh │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ ├── etcd-health.sh.j2 │ │ │ └── etcd.service.j2 │ │ ├── master │ │ ├── files │ │ │ ├── 1.11.5.sh │ │ │ ├── audit-policy.yaml │ │ │ ├── down.sh │ │ │ ├── encryption-config.yaml │ │ │ ├── k8s_cluster.sh │ │ │ ├── kube-controller-manager.service │ │ │ ├── kube-proxy.service │ │ │ ├── kube-scheduler.service │ │ │ ├── mk-encryption-config.sh │ │ │ └── tls-instructs-csr.yaml │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ ├── kube-apiserver.service.j2 │ │ │ ├── kube-proxy.config.yaml.j2 │ │ │ ├── kubelet.config.json.j2 │ │ │ ├── kubelet.service.j2 │ │ │ └── token.sh.j2 │ │ ├── mk.sh │ │ └── node │ │ ├── files │ │ ├── down.sh │ │ ├── kube-proxy.service │ │ └── nginx.service │ │ ├── tasks │ │ └── main.yml │ │ └── templates │ │ ├── kube-proxy.config.yaml.j2 │ │ ├── kubelet.config.json.j2 │ │ ├── kubelet.service.j2 │ │ └── nginx.conf.j2 │ └── 1.5.2 │ ├── README.md │ ├── docker_master.yml │ ├── docker_node.yml │ ├── hosts │ ├── init_env.yml │ ├── k8s_master.yml │ ├── k8s_node.yml │ └── roles │ ├── docker_master │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── virt7-docker-common-release.repo │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── etcd.conf │ │ └── flanneld │ ├── docker_node │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── virt7-docker-common-release.repo │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── flanneld │ ├── init │ └── tasks │ │ └── main.yml │ ├── k8s_master │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── virt7-docker-common-release.repo │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── apiserver │ │ ├── config │ │ ├── etcd.conf │ │ ├── flanneld │ │ └── kubelet │ ├── k8s_node │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── virt7-docker-common-release.repo │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── apiserver │ │ ├── config │ │ ├── etcd.conf │ │ ├── flanneld │ │ └── kubelet │ └── mkdir.sh ├── autotar.sh ├── centos6-vault.sh ├── easy-cdn-1.0.5-linux.tar.gz ├── fcgi.conf ├── goto.zip ├── mongodb_deploy-v0.2.sh ├── mongodb_rs_add_v0.1.sh ├── mysql5.5.22.sh ├── mysql_5.6.17.sh ├── mysql_5.7.9.sh ├── nginx-tcp.conf ├── nginx.conf ├── nginx_cache.conf ├── nginx_tcp.sh ├── proxy.conf ├── proxy_cache.conf └── xen-cli-0.0.1.tar.gz /AutoAPP-v0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoAPP (Apache+Percaona[mysql]+PHP)" 5 | echo "" 6 | echo "" 7 | echo "AutoAPP v0.0.1 by badb0y " 8 | echo "Default Install PATH:/usr/local/{percona.php.apache2}" 9 | echo "Default percona(mysql) password:google123" 10 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | if [ "`uname -m`" == "x86_64" ]; then 19 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 20 | rpm -Uhv http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm 21 | elif [ "`uname -m`" == "i686" ]; then 22 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 23 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm 24 | fi 25 | yum -y install bison bison-devel cmake patch make gcc gd gd-devel libxml* 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 26 | 27 | export LANC=C 28 | 29 | wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 30 | wget http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 31 | wget http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 32 | wget http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 33 | wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.16-22.0/source/Percona-Server-5.5.16-rel22.0.tar.gz 34 | wget http://mirror.bjtu.edu.cn/apache//httpd/httpd-2.2.21.tar.gz 35 | wget http://am.php.net/distributions/php-5.3.8.tar.gz 36 | 37 | 38 | tar zxvf libiconv-1.13.tar.gz 39 | cd libiconv-1.13/ 40 | ./configure --prefix=/usr/local 41 | make 42 | make install 43 | cd ../ 44 | 45 | tar zxvf libmcrypt-2.5.8.tar.gz 46 | cd libmcrypt-2.5.8/ 47 | ./configure 48 | make 49 | make install 50 | /sbin/ldconfig 51 | cd libltdl/ 52 | ./configure --enable-ltdl-install 53 | make 54 | make install 55 | cd ../../ 56 | 57 | tar zxvf mhash-0.9.9.9.tar.gz 58 | cd mhash-0.9.9.9/ 59 | ./configure 60 | make 61 | make install 62 | cd ../ 63 | 64 | echo "/usr/local/lib" >> /etc/ld.so.conf 65 | ldconfig 66 | 67 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 68 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 69 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 70 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 71 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 72 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 73 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 74 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 75 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 76 | 77 | tar zxvf mcrypt-2.6.8.tar.gz 78 | cd mcrypt-2.6.8/ 79 | /sbin/ldconfig 80 | ./configure 81 | make 82 | make install 83 | cd ../ 84 | 85 | 86 | echo "Installation MYSQL..." 87 | groupadd mysql 88 | useradd -g mysql mysql 89 | tar -zxvf Percona-Server-5.5.16-rel22.0.tar.gz 90 | cd Percona-Server-5.5.16-rel22.0 91 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 92 | #cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 93 | make && make install 94 | cp support-files/my-medium.cnf /etc/my.cnf 95 | cp support-files/mysql.server /etc/init.d/mysql 96 | cd /usr/local/percona 97 | ./scripts/mysql_install_db --user=mysql 98 | chown -R mysql /usr/local/percona/data 99 | chgrp -R mysql /usr/local/percona/. 100 | chmod 755 /etc/init.d/mysql 101 | chkconfig --level 345 mysql on 102 | echo "/usr/local/percona/lib" >> /etc/ld.so.conf 103 | ldconfig 104 | service mysql start 105 | cd - 106 | cd .. 107 | /usr/local/percona/bin/mysqladmin -u root password google123 108 | echo 'export PATH="/usr/local/percona/bin:$PATH"' >>/etc/profile 109 | source /etc/profile 110 | 111 | 112 | tar -zxvf httpd-2.2.21.tar.gz 113 | cd httpd-2.2.21 114 | ./configure --prefix=/usr/local/apache2 --enable-so --enable-track-vars --enable-mods-shared=all --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite 115 | make&&make install 116 | cd .. 117 | 118 | 119 | tar -zxvf php-5.3.8.tar.gz 120 | cd php-5.3.8 121 | ./configure --prefix=/usr/local/php53 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/percona --with-config-file-path=/usr/local/php53/etc --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-mbstring --enable-sockets 122 | make ZEND_EXTRA_LIBS='-liconv' 123 | make install 124 | cp php.ini-production /usr/local/php53/etc/php.ini 125 | sed -i 's#short_open_tag = Off#short_open_tag = On#g' /usr/local/php53/etc/php.ini 126 | cd .. 127 | 128 | 129 | sed -i 's/index.html/index.php index.html/g' /usr/local/apache2/conf/httpd.conf 130 | echo "AddType application/x-httpd-php .php" >>/usr/local/apache2/conf/httpd.conf 131 | echo "AddType application/x-httpd-php-source .phps" >>/usr/local/apache2/conf/httpd.conf 132 | 133 | cat >/usr/local/apache2/htdocs/info.php< 137 | EOF 138 | 139 | chkconfig httpd off 140 | service httpd stop 141 | /usr/local/apache2/bin/apachectl start 142 | 143 | clear 144 | echo "=========================================================================" 145 | echo "Welcome to AutoAPP (Apache+Percaona[mysql]+PHP)" 146 | echo "" 147 | echo "" 148 | echo "AutoAPP v0.0.1 by badb0y " 149 | echo "Default Install PATH:/usr/local/{percona.php.apache2}" 150 | echo "Default percona(mysql) password:google123" 151 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 152 | echo "=========================================================================" 153 | echo "" 154 | echo "For more information please visit http://code.google.com/p/autosetup/" 155 | echo "" -------------------------------------------------------------------------------- /AutoBind-v0.0.1.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoBind-v0.0.1.sh -------------------------------------------------------------------------------- /AutoCA-0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # create self-signed server certificate: 4 | 5 | read -p "Enter your domain [www.example.com]: " DOMAIN 6 | 7 | if [[ ! -f ca.crt ]]; then 8 | mkdir -p /etc/pki/CA/ 9 | rm -rf /etc/pki/CA/index.txt 10 | rm -rf /etc/pki/CA/serial 11 | touch /etc/pki/CA/{index.txt,serial} 12 | echo "01" > /etc/pki/CA/serial 13 | echo "Create CA key..." 14 | SUBJECT="/C=BJ/ST=BJ/L=OMP/O=OMP/OU=OMP/CN=OMPSSL" 15 | openssl genrsa -des3 -out ca.key 2048 16 | openssl req -new -subj $SUBJECT -x509 -days 3650 -key ca.key -out ca.crt 17 | fi 18 | 19 | echo "Create server key..." 20 | SUBJECT="/C=BJ/ST=BJ/L=OMP/O=OMP/OU=OMP/CN=$DOMAIN" 21 | openssl genrsa -des3 -out $DOMAIN.key 1024 22 | 23 | echo "Create server certificate signing request..." 24 | openssl req -new -subj $SUBJECT -key $DOMAIN.key -out $DOMAIN.csr 25 | 26 | echo "Remove password..." 27 | 28 | mv $DOMAIN.key $DOMAIN.origin.key 29 | openssl rsa -in $DOMAIN.origin.key -out $DOMAIN.key 30 | 31 | echo "Sign SSL certificate..." 32 | #openssl x509 -req -days 3650 -in $DOMAIN.csr -signkey $DOMAIN.key -out $DOMAIN.crt 33 | openssl ca -policy policy_anything -days 3650 -cert ca.crt -keyfile ca.key -in $DOMAIN.csr -out $DOMAIN.crt 34 | cat ca.crt >> $DOMAIN.crt 35 | 36 | #openssl s_client -connect wap.com.cn:443 37 | #yum install ca-certificates 38 | #update-ca-trust force-enable 39 | #cp ca.crt /etc/pki/ca-trust/source/anchors/ 40 | #update-ca-trust extract 41 | 42 | echo "" 43 | echo "" 44 | echo "TODO:" 45 | echo "Copy $DOMAIN.crt to /etc/nginx/ssl/$DOMAIN.crt" 46 | echo "Copy $DOMAIN.key to /etc/nginx/ssl/$DOMAIN.key" 47 | echo "Add configuration in nginx:" 48 | echo "server {" 49 | echo " ..." 50 | echo " listen 443 ssl;" 51 | echo " ssl_certificate /etc/nginx/ssl/$DOMAIN.crt;" 52 | echo " ssl_certificate_key /etc/nginx/ssl/$DOMAIN.key;" 53 | echo " ssl_client_certificate /etc/nginx/ssl/ca.crt;" 54 | echo "}" 55 | -------------------------------------------------------------------------------- /AutoCProxy-v0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoCProxy (Nginx+cache+proxy)" 5 | echo "" 6 | echo "" 7 | echo "AutoCProxy v0.0.1 by badb0y " 8 | echo "Default Install PATH:/usr/local/{nginx}" 9 | echo "" 10 | echo "=========================================================================" 11 | echo "" 12 | echo "For more information please visit https://github.com/akin520/AutoSetup" 13 | echo "" 14 | 15 | read -p "If the OK! Press any key to start..." 16 | 17 | base() { 18 | echo "EVN Initialization..." 19 | if [ "`uname -m`" == "x86_64" ]; then 20 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 21 | rpm -Uhv http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm 22 | elif [ "`uname -m`" == "i686" ]; then 23 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 24 | rpm -Uvh http://mirrors.ustc.edu.cn/epel/6/i386/epel-release-6-7.noarch.rpm 25 | fi 26 | yum -y install cmake bison bison-devel 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 27 | yum -y install cmake libmcrypt libmcrypt-devel libmhash libmhash-devel 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-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers 28 | yum install pcre pcre-devel -y 29 | } 30 | 31 | download() { 32 | 33 | echo "Download soft..." 34 | wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz 35 | wget http://nginx.org/download/nginx-1.7.9.tar.gz 36 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/run.sh 37 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/stop.sh 38 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/openssl-1.0.0d.tar.gz 39 | wget --no-check-certificate https://raw.githubusercontent.com/akin520/AutoSetup/master/nginx_cache.conf -O nginx.conf 40 | wget --no-check-certificate https://raw.githubusercontent.com/akin520/AutoSetup/master/proxy_cache.conf -O proxy.conf 41 | 42 | } 43 | 44 | nginx() { 45 | 46 | echo "Installtion NGINX..." 47 | groupadd webadm 48 | useradd -g webadm webadm 49 | 50 | 51 | tar -zxvf ngx_cache_purge-2.3.tar.gz 52 | tar zxvf openssl-1.0.0d.tar.gz 53 | tar -zxvf nginx-1.7.9.tar.gz 54 | cd nginx-1.7.9 55 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --add-module=../ngx_cache_purge-2.3 --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-file-aio --with-openssl=../openssl-1.0.0d/ 56 | make;make install 57 | cd .. 58 | 59 | } 60 | 61 | config() { 62 | 63 | echo "Configuration..." 64 | 65 | echo "nginx config" 66 | rm -rf /usr/local/nginx/conf/nginx.conf 67 | cp -a *.conf /usr/local/nginx/conf 68 | 69 | cp -a *.sh /root/ 70 | sed -i '3d' /root/run.sh 71 | sed -i '2d' /root/stop.sh 72 | chmod 755 /root/*.sh 73 | } 74 | 75 | msg() { 76 | echo "=========================================================================" 77 | echo "Welcome to AutoNProxy (Nginx+cache+proxy)" 78 | echo "" 79 | echo "" 80 | echo "AutoCProxy v0.0.1 by badb0y " 81 | echo "Default Install PATH:/usr/local/{nginx}" 82 | echo "" 83 | echo "=========================================================================" 84 | echo "" 85 | } 86 | 87 | main() { 88 | 89 | echo "Installtion AutoNProxy..." 90 | base 91 | download 92 | nginx 93 | config 94 | msg 95 | } 96 | 97 | main -------------------------------------------------------------------------------- /AutoIM_Porxy for WIN v1.0.1.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoIM_Porxy for WIN v1.0.1.rar -------------------------------------------------------------------------------- /AutoIM_Porxy-1.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoIM_Porxy-1.0.1.tar.gz -------------------------------------------------------------------------------- /AutoMAP-0.1.11.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoMAP-0.1.11.tar.gz -------------------------------------------------------------------------------- /AutoMAP-v0.1.12.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoMAP (Apache+Mysql+PHP)" 5 | echo "" 6 | echo "" 7 | echo "AutoMAP v0.1.12 by badb0y " 8 | echo "Default Install PATH:/usr/local/{mysql.php.apache2}" 9 | echo "Default mysql password:google123" 10 | echo "Defautl web path:/usr/local/apache2/htdocs [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | export LANC=C 16 | 17 | read -p "If the OK! Press any key to start..." 18 | 19 | if [ "`uname -m`" == "x86_64" ]; then 20 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 21 | rpm -Uhv http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 22 | elif [ "`uname -m`" == "i686" ]; then 23 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 24 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm 25 | fi 26 | yum -y install bison bison-devel cmake patch make gcc gd gd-devel libxml* 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 27 | 28 | 29 | 30 | wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 31 | wget http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 32 | wget http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 33 | wget http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 34 | wget http://gd.tuwien.ac.at/db/mysql/Downloads/MySQL-5.5/mysql-5.5.19.tar.gz 35 | #wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.16-22.0/source/Percona-Server-5.5.16-rel22.0.tar.gz 36 | wget http://mirror.bjtu.edu.cn/apache//httpd/httpd-2.2.21.tar.gz 37 | wget http://am.php.net/distributions/php-5.3.8.tar.gz 38 | 39 | 40 | tar zxvf libiconv-1.13.tar.gz 41 | cd libiconv-1.13/ 42 | ./configure --prefix=/usr/local 43 | make 44 | make install 45 | cd ../ 46 | 47 | tar zxvf libmcrypt-2.5.8.tar.gz 48 | cd libmcrypt-2.5.8/ 49 | ./configure 50 | make 51 | make install 52 | /sbin/ldconfig 53 | cd libltdl/ 54 | ./configure --enable-ltdl-install 55 | make 56 | make install 57 | cd ../../ 58 | 59 | tar zxvf mhash-0.9.9.9.tar.gz 60 | cd mhash-0.9.9.9/ 61 | ./configure 62 | make 63 | make install 64 | cd ../ 65 | 66 | echo "/usr/local/lib" >> /etc/ld.so.conf 67 | ldconfig 68 | 69 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 70 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 71 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 72 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 73 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 74 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 75 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 76 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 77 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 78 | 79 | tar zxvf mcrypt-2.6.8.tar.gz 80 | cd mcrypt-2.6.8/ 81 | /sbin/ldconfig 82 | ./configure 83 | make 84 | make install 85 | cd ../ 86 | 87 | 88 | echo "Installation MYSQL..." 89 | groupadd mysql 90 | useradd -g mysql mysql 91 | tar -zxvf mysql-5.5.19.tar.gz 92 | cd mysql-5.5.19 93 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 94 | #cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 95 | make && make install 96 | cp support-files/my-medium.cnf /etc/my.cnf 97 | cp support-files/mysql.server /etc/init.d/mysql 98 | cd /usr/local/mysql 99 | ./scripts/mysql_install_db --user=mysql 100 | chown -R mysql /usr/local/mysql/data 101 | chgrp -R mysql /usr/local/mysql/. 102 | chmod 755 /etc/init.d/mysql 103 | chkconfig --level 345 mysql on 104 | echo "/usr/local/mysql/lib" >> /etc/ld.so.conf 105 | ldconfig 106 | service mysql start 107 | cd - 108 | cd .. 109 | /usr/local/mysql/bin/mysqladmin -u root password google123 110 | echo 'export PATH="/usr/local/mysql/bin:$PATH"' >>/etc/profile 111 | source /etc/profile 112 | 113 | 114 | tar -zxvf httpd-2.2.21.tar.gz 115 | cd httpd-2.2.21 116 | ./configure --prefix=/usr/local/apache2 --enable-so --enable-track-vars --enable-mods-shared=all --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite 117 | make&&make install 118 | cd .. 119 | 120 | 121 | tar -zxvf php-5.3.8.tar.gz 122 | cd php-5.3.8 123 | ./configure --prefix=/usr/local/php53 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php53/etc --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-mbstring --enable-sockets 124 | make ZEND_EXTRA_LIBS='-liconv' 125 | make install 126 | cp php.ini-production /usr/local/php53/etc/php.ini 127 | sed -i 's#short_open_tag = Off#short_open_tag = On#g' /usr/local/php53/etc/php.ini 128 | cd .. 129 | 130 | 131 | sed -i 's/index.html/index.php index.html/g' /usr/local/apache2/conf/httpd.conf 132 | echo "AddType application/x-httpd-php .php" >>/usr/local/apache2/conf/httpd.conf 133 | echo "AddType application/x-httpd-php-source .phps" >>/usr/local/apache2/conf/httpd.conf 134 | 135 | cat >/usr/local/apache2/htdocs/info.php< 139 | EOF 140 | 141 | chkconfig httpd off 142 | service httpd stop 143 | /usr/local/apache2/bin/apachectl start 144 | 145 | clear 146 | echo "=========================================================================" 147 | echo "Welcome to AutoMAP (Apache+Mysql+PHP)" 148 | echo "" 149 | echo "" 150 | echo "AutoMAP v0.1.12 by badb0y " 151 | echo "Default Install PATH:/usr/local/{mysql.php.apache2}" 152 | echo "Default mysql password:google123" 153 | echo "Defautl web path:/usr/local/apache2/htdocs [http://localhost/info.php]" 154 | echo "=========================================================================" 155 | echo "" 156 | echo "For more information please visit http://code.google.com/p/autosetup/" 157 | echo "" -------------------------------------------------------------------------------- /AutoMAP-v0.2.4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoMAP (Apache+Mysql+PHP)" 5 | echo "" 6 | echo "" 7 | echo "AutoMAP v0.2.4 by badb0y " 8 | echo "Default Install PATH:/usr/local/{mysql.php.apache2}" 9 | echo "Default mysql password:google123" 10 | echo "Defautl web path:/usr/local/apache2/htdocs [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | export LANC=C 16 | 17 | read -p "If the OK! Press any key to start..." 18 | 19 | if [ "`uname -m`" == "x86_64" ]; then 20 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 21 | rpm -Uhv http://mirrors.ustc.edu.cn/epel/5/x86_64/epel-release-5-4.noarch.rpm 22 | elif [ "`uname -m`" == "i686" ]; then 23 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 24 | rpm -Uvh http://mirrors.ustc.edu.cn/epel/5/i386/epel-release-5-4.noarch.rpm 25 | fi 26 | yum -y install bison bison-devel cmake patch make gcc gd gd-devel libxml* 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 27 | 28 | 29 | 30 | wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 31 | wget http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 32 | wget http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 33 | wget http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 34 | wget http://autosetup1.googlecode.com/files/mysql-5.5.19.tar.gz 35 | #wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.16-22.0/source/Percona-Server-5.5.16-rel22.0.tar.gz 36 | wget http://autosetup1.googlecode.com/files/httpd-2.2.21.tar.gz 37 | wget http://autosetup1.googlecode.com/files/php-5.3.8.tar.gz 38 | 39 | 40 | tar zxvf libiconv-1.13.tar.gz 41 | cd libiconv-1.13/ 42 | ./configure --prefix=/usr/local 43 | make 44 | make install 45 | cd ../ 46 | 47 | tar zxvf libmcrypt-2.5.8.tar.gz 48 | cd libmcrypt-2.5.8/ 49 | ./configure 50 | make 51 | make install 52 | /sbin/ldconfig 53 | cd libltdl/ 54 | ./configure --enable-ltdl-install 55 | make 56 | make install 57 | cd ../../ 58 | 59 | tar zxvf mhash-0.9.9.9.tar.gz 60 | cd mhash-0.9.9.9/ 61 | ./configure 62 | make 63 | make install 64 | cd ../ 65 | 66 | echo "/usr/local/lib" >> /etc/ld.so.conf 67 | ldconfig 68 | 69 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 70 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 71 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 72 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 73 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 74 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 75 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 76 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 77 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 78 | 79 | tar zxvf mcrypt-2.6.8.tar.gz 80 | cd mcrypt-2.6.8/ 81 | /sbin/ldconfig 82 | ./configure 83 | make 84 | make install 85 | cd ../ 86 | 87 | 88 | echo "Installation MYSQL..." 89 | groupadd mysql 90 | useradd -g mysql mysql 91 | tar -zxvf mysql-5.5.19.tar.gz 92 | cd mysql-5.5.19 93 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 94 | #cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 95 | make && make install 96 | cp support-files/my-medium.cnf /etc/my.cnf 97 | cp support-files/mysql.server /etc/init.d/mysql 98 | cd /usr/local/mysql 99 | ./scripts/mysql_install_db --user=mysql 100 | chown -R mysql /usr/local/mysql/data 101 | chgrp -R mysql /usr/local/mysql/. 102 | chmod 755 /etc/init.d/mysql 103 | chkconfig --level 345 mysql on 104 | echo "/usr/local/mysql/lib" >> /etc/ld.so.conf 105 | ldconfig 106 | service mysql start 107 | cd - 108 | cd .. 109 | /usr/local/mysql/bin/mysqladmin -u root password google123 110 | echo 'export PATH="/usr/local/mysql/bin:$PATH"' >>/etc/profile 111 | source /etc/profile 112 | 113 | 114 | tar -zxvf httpd-2.2.21.tar.gz 115 | cd httpd-2.2.21 116 | ./configure --prefix=/usr/local/apache2 --enable-so --enable-track-vars --enable-mods-shared=all --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite 117 | make&&make install 118 | cd .. 119 | 120 | 121 | tar -zxvf php-5.3.8.tar.gz 122 | cd php-5.3.8 123 | ./configure --prefix=/usr/local/php53 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php53/etc --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-mbstring --enable-sockets 124 | make ZEND_EXTRA_LIBS='-liconv' 125 | make install 126 | cp php.ini-production /usr/local/php53/etc/php.ini 127 | sed -i 's#short_open_tag = Off#short_open_tag = On#g' /usr/local/php53/etc/php.ini 128 | cd .. 129 | 130 | 131 | sed -i 's/index.html/index.php index.html/g' /usr/local/apache2/conf/httpd.conf 132 | echo "AddType application/x-httpd-php .php" >>/usr/local/apache2/conf/httpd.conf 133 | echo "AddType application/x-httpd-php-source .phps" >>/usr/local/apache2/conf/httpd.conf 134 | 135 | cat >/usr/local/apache2/htdocs/info.php< 139 | EOF 140 | 141 | chkconfig httpd off 142 | service httpd stop 143 | /usr/local/apache2/bin/apachectl start 144 | 145 | clear 146 | echo "=========================================================================" 147 | echo "Welcome to AutoMAP (Apache+Mysql+PHP)" 148 | echo "" 149 | echo "" 150 | echo "AutoMAP v0.2.4 by badb0y " 151 | echo "Default Install PATH:/usr/local/{mysql.php.apache2}" 152 | echo "Default mysql password:google123" 153 | echo "Defautl web path:/usr/local/apache2/htdocs [http://localhost/info.php]" 154 | echo "=========================================================================" 155 | echo "" 156 | echo "For more information please visit http://code.google.com/p/autosetup/" 157 | echo "" -------------------------------------------------------------------------------- /AutoMPN-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoMPN-0.0.1.tar.gz -------------------------------------------------------------------------------- /AutoMPN-v0.0.4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoMPN (MYSQL+PHP+NGINX)" 5 | echo "" 6 | echo "" 7 | echo "AutoMPN v0.0.4 by badb0y " 8 | echo "Default Install PATH:/usr/local/{mysql.php.nginx}" 9 | echo "Default mysql password:google123" 10 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | base() { 19 | 20 | echo "EVN Initialization..." 21 | if [ "`uname -m`" == "x86_64" ]; then 22 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 23 | elif [ "`uname -m`" == "i686" ]; then 24 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 25 | fi 26 | 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 27 | } 28 | 29 | download() { 30 | 31 | echo "Download soft..." 32 | wget -c http://sysoev.ru/nginx/nginx-0.8.53.tar.gz 33 | wget -c http://autosetup1.googlecode.com/files/php-5.2.13.tar.gz 34 | wget -c http://autosetup1.googlecode.com/files/php-5.2.13-fpm-0.5.13.diff.gz 35 | wget -c http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 36 | wget -c http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 37 | wget -c http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 38 | wget -c http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 39 | wget -c http://autosetup1.googlecode.com/files/pcre-8.01.tar.gz 40 | wget -c http://autosetup1.googlecode.com/files/mysql-5.5.2-m2.tar.gz 41 | wget -c http://autosetup1.googlecode.com/files/php-fpm.conf 42 | wget -c http://autosetup1.googlecode.com/files/nginx.conf 43 | wget -c http://autosetup1.googlecode.com/files/fcgi.conf 44 | wget -c http://autosetup1.googlecode.com/files/run.sh 45 | wget -c http://autosetup1.googlecode.com/files/stop.sh 46 | } 47 | 48 | installlib() { 49 | 50 | echo "Installation support library..." 51 | tar zxvf libiconv-1.13.tar.gz 52 | cd libiconv-1.13/ 53 | ./configure --prefix=/usr/local 54 | make 55 | make install 56 | cd ../ 57 | 58 | tar zxvf libmcrypt-2.5.8.tar.gz 59 | cd libmcrypt-2.5.8/ 60 | ./configure 61 | make 62 | make install 63 | /sbin/ldconfig 64 | cd libltdl/ 65 | ./configure --enable-ltdl-install 66 | make 67 | make install 68 | cd ../../ 69 | 70 | tar zxvf mhash-0.9.9.9.tar.gz 71 | cd mhash-0.9.9.9/ 72 | ./configure 73 | make 74 | make install 75 | cd ../ 76 | 77 | echo "/usr/local/lib" >> /etc/ld.so.conf 78 | ldconfig 79 | 80 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 81 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 82 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 83 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 84 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 85 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 86 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 87 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 88 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 89 | 90 | tar zxvf mcrypt-2.6.8.tar.gz 91 | cd mcrypt-2.6.8/ 92 | /sbin/ldconfig 93 | ./configure 94 | make 95 | make install 96 | cd ../ 97 | } 98 | 99 | mysql() { 100 | 101 | echo "Installation MYSQL..." 102 | tar -zxvf mysql-5.5.2-m2.tar.gz 103 | cd mysql-5.5.2-m2/ 104 | ./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 105 | make;make install 106 | cd .. 107 | 108 | groupadd mysql 109 | useradd -g mysql mysql 110 | cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf 111 | /usr/local/mysql/bin/mysql_install_db --user=mysql 112 | chown -R mysql /usr/local/mysql/var 113 | chgrp -R mysql /usr/local/mysql/. 114 | cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql 115 | chmod 755 /etc/init.d/mysql 116 | chkconfig --level 345 mysql on 117 | echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf 118 | ldconfig 119 | ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql 120 | ln -s /usr/local/mysql/include/mysql /usr/include/mysql 121 | service mysql start 122 | /usr/local/mysql/bin/mysqladmin -u root password google123 123 | service mysql stop 124 | } 125 | 126 | php() { 127 | 128 | echo "Installtion PHP..." 129 | tar zxvf php-5.2.13.tar.gz 130 | gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1 131 | cd php-5.2.13/ 132 | ./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 133 | make ZEND_EXTRA_LIBS='-liconv' 134 | make install 135 | cp php.ini-dist /usr/local/php/etc/php.ini 136 | cd .. 137 | } 138 | 139 | nginx() { 140 | 141 | echo "Installtion NGINX..." 142 | groupadd webadm 143 | useradd -g webadm webadm 144 | 145 | tar zxvf pcre-8.01.tar.gz 146 | cd pcre-8.01/ 147 | ./configure 148 | make ;make install 149 | cd ../ 150 | 151 | tar zxvf nginx-0.8.53.tar.gz 152 | cd nginx-0.8.53 153 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 154 | make; make install 155 | cd ../ 156 | } 157 | 158 | config() { 159 | 160 | echo "Configuration..." 161 | echo "php config" 162 | rm -rf /usr/local/php/etc/php-fpm.conf 163 | cp php-fpm.conf /usr/local/php/etc/ 164 | 165 | echo "nginx config" 166 | rm -rf /usr/local/nginx/conf/fcgi.conf 167 | rm -rf /usr/local/nginx/conf/nginx.conf 168 | cp -a fcgi.conf /usr/local/nginx/conf/ 169 | cp -a nginx.conf /usr/local/nginx/conf/ 170 | 171 | echo '' >/home/webadm/info.php 172 | 173 | #echo "ulimit -SHn 51200" >>/root/run.sh 174 | #echo "/usr/local/php/sbin/php-fpm start" >>/root/run.sh 175 | #echo "/usr/local/nginx/sbin/nginx -t" >>/root/run.sh 176 | #echo "/usr/local/nginx/sbin/nginx" >>/root/run.sh 177 | #sed -i '1 i#!/bin/bash' /root/run.sh 178 | 179 | #echo "kill akintxt" >>/root/stop.sh 180 | #echo "/usr/local/php/sbin/php-fpm stop" >>/root/stop.sh 181 | #sed -i 's!akintxt!`cat /usr/local/nginx/logs/nginx.pid`!g' /root/stop.sh 182 | #sed -i '1 i#!/bin/bash' /root/stop.sh 183 | cp -a run.sh /root/ 184 | cp -a stop.sh /root/ 185 | chmod 755 /root/*.sh 186 | } 187 | 188 | main() { 189 | 190 | echo "Installtion AutoMPN..." 191 | base 192 | download 193 | installlib 194 | mysql 195 | php 196 | nginx 197 | config 198 | } 199 | 200 | main -------------------------------------------------------------------------------- /AutoMPN-v0.0.5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoMPN (MYSQL+PHP+NGINX)" 5 | echo "" 6 | echo "" 7 | echo "AutoMPN v0.0.5 by badb0y " 8 | echo "Default Install PATH:/usr/local/{mysql.php.nginx}" 9 | echo "Default mysql password:google123" 10 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | base() { 19 | 20 | echo "EVN Initialization..." 21 | if [ "`uname -m`" == "x86_64" ]; then 22 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 23 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 24 | elif [ "`uname -m`" == "i686" ]; then 25 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 26 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm 27 | fi 28 | 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 29 | } 30 | 31 | download() { 32 | 33 | echo "Download soft..." 34 | wget http://nginx.org/download/nginx-1.1.4.tar.gz 35 | wget http://autosetup1.googlecode.com/files/php-5.2.13.tar.gz 36 | wget http://autosetup1.googlecode.com/files/php-5.2.13-fpm-0.5.13.diff.gz 37 | wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 38 | wget http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 39 | wget http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 40 | wget http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 41 | wget http://autosetup1.googlecode.com/files/pcre-8.01.tar.gz 42 | wget http://autosetup1.googlecode.com/files/mysql-5.5.2-m2.tar.gz 43 | wget http://autosetup1.googlecode.com/files/php-fpm.conf 44 | wget http://autosetup1.googlecode.com/files/nginx.conf 45 | wget http://autosetup1.googlecode.com/files/fcgi.conf 46 | wget http://autosetup1.googlecode.com/files/run.sh 47 | wget http://autosetup1.googlecode.com/files/stop.sh 48 | } 49 | 50 | installlib() { 51 | 52 | echo "Installation support library..." 53 | tar zxvf libiconv-1.13.tar.gz 54 | cd libiconv-1.13/ 55 | ./configure --prefix=/usr/local 56 | make 57 | make install 58 | cd ../ 59 | 60 | tar zxvf libmcrypt-2.5.8.tar.gz 61 | cd libmcrypt-2.5.8/ 62 | ./configure 63 | make 64 | make install 65 | /sbin/ldconfig 66 | cd libltdl/ 67 | ./configure --enable-ltdl-install 68 | make 69 | make install 70 | cd ../../ 71 | 72 | tar zxvf mhash-0.9.9.9.tar.gz 73 | cd mhash-0.9.9.9/ 74 | ./configure 75 | make 76 | make install 77 | cd ../ 78 | 79 | echo "/usr/local/lib" >> /etc/ld.so.conf 80 | ldconfig 81 | 82 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 83 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 84 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 85 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 86 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 87 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 88 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 89 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 90 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 91 | 92 | tar zxvf mcrypt-2.6.8.tar.gz 93 | cd mcrypt-2.6.8/ 94 | /sbin/ldconfig 95 | ./configure 96 | make 97 | make install 98 | cd ../ 99 | } 100 | 101 | mysql() { 102 | 103 | echo "Installation MYSQL..." 104 | tar -zxvf mysql-5.5.2-m2.tar.gz 105 | cd mysql-5.5.2-m2/ 106 | ./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 107 | make;make install 108 | cd .. 109 | 110 | groupadd mysql 111 | useradd -g mysql mysql 112 | cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf 113 | /usr/local/mysql/bin/mysql_install_db --user=mysql 114 | chown -R mysql /usr/local/mysql/var 115 | chgrp -R mysql /usr/local/mysql/. 116 | cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql 117 | chmod 755 /etc/init.d/mysql 118 | chkconfig --level 345 mysql on 119 | echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf 120 | ldconfig 121 | ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql 122 | ln -s /usr/local/mysql/include/mysql /usr/include/mysql 123 | service mysql start 124 | /usr/local/mysql/bin/mysqladmin -u root password google123 125 | service mysql stop 126 | } 127 | 128 | php() { 129 | 130 | echo "Installtion PHP..." 131 | tar zxvf php-5.2.13.tar.gz 132 | gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1 133 | cd php-5.2.13/ 134 | ./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 135 | make ZEND_EXTRA_LIBS='-liconv' 136 | make install 137 | cp php.ini-dist /usr/local/php/etc/php.ini 138 | cd .. 139 | } 140 | 141 | nginx() { 142 | 143 | echo "Installtion NGINX..." 144 | groupadd webadm 145 | useradd -g webadm webadm 146 | 147 | tar zxvf pcre-8.01.tar.gz 148 | cd pcre-8.01/ 149 | ./configure 150 | make ;make install 151 | cd ../ 152 | 153 | tar zxvf nginx-1.1.4.tar.gz 154 | cd nginx-1.1.4 155 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 156 | make; make install 157 | cd ../ 158 | } 159 | 160 | config() { 161 | 162 | echo "Configuration..." 163 | echo "php config" 164 | rm -rf /usr/local/php/etc/php-fpm.conf 165 | cp php-fpm.conf /usr/local/php/etc/ 166 | 167 | echo "nginx config" 168 | rm -rf /usr/local/nginx/conf/fcgi.conf 169 | rm -rf /usr/local/nginx/conf/nginx.conf 170 | cp -a fcgi.conf /usr/local/nginx/conf/ 171 | cp -a nginx.conf /usr/local/nginx/conf/ 172 | 173 | echo '' >/home/webadm/info.php 174 | 175 | #echo "ulimit -SHn 51200" >>/root/run.sh 176 | #echo "/usr/local/php/sbin/php-fpm start" >>/root/run.sh 177 | #echo "/usr/local/nginx/sbin/nginx -t" >>/root/run.sh 178 | #echo "/usr/local/nginx/sbin/nginx" >>/root/run.sh 179 | #sed -i '1 i#!/bin/bash' /root/run.sh 180 | 181 | #echo "kill akintxt" >>/root/stop.sh 182 | #echo "/usr/local/php/sbin/php-fpm stop" >>/root/stop.sh 183 | #sed -i 's!akintxt!`cat /usr/local/nginx/logs/nginx.pid`!g' /root/stop.sh 184 | #sed -i '1 i#!/bin/bash' /root/stop.sh 185 | cp -a run.sh /root/ 186 | cp -a stop.sh /root/ 187 | chmod 755 /root/*.sh 188 | } 189 | 190 | main() { 191 | 192 | echo "Installtion AutoMPN..." 193 | base 194 | download 195 | installlib 196 | mysql 197 | php 198 | nginx 199 | config 200 | } 201 | 202 | main -------------------------------------------------------------------------------- /AutoMPN-v0[1].0.3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoMPN (MYSQL+PHP+NGINX)" 5 | echo "" 6 | echo "" 7 | echo "AutoMPN v0.0.3 by badb0y " 8 | echo "Default Install PATH:/usr/local/{mysql.php.nginx}" 9 | echo "Default mysql password:google123" 10 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | base() { 19 | 20 | echo "EVN Initialization..." 21 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 22 | 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 23 | } 24 | 25 | download() { 26 | 27 | echo "Download soft..." 28 | wget http://sysoev.ru/nginx/nginx-0.8.34.tar.gz 29 | wget http://www.php.net/get/php-5.2.13.tar.gz/from/this/mirror 30 | wget http://php-fpm.org/downloads/php-5.2.13-fpm-0.5.13.diff.gz 31 | wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz 32 | wget "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0" 33 | wget "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?modtime=1194463373&big_mirror=0" 34 | wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?modtime=1175740843&big_mirror=0" 35 | wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.gz 36 | wget http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.2-m2.tar.gz 37 | wget http://autosetup1.googlecode.com/files/php-fpm.conf 38 | wget http://autosetup1.googlecode.com/files/nginx.conf 39 | wget http://autosetup1.googlecode.com/files/fcgi.conf 40 | wget http://autosetup1.googlecode.com/files/run.sh 41 | wget http://autosetup1.googlecode.com/files/stop.sh 42 | } 43 | 44 | installlib() { 45 | 46 | echo "Installation support library..." 47 | tar zxvf libiconv-1.13.tar.gz 48 | cd libiconv-1.13/ 49 | ./configure --prefix=/usr/local 50 | make 51 | make install 52 | cd ../ 53 | 54 | tar zxvf libmcrypt-2.5.8.tar.gz 55 | cd libmcrypt-2.5.8/ 56 | ./configure 57 | make 58 | make install 59 | /sbin/ldconfig 60 | cd libltdl/ 61 | ./configure --enable-ltdl-install 62 | make 63 | make install 64 | cd ../../ 65 | 66 | tar zxvf mhash-0.9.9.9.tar.gz 67 | cd mhash-0.9.9.9/ 68 | ./configure 69 | make 70 | make install 71 | cd ../ 72 | 73 | echo "/usr/local/lib" >> /etc/ld.so.conf 74 | ldconfig 75 | 76 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 77 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 78 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 79 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 80 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 81 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 82 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 83 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 84 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 85 | 86 | tar zxvf mcrypt-2.6.8.tar.gz 87 | cd mcrypt-2.6.8/ 88 | /sbin/ldconfig 89 | ./configure 90 | make 91 | make install 92 | cd ../ 93 | } 94 | 95 | mysql() { 96 | 97 | echo "Installation MYSQL..." 98 | tar -zxvf mysql-5.5.2-m2.tar.gz 99 | cd mysql-5.5.2-m2/ 100 | ./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 101 | make;make install 102 | cd .. 103 | 104 | groupadd mysql 105 | useradd -g mysql mysql 106 | cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf 107 | /usr/local/mysql/bin/mysql_install_db --user=mysql 108 | chown -R mysql /usr/local/mysql/var 109 | chgrp -R mysql /usr/local/mysql/. 110 | cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql 111 | chmod 755 /etc/init.d/mysql 112 | chkconfig --level 345 mysql on 113 | echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf 114 | ldconfig 115 | ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql 116 | ln -s /usr/local/mysql/include/mysql /usr/include/mysql 117 | service mysql start 118 | /usr/local/mysql/bin/mysqladmin -u root password google123 119 | service mysql stop 120 | } 121 | 122 | php() { 123 | 124 | echo "Installtion PHP..." 125 | tar zxvf php-5.2.13.tar.gz 126 | gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1 127 | cd php-5.2.13/ 128 | ./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 129 | make ZEND_EXTRA_LIBS='-liconv' 130 | make install 131 | cp php.ini-dist /usr/local/php/etc/php.ini 132 | cd .. 133 | } 134 | 135 | nginx() { 136 | 137 | echo "Installtion NGINX..." 138 | groupadd webadm 139 | useradd -g webadm webadm 140 | 141 | tar zxvf pcre-8.01.tar.gz 142 | cd pcre-8.01/ 143 | ./configure 144 | make ;make install 145 | cd ../ 146 | 147 | tar zxvf nginx-0.8.34.tar.gz 148 | cd nginx-0.8.34/ 149 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 150 | make; make install 151 | cd ../ 152 | } 153 | 154 | config() { 155 | 156 | echo "Configuration..." 157 | echo "php config" 158 | rm -rf /usr/local/php/etc/php-fpm.conf 159 | cp php-fpm.conf /usr/local/php/etc/ 160 | 161 | echo "nginx config" 162 | rm -rf /usr/local/nginx/conf/fcgi.conf 163 | rm -rf /usr/local/nginx/conf/nginx.conf 164 | cp -a fcgi.conf /usr/local/nginx/conf/ 165 | cp -a nginx.conf /usr/local/nginx/conf/ 166 | 167 | echo '' >/home/webadm/info.php 168 | 169 | #echo "ulimit -SHn 51200" >>/root/run.sh 170 | #echo "/usr/local/php/sbin/php-fpm start" >>/root/run.sh 171 | #echo "/usr/local/nginx/sbin/nginx -t" >>/root/run.sh 172 | #echo "/usr/local/nginx/sbin/nginx" >>/root/run.sh 173 | #sed -i '1 i#!/bin/bash' /root/run.sh 174 | 175 | #echo "kill akintxt" >>/root/stop.sh 176 | #echo "/usr/local/php/sbin/php-fpm stop" >>/root/stop.sh 177 | #sed -i 's!akintxt!`cat /usr/local/nginx/logs/nginx.pid`!g' /root/stop.sh 178 | #sed -i '1 i#!/bin/bash' /root/stop.sh 179 | cp -a run.sh /root/ 180 | cp -a stop.sh /root/ 181 | chmod 755 /root/*.sh 182 | } 183 | 184 | main() { 185 | 186 | echo "Installtion AutoMPN..." 187 | base 188 | download 189 | installlib 190 | mysql 191 | php 192 | nginx 193 | config 194 | } 195 | 196 | main -------------------------------------------------------------------------------- /AutoMail-el5-v0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | showmsg() { 4 | clear 5 | cat << "EOF" 6 | 7 | This script is ExtMail server v0.0.1: 8 | 9 | * Install Postfix/courier-imap CentOS5.x 10 | * Install WebMail(extmail&extman) 11 | 12 | Press Ctrl-C now if you want to exit 13 | 14 | EOF 15 | read -p "Press any key to continue..." 16 | } 17 | 18 | baseamp() { 19 | if [ "`uname -m`" == "x86_64" ]; then 20 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 21 | elif [ "`uname -m`" == "i686" ]; then 22 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 23 | fi 24 | #add EMOS repo 25 | wget http://autosetup1.googlecode.com/files/EMOS-Base.repo -O /etc/yum.repos.d/EMOS-Base.repo 26 | yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-adodb php-xml php-mbstring php-ldap php-pear php-xmlrpc libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql-devel libdbi-dbd-mysql 27 | chkconfig httpd on 28 | chkcofnig mysqld on 29 | /etc/init.d/mysqld restart 30 | /etc/init.d/httpd restart 31 | } 32 | 33 | postfixinstall(){ 34 | yum --disablerepo=* --enablerepo=EMOS-base install postfix -y 35 | #configure postfix 36 | postconf -n > /etc/postfix/main2.cf 37 | mv /etc/postfix/main.cf /etc/postfix/main.cf.old 38 | mv /etc/postfix/main2.cf /etc/postfix/main.cf 39 | #stop sendmail 40 | /etc/init.d/sendmail stop 41 | chkconfig sendmail off 42 | #change mta 43 | alternatives --set mta /usr/sbin/sendmail.postfix 44 | chkconfig postfix on 45 | /etc/init.d/postfix restart 46 | #configure main.cf 47 | echo '#hostname' >>/etc/postfix/main.cf 48 | postconf -e 'mynetworks = 127.0.0.1' 49 | postconf -e "myhostname = `hostname`" 50 | postconf -e 'mydestination = $mynetworks $myhostname' 51 | echo '# banner' >>/etc/postfix/main.cf 52 | postconf -e 'mail_name = Postfix - by AutoMail' 53 | postconf -e 'smtpd_banner = $myhostname ESMTP $mail_name' 54 | echo '# response immediately' >>/etc/postfix/main.cf 55 | postconf -e 'smtpd_error_sleep_time = 0s' 56 | echo '# Message and return code control' >>/etc/postfix/main.cf 57 | postconf -e 'message_size_limit = 5242880' 58 | postconf -e 'mailbox_size_limit = 5242880' 59 | postconf -e 'show_user_unknown_table_name = no' 60 | echo '# Queue lifetime control' >>/etc/postfix/main.cf 61 | postconf -e 'bounce_queue_lifetime = 1d' 62 | postconf -e 'maximal_queue_lifetime = 1d' 63 | } 64 | 65 | maildropinstall(){ 66 | yum -y --disablerepo=* --enablerepo=EMOS-base install maildrop 67 | echo 'maildrop unix - n n - - pipe' >>/etc/postfix/master.cf 68 | echo ' flags=DRhu user=vuser argv=maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${extension} {nexthop}' >>/etc/postfix/master.cf 69 | echo '#maildrop only one' >>/etc/postfix/main.cf 70 | postconf -e 'maildrop_destination_recipient_limit = 1' 71 | } 72 | 73 | 74 | courier(){ 75 | if [ "`uname -m`" == "x86_64" ]; then 76 | #wget http://www.hajo.net/pub/Linux/MyRepos/CentOS5.2/x86_64/courier-authlib-0.62.2-1.x86_64.rpm 77 | #wget http://www.hajo.net/pub/Linux/MyRepos/CentOS5.2/x86_64/courier-authlib-mysql-0.62.2-1.x86_64.rpm 78 | #wget http://www.hajo.net/pub/Linux/MyRepos/CentOS5.2/x86_64/courier-authlib-devel-0.62.2-1.x86_64.rpm 79 | yum remove -y courier-authlib-0.57-2hzq 80 | wget http://autosetup1.googlecode.com/files/courier-authlib-0.62.2-1.x86_64.rpm 81 | wget http://autosetup1.googlecode.com/files/courier-authlib-devel-0.62.2-1.x86_64.rpm 82 | wget http://autosetup1.googlecode.com/files/courier-authlib-mysql-0.62.2-1.x86_64.rpm 83 | rpm -Uvh courier* 84 | yum -y --disablerepo=* --enablerepo=EMOS-base install maildrop 85 | elif [ "`uname -m`" == "i686" ]; then 86 | yum -y --disablerepo=* --enablerepo=EMOS-base install courier-authlib courier-authlib-mysql courier-authlib-devel 87 | fi 88 | wget http://autosetup1.googlecode.com/files/authmysqlrc -O /etc/authlib/authmysqlrc 89 | wget http://autosetup1.googlecode.com/files/authdaemonrc -O /etc/authlib/authdaemonrc 90 | chmod 755 /var/spool/authdaemon/ 91 | } 92 | 93 | 94 | 95 | saslinstall(){ 96 | rpm -e cyrus-sasl --nodeps 97 | yum -y --disablerepo=* --enablerepo=EMOS-base install cyrus-sasl 98 | 99 | cat >>/etc/postfix/main.cf</usr/lib64/sasl2/smtpd.conf</usr/lib/sasl2/smtpd.conf<>/etc/httpd/conf/httpd.conf</etc/httpd/conf/vhost_automail.conf< 169 | ServerName mail.extmail.org 170 | DocumentRoot /var/www/extsuite/extmail/html/ 171 | 172 | ScriptAlias /extmail/cgi/ /var/www/extsuite/extmail/cgi/ 173 | Alias /extmail /var/www/extsuite/extmail/html/ 174 | 175 | ScriptAlias /extman/cgi/ /var/www/extsuite/extman/cgi/ 176 | Alias /extman /var/www/extsuite/extman/html/ 177 | 178 | # Suexec config 179 | SuexecUserGroup vuser vgroup 180 | 181 | HEOF 182 | 183 | #install extmail 184 | yum -y --disablerepo=* --enablerepo=EMOS-base install extsuite-webmail 185 | 186 | cd /var/www/extsuite/extmail 187 | cp webmail.cf.default webmail.cf 188 | #configure webmail.cf 189 | sed -i 's#SYS_MYSQL_USER = db_user#SYS_MYSQL_USER = extmail#g' webmail.cf 190 | sed -i 's#SYS_MYSQL_PASS = db_pass#SYS_MYSQL_PASS = extmail#g' webmail.cf 191 | chown -R vuser:vgroup /var/www/extsuite/extmail/cgi/ 192 | 193 | #install extman 194 | yum -y --disablerepo=* --enablerepo=EMOS-base install extsuite-webman 195 | 196 | chown -R vuser:vgroup /var/www/extsuite/extman/cgi/ 197 | mkdir -p /var/www/extsuite/extman/tmp 198 | chown -R vuser:vgroup /var/www/extsuite/extman/tmp 199 | sed -i 's#SYS_SESS_DIR = /tmp/extman/#SYS_SESS_DIR = /var/www/extsuite/extman/tmp/#g' /var/www/extsuite/extman/webman.cf 200 | #close Verification code 201 | sed -i 's/SYS_CAPTCHA_ON = 1/SYS_CAPTCHA_ON = 0/g' /var/www/extsuite/extman/webman.cf 202 | #add mysql user 203 | mysql -uroot -e 'GRANT ALL ON *.* TO extmail@'localhost' IDENTIFIED BY "extmail";' 204 | mysql -uroot -e 'flush privileges;' 205 | 206 | #configure postfix mysql 207 | mysql -u root < /var/www/extsuite/extman/docs/extmail.sql 208 | mysql -u root < /var/www/extsuite/extman/docs/init.sql 209 | cd /var/www/extsuite/extman/docs 210 | cp mysql_virtual_alias_maps.cf /etc/postfix/ 211 | cp mysql_virtual_domains_maps.cf /etc/postfix/ 212 | cp mysql_virtual_mailbox_maps.cf /etc/postfix/ 213 | cp mysql_virtual_sender_maps.cf /etc/postfix/ 214 | #configure postfix main.cf 215 | echo '# extmail config here' >>/etc/postfix/main.cf 216 | postconf -e 'virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf' 217 | postconf -e 'virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf' 218 | postconf -e 'virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf' 219 | postconf -e 'virtual_transport = maildrop:' 220 | 221 | service postfix restart 222 | #create mail domain 223 | cd /var/www/extsuite/extman/tools 224 | ./maildirmake.pl /home/domains/extmail.org/postmaster/Maildir 225 | chown -R vuser:vgroup /home/domains/extmail.org 226 | /usr/local/mailgraph_ext/mailgraph-init start 227 | /var/www/extsuite/extman/daemon/cmdserver --daemon 228 | 229 | #add rc.local 230 | echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.local 231 | echo "/usr/local/mailgraph_ext/qmonitor-init start" >> /etc/rc.local 232 | echo "/var/www/extsuite/extman/daemon/cmdserver --daemon" >>/etc/rc.local 233 | 234 | 235 | 236 | } 237 | 238 | showend(){ 239 | /etc/init.d/httpd restart 240 | /etc/init.d/postfix restart 241 | /etc/init.d/courier-authlib restart 242 | /etc/init.d/courier-imap restart 243 | clear 244 | cat << "EOF" 245 | 246 | 247 | This script is ExtMail server v0.0.1: 248 | 249 | * Install Postfix/courier-imap CentOS5.x 250 | * Mysql:[root:null] [extmail:extmail] 251 | * Authtest:/usr/sbin/authtest -s login postmaster@extmail.org extmail 252 | * Test doc:http://autosetup1.googlecode.com/files/test%20mail.txt 253 | * Extmail:http://0.0.0.0/extmail/ [u:postmaster p:extmail d:extmail.org] 254 | * Extman:http://0.0.0.0/extman/ [u:root@extmail.org p:extmail*123* d:extmail.org] 255 | 256 | 257 | EOF 258 | } 259 | 260 | main(){ 261 | showmsg 262 | baseamp 263 | postfixinstall 264 | maildropinstall 265 | courier 266 | saslinstall 267 | imapinstall 268 | extinstall 269 | showend 270 | } 271 | 272 | main -------------------------------------------------------------------------------- /AutoMail-el6-v0.0.3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | showmsg() { 4 | clear 5 | cat << "EOF" 6 | 7 | This script is ExtMail server v0.0.3: 8 | 9 | * Install Postfix/courier-imap CentOS6.x x86_64: 10 | * Install WebMail(extmail&extman) 11 | 12 | Press Ctrl-C now if you want to exit 13 | 14 | EOF 15 | read -p "Press any key to continue..." 16 | } 17 | 18 | baseamp() { 19 | yum install epel-* nss-devel -y 20 | #add EMOS localhost repo 21 | #wget https://raw.githubusercontent.com/akin520/autosetup1/master/EMOS-Base1.6.repo -O /etc/yum.repos.d/EMOS-Base.repo 22 | wget https://raw.githubusercontent.com/akin520/autosetup1/master/EMOS-Local.repo -O /etc/yum.repos.d/EMOS-Local.repo 23 | if [ ! -f /tmp/EMOS_1.6_x86_64.iso ];then 24 | wget http://mirror.extmail.org/iso/emos/EMOS_1.6_x86_64.iso -O /tmp/EMOS_1.6_x86_64.iso 25 | fi 26 | mkdir -p /emos 27 | mount -o loop /tmp/EMOS_1.6_x86_64.iso /emos 28 | #mysql 29 | mv /etc/my.cnf /etc/my.cnf`date +%Y%m%d%H` 30 | yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm 31 | yum install -y Percona-Server-server-56 32 | /etc/init.d/mysql start 33 | chkconfig mysql on 34 | yum -y install httpd php php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-adodb php-xml php-mbstring php-ldap php-pear php-xmlrpc libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql-devel libdbi-dbd-mysql 35 | chkconfig httpd on 36 | /etc/init.d/httpd restart 37 | /etc/init.d/mysql restart 38 | } 39 | 40 | postfixinstall(){ 41 | yum --disablerepo=* --enablerepo=EMOS-base install postfix -y 42 | #configure postfix 43 | postconf -n > /etc/postfix/main2.cf 44 | mv /etc/postfix/main.cf /etc/postfix/main.cf.old 45 | mv /etc/postfix/main2.cf /etc/postfix/main.cf 46 | #stop sendmail 47 | /etc/init.d/sendmail stop 48 | chkconfig sendmail off 49 | #change mta 50 | alternatives --set mta /usr/sbin/sendmail.postfix 51 | chkconfig postfix on 52 | /etc/init.d/postfix restart 53 | #configure main.cf 54 | echo '#hostname' >>/etc/postfix/main.cf 55 | postconf -e 'mynetworks = 127.0.0.1' 56 | postconf -e "myhostname = `hostname`" 57 | postconf -e 'mydestination = $mynetworks $myhostname' 58 | echo '# banner' >>/etc/postfix/main.cf 59 | postconf -e 'mail_name = Postfix - by AutoMail' 60 | postconf -e 'smtpd_banner = $myhostname ESMTP $mail_name' 61 | echo '# response immediately' >>/etc/postfix/main.cf 62 | postconf -e 'smtpd_error_sleep_time = 0s' 63 | echo '# Message and return code control' >>/etc/postfix/main.cf 64 | postconf -e 'message_size_limit = 5242880' 65 | postconf -e 'mailbox_size_limit = 5242880' 66 | postconf -e 'show_user_unknown_table_name = no' 67 | echo '# Queue lifetime control' >>/etc/postfix/main.cf 68 | postconf -e 'bounce_queue_lifetime = 1d' 69 | postconf -e 'maximal_queue_lifetime = 1d' 70 | } 71 | 72 | maildropinstall(){ 73 | yum -y --disablerepo=* --enablerepo=EMOS-base install maildrop 74 | echo 'maildrop unix - n n - - pipe' >>/etc/postfix/master.cf 75 | echo ' flags=DRhu user=vuser argv=maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${extension} {nexthop}' >>/etc/postfix/master.cf 76 | echo '#maildrop only one' >>/etc/postfix/main.cf 77 | postconf -e 'maildrop_destination_recipient_limit = 1' 78 | } 79 | 80 | 81 | courier(){ 82 | yum -y --disablerepo=* --enablerepo=EMOS-base install courier-authlib courier-authlib-mysql courier-authlib-devel 83 | wget https://raw.githubusercontent.com/akin520/autosetup1/master/authmysqlrc -O /etc/authlib/authmysqlrc 84 | wget https://raw.githubusercontent.com/akin520/autosetup1/master/authdaemonrc -O /etc/authlib/authdaemonrc 85 | chmod 755 /var/spool/authdaemon/ 86 | } 87 | 88 | 89 | 90 | saslinstall(){ 91 | rpm -e cyrus-sasl-lib --nodeps 92 | rpm -Uvh /emos/EMOS/cyrus-sasl/RPMS/cyrus-sasl-lib-2.1.23-8.FT.el6.x86_64.rpm 93 | yum -y --disablerepo=* --enablerepo=EMOS-base install cyrus-sasl cyrus-sasl-plain 94 | 95 | cat >>/etc/postfix/main.cf</usr/lib64/sasl2/smtpd.conf<>/etc/httpd/conf/httpd.conf</etc/httpd/conf/vhost_automail.conf< 155 | ServerName mail.extmail.org 156 | DocumentRoot /var/www/extsuite/extmail/html/ 157 | 158 | ScriptAlias /extmail/cgi/ /var/www/extsuite/extmail/cgi/ 159 | Alias /extmail /var/www/extsuite/extmail/html/ 160 | 161 | ScriptAlias /extman/cgi/ /var/www/extsuite/extman/cgi/ 162 | Alias /extman /var/www/extsuite/extman/html/ 163 | 164 | # Suexec config 165 | SuexecUserGroup vuser vgroup 166 | 167 | HEOF 168 | 169 | #install extmail 170 | yum -y install extsuite-webmail perl-DBD-mysql perl-ExtUtils-MakeMaker 171 | 172 | cd /var/www/extsuite/extmail 173 | cp webmail.cf.default webmail.cf 174 | #configure webmail.cf 175 | sed -i 's#SYS_MYSQL_USER = db_user#SYS_MYSQL_USER = extmail#g' webmail.cf 176 | sed -i 's#SYS_MYSQL_PASS = db_pass#SYS_MYSQL_PASS = extmail#g' webmail.cf 177 | chown -R vuser:vgroup /var/www/extsuite/extmail/cgi/ 178 | 179 | #install extman 180 | yum -y install extsuite-webman 181 | 182 | chown -R vuser:vgroup /var/www/extsuite/extman/cgi/ 183 | mkdir -p /var/www/extsuite/extman/tmp 184 | chown -R vuser:vgroup /var/www/extsuite/extman/tmp 185 | sed -i 's#SYS_SESS_DIR = /tmp/extman/#SYS_SESS_DIR = /var/www/extsuite/extman/tmp/#g' /var/www/extsuite/extman/webman.cf 186 | #close Verification code 187 | sed -i 's/SYS_CAPTCHA_ON = 1/SYS_CAPTCHA_ON = 0/g' /var/www/extsuite/extman/webman.cf 188 | #add mysql user 189 | mysql -uroot -e 'GRANT ALL ON *.* TO extmail@'localhost' IDENTIFIED BY "extmail";' 190 | mysql -uroot -e 'flush privileges;' 191 | 192 | #configure postfix mysql 193 | sed -i 's/TYPE=MyISAM/ENGINE=MyISAM/' /var/www/extsuite/extman/docs/extmail.sql 194 | mysql -u root < /var/www/extsuite/extman/docs/extmail.sql 195 | mysql -u root < /var/www/extsuite/extman/docs/init.sql 196 | cd /var/www/extsuite/extman/docs 197 | cp mysql_virtual_alias_maps.cf /etc/postfix/ 198 | cp mysql_virtual_domains_maps.cf /etc/postfix/ 199 | cp mysql_virtual_mailbox_maps.cf /etc/postfix/ 200 | cp mysql_virtual_sender_maps.cf /etc/postfix/ 201 | #configure postfix main.cf 202 | echo '# extmail config here' >>/etc/postfix/main.cf 203 | postconf -e 'virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf' 204 | postconf -e 'virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf' 205 | postconf -e 'virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf' 206 | postconf -e 'virtual_transport = maildrop:' 207 | 208 | service postfix restart 209 | #create mail domain 210 | cd /var/www/extsuite/extman/tools 211 | ./maildirmake.pl /home/domains/extmail.org/postmaster/Maildir 212 | chown -R vuser:vgroup /home/domains/extmail.org 213 | /usr/local/mailgraph_ext/mailgraph-init start 214 | /var/www/extsuite/extman/daemon/cmdserver --daemon 215 | 216 | #add rc.local 217 | echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.local 218 | echo "/usr/local/mailgraph_ext/qmonitor-init start" >> /etc/rc.local 219 | echo "/var/www/extsuite/extman/daemon/cmdserver --daemon" >>/etc/rc.local 220 | 221 | 222 | 223 | } 224 | 225 | showend(){ 226 | /etc/init.d/httpd restart 227 | /etc/init.d/postfix restart 228 | /etc/init.d/courier-authlib restart 229 | chkconfig courier-authlib on 230 | /etc/init.d/courier-imap restart 231 | chkconfig courier-imap on 232 | clear 233 | cat << "EOF" 234 | 235 | 236 | This script is ExtMail server v0.0.3: 237 | 238 | * Install Postfix/courier-imap CentOS6.x 239 | * Mysql:[root:null] [extmail:extmail] 240 | * Authtest:/usr/sbin/authtest -s login postmaster@extmail.org extmail 241 | * Test doc:http://github.com/akin520/AutoSetup 242 | * Extmail:http://0.0.0.0/extmail/ [u:postmaster p:extmail d:extmail.org] 243 | * Extman:http://0.0.0.0/extman/ [u:root@extmail.org p:extmail*123* d:extmail.org] 244 | 245 | 246 | EOF 247 | } 248 | 249 | main(){ 250 | if [ $(id -u) != "0" ]; then 251 | printf "Error: You must be root to run this script!\n" 252 | exit 1 253 | fi 254 | showmsg 255 | baseamp 256 | postfixinstall 257 | maildropinstall 258 | courier 259 | saslinstall 260 | imapinstall 261 | extinstall 262 | showend 263 | } 264 | 265 | main -------------------------------------------------------------------------------- /AutoMiniMail-0.0.2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoMiniMail-0.0.2.tar.gz -------------------------------------------------------------------------------- /AutoMiniMail-el6-v0.0.3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | showmsg() { 4 | clear 5 | cat << "EOF" 6 | 7 | This script is MiniMail server v0.0.3: 8 | 9 | * Install Postfix/Dovecot CentOS6.x 10 | 11 | Press Ctrl-C now if you want to exit 12 | 13 | EOF 14 | read -p "Press any key to continue..." 15 | } 16 | 17 | install() { 18 | if [ "`uname -m`" == "x86_64" ]; then 19 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 20 | elif [ "`uname -m`" == "i686" ]; then 21 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 22 | fi 23 | yum install postfix dovecot cyrus-sasl* -y 24 | } 25 | 26 | config() { 27 | postconf -e "myhostname = `hostname`" 28 | read -p "MX domain(install.cn):" domain 29 | if [[ $domain == "" ]];then 30 | domain=install.cn 31 | fi 32 | postconf -e "mydomain = $domain" 33 | postconf -e 'myorigin = $mydomain' 34 | postconf -e 'relay_domains = $mydestination' 35 | postconf -e 'home_mailbox = Maildir/' 36 | postconf -e 'smtpd_banner = $myhostname ESMTP unknow' 37 | postconf -e 'smtpd_sasl_auth_enable = yes' 38 | postconf -e 'smtpd_sasl_local_domain = $myhostname' 39 | postconf -e 'smtpd_sasl_security_options = noanonymous' 40 | postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination' 41 | postconf -e 'message_size_limit = 15728640' 42 | read -p "Domain MX ip(17.17.17.1):" ip 43 | if [[ $ip == "" ]];then 44 | ip="127.0.0.1" 45 | fi 46 | postconf -e "inet_interfaces = $ip" 47 | postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain' 48 | 49 | sed -i 's/#protocols = imap imaps pop3 pop3s/protocols = imap imaps pop3 pop3s/g' /etc/dovecot/dovecot.conf 50 | sed -i 's/# mail_location = maildir\:\~\/Maildir/mail_location = maildir\:\~\/Maildir/g' /etc/dovecot/dovecot.conf 51 | 52 | #mkdir default user dir 53 | mkdir -p /etc/skel/Maildir 54 | chmod 700 /etc/skel/Maildir 55 | 56 | #stop/start service 57 | /etc/rc.d/init.d/sendmail stop 58 | chkconfig sendmail off 59 | 60 | #alternatives --config mta 61 | alternatives --set mta /usr/sbin/sendmail.postfix 62 | chkconfig postfix on 63 | /etc/rc.d/init.d/postfix start 64 | 65 | chkconfig saslauthd on 66 | /etc/rc.d/init.d/saslauthd stop 67 | /etc/rc.d/init.d/saslauthd start 68 | 69 | chkconfig dovecot on 70 | /etc/rc.d/init.d/dovecot start 71 | } 72 | 73 | 74 | showmsg 75 | install 76 | config -------------------------------------------------------------------------------- /AutoMiniMail-el7-v0.0.4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | showmsg() { 4 | clear 5 | cat << "EOF" 6 | 7 | This script is MiniMail server v0.0.4: 8 | 9 | * Install Postfix/Dovecot CentOS7.x 10 | 11 | Press Ctrl-C now if you want to exit 12 | 13 | EOF 14 | read -p "Press any key to continue..." 15 | } 16 | 17 | install() { 18 | yum install epel-* -y 19 | yum install postfix dovecot cyrus-sasl* -y 20 | } 21 | 22 | config() { 23 | postconf -e "myhostname = `hostname`" 24 | read -p "MX domain(install.cn):" domain 25 | if [[ $domain == "" ]];then 26 | domain=install.cn 27 | fi 28 | postconf -e "mydomain = $domain" 29 | postconf -e 'myorigin = $mydomain' 30 | postconf -e 'relay_domains = $mydestination' 31 | postconf -e 'home_mailbox = Maildir/' 32 | postconf -e 'smtpd_banner = $myhostname ESMTP unknow' 33 | postconf -e 'smtpd_sasl_auth_enable = yes' 34 | postconf -e 'broken_sasl_auth_clients = yes' 35 | postconf -e 'smtpd_sasl_type = dovecot' 36 | postconf -e 'smtpd_sasl_path = /var/spool/postfix/private/auth' 37 | postconf -e 'smtpd_sasl_local_domain = $myhostname' 38 | postconf -e 'smtpd_sasl_security_options = noanonymous' 39 | postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination' 40 | postconf -e 'smtpd_client_restrictions = permit_sasl_authenticated, reject' 41 | postconf -e 'message_size_limit = 15728640' 42 | read -p "Domain MX ip(17.17.17.1):" ip 43 | if [[ $ip == "" ]];then 44 | ip="127.0.0.1" 45 | fi 46 | postconf -e "inet_interfaces = $ip" 47 | postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain' 48 | 49 | sed -i 's/#protocols = imap pop3 lmtp/protocols = imap pop3 lmtp/g' /etc/dovecot/dovecot.conf 50 | sed -i 's/# mail_location = maildir\:\~\/Maildir/mail_location = maildir\:\~\/Maildir/g' /etc/dovecot/conf.d/10-mail.conf 51 | #disabled ssl 52 | sed -i 's/#disable_plaintext_auth = yes/disable_plaintext_auth = no/g' /etc/dovecot/conf.d/10-auth.conf 53 | sed -i 's/auth_mechanisms = plain/auth_mechanisms = plain login/g' /etc/dovecot/conf.d/10-auth.conf 54 | sed -i 's/ssl = required/ssl = no/g' /etc/dovecot/conf.d/10-ssl.conf 55 | #postfix auth 56 | sed -i '/Postfix smtp-auth/a\ unix_listener /var/spool/postfix/private/auth {\n mode=06666\n user = postfix\n group = postfix\n }' /etc/dovecot/conf.d/10-master.conf 57 | 58 | #mkdir default user dir 59 | mkdir -p /etc/skel/Maildir 60 | chmod 700 /etc/skel/Maildir 61 | 62 | #alternatives --config mta 63 | alternatives --set mta /usr/sbin/sendmail.postfix 64 | systemctl start postfix 65 | systemctl enable postfix 66 | 67 | #start saslauthd 68 | systemctl start saslauthd 69 | systemctl enable saslauthd 70 | 71 | #start dovecot 72 | systemctl start dovecot 73 | systemctl enable dovecot 74 | } 75 | 76 | 77 | showmsg 78 | install 79 | config -------------------------------------------------------------------------------- /AutoNProxy-v0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoNProxy (Nginx-proxy)" 5 | echo "" 6 | echo "" 7 | echo "AutoNProxy v0.0.1 by badb0y " 8 | echo "Default Install PATH:/usr/local/{nginx}" 9 | echo "" 10 | echo "=========================================================================" 11 | echo "" 12 | echo "For more information please visit http://code.google.com/p/autosetup/" 13 | echo "" 14 | 15 | read -p "If the OK! Press any key to start..." 16 | 17 | base() { 18 | 19 | echo "EVN Initialization..." 20 | if [ "`uname -m`" == "x86_64" ]; then 21 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 22 | elif [ "`uname -m`" == "i686" ]; then 23 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 24 | fi 25 | 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 26 | } 27 | 28 | download() { 29 | 30 | echo "Download soft..." 31 | wget http://sysoev.ru/nginx/nginx-0.8.53.tar.gz 32 | wget http://autosetup1.googlecode.com/files/pcre-8.01.tar.gz 33 | wget http://autosetup1.googlecode.com/files/proxy.conf 34 | wget http://autosetup1.googlecode.com/files/run.sh 35 | wget http://autosetup1.googlecode.com/files/stop.sh 36 | wget http://autosetup1.googlecode.com/files/nginx1.conf 37 | } 38 | 39 | nginx() { 40 | 41 | echo "Installtion NGINX..." 42 | groupadd webadm 43 | useradd -g webadm webadm 44 | 45 | tar zxvf pcre-8.01.tar.gz 46 | cd pcre-8.01/ 47 | ./configure 48 | make ;make install 49 | cd ../ 50 | 51 | tar zxvf nginx-0.8.53.tar.gz 52 | cd nginx-0.8.53 53 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 54 | make; make install 55 | cd ../ 56 | } 57 | 58 | config() { 59 | 60 | echo "Configuration..." 61 | 62 | echo "nginx config" 63 | rm -rf /usr/local/nginx/conf/nginx.conf 64 | cp -a proxy.conf /usr/local/nginx/conf/ 65 | cp -a nginx1.conf /usr/local/nginx/conf/nginx.conf 66 | 67 | 68 | cp -a run.sh /root/ 69 | cp -a stop.sh /root/ 70 | sed -i '3d' /root/run.sh 71 | sed -i '2d' /root/stop.sh 72 | chmod 755 /root/*.sh 73 | } 74 | 75 | msg() { 76 | echo "=========================================================================" 77 | echo "Welcome to AutoNProxy (Nginx-proxy)" 78 | echo "" 79 | echo "" 80 | echo "AutoNProxy v0.0.1 by badb0y " 81 | echo "Default Install PATH:/usr/local/{nginx}" 82 | echo "" 83 | echo "=========================================================================" 84 | echo "" 85 | } 86 | 87 | main() { 88 | 89 | echo "Installtion AutoNProxy..." 90 | base 91 | download 92 | nginx 93 | config 94 | msg 95 | } 96 | 97 | main -------------------------------------------------------------------------------- /AutoNProxy-v0.0.2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoNProxy (Nginx-proxy)" 5 | echo "" 6 | echo "" 7 | echo "AutoNProxy v0.0.2 by badb0y " 8 | echo "Default Install PATH:/usr/local/{nginx}" 9 | echo "" 10 | echo "=========================================================================" 11 | echo "" 12 | echo "For more information please visit http://code.google.com/p/autosetup/" 13 | echo "" 14 | 15 | read -p "If the OK! Press any key to start..." 16 | 17 | base() { 18 | 19 | echo "EVN Initialization..." 20 | if [ "`uname -m`" == "x86_64" ]; then 21 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 22 | elif [ "`uname -m`" == "i686" ]; then 23 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 24 | fi 25 | 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 26 | } 27 | 28 | download() { 29 | 30 | echo "Download soft..." 31 | wget http://nginx.org/download/nginx-1.6.0.tar.gz 32 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/pcre-8.01.tar.gz 33 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/proxy.conf 34 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/run.sh 35 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/stop.sh 36 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/nginx1.conf 37 | wget --no-check-certificate https://sourceforge.net/projects/autosetup/files/soft/openssl-1.0.0d.tar.gz 38 | } 39 | 40 | nginx() { 41 | 42 | echo "Installtion NGINX..." 43 | groupadd webadm 44 | useradd -g webadm webadm 45 | 46 | tar zxvf pcre-8.01.tar.gz 47 | cd pcre-8.01/ 48 | ./configure 49 | make ;make install 50 | cd ../ 51 | 52 | tar zxvf openssl-1.0.0d.tar.gz 53 | tar zxvf nginx-1.6.0.tar.gz 54 | cd nginx-1.6.0 55 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=../openssl-1.0.0d/ 56 | make; make install 57 | cd ../ 58 | } 59 | 60 | config() { 61 | 62 | echo "Configuration..." 63 | 64 | echo "nginx config" 65 | rm -rf /usr/local/nginx/conf/nginx.conf 66 | cp -a proxy.conf /usr/local/nginx/conf/ 67 | cp -a nginx1.conf /usr/local/nginx/conf/nginx.conf 68 | 69 | 70 | cp -a run.sh /root/ 71 | cp -a stop.sh /root/ 72 | sed -i '3d' /root/run.sh 73 | sed -i '2d' /root/stop.sh 74 | chmod 755 /root/*.sh 75 | cat /etc/rc.local|grep run 76 | if [[ $? == 1 ]];then 77 | echo "/root/run.sh" >>/etc/rc.local 78 | fi 79 | } 80 | 81 | msg() { 82 | echo "=========================================================================" 83 | echo "Welcome to AutoNProxy (Nginx-proxy)" 84 | echo "" 85 | echo "" 86 | echo "AutoNProxy v0.0.2 by badb0y " 87 | echo "Default Install PATH:/usr/local/{nginx}" 88 | echo "" 89 | echo "=========================================================================" 90 | echo "" 91 | } 92 | 93 | main() { 94 | 95 | echo "Installtion AutoNProxy..." 96 | base 97 | download 98 | nginx 99 | config 100 | msg 101 | } 102 | 103 | main -------------------------------------------------------------------------------- /AutoNProxy-v0.0.3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoNProxy (Nginx-proxy)" 5 | echo "" 6 | echo "" 7 | echo "AutoNProxy v0.0.3 by badb0y " 8 | echo "Default Install PATH:/usr/local/{nginx}" 9 | echo "" 10 | echo "=========================================================================" 11 | echo "" 12 | echo "For more information please visit http://code.google.com/p/autosetup/" 13 | echo "" 14 | 15 | read -p "If the OK! Press any key to start..." 16 | 17 | base() { 18 | 19 | echo "EVN Initialization..." 20 | if [ "`uname -m`" == "x86_64" ]; then 21 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 22 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 23 | elif [ "`uname -m`" == "i686" ]; then 24 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 25 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm 26 | fi 27 | 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 28 | } 29 | 30 | download() { 31 | 32 | echo "Download soft..." 33 | wget http://nginx.org/download/nginx-1.1.4.tar.gz 34 | wget http://sourceforge.net/projects/pcre/files/pcre/8.12/pcre-8.12.tar.gz/download 35 | wget http://autosetup1.googlecode.com/files/proxy.conf 36 | wget http://autosetup1.googlecode.com/files/run.sh 37 | wget http://autosetup1.googlecode.com/files/stop.sh 38 | wget http://autosetup1.googlecode.com/files/nginx1.conf 39 | } 40 | 41 | nginx() { 42 | 43 | echo "Installtion NGINX..." 44 | groupadd webadm 45 | useradd -g webadm webadm 46 | 47 | tar zxvf pcre-8.12.tar.gz 48 | cd pcre-8.12/ 49 | ./configure 50 | make ;make install 51 | cd ../ 52 | 53 | tar zxvf nginx-1.1.4.tar.gz 54 | cd nginx-1.1.4 55 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 56 | make; make install 57 | cd ../ 58 | } 59 | 60 | config() { 61 | 62 | echo "Configuration..." 63 | 64 | echo "nginx config" 65 | rm -rf /usr/local/nginx/conf/nginx.conf 66 | cp -a proxy.conf /usr/local/nginx/conf/ 67 | cp -a nginx1.conf /usr/local/nginx/conf/nginx.conf 68 | 69 | 70 | cp -a run.sh /root/ 71 | cp -a stop.sh /root/ 72 | sed -i '3d' /root/run.sh 73 | sed -i '2d' /root/stop.sh 74 | chmod 755 /root/*.sh 75 | } 76 | 77 | msg() { 78 | echo "=========================================================================" 79 | echo "Welcome to AutoNProxy (Nginx-proxy)" 80 | echo "" 81 | echo "" 82 | echo "AutoNProxy v0.0.3 by badb0y " 83 | echo "Default Install PATH:/usr/local/{nginx}" 84 | echo "" 85 | echo "=========================================================================" 86 | echo "" 87 | } 88 | 89 | main() { 90 | 91 | echo "Installtion AutoNProxy..." 92 | base 93 | download 94 | nginx 95 | config 96 | msg 97 | } 98 | 99 | main -------------------------------------------------------------------------------- /AutoOVPN-1.5.2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoOVPN-1.5.2.tar.gz -------------------------------------------------------------------------------- /AutoPPN-v0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoPPN (Percaona[mysql]+PHP+NGINX)" 5 | echo "" 6 | echo "" 7 | echo "AutoPPN v0.0.1 by badb0y " 8 | echo "Default Install PATH:/usr/local/{percona.php.nginx}" 9 | echo "Default percona(mysql) password:google123" 10 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | base() { 19 | 20 | echo "EVN Initialization..." 21 | if [ "`uname -m`" == "x86_64" ]; then 22 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 23 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 24 | elif [ "`uname -m`" == "i686" ]; then 25 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 26 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm 27 | fi 28 | yum -y install cmake bsion 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 29 | yum -y install cmake libmcrypt libmcrypt-devel libmhash libmhash-devel 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-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers 30 | 31 | if [ -f /etc/my.cnf ]; then 32 | mv -f /etc/my.cnf /etc/my.cnf.autoppn 33 | fi 34 | 35 | if [ -f /etc/init.d/mysql ]; then 36 | mv -f /etc/init.d/mysql /etc/init.d/mysql.autoppn 37 | fi 38 | 39 | if [ -d /usr/local/percona ]; then 40 | mv /usr/local/percona /usr/local/percona.autoppn 41 | fi 42 | 43 | if [ -d /usr/local/nginx ]; then 44 | mv /usr/local/nginx /usr/local/nginx.autoppn 45 | fi 46 | 47 | if [ -d /usr/local/php ]; then 48 | mv /usr/local/php /usr/local/php.autoppn 49 | fi 50 | } 51 | 52 | download() { 53 | 54 | echo "Download soft..." 55 | wget http://www.nginx.org/download/nginx-1.1.6.tar.gz 56 | wget http://autosetup1.googlecode.com/files/php-5.2.13.tar.gz 57 | wget http://autosetup1.googlecode.com/files/php-5.2.13-fpm-0.5.13.diff.gz 58 | wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 59 | wget http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 60 | wget http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 61 | wget http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 62 | wget http://autosetup1.googlecode.com/files/pcre-8.01.tar.gz 63 | wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.16-22.0/source/Percona-Server-5.5.16-rel22.0.tar.gz 64 | wget http://autosetup1.googlecode.com/files/php-fpm.conf 65 | wget http://autosetup1.googlecode.com/files/nginx.conf 66 | wget http://autosetup1.googlecode.com/files/fcgi.conf 67 | wget http://autosetup1.googlecode.com/files/run.sh 68 | wget http://autosetup1.googlecode.com/files/stop.sh 69 | } 70 | 71 | installlib() { 72 | 73 | echo "Installation support library..." 74 | tar zxvf libiconv-1.13.tar.gz 75 | cd libiconv-1.13/ 76 | ./configure --prefix=/usr/local 77 | make 78 | make install 79 | cd ../ 80 | 81 | tar zxvf libmcrypt-2.5.8.tar.gz 82 | cd libmcrypt-2.5.8/ 83 | ./configure 84 | make 85 | make install 86 | /sbin/ldconfig 87 | cd libltdl/ 88 | ./configure --enable-ltdl-install 89 | make 90 | make install 91 | cd ../../ 92 | 93 | tar zxvf mhash-0.9.9.9.tar.gz 94 | cd mhash-0.9.9.9/ 95 | ./configure 96 | make 97 | make install 98 | cd ../ 99 | 100 | echo "/usr/local/lib" >> /etc/ld.so.conf 101 | ldconfig 102 | 103 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 104 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 105 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 106 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 107 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 108 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 109 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 110 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 111 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 112 | 113 | tar zxvf mcrypt-2.6.8.tar.gz 114 | cd mcrypt-2.6.8/ 115 | /sbin/ldconfig 116 | ./configure 117 | make 118 | make install 119 | cd ../ 120 | 121 | #if [ -d /usr/lib64 ]; then 122 | #\cp -frp /usr/lib64/libjpeg.* /usr/lib/ 123 | #\cp -frp /usr/lib64/libpng.* /usr/lib/ 124 | #fi 125 | } 126 | 127 | mysql() { 128 | 129 | echo "Installation MYSQL..." 130 | groupadd mysql 131 | useradd -g mysql mysql 132 | tar -zxvf Percona-Server-5.5.16-rel22.0.tar.gz 133 | cd Percona-Server-5.5.16-rel22.0 134 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 135 | #cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 136 | make && make install 137 | cp support-files/my-medium.cnf /etc/my.cnf 138 | cp support-files/mysql.server /etc/init.d/mysql 139 | cd /usr/local/percona 140 | ./scripts/mysql_install_db --user=mysql 141 | chown -R mysql /usr/local/percona/data 142 | chgrp -R mysql /usr/local/percona/. 143 | chmod 755 /etc/init.d/mysql 144 | chkconfig --level 345 mysql on 145 | echo "/usr/local/percona/lib" >> /etc/ld.so.conf 146 | ldconfig 147 | service mysql start 148 | cd - 149 | cd .. 150 | /usr/local/percona/bin/mysqladmin -u root password google123 151 | echo 'export PATH="/usr/local/percona/bin:$PATH"' >>/etc/profile 152 | source /etc/profile 153 | } 154 | 155 | php() { 156 | 157 | echo "Installtion PHP..." 158 | tar zxvf php-5.2.13.tar.gz 159 | gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1 160 | cd php-5.2.13/ 161 | ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/percona --with-mysqli=/usr/local/percona/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 162 | make ZEND_EXTRA_LIBS='-liconv' 163 | make install 164 | cp php.ini-dist /usr/local/php/etc/php.ini 165 | cd .. 166 | } 167 | 168 | nginx() { 169 | 170 | echo "Installtion NGINX..." 171 | groupadd webadm 172 | useradd -g webadm webadm 173 | 174 | tar zxvf pcre-8.01.tar.gz 175 | cd pcre-8.01/ 176 | ./configure 177 | make ;make install 178 | cd ../ 179 | 180 | tar zxvf nginx-1.1.6.tar.gz 181 | cd nginx-1.1.6 182 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 183 | make; make install 184 | cd ../ 185 | } 186 | 187 | config() { 188 | 189 | echo "Configuration..." 190 | echo "php config" 191 | rm -rf /usr/local/php/etc/php-fpm.conf 192 | cp php-fpm.conf /usr/local/php/etc/ 193 | 194 | echo "nginx config" 195 | rm -rf /usr/local/nginx/conf/fcgi.conf 196 | rm -rf /usr/local/nginx/conf/nginx.conf 197 | cp -a fcgi.conf /usr/local/nginx/conf/ 198 | cp -a nginx.conf /usr/local/nginx/conf/ 199 | 200 | echo '' >/home/webadm/index.php 201 | 202 | #echo "ulimit -SHn 51200" >>/root/run.sh 203 | #echo "/usr/local/php/sbin/php-fpm start" >>/root/run.sh 204 | #echo "/usr/local/nginx/sbin/nginx -t" >>/root/run.sh 205 | #echo "/usr/local/nginx/sbin/nginx" >>/root/run.sh 206 | #sed -i '1 i#!/bin/bash' /root/run.sh 207 | 208 | #echo "kill akintxt" >>/root/stop.sh 209 | #echo "/usr/local/php/sbin/php-fpm stop" >>/root/stop.sh 210 | #sed -i 's!akintxt!`cat /usr/local/nginx/logs/nginx.pid`!g' /root/stop.sh 211 | #sed -i '1 i#!/bin/bash' /root/stop.sh 212 | cp -a run.sh /root/ 213 | cp -a stop.sh /root/ 214 | chmod 755 /root/*.sh 215 | } 216 | 217 | main() { 218 | 219 | echo "Installtion AutoPPN..." 220 | base 221 | download 222 | installlib 223 | mysql 224 | php 225 | nginx 226 | config 227 | } 228 | 229 | main -------------------------------------------------------------------------------- /AutoPPN-v0.0.2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoPPN (Percaona[mysql]+PHP+NGINX)" 5 | echo "" 6 | echo "" 7 | echo "AutoPPN v0.0.2 by badb0y " 8 | echo "Default Install PATH:/usr/local/{percona.php.nginx}" 9 | echo "Default percona(mysql) password:google123" 10 | echo "Defautl web path:/home/webadm [http://localhost/info.php]" 11 | echo "=========================================================================" 12 | echo "" 13 | echo "For more information please visit http://code.google.com/p/autosetup/" 14 | echo "" 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | base() { 19 | 20 | echo "EVN Initialization..." 21 | if [ "`uname -m`" == "x86_64" ]; then 22 | rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 23 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 24 | elif [ "`uname -m`" == "i686" ]; then 25 | rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 26 | rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm 27 | fi 28 | yum -y install cmake bison bison-devel 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 29 | yum -y install cmake libmcrypt libmcrypt-devel libmhash libmhash-devel 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-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers 30 | 31 | if [ -f /etc/my.cnf ]; then 32 | mv -f /etc/my.cnf /etc/my.cnf.autoppn 33 | fi 34 | 35 | if [ -f /etc/init.d/mysql ]; then 36 | mv -f /etc/init.d/mysql /etc/init.d/mysql.autoppn 37 | fi 38 | 39 | if [ -d /usr/local/percona ]; then 40 | mv /usr/local/percona /usr/local/percona.autoppn 41 | fi 42 | 43 | if [ -d /usr/local/nginx ]; then 44 | mv /usr/local/nginx /usr/local/nginx.autoppn 45 | fi 46 | 47 | if [ -d /usr/local/php ]; then 48 | mv /usr/local/php /usr/local/php.autoppn 49 | fi 50 | } 51 | 52 | download() { 53 | 54 | echo "Download soft..." 55 | if [ ! -s nginx-1.1.6.tar.gz ]; then 56 | wget http://www.nginx.org/download/nginx-1.1.6.tar.gz 57 | fi 58 | if [ ! -s php-5.2.13.tar.gz ]; then 59 | wget http://autosetup1.googlecode.com/files/php-5.2.13.tar.gz 60 | fi 61 | if [ ! -s php-5.2.13-fpm-0.5.13.diff.gz ]; then 62 | wget http://autosetup1.googlecode.com/files/php-5.2.13-fpm-0.5.13.diff.gz 63 | fi 64 | if [ ! -s libiconv-1.13.tar.gz ]; then 65 | wget http://autosetup1.googlecode.com/files/libiconv-1.13.tar.gz 66 | fi 67 | if [ ! -s libmcrypt-2.5.8.tar.gz ]; then 68 | wget http://autosetup1.googlecode.com/files/libmcrypt-2.5.8.tar.gz 69 | fi 70 | if [ ! -s mcrypt-2.6.8.tar.gz ]; then 71 | wget http://autosetup1.googlecode.com/files/mcrypt-2.6.8.tar.gz 72 | fi 73 | if [ ! -s mhash-0.9.9.9.tar.gz ]; then 74 | wget http://autosetup1.googlecode.com/files/mhash-0.9.9.9.tar.gz 75 | fi 76 | if [ ! -s pcre-8.01.tar.gz ]; then 77 | wget http://autosetup1.googlecode.com/files/pcre-8.01.tar.gz 78 | fi 79 | if [ ! -s Percona-Server-5.5.16-rel22.0.tar.gz ]; then 80 | wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.16-22.0/source/Percona-Server-5.5.16-rel22.0.tar.gz 81 | fi 82 | if [ ! -s php-fpm.conf ]; then 83 | wget http://autosetup1.googlecode.com/files/php-fpm.conf 84 | fi 85 | if [ ! -s nginx.conf ]; then 86 | wget http://autosetup1.googlecode.com/files/nginx.conf 87 | fi 88 | if [ ! -s fcgi.conf ]; then 89 | wget http://autosetup1.googlecode.com/files/fcgi.conf 90 | fi 91 | if [ ! -s run.sh ]; then 92 | wget http://autosetup1.googlecode.com/files/run.sh 93 | fi 94 | if [ ! -s stop.sh ]; then 95 | wget http://autosetup1.googlecode.com/files/stop.sh 96 | fi 97 | 98 | echo "Download soft END..." 99 | } 100 | 101 | installlib() { 102 | 103 | echo "Installation support library..." 104 | tar zxvf libiconv-1.13.tar.gz 105 | cd libiconv-1.13/ 106 | ./configure --prefix=/usr/local 107 | make 108 | make install 109 | cd ../ 110 | 111 | tar zxvf libmcrypt-2.5.8.tar.gz 112 | cd libmcrypt-2.5.8/ 113 | ./configure 114 | make 115 | make install 116 | /sbin/ldconfig 117 | cd libltdl/ 118 | ./configure --enable-ltdl-install 119 | make 120 | make install 121 | cd ../../ 122 | 123 | tar zxvf mhash-0.9.9.9.tar.gz 124 | cd mhash-0.9.9.9/ 125 | ./configure 126 | make 127 | make install 128 | cd ../ 129 | 130 | echo "/usr/local/lib" >> /etc/ld.so.conf 131 | ldconfig 132 | 133 | ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la 134 | ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so 135 | ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 136 | ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 137 | ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a 138 | ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la 139 | ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so 140 | ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 141 | ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1 142 | 143 | tar zxvf mcrypt-2.6.8.tar.gz 144 | cd mcrypt-2.6.8/ 145 | /sbin/ldconfig 146 | ./configure 147 | make 148 | make install 149 | cd ../ 150 | 151 | #if [ -d /usr/lib64 ]; then 152 | #\cp -frp /usr/lib64/libjpeg.* /usr/lib/ 153 | #\cp -frp /usr/lib64/libpng.* /usr/lib/ 154 | #fi 155 | } 156 | 157 | mysql() { 158 | 159 | echo "Installation MYSQL..." 160 | groupadd mysql 161 | useradd -g mysql mysql 162 | tar -zxvf Percona-Server-5.5.16-rel22.0.tar.gz 163 | cd Percona-Server-5.5.16-rel22.0 164 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 165 | #cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/percona -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 166 | make && make install 167 | cp support-files/my-medium.cnf /etc/my.cnf 168 | cp support-files/mysql.server /etc/init.d/mysql 169 | cd /usr/local/percona 170 | ./scripts/mysql_install_db --user=mysql 171 | chown -R mysql /usr/local/percona/data 172 | chgrp -R mysql /usr/local/percona/. 173 | chmod 755 /etc/init.d/mysql 174 | chkconfig --level 345 mysql on 175 | echo "/usr/local/percona/lib" >> /etc/ld.so.conf 176 | ldconfig 177 | service mysql start 178 | cd - 179 | cd .. 180 | /usr/local/percona/bin/mysqladmin -u root password google123 181 | echo 'export PATH="/usr/local/percona/bin:$PATH"' >>/etc/profile 182 | source /etc/profile 183 | } 184 | 185 | php() { 186 | 187 | echo "Installtion PHP..." 188 | tar zxvf php-5.2.13.tar.gz 189 | gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1 190 | cd php-5.2.13/ 191 | ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/percona --with-mysqli=/usr/local/percona/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 192 | make ZEND_EXTRA_LIBS='-liconv' 193 | make install 194 | cp php.ini-dist /usr/local/php/etc/php.ini 195 | cd .. 196 | } 197 | 198 | nginx() { 199 | 200 | echo "Installtion NGINX..." 201 | groupadd webadm 202 | useradd -g webadm webadm 203 | 204 | tar zxvf pcre-8.01.tar.gz 205 | cd pcre-8.01/ 206 | ./configure 207 | make ;make install 208 | cd ../ 209 | 210 | tar zxvf nginx-1.1.6.tar.gz 211 | cd nginx-1.1.6 212 | ./configure --user=webadm --group=webadm --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module 213 | make; make install 214 | cd ../ 215 | } 216 | 217 | config() { 218 | 219 | echo "Configuration..." 220 | echo "php config" 221 | rm -rf /usr/local/php/etc/php-fpm.conf 222 | cp php-fpm.conf /usr/local/php/etc/ 223 | 224 | echo "nginx config" 225 | rm -rf /usr/local/nginx/conf/fcgi.conf 226 | rm -rf /usr/local/nginx/conf/nginx.conf 227 | cp -a fcgi.conf /usr/local/nginx/conf/ 228 | cp -a nginx.conf /usr/local/nginx/conf/ 229 | 230 | echo '' >/home/webadm/index.php 231 | 232 | #echo "ulimit -SHn 51200" >>/root/run.sh 233 | #echo "/usr/local/php/sbin/php-fpm start" >>/root/run.sh 234 | #echo "/usr/local/nginx/sbin/nginx -t" >>/root/run.sh 235 | #echo "/usr/local/nginx/sbin/nginx" >>/root/run.sh 236 | #sed -i '1 i#!/bin/bash' /root/run.sh 237 | 238 | #echo "kill akintxt" >>/root/stop.sh 239 | #echo "/usr/local/php/sbin/php-fpm stop" >>/root/stop.sh 240 | #sed -i 's!akintxt!`cat /usr/local/nginx/logs/nginx.pid`!g' /root/stop.sh 241 | #sed -i '1 i#!/bin/bash' /root/stop.sh 242 | cp -a run.sh /root/ 243 | cp -a stop.sh /root/ 244 | chmod 755 /root/*.sh 245 | } 246 | 247 | main() { 248 | 249 | echo "Installtion AutoPPN..." 250 | base 251 | download 252 | installlib 253 | mysql 254 | php 255 | nginx 256 | config 257 | } 258 | 259 | main -------------------------------------------------------------------------------- /AutoSNMP-v0.0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoSNMP (net-snmp)" 5 | echo "" 6 | echo "" 7 | echo "AutoSNMP v0.0.1 by badb0y " 8 | echo "Default community name:google" 9 | echo "" 10 | echo "=========================================================================" 11 | echo "" 12 | echo "For more information please visit http://code.google.com/p/autosetup/" 13 | echo "" 14 | export LANC=C 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | cat /etc/redhat-release |grep CentOS 2>&1 >/dev/null 19 | if [ $? -ne 0 ];then 20 | echo "OS no CentOS!" 21 | exit 1 22 | fi 23 | yum install net-snmp* -y 24 | if [ -f /etc/snmp/snmpd.conf ];then 25 | rm -rf /etc/snmp/snmpd.conf 26 | rm -rf /etc/sysconfig/snmpd.options 27 | wget http://autosetup1.googlecode.com/files/snmpd.options -O /etc/sysconfig/snmpd.options 28 | wget http://autosetup1.googlecode.com/files/snmpd.conf -O /etc/snmp/snmpd.conf 29 | fi 30 | 31 | clear 32 | echo "=========================================================================" 33 | echo "Welcome to AutoSNMP (net-snmp)" 34 | echo "" 35 | echo "" 36 | echo "AutoSNMP v0.0.1 by badb0y " 37 | echo "Default community name:google" 38 | echo "" 39 | echo "=========================================================================" 40 | echo "" 41 | echo "For more information please visit http://code.google.com/p/autosetup/" 42 | echo "" 43 | 44 | -------------------------------------------------------------------------------- /AutoSNMP-v0.0.2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "Welcome to AutoSNMP (net-snmp)" 5 | echo "" 6 | echo "" 7 | echo "AutoSNMP v0.0.2 by badb0y " 8 | echo "Default community name:google" 9 | echo "" 10 | echo "=========================================================================" 11 | echo "" 12 | echo "For more information please visit http://code.google.com/p/autosetup/" 13 | echo "" 14 | export LANC=C 15 | 16 | read -p "If the OK! Press any key to start..." 17 | 18 | cat /etc/redhat-release |grep CentOS 2>&1 >/dev/null 19 | if [ $? -ne 0 ];then 20 | echo "OS no CentOS!" 21 | exit 1 22 | fi 23 | yum install net-snmp* -y 24 | if [ -f /etc/snmp/snmpd.conf ];then 25 | rm -rf /etc/snmp/snmpd.conf 26 | rm -rf /etc/sysconfig/snmpd.options 27 | wget http://autosetup1.googlecode.com/files/snmpd.options -O /etc/sysconfig/snmpd.options 28 | wget http://autosetup1.googlecode.com/files/snmpd.conf -O /etc/snmp/snmpd.conf 29 | fi 30 | chkconfig snmpd on 31 | service snmpd start 32 | 33 | clear 34 | echo "=========================================================================" 35 | echo "Welcome to AutoSNMP (net-snmp)" 36 | echo "" 37 | echo "" 38 | echo "AutoSNMP v0.0.2 by badb0y " 39 | echo "Default community name:google" 40 | echo "" 41 | echo "=========================================================================" 42 | echo "" 43 | echo "For more information please visit http://code.google.com/p/autosetup/" 44 | echo "" 45 | 46 | -------------------------------------------------------------------------------- /AutoSS5-1.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoSS5-1.0.1.tar.gz -------------------------------------------------------------------------------- /AutoSVN-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoSVN-0.0.1.tar.gz -------------------------------------------------------------------------------- /AutoSVN-0.1.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoSVN-0.1.1.tar.gz -------------------------------------------------------------------------------- /AutoVPN-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoVPN-0.0.1.tar.gz -------------------------------------------------------------------------------- /AutoVPN-1.0.0-el5.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoVPN-1.0.0-el5.tar.gz -------------------------------------------------------------------------------- /AutoVPN-1.0.1-el6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/AutoVPN-1.0.1-el6.tar.gz -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #AutoSetup版本号说明 2 | ========= 3 | 4 | ##版本号 5 | - AutoIM_Porxy 是基于squid的,自动安装的http代理,可用于QQ等IM软件 (v1.0.1) 6 | - AutoSVN 是基于apache+subversion+viewve的版本控制工具 (v0.1.1) 7 | - AutoVPN 是基于pptp+freeradius+mysql的,可用WEB管理(el5-v1.0.0 el6-v1.0.1) 8 | - AutoCDN 是基于easy-cdn所做的自运安装版,详细见easy-cdn站点 (v1.0.5) 9 | - AutoMPN 是基于mysql+php+nginx的动态web服务器,专为小内存优化 (v0.0.5) 10 | - AutoMAP 是基于mysql+apache+php的动态WEB服器.(v0.2.3) 11 | - AutoOVPN 是基于openvpn+freeradius+mysql的,可用web管理(v1.5.2) 12 | - xen-cli 是xen的命令管理工具 (v0.0.1) 13 | - AutoSS5 是基于SS5+PAM_MYSQL+MYSQL的,可用WEB管理(v1.0.1) 14 | - AutoMiniMail 是基于postfix+dovcont的小型mail,可选webmail(el5-v0.0.2 el6-v0.0.3) 15 | - Easy-DNS 是基于bind-dlz+mysql的WEB管理工具(请防问easy-cdn站点) 16 | - AutoNProxy 是基于nginx的反向代理(v0.0.3) 17 | - Win-Ecdn 是基于win的squid的缓存服务器(v0.1) 18 | - Win-Ecdn-Manager 是Win-Ecdn的一个管理工具(v0.2) 19 | - AutoPPN 是基于Percona+php-fastcgi+nginx的动态web服务器(el5-v0.1.0 el6-v0.0.8) 20 | - AutoAPP 是基于apache+percona+php的动态web服务器,为centos6下脚本(v0.0.1) 21 | - AutoStack 是基于openstack essex自动安装脚本,脚本在ubuntu12.04下使用,多节点版(v0.0.3) 22 | - AutoMail 是基于postfix+extmail的一个企业级mail系统(el6-v0.0.3 el7-v0.0.4) 23 | - AutoCProxy 是基于nginx+cache+proxy (v0.0.1) 24 | - ansible 自动化安装k8s 1.5.2yum安装脚本 25 | -------------------------------------------------------------------------------- /RPM-build-tree.txt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # RPM-build-tree.txt 4 | # also called: fedora-buildrpmtree 5 | # 6 | # Set up a 'plain userid' SRPM build environment 7 | # 8 | # Home locale for this script: 9 | # /hintskinks/buildtree/RPM-build-tree.txt 10 | # also: ftp://ftp.owlriver.com/pub/local/ORC/rpmbuild/ 11 | # 12 | # See also: http://freshrpms.net/docs/fight.html 13 | # 14 | # based on a post: 15 | # Date: Tue, 30 Jul 2002 17:00:21 +0200 16 | # From: Ralf Ertzinger 17 | # Reply-To: rpm-list@freshrpms.net 18 | # 19 | VER="0.06-050418" 20 | # copyright (c) 2002 Owl River Company - Columbus OH 21 | # info@owlriver.com -- GPL v.2 22 | # 23 | # rev 0.06 050418 RPH - change topdir to a version not needing 24 | # rpm to expand a shell script to determine the home 25 | # directory - $ HOMEDIR - so that: 26 | # rpm --showrc | grep top 27 | # passes the sanity test in sub-shells better 28 | # rev 0.05 030814 RPH -- apply NIS extension per 29 | # nate at rj1.org (Nathan Owen) 30 | # https://bugzilla.fedora.us/show_bug.cgi?id=594 31 | # rev 0.04 030422 RPH -- change to vendor neutral 'rpmbuild' 32 | # path element 33 | # rev 0.03 021210 RPH -- put the home in the right place 34 | # automatically 35 | # rev 0.02 021207 RPH -- add %make macro for people using 36 | # Mandrake .spec files on non-Mandrake platforms 37 | # initial 0.01 020731 RPH - initial release 38 | # 39 | [ "x$1" = "x-d" ] && { 40 | DEBUG="y" 41 | export DEBUG 42 | shift 1 43 | } 44 | # 45 | IAM=`id -un` 46 | # returns bare username 47 | # 48 | PASSWDDIR=`grep ^$IAM: /etc/passwd | awk -F":" '{print $6}'` 49 | HOMEDIR=${HOME:=$PASSWDDIR} 50 | [ ! -d $HOMEDIR ] && { 51 | echo "ERROR: Home directory for user $IAM not found in /etc/passwd." 52 | exit 1 53 | } 54 | # and home directory 55 | # 56 | # 57 | RHDIR="$HOMEDIR/rpmbuild" 58 | # 59 | RPMMACROS="$HOMEDIR/.rpmmacros" 60 | touch $RPMMACROS 61 | # 62 | TOPDIR="%_topdir" 63 | ISTOP=`grep -c ^$TOPDIR $RPMMACROS` 64 | [ $ISTOP -lt 1 ] && { 65 | echo "%_topdir $HOMEDIR/rpmbuild" >> $RPMMACROS 66 | } 67 | # 68 | MAKE="%make " 69 | ISTOP=`grep -c ^$MAKE $RPMMACROS` 70 | [ $ISTOP -lt 1 ] && { 71 | echo "$MAKE make" >> $RPMMACROS 72 | } 73 | # 74 | [ "x$DEBUG" != "x" ] && { 75 | echo "$IAM $HOMEDIR $RPMMACROS" 76 | echo "$RHDIR $TOPDIR $ISTOP" 77 | } 78 | # 79 | [ ! -d $RHDIR ] && mkdir -p $RHDIR 80 | cd $RHDIR 81 | for i in RPMS SOURCES SPECS SRPMS BUILD ; do 82 | [ ! -d ./$i ] && mkdir ./$i 83 | done 84 | # 85 | exit 0 86 | # 87 | -------------------------------------------------------------------------------- /Win-Ecdn-Manager-v0.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/Win-Ecdn-Manager-v0.1.zip -------------------------------------------------------------------------------- /Win-Ecdn-Manager-v0.2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/Win-Ecdn-Manager-v0.2.zip -------------------------------------------------------------------------------- /Win-Ecdn-v0.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/Win-Ecdn-v0.1.zip -------------------------------------------------------------------------------- /ansible/README.md: -------------------------------------------------------------------------------- 1 | #ansible脚本目录 -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/01.cert.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: cert 3 | roles: 4 | - cert 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/02.etcd.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: etcd 3 | roles: 4 | - etcd 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/03.docker.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: docker 3 | roles: 4 | - docker 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/04.master.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: master 3 | roles: 4 | - master 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/05.node.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: node 3 | roles: 4 | - node 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # k8s 1.11.2安装脚本 # 3 | 4 | 5 | 1. 下载二进制文件,分别在roles下面etcd,master,node下files里面down.sh(测试中可以使用1.12) 6 | 7 | 2. 按顺序执行 8 | `ansible-playbook -i hosts 01.cert.yml ` 9 | `ansible-playbook -i hosts 02.etcd.yml ` 10 | `ansible-playbook -i hosts 03.docker.yml ` 11 | `ansible-playbook -i hosts 04.master.yml ` 12 | `ansible-playbook -i hosts 05.node.yml ` 13 | 14 | 3. 添加节点 15 | hosts中添加 16 | 192.168.20.214 hostname=ym214 17 | 再执行: 18 | ` 19 | ansible-playbook -i hosts 05.node.yml --limit 192.168.20.214 20 | ` 21 | 22 | 4.升级K8S 1.11.5 23 | `cd roles/master/files/&& bash -x 1.11.5.sh ` 24 | `ansible-playbook -i hosts 04.master.yml --tags update ` 25 | `ansible-playbook -i hosts 05.node.yml --tags update` 26 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/cls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -rf *.retry 3 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/group_vars/all.yml: -------------------------------------------------------------------------------- 1 | ansible_ssh_user: root #用户名 2 | ansible_ssh_pass: root #密码 3 | ansible_ssh_port: 22 #ssh端口 4 | TMP_NODES: "{% for h in groups['etcd'] %}{{ hostvars[h]['hostname'] }}=https://{{ h }}:2380,{% endfor %}" 5 | ETCD_NODES: "{{ TMP_NODES.rstrip(',') }}" 6 | TMP2_NODES: "{% for h in groups['etcd'] %}https://{{ h }}:2379,{% endfor %}" 7 | ETCD_SH: "{{ TMP2_NODES.rstrip(',') }}" 8 | CERT_HOST: "{% for h in groups['cert'] %}{{h}}{% endfor %}" 9 | IFACE: "em1" #网卡需要指定 10 | IP: "{{ansible_em1['ipv4']['address']}}" #网卡需要指定 11 | IP2: "{{ansible_default_ipv4['address']}}" 12 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/hosts: -------------------------------------------------------------------------------- 1 | [etcd] 2 | 192.168.20.209 hostname=etcd1 3 | 192.168.20.211 hostname=etcd2 4 | 192.168.20.213 hostname=etcd3 5 | 6 | [cert] 7 | 192.168.20.209 hostname=ym209 8 | 9 | [master] 10 | 192.168.20.209 hostname=ym209 11 | 192.168.20.211 hostname=ym211 12 | 192.168.20.213 hostname=ym213 13 | 14 | [node] 15 | 192.168.20.210 hostname=ym210 16 | 192.168.20.212 hostname=ym212 17 | 18 | [docker:children] 19 | master 20 | node 21 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/files/admin-csr.json: -------------------------------------------------------------------------------- 1 | { 2 | "CN": "admin", 3 | "hosts": [], 4 | "key": { 5 | "algo": "rsa", 6 | "size": 2048 7 | }, 8 | "names": [ 9 | { 10 | "C": "CN", 11 | "ST": "ShenZhen", 12 | "L": "ShenZhen", 13 | "O": "system:masters", 14 | "OU": "System" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/files/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "signing": { 3 | "default": { 4 | "expiry": "87600h" 5 | }, 6 | "profiles": { 7 | "kubernetes": { 8 | "usages": [ 9 | "signing", 10 | "key encipherment", 11 | "server auth", 12 | "client auth" 13 | ], 14 | "expiry": "87600h" 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/files/csr.json: -------------------------------------------------------------------------------- 1 | { 2 | "CN": "kubernetes", 3 | "key": { 4 | "algo": "rsa", 5 | "size": 2048 6 | }, 7 | "names": [ 8 | { 9 | "C": "CN", 10 | "ST": "ShenZhen", 11 | "L": "ShenZhen", 12 | "O": "k8s", 13 | "OU": "System" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/files/kube-proxy-csr.json: -------------------------------------------------------------------------------- 1 | { 2 | "CN": "system:kube-proxy", 3 | "hosts": [], 4 | "key": { 5 | "algo": "rsa", 6 | "size": 2048 7 | }, 8 | "names": [ 9 | { 10 | "C": "CN", 11 | "ST": "ShenZhen", 12 | "L": "ShenZhen", 13 | "O": "k8s", 14 | "OU": "System" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: mkdir ssl dir 3 | shell: mkdir -p /opt/ssl/ 4 | 5 | - name: yum libselinux-python 6 | yum: name=libselinux-python state=present 7 | 8 | - name: yum epel 9 | yum: name=epel-release state=present 10 | 11 | - name: yum wget 12 | yum: name=wget state=present 13 | 14 | - name: install ssl tools 15 | shell: wget https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 && mv cfssl_linux-amd64 /usr/bin/cfssl&& wget https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64&& mv cfssljson_linux-amd64 /usr/bin/cfssljson&& wget https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64&& mv cfssl-certinfo_linux-amd64 /usr/bin/cfssl-certinfo&& chmod +x /usr/bin/cfssl* 16 | 17 | - name: copy config.json 18 | copy: src=config.json dest=/opt/ssl/config.json 19 | 20 | - name: copy csr.json 21 | copy: src=csr.json dest=/opt/ssl/csr.json 22 | 23 | - name: make ca 24 | shell: cd /opt/ssl/ && /usr/bin/cfssl gencert -initca csr.json | /usr/bin/cfssljson -bare ca 25 | 26 | - name: etcd-csr.json 27 | template: src=etcd-csr.json.j2 dest=/opt/ssl/etcd-csr.json 28 | 29 | - name: make etcd ssl 30 | shell: cd /opt/ssl/ && /usr/bin/cfssl gencert -ca=/opt/ssl/ca.pem -ca-key=/opt/ssl/ca-key.pem -config=/opt/ssl/config.json -profile=kubernetes etcd-csr.json | /usr/bin/cfssljson -bare etcd 31 | 32 | - name: copy admin-csr.json 33 | copy: src=admin-csr.json dest=/opt/ssl/admin-csr.json 34 | 35 | - name: make admin ssl 36 | shell: cd /opt/ssl/ && /usr/bin/cfssl gencert -ca=/opt/ssl/ca.pem -ca-key=/opt/ssl/ca-key.pem -config=/opt/ssl/config.json -profile=kubernetes admin-csr.json | /usr/bin/cfssljson -bare admin 37 | 38 | - name: kubernetes-csr.json 39 | template: src=kubernetes-csr.json.j2 dest=/opt/ssl/kubernetes-csr.json 40 | 41 | - name: make kubernetes ssl 42 | shell: cd /opt/ssl && /usr/bin/cfssl gencert -ca=/opt/ssl/ca.pem -ca-key=/opt/ssl/ca-key.pem -config=/opt/ssl/config.json -profile=kubernetes kubernetes-csr.json | /usr/bin/cfssljson -bare kubernetes 43 | 44 | - name: copy kube-proxy-csr.json 45 | copy: src=kube-proxy-csr.json dest=/opt/ssl/kube-proxy-csr.json 46 | 47 | - name: make kube-proxy ssl 48 | shell: cd /opt/ssl/ && /usr/bin/cfssl gencert -ca=/opt/ssl/ca.pem -ca-key=/opt/ssl/ca-key.pem -config=/opt/ssl/config.json -profile=kubernetes kube-proxy-csr.json | /usr/bin/cfssljson -bare kube-proxy 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/templates/etcd-csr.json.j2: -------------------------------------------------------------------------------- 1 | { 2 | "CN": "etcd", 3 | "hosts": [ 4 | {% for h in groups['etcd'] %} 5 | "{{ h }}", 6 | {% endfor %} 7 | "127.0.0.1" 8 | ], 9 | "key": { 10 | "algo": "rsa", 11 | "size": 2048 12 | }, 13 | "names": [ 14 | { 15 | "C": "CN", 16 | "ST": "ShenZhen", 17 | "L": "ShenZhen", 18 | "O": "k8s", 19 | "OU": "System" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/cert/templates/kubernetes-csr.json.j2: -------------------------------------------------------------------------------- 1 | { 2 | "CN": "kubernetes", 3 | "hosts": [ 4 | "127.0.0.1", 5 | {% for h in groups['master'] %} 6 | "{{ h }}", 7 | {% endfor %} 8 | "10.254.0.1", 9 | "10.254.0.2", 10 | "kubernetes", 11 | "kubernetes.default", 12 | "kubernetes.default.svc", 13 | "kubernetes.default.svc.cluster", 14 | "kubernetes.default.svc.cluster.local" 15 | ], 16 | "key": { 17 | "algo": "rsa", 18 | "size": 2048 19 | }, 20 | "names": [ 21 | { 22 | "C": "CN", 23 | "ST": "ShenZhen", 24 | "L": "ShenZhen", 25 | "O": "k8s", 26 | "OU": "System" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/daemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "storage-driver": "overlay2", 3 | "storage-opts": [ 4 | "overlay2.override_kernel_check=true" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/docker-dns.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | Environment="DOCKER_DNS_OPTIONS=\ 3 | --dns 10.254.0.2 --dns 114.114.114.114 \ 4 | --dns-search default.svc.cluster.local --dns-search svc.cluster.local \ 5 | --dns-opt ndots:2 --dns-opt timeout:2 --dns-opt attempts:2" 6 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/docker-options.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | Environment="DOCKER_OPTS=--insecure-registry=ym209:5000 --graph=/opt/docker --log-opt max-size=50m --log-opt max-file=5" 3 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/docker.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Application Container Engine 3 | Documentation=http://docs.docker.com 4 | After=network.target 5 | 6 | [Service] 7 | Type=notify 8 | Environment=GOTRACEBACK=crash 9 | ExecReload=/bin/kill -s HUP $MAINPID 10 | Delegate=yes 11 | KillMode=process 12 | ExecStart=/usr/bin/dockerd \ 13 | $DOCKER_OPTS \ 14 | $DOCKER_STORAGE_OPTIONS \ 15 | $DOCKER_NETWORK_OPTIONS \ 16 | $DOCKER_DNS_OPTIONS \ 17 | $INSECURE_REGISTRY 18 | ExecStartPost=/usr/sbin/iptables -P FORWARD ACCEPT 19 | LimitNOFILE=1048576 20 | LimitNPROC=1048576 21 | LimitCORE=infinity 22 | TimeoutStartSec=1min 23 | Restart=on-abnormal 24 | 25 | [Install] 26 | WantedBy=multi-user.target 27 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/flannel-0.10.0-1.x86_64.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/ansible/k8s/1.11.2/roles/docker/files/flannel-0.10.0-1.x86_64.rpm -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/flannel.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | EnvironmentFile=-/run/flannel/docker 3 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/files/iptables.conf: -------------------------------------------------------------------------------- 1 | ExecStartPost=/usr/sbin/iptables -P FORWARD ACCEPT 2 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: make tmp hosts 3 | template: src=hosts.j2 dest=/tmp/hosts 4 | 5 | - name: cat /etc/hosts|grep hostname 6 | shell: cat /etc/hosts|grep {{hostname}} 7 | register: result_host 8 | ignore_errors: True 9 | 10 | #https://blog.csdn.net/kellyseeme/article/details/50619562 11 | - name: add hosts 12 | lineinfile: dest=/etc/hosts state=present line="{{item}}" 13 | with_file: 14 | - /tmp/hosts 15 | when: result_host.rc != 0 16 | 17 | - name: del tmp hosts 18 | file: path=/tmp/hosts state=absent 19 | 20 | - name: yum epel 21 | yum: name=epel-release state=present 22 | 23 | - name: yum libselinux-python 24 | yum: name=libselinux-python state=present 25 | 26 | - name: yum yum-utils 27 | yum: name=yum-utils state=present 28 | 29 | - name: add docker-ce repo 30 | shell: yum-config-manager --add-repo http://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo 31 | 32 | - name: yum policycoreutils-python 33 | yum: name=policycoreutils-python state=present 34 | 35 | - name: yum docker-ce-selinux-17.03.3.ce 36 | yum: name=docker-ce-selinux-17.03.3.ce state=present 37 | 38 | - name: yum docker-ce-17.03.3.ce 39 | yum: name=docker-ce-17.03.3.ce state=present 40 | 41 | - name: mkdir docker config dir 42 | shell: mkdir -p /etc/docker/ && mkdir -p /etc/systemd/system/docker.service.d/ &&mkdir -p /opt/docker 43 | 44 | - name: copy docker.service 45 | copy: src=docker.service dest=/usr/lib/systemd/system/docker.service 46 | 47 | - name: copy daemon.json 48 | copy: src=daemon.json dest=/etc/docker/daemon.json 49 | 50 | - name: copy docker plugin 51 | copy: src={{item}} dest=/etc/systemd/system/docker.service.d/{{item}} 52 | with_items: 53 | - "docker-options.conf" 54 | - "docker-dns.conf" 55 | - "flannel.conf" 56 | - "iptables.conf" 57 | 58 | - name: copy flannel 59 | copy: src=flannel-0.10.0-1.x86_64.rpm dest=/tmp/flannel-0.10.0-1.x86_64.rpm 60 | 61 | - name: install flannel 62 | shell: yum install -y /tmp/flannel-0.10.0-1.x86_64.rpm 63 | ignore_errors: yes 64 | 65 | - name: rm -rf flannel config 66 | shell: rm -rf /usr/lib/systemd/system/docker.service.d/ 67 | 68 | - name: flannel sysconfig 69 | template: src=flanneld.j2 dest=/etc/sysconfig/flanneld 70 | 71 | - name: flannel add network 72 | template: src=add.sh.j2 dest=/tmp/add.sh 73 | 74 | - name: flannel script 75 | shell: chmod +x /tmp/add.sh && /tmp/add.sh 76 | 77 | - name: run flannel 78 | shell: systemctl daemon-reload &&systemctl enable flanneld &&systemctl start flanneld 79 | 80 | - name: fix flannel 81 | shell: sed -i 's/false/true/' /var/run/flannel/docker 82 | 83 | - name: restart flannel 84 | shell: systemctl restart flanneld 85 | 86 | - name: start docker 87 | shell: systemctl daemon-reload &&systemctl enable docker &&systemctl start docker 88 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/templates/add.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | etcdctl --endpoints={{ETCD_SH}} \ 3 | --cert-file=/etc/kubernetes/ssl/etcd.pem \ 4 | --ca-file=/etc/kubernetes/ssl/ca.pem \ 5 | --key-file=/etc/kubernetes/ssl/etcd-key.pem \ 6 | set /flannel/network/config '{"Network":"10.254.64.0/18","SubnetLen":24,"Backend":{"Type":"host-gw"}}' 7 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/templates/flanneld.j2: -------------------------------------------------------------------------------- 1 | # Flanneld configuration options 2 | 3 | # etcd url location. Point this to the server where etcd runs 4 | FLANNEL_ETCD_ENDPOINTS="{{ETCD_SH}}" 5 | 6 | # etcd config key. This is the configuration key that flannel queries 7 | # For address range assignment 8 | FLANNEL_ETCD_PREFIX="/flannel/network" 9 | 10 | # Any additional options that you want to pass 11 | FLANNEL_OPTIONS="-ip-masq=true -etcd-cafile=/etc/kubernetes/ssl/ca.pem -etcd-certfile=/etc/kubernetes/ssl/etcd.pem -etcd-keyfile=/etc/kubernetes/ssl/etcd-key.pem -iface={{IFACE}}" 12 | 13 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/docker/templates/hosts.j2: -------------------------------------------------------------------------------- 1 | {% for h in groups['docker'] %} 2 | {{ h }} {{hostvars[h]['hostname']}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/etcd/files/down.sh: -------------------------------------------------------------------------------- 1 | wget https://github.com/coreos/etcd/releases/download/v3.2.18/etcd-v3.2.18-linux-amd64.tar.gz 2 | tar zxvf etcd-v3.2.18-linux-amd64.tar.gz 3 | cd etcd-v3.2.18-linux-amd64 4 | mv etcd etcdctl ../ 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/etcd/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: mkdir ssl 3 | shell: mkdir -p /etc/kubernetes/ssl/ 4 | 5 | - name: make etcd dir 6 | shell: useradd etcd && mkdir -p /opt/etcd && chown -R etcd:etcd /opt/etcd 7 | ignore_errors: yes 8 | 9 | - name: copy ssl 10 | copy: src=/opt/ssl/{{item}} dest=/etc/kubernetes/ssl/{{item}} 11 | with_items: 12 | - "ca.csr" 13 | - "ca-key.pem" 14 | - "ca.pem" 15 | - "etcd-key.pem" 16 | - "etcd.pem" 17 | 18 | - name: copy etcd file 19 | copy: src={{item}} dest=/usr/bin/{{item}} owner=root group=root mode=755 20 | with_items: 21 | - "etcd" 22 | - "etcdctl" 23 | 24 | - name: etcd service 25 | template: src=etcd.service.j2 dest=/usr/lib/systemd/system/etcd.service 26 | 27 | - name: run etcd 28 | shell: systemctl daemon-reload &&systemctl enable etcd &&systemctl start etcd 29 | 30 | - name: etcd tools 31 | template: src=etcd-health.sh.j2 dest=/root/etcd-health.sh mode=755 32 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/etcd/templates/etcd-health.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | etcdctl --endpoints={{ETCD_SH}} \ 3 | --cert-file=/etc/kubernetes/ssl/etcd.pem \ 4 | --ca-file=/etc/kubernetes/ssl/ca.pem \ 5 | --key-file=/etc/kubernetes/ssl/etcd-key.pem \ 6 | cluster-health 7 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/etcd/templates/etcd.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Etcd Server 3 | After=network.target 4 | After=network-online.target 5 | Wants=network-online.target 6 | 7 | [Service] 8 | Type=notify 9 | WorkingDirectory=/opt/etcd/ 10 | User=etcd 11 | # set GOMAXPROCS to number of processors 12 | ExecStart=/usr/bin/etcd \ 13 | --name={{hostname}} \ 14 | --cert-file=/etc/kubernetes/ssl/etcd.pem \ 15 | --key-file=/etc/kubernetes/ssl/etcd-key.pem \ 16 | --peer-cert-file=/etc/kubernetes/ssl/etcd.pem \ 17 | --peer-key-file=/etc/kubernetes/ssl/etcd-key.pem \ 18 | --trusted-ca-file=/etc/kubernetes/ssl/ca.pem \ 19 | --peer-trusted-ca-file=/etc/kubernetes/ssl/ca.pem \ 20 | --initial-advertise-peer-urls=https://{{ inventory_hostname }}:2380 \ 21 | --listen-peer-urls=https://{{ inventory_hostname }}:2380 \ 22 | --listen-client-urls=https://{{ inventory_hostname }}:2379,http://127.0.0.1:2379 \ 23 | --advertise-client-urls=https://{{ inventory_hostname }}:2379 \ 24 | --initial-cluster-token=k8s-etcd-cluster \ 25 | --initial-cluster={{ ETCD_NODES }} \ 26 | --initial-cluster-state=new \ 27 | --data-dir=/opt/etcd/ 28 | Restart=on-failure 29 | RestartSec=5 30 | LimitNOFILE=65536 31 | 32 | [Install] 33 | WantedBy=multi-user.target 34 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/1.11.5.sh: -------------------------------------------------------------------------------- 1 | export https_proxy="http://192.168.20.198:7777" 2 | if [[ ! -f "kubernetes-server-linux-amd64.tar.gz" ]];then 3 | wget https://dl.k8s.io/v1.11.5/kubernetes-server-linux-amd64.tar.gz 4 | tar -xzvf kubernetes-server-linux-amd64.tar.gz 5 | fi 6 | mkdir -p 1.11.5 7 | cp kubernetes/server/bin/{kube-apiserver,kube-controller-manager,kube-scheduler,kubectl,kube-proxy,kubelet,kubeadm} 1.11.5/ 8 | mkdir -p ../../node/files/1.11.5 9 | cp kubernetes/server/bin/{kubectl,kube-proxy,kubelet} ../../node/files/1.11.5 10 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/audit-policy.yaml: -------------------------------------------------------------------------------- 1 | # Log all requests at the Metadata level. 2 | apiVersion: audit.k8s.io/v1beta1 3 | kind: Policy 4 | rules: 5 | - level: Metadata 6 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/down.sh: -------------------------------------------------------------------------------- 1 | wget https://dl.k8s.io/v1.11.2/kubernetes-server-linux-amd64.tar.g 2 | tar -xzvf kubernetes-server-linux-amd64.tar.gz 3 | cd kubernetes 4 | cp server/bin/{kube-apiserver,kube-controller-manager,kube-scheduler,kubectl,kube-proxy,kubelet,kubeadm} ../ 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/encryption-config.yaml: -------------------------------------------------------------------------------- 1 | kind: EncryptionConfig 2 | apiVersion: v1 3 | resources: 4 | - resources: 5 | - secrets 6 | providers: 7 | - aescbc: 8 | keys: 9 | - name: key1 10 | secret: 56ef069f5f46b9159f98e5cc0a34875e 11 | - identity: {} 12 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/k8s_cluster.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ ! -f ~/.kube/config ]];then 3 | kubectl config set-cluster kubernetes \ 4 | --certificate-authority=/etc/kubernetes/ssl/ca.pem \ 5 | --embed-certs=true \ 6 | --server=https://127.0.0.1:6443 7 | 8 | kubectl config set-credentials admin \ 9 | --client-certificate=/etc/kubernetes/ssl/admin.pem \ 10 | --embed-certs=true \ 11 | --client-key=/etc/kubernetes/ssl/admin-key.pem 12 | 13 | kubectl config set-context kubernetes \ 14 | --cluster=kubernetes \ 15 | --user=admin 16 | 17 | kubectl config use-context kubernetes 18 | fi 19 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/kube-controller-manager.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kubernetes Controller Manager 3 | Documentation=https://github.com/GoogleCloudPlatform/kubernetes 4 | 5 | [Service] 6 | ExecStart=/usr/local/bin/kube-controller-manager \ 7 | --address=0.0.0.0 \ 8 | --master=http://127.0.0.1:8080 \ 9 | --allocate-node-cidrs=true \ 10 | --service-cluster-ip-range=10.254.0.0/18 \ 11 | --cluster-cidr=10.254.64.0/18 \ 12 | --cluster-signing-cert-file=/etc/kubernetes/ssl/ca.pem \ 13 | --cluster-signing-key-file=/etc/kubernetes/ssl/ca-key.pem \ 14 | --feature-gates=RotateKubeletServerCertificate=true \ 15 | --controllers=*,tokencleaner,bootstrapsigner \ 16 | --experimental-cluster-signing-duration=86700h0m0s \ 17 | --cluster-name=kubernetes \ 18 | --service-account-private-key-file=/etc/kubernetes/ssl/ca-key.pem \ 19 | --root-ca-file=/etc/kubernetes/ssl/ca.pem \ 20 | --leader-elect=true \ 21 | --node-monitor-grace-period=40s \ 22 | --node-monitor-period=5s \ 23 | --pod-eviction-timeout=5m0s \ 24 | --v=2 25 | Restart=on-failure 26 | RestartSec=5 27 | 28 | [Install] 29 | WantedBy=multi-user.target 30 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/kube-proxy.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kubernetes Kube-Proxy Server 3 | Documentation=https://github.com/GoogleCloudPlatform/kubernetes 4 | After=network.target 5 | 6 | [Service] 7 | WorkingDirectory=/var/lib/kube-proxy 8 | ExecStart=/usr/local/bin/kube-proxy \ 9 | --config=/etc/kubernetes/kube-proxy.config.yaml \ 10 | --logtostderr=true \ 11 | --v=1 12 | Restart=on-failure 13 | RestartSec=5 14 | LimitNOFILE=65536 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/kube-scheduler.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kubernetes Scheduler 3 | Documentation=https://github.com/GoogleCloudPlatform/kubernetes 4 | 5 | [Service] 6 | ExecStart=/usr/local/bin/kube-scheduler \ 7 | --address=0.0.0.0 \ 8 | --master=http://127.0.0.1:8080 \ 9 | --leader-elect=true \ 10 | --v=1 11 | Restart=on-failure 12 | RestartSec=5 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | 17 | -------------------------------------------------------------------------------- /ansible/k8s/1.11.2/roles/master/files/mk-encryption-config.sh: -------------------------------------------------------------------------------- 1 | SECRET=$(head -c 16 /dev/urandom | od -An -t x | tr -d ' ') 2 | cat > encryption-config.yaml < /proc/sys/net/bridge/bridge-nf-call-iptables" 24 | - "echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables" 25 | 26 | - name: limits.conf 27 | lineinfile: dest=/etc/security/limits.conf state=present line='* - nofile 65535' 28 | 29 | - name: limits.conf two 30 | lineinfile: dest=/etc/security/limits.d/20-nproc.conf state=present line='* soft nproc 65535' 31 | 32 | - name: disable fw 33 | shell: systemctl disable firewalld && systemctl stop firewalld 34 | 35 | - name: yum iptables 36 | shell: yum -y install iptables iptables-services && systemctl start iptables && systemctl enable iptables 37 | 38 | - name: clear iptables 39 | shell: iptables -F && iptables -F -t nat && service iptables save 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | master: server130 3 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/files/virt7-docker-common-release.repo: -------------------------------------------------------------------------------- 1 | [virt7-docker-common-release] 2 | name=virt7-docker-common-release 3 | baseurl=http://cbs.centos.org/repos/virt7-docker-common-release/x86_64/os/ 4 | gpgcheck=0 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: copy k8s repo 3 | copy: src=virt7-docker-common-release.repo dest=/etc/yum.repos.d/virt7-docker-common-release.repo 4 | 5 | - name: install k8s 6 | shell: yum -y install --enablerepo=virt7-docker-common-release kubernetes 7 | 8 | - name: copy /etc/kubernetes/config 9 | template: src=config dest=/etc/kubernetes/config 10 | 11 | - name: copy /etc/kubernetes/apiserver 12 | template: src=apiserver dest=/etc/kubernetes/apiserver 13 | 14 | - name: copy /etc/kubernetes/kubelet 15 | template: src=kubelet dest=/etc/kubernetes/kubelet 16 | 17 | - name: enable k8s 18 | shell: systemctl daemon-reload && systemctl enable kube-apiserver kube-controller-manager kube-scheduler kubelet kube-proxy 19 | 20 | - name: run k8s 21 | shell: systemctl restart kube-apiserver kube-controller-manager kube-scheduler kubelet kube-proxy 22 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/templates/apiserver: -------------------------------------------------------------------------------- 1 | ### 2 | # kubernetes system config 3 | # 4 | # The following values are used to configure the kube-apiserver 5 | # 6 | 7 | # The address on the local server to listen to. 8 | KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0" 9 | 10 | # The port on the local server to listen on. 11 | KUBE_API_PORT="--port=8080" 12 | 13 | # Port minions listen on 14 | KUBELET_PORT="--kubelet-port=10250" 15 | 16 | # Comma separated list of nodes in the etcd cluster 17 | KUBE_ETCD_SERVERS="--etcd-servers=http://{{master}}:2379" 18 | 19 | # Address range to use for services 20 | KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16" 21 | 22 | # default admission control policies 23 | KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota" 24 | # Add your own! 25 | KUBE_API_ARGS="" 26 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/templates/config: -------------------------------------------------------------------------------- 1 | ### 2 | # kubernetes system config 3 | # 4 | # The following values are used to configure various aspects of all 5 | # kubernetes services, including 6 | # 7 | # kube-apiserver.service 8 | # kube-controller-manager.service 9 | # kube-scheduler.service 10 | # kubelet.service 11 | # kube-proxy.service 12 | KUBE_ETCD_SERVERS="--etcd-servers=http://{{master}}:2379" 13 | # logging to stderr means we get it in the systemd journal 14 | KUBE_LOGTOSTDERR="--logtostderr=true" 15 | 16 | # journal message level, 0 is debug 17 | KUBE_LOG_LEVEL="--v=0" 18 | 19 | # Should this cluster be allowed to run privileged docker containers 20 | KUBE_ALLOW_PRIV="--allow-privileged=false" 21 | 22 | # How the controller-manager, scheduler, and proxy find the apiserver 23 | KUBE_MASTER="--master=http://{{master}}:8080" 24 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/templates/etcd.conf: -------------------------------------------------------------------------------- 1 | # [member] 2 | ETCD_NAME=default 3 | ETCD_DATA_DIR="/var/lib/etcd/default.etcd" 4 | #ETCD_WAL_DIR="" 5 | #ETCD_SNAPSHOT_COUNT="10000" 6 | #ETCD_HEARTBEAT_INTERVAL="100" 7 | #ETCD_ELECTION_TIMEOUT="1000" 8 | #ETCD_LISTEN_PEER_URLS="http://localhost:2380" 9 | ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001" 10 | #ETCD_MAX_SNAPSHOTS="5" 11 | #ETCD_MAX_WALS="5" 12 | #ETCD_CORS="" 13 | # 14 | #[cluster] 15 | #ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380" 16 | # if you use different ETCD_NAME (e.g. test), set ETCD_INITIAL_CLUSTER value for this name, i.e. "test=http://..." 17 | #ETCD_INITIAL_CLUSTER="default=http://localhost:2380" 18 | #ETCD_INITIAL_CLUSTER_STATE="new" 19 | #ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster" 20 | ETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001" 21 | #ETCD_DISCOVERY="" 22 | #ETCD_DISCOVERY_SRV="" 23 | #ETCD_DISCOVERY_FALLBACK="proxy" 24 | #ETCD_DISCOVERY_PROXY="" 25 | #ETCD_STRICT_RECONFIG_CHECK="false" 26 | #ETCD_AUTO_COMPACTION_RETENTION="0" 27 | #ETCD_ENABLE_V2="true" 28 | # 29 | #[proxy] 30 | #ETCD_PROXY="off" 31 | #ETCD_PROXY_FAILURE_WAIT="5000" 32 | #ETCD_PROXY_REFRESH_INTERVAL="30000" 33 | #ETCD_PROXY_DIAL_TIMEOUT="1000" 34 | #ETCD_PROXY_WRITE_TIMEOUT="5000" 35 | #ETCD_PROXY_READ_TIMEOUT="0" 36 | # 37 | #[security] 38 | #ETCD_CERT_FILE="" 39 | #ETCD_KEY_FILE="" 40 | #ETCD_CLIENT_CERT_AUTH="false" 41 | #ETCD_TRUSTED_CA_FILE="" 42 | #ETCD_AUTO_TLS="false" 43 | #ETCD_PEER_CERT_FILE="" 44 | #ETCD_PEER_KEY_FILE="" 45 | #ETCD_PEER_CLIENT_CERT_AUTH="false" 46 | #ETCD_PEER_TRUSTED_CA_FILE="" 47 | #ETCD_PEER_AUTO_TLS="false" 48 | # 49 | #[logging] 50 | #ETCD_DEBUG="false" 51 | # examples for -log-package-levels etcdserver=WARNING,security=DEBUG 52 | #ETCD_LOG_PACKAGE_LEVELS="" 53 | # 54 | #[profiling] 55 | #ETCD_ENABLE_PPROF="false" 56 | #ETCD_METRICS="basic" 57 | # 58 | #[auth] 59 | #ETCD_AUTH_TOKEN="simple" 60 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/templates/flanneld: -------------------------------------------------------------------------------- 1 | # Flanneld configuration options 2 | 3 | # etcd url location. Point this to the server where etcd runs 4 | FLANNEL_ETCD_ENDPOINTS="http://{{master}}:2379" 5 | 6 | # etcd config key. This is the configuration key that flannel queries 7 | # For address range assignment 8 | FLANNEL_ETCD_PREFIX="/k8s/network" 9 | 10 | # Any additional options that you want to pass 11 | FLANNEL_OPTIONS="--iface=em1" 12 | 13 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_master/templates/kubelet: -------------------------------------------------------------------------------- 1 | ### 2 | # kubernetes kubelet (minion) config 3 | 4 | # The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) 5 | KUBELET_ADDRESS="--address=0.0.0.0" 6 | 7 | # The port for the info server to serve on 8 | # KUBELET_PORT="--port=10250" 9 | 10 | # You may leave this blank to use the actual hostname 11 | KUBELET_HOSTNAME="--hostname-override={{hostname}}" 12 | 13 | # location of the api-server 14 | KUBELET_API_SERVER="--api-servers=http://{{master}}:8080" 15 | 16 | # pod infrastructure container 17 | KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest" 18 | 19 | # Add your own! 20 | KUBELET_ARGS="" 21 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | master: server130 3 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/files/virt7-docker-common-release.repo: -------------------------------------------------------------------------------- 1 | [virt7-docker-common-release] 2 | name=virt7-docker-common-release 3 | baseurl=http://cbs.centos.org/repos/virt7-docker-common-release/x86_64/os/ 4 | gpgcheck=0 5 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: copy k8s repo 3 | copy: src=virt7-docker-common-release.repo dest=/etc/yum.repos.d/virt7-docker-common-release.repo 4 | 5 | - name: install k8s 6 | shell: yum -y install --enablerepo=virt7-docker-common-release kubernetes 7 | 8 | - name: copy /etc/kubernetes/config 9 | template: src=config dest=/etc/kubernetes/config 10 | 11 | - name: copy /etc/kubernetes/apiserver 12 | template: src=apiserver dest=/etc/kubernetes/apiserver 13 | 14 | - name: copy /etc/kubernetes/kubelet 15 | template: src=kubelet dest=/etc/kubernetes/kubelet 16 | 17 | - name: enable k8s 18 | shell: systemctl daemon-reload && systemctl enable kubelet kube-proxy 19 | 20 | - name: run k8s 21 | shell: systemctl restart kubelet kube-proxy 22 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/templates/apiserver: -------------------------------------------------------------------------------- 1 | ### 2 | # kubernetes system config 3 | # 4 | # The following values are used to configure the kube-apiserver 5 | # 6 | 7 | # The address on the local server to listen to. 8 | KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0" 9 | 10 | # The port on the local server to listen on. 11 | KUBE_API_PORT="--port=8080" 12 | 13 | # Port minions listen on 14 | KUBELET_PORT="--kubelet-port=10250" 15 | 16 | # Comma separated list of nodes in the etcd cluster 17 | KUBE_ETCD_SERVERS="--etcd-servers=http://{{master}}:2379" 18 | 19 | # Address range to use for services 20 | KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16" 21 | 22 | # default admission control policies 23 | KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota" 24 | # Add your own! 25 | KUBE_API_ARGS="" 26 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/templates/config: -------------------------------------------------------------------------------- 1 | ### 2 | # kubernetes system config 3 | # 4 | # The following values are used to configure various aspects of all 5 | # kubernetes services, including 6 | # 7 | # kube-apiserver.service 8 | # kube-controller-manager.service 9 | # kube-scheduler.service 10 | # kubelet.service 11 | # kube-proxy.service 12 | KUBE_ETCD_SERVERS="--etcd-servers=http://{{master}}:2379" 13 | # logging to stderr means we get it in the systemd journal 14 | KUBE_LOGTOSTDERR="--logtostderr=true" 15 | 16 | # journal message level, 0 is debug 17 | KUBE_LOG_LEVEL="--v=0" 18 | 19 | # Should this cluster be allowed to run privileged docker containers 20 | KUBE_ALLOW_PRIV="--allow-privileged=false" 21 | 22 | # How the controller-manager, scheduler, and proxy find the apiserver 23 | KUBE_MASTER="--master=http://{{master}}:8080" 24 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/templates/etcd.conf: -------------------------------------------------------------------------------- 1 | # [member] 2 | ETCD_NAME=default 3 | ETCD_DATA_DIR="/var/lib/etcd/default.etcd" 4 | #ETCD_WAL_DIR="" 5 | #ETCD_SNAPSHOT_COUNT="10000" 6 | #ETCD_HEARTBEAT_INTERVAL="100" 7 | #ETCD_ELECTION_TIMEOUT="1000" 8 | #ETCD_LISTEN_PEER_URLS="http://localhost:2380" 9 | ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001" 10 | #ETCD_MAX_SNAPSHOTS="5" 11 | #ETCD_MAX_WALS="5" 12 | #ETCD_CORS="" 13 | # 14 | #[cluster] 15 | #ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380" 16 | # if you use different ETCD_NAME (e.g. test), set ETCD_INITIAL_CLUSTER value for this name, i.e. "test=http://..." 17 | #ETCD_INITIAL_CLUSTER="default=http://localhost:2380" 18 | #ETCD_INITIAL_CLUSTER_STATE="new" 19 | #ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster" 20 | ETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001" 21 | #ETCD_DISCOVERY="" 22 | #ETCD_DISCOVERY_SRV="" 23 | #ETCD_DISCOVERY_FALLBACK="proxy" 24 | #ETCD_DISCOVERY_PROXY="" 25 | #ETCD_STRICT_RECONFIG_CHECK="false" 26 | #ETCD_AUTO_COMPACTION_RETENTION="0" 27 | #ETCD_ENABLE_V2="true" 28 | # 29 | #[proxy] 30 | #ETCD_PROXY="off" 31 | #ETCD_PROXY_FAILURE_WAIT="5000" 32 | #ETCD_PROXY_REFRESH_INTERVAL="30000" 33 | #ETCD_PROXY_DIAL_TIMEOUT="1000" 34 | #ETCD_PROXY_WRITE_TIMEOUT="5000" 35 | #ETCD_PROXY_READ_TIMEOUT="0" 36 | # 37 | #[security] 38 | #ETCD_CERT_FILE="" 39 | #ETCD_KEY_FILE="" 40 | #ETCD_CLIENT_CERT_AUTH="false" 41 | #ETCD_TRUSTED_CA_FILE="" 42 | #ETCD_AUTO_TLS="false" 43 | #ETCD_PEER_CERT_FILE="" 44 | #ETCD_PEER_KEY_FILE="" 45 | #ETCD_PEER_CLIENT_CERT_AUTH="false" 46 | #ETCD_PEER_TRUSTED_CA_FILE="" 47 | #ETCD_PEER_AUTO_TLS="false" 48 | # 49 | #[logging] 50 | #ETCD_DEBUG="false" 51 | # examples for -log-package-levels etcdserver=WARNING,security=DEBUG 52 | #ETCD_LOG_PACKAGE_LEVELS="" 53 | # 54 | #[profiling] 55 | #ETCD_ENABLE_PPROF="false" 56 | #ETCD_METRICS="basic" 57 | # 58 | #[auth] 59 | #ETCD_AUTH_TOKEN="simple" 60 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/templates/flanneld: -------------------------------------------------------------------------------- 1 | # Flanneld configuration options 2 | 3 | # etcd url location. Point this to the server where etcd runs 4 | FLANNEL_ETCD_ENDPOINTS="http://{{master}}:2379" 5 | 6 | # etcd config key. This is the configuration key that flannel queries 7 | # For address range assignment 8 | FLANNEL_ETCD_PREFIX="/k8s/network" 9 | 10 | # Any additional options that you want to pass 11 | FLANNEL_OPTIONS="--iface=em1" 12 | 13 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/k8s_node/templates/kubelet: -------------------------------------------------------------------------------- 1 | ### 2 | # kubernetes kubelet (minion) config 3 | 4 | # The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) 5 | KUBELET_ADDRESS="--address=0.0.0.0" 6 | 7 | # The port for the info server to serve on 8 | # KUBELET_PORT="--port=10250" 9 | 10 | # You may leave this blank to use the actual hostname 11 | KUBELET_HOSTNAME="--hostname-override={{hostname}}" 12 | 13 | # location of the api-server 14 | KUBELET_API_SERVER="--api-servers=http://{{master}}:8080" 15 | 16 | # pod infrastructure container 17 | KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest" 18 | 19 | # Add your own! 20 | KUBELET_ARGS="" 21 | -------------------------------------------------------------------------------- /ansible/k8s/1.5.2/roles/mkdir.sh: -------------------------------------------------------------------------------- 1 | mkdir -p $1/{defaults,files,handlers,tasks,templates}/ 2 | -------------------------------------------------------------------------------- /autotar.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/autotar.sh -------------------------------------------------------------------------------- /centos6-vault.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | version=`cat /etc/redhat-release |awk '{printf $3}'` 3 | mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 4 | cat >/etc/yum.repos.d/CentOS-Base.repo<>/etc/hosts 9 | echo '192.168.100.62 mongohost2' >>/etc/hosts 10 | echo '192.168.100.63 mongohost3' >>/etc/hosts 11 | echo "host add!" 12 | else 13 | echo "host have!" 14 | fi 15 | } 16 | 17 | node1() { 18 | #data 19 | mkdir -p /work/mongodb/{shard11,shard21} 20 | cat > /work/mongodb/shard11.conf < /work/mongodb/shard21.conf < /work/mongodb/config1.conf < /work/mongodb/arbiter1.conf < /work/mongodb/arbiter2.conf < /work/mongodb/mongos1.conf < /root/mongo.sh < /root/mongos.sh < /work/mongodb/shard12.conf < /work/mongodb/shard22.conf < /work/mongodb/config2.conf < /work/mongodb/arbiter1.conf < /work/mongodb/arbiter2.conf < /work/mongodb/mongos2.conf < /root/mongo.sh < /root/mongos.sh < /work/mongodb/shard13.conf < /work/mongodb/shard23.conf < /work/mongodb/config3.conf < /work/mongodb/arbiter1.conf < /work/mongodb/arbiter2.conf < /work/mongodb/mongos3.conf < /root/mongo.sh < /root/mongos.sh < /work/mongodb/shard$1.conf < /root/mongo$1.sh <> /etc/ld.so.conf 70 | ldconfig 71 | service mysql start 72 | cd - 73 | cd .. 74 | /usr/local/percona/bin/mysqladmin -u root password google123 75 | echo 'export PATH="/usr/local/percona/bin:$PATH"' >>/etc/profile 76 | source /etc/profile 77 | } 78 | 79 | main() { 80 | base 81 | download 82 | mysql 83 | } 84 | main 85 | -------------------------------------------------------------------------------- /mysql_5.6.17.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "" 5 | echo "Mysql for Centos6.x Install scripts " 6 | echo "Default Install PATH:/usr/local/mysql" 7 | echo "Default mysql default password:google123" 8 | echo "=========================================================================" 9 | echo "" 10 | echo "For more information please visit http://code.google.com/p/autosetup/ or https://github.com/akin520" 11 | echo "" 12 | 13 | read -p "If the OK! Press any key to start..." 14 | 15 | base() { 16 | echo "EVN Initialization..." 17 | if [ "`uname -m`" == "x86_64" ]; then 18 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 19 | rpm -Uhv http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm 20 | elif [ "`uname -m`" == "i686" ]; then 21 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 22 | rpm -Uvh http://mirrors.ustc.edu.cn/epel/6/i386/epel-release-6-7.noarch.rpm 23 | fi 24 | yum -y install unzip wget cmake bison bison-devel 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 25 | yum install axel -y 26 | } 27 | 28 | download() { 29 | echo "Download soft..." 30 | if [ ! -s mysql-5.6.17.tar.gz ]; then 31 | axel -n 10 http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17.tar.gz 32 | fi 33 | if [ -s /etc/my.cnf ]; then 34 | mv /etc/my.cnf /etc/my.cnf.auto 35 | fi 36 | if [ -s /etc/init.d/mysql ]; then 37 | mv /etc/init.d/mysql /etc/init.d/mysql.auto 38 | fi 39 | } 40 | 41 | install(){ 42 | useradd mysql 43 | tar -zxvf mysql-5.6.17.tar.gz 44 | cd mysql-5.6.17 45 | mkdir -p source_downloads 46 | cd source_downloads 47 | axel -n 5 http://sourceforge.net/projects/autosetup/files/soft/gmock-1.6.0.zip 48 | unzip gmock-1.6.0.zip 49 | cd gmock-1.6.0 50 | ./configure 51 | make 52 | cd ../.. 53 | 54 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=bundled -DWITH_READLINE=1 -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DENABLE_DOWNLOADS=1 55 | make && make install 56 | cp support-files/my-default.cnf /etc/my.cnf 57 | cp support-files/mysql.server /etc/init.d/mysql 58 | cd /usr/local/mysql 59 | ./scripts/mysql_install_db --user=mysql 60 | chown -R mysql /usr/local/mysql/data 61 | chgrp -R mysql /usr/local/mysql/. 62 | chmod 755 /etc/init.d/mysql 63 | chkconfig --level 345 mysql on 64 | echo "/usr/local/mysql/lib" >> /etc/ld.so.conf 65 | ldconfig 66 | service mysql start 67 | cd - 68 | cd .. 69 | /usr/local/mysql/bin/mysqladmin -u root password google123 70 | echo 'export PATH="/usr/local/mysql/bin:$PATH"' >>/etc/profile 71 | source /etc/profile 72 | } 73 | 74 | end() { 75 | clear 76 | echo "" 77 | echo "" 78 | echo "Run Script: /etc/init.d/mysql {start|stop|restart}" 79 | echo "datadir /usr/local/mysql/data" 80 | echo "" 81 | echo "" 82 | } 83 | 84 | main() { 85 | 86 | echo "Installtion MYSQL..." 87 | base 88 | download 89 | install 90 | end 91 | } 92 | 93 | main 94 | 95 | -------------------------------------------------------------------------------- /mysql_5.7.9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | echo "=========================================================================" 4 | echo "" 5 | echo "Mysql for Centos6.x Install scripts " 6 | echo "Default Install PATH:/usr/local/mysql" 7 | echo "=========================================================================" 8 | echo "" 9 | echo "For more information please visit http://code.google.com/p/autosetup/ or https://github.com/akin520" 10 | echo "" 11 | 12 | read -p "If the OK! Press any key to start..." 13 | 14 | base() { 15 | echo "EVN Initialization..." 16 | if [ "`uname -m`" == "x86_64" ]; then 17 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 18 | rpm -Uhv http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm 19 | elif [ "`uname -m`" == "i686" ]; then 20 | rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 21 | rpm -Uvh http://mirrors.ustc.edu.cn/epel/6/i386/epel-release-6-7.noarch.rpm 22 | fi 23 | yum -y install unzip wget cmake bison bison-devel 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 24 | yum install axel -y 25 | } 26 | 27 | download() { 28 | echo "Download soft..." 29 | if [ ! -s mysql-5.7.9.tar.gz ]; then 30 | axel -n 10 http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9.tar.gz 31 | fi 32 | if [ ! -s boost_1_59_0.tar.gz ]; then 33 | axel -n 10 http://nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz 34 | fi 35 | if [ -s /etc/my.cnf ]; then 36 | mv /etc/my.cnf /etc/my.cnf.auto 37 | fi 38 | if [ -s /etc/init.d/mysql ]; then 39 | mv /etc/init.d/mysql /etc/init.d/mysql.auto 40 | fi 41 | } 42 | 43 | install(){ 44 | tar -zxvf boost_1_59_0.tar.gz 45 | mv boost_1_59_0 /usr/local/ 46 | groupadd mysql 47 | useradd -g mysql mysql 48 | tar -zxvf mysql-5.7.9.tar.gz 49 | cd mysql-5.7.9 50 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DMYSQL_TCP_PORT=3306 -DMYSQL_USER=mysql -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost_1_59_0 51 | make && make install 52 | cp support-files/my-default.cnf /etc/my.cnf 53 | cp support-files/mysql.server /etc/init.d/mysql 54 | cd /usr/local/mysql 55 | #./bin/mysqld --initialize --user=mysql 56 | ./bin/mysqld --initialize-insecure --user=mysql 57 | chown -R mysql /usr/local/mysql/data 58 | chgrp -R mysql /usr/local/mysql/. 59 | chmod 755 /etc/init.d/mysql 60 | chkconfig --level 345 mysql on 61 | echo "/usr/local/mysql/lib" >> /etc/ld.so.conf 62 | ldconfig 63 | service mysql start 64 | cd - 65 | cd .. 66 | echo 'export PATH="/usr/local/mysql/bin:$PATH"' >>/etc/profile 67 | source /etc/profile 68 | } 69 | 70 | end() { 71 | clear 72 | echo "" 73 | echo "" 74 | echo "Run Script: /etc/init.d/mysql {start|stop|restart}" 75 | echo "datadir /usr/local/mysql/data" 76 | echo "" 77 | echo "" 78 | } 79 | 80 | main() { 81 | 82 | echo "Installtion MYSQL..." 83 | base 84 | download 85 | install 86 | end 87 | } 88 | 89 | main 90 | 91 | -------------------------------------------------------------------------------- /nginx-tcp.conf: -------------------------------------------------------------------------------- 1 | user www www; 2 | 3 | worker_processes 2; 4 | 5 | error_log /usr/local/nginx/logs/nginx_error.log crit; 6 | 7 | pid /usr/local/nginx/logs/nginx.pid; 8 | 9 | #Specifies the value for maximum file descriptors that can be opened by this process. 10 | worker_rlimit_nofile 51200; 11 | 12 | events 13 | { 14 | use epoll; 15 | worker_connections 51200; 16 | } 17 | 18 | http { 19 | include mime.types; 20 | default_type application/octet-stream; 21 | 22 | #charset gb2312; 23 | 24 | server_names_hash_bucket_size 128; 25 | client_header_buffer_size 32k; 26 | large_client_header_buffers 4 32k; 27 | client_max_body_size 8m; 28 | 29 | sendfile on; 30 | tcp_nopush on; 31 | 32 | keepalive_timeout 60; 33 | 34 | tcp_nodelay on; 35 | 36 | fastcgi_connect_timeout 300; 37 | fastcgi_send_timeout 300; 38 | fastcgi_read_timeout 300; 39 | fastcgi_buffer_size 128k; 40 | fastcgi_buffers 4 256k; 41 | fastcgi_busy_buffers_size 256k; 42 | fastcgi_temp_file_write_size 256k; 43 | 44 | gzip on; 45 | gzip_min_length 1k; 46 | gzip_buffers 4 16k; 47 | gzip_http_version 1.0; 48 | gzip_comp_level 2; 49 | gzip_types text/plain application/x-javascript text/css application/xml; 50 | gzip_vary on; 51 | 52 | #limit_zone crawler $binary_remote_addr 10m; 53 | 54 | log_format access '$remote_addr - $remote_user [$time_local] "$request" ' 55 | '$status $body_bytes_sent "$http_referer" ' 56 | '"$http_user_agent" $http_x_forwarded_for'; 57 | 58 | server { 59 | listen 8888; 60 | server_name localhost; 61 | 62 | location /status { 63 | stub_status on; 64 | access_log off; 65 | } 66 | } 67 | } 68 | 69 | 70 | stream { 71 | server { 72 | listen 12345; 73 | proxy_connect_timeout 5s; 74 | proxy_timeout 20s; 75 | proxy_pass 192.168.10.234:3306; 76 | } 77 | server { 78 | listen 53 udp reuseport; 79 | proxy_timeout 20s; 80 | proxy_pass 192.168.10.234:53; 81 | } 82 | server { 83 | listen 9135; 84 | proxy_connect_timeout 10s; 85 | proxy_timeout 30s; 86 | proxy_pass [2404:6800:4012:1::200e]:9135; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | user webadm webadm; 2 | 3 | worker_processes 2; 4 | 5 | error_log /usr/local/nginx/logs/nginx_error.log crit; 6 | 7 | pid /usr/local/nginx/logs/nginx.pid; 8 | 9 | #Specifies the value for maximum file descriptors that can be opened by this process. 10 | worker_rlimit_nofile 51200; 11 | 12 | events 13 | { 14 | use epoll; 15 | worker_connections 51200; 16 | } 17 | 18 | http 19 | { 20 | include mime.types; 21 | default_type application/octet-stream; 22 | 23 | #charset gb2312; 24 | 25 | server_names_hash_bucket_size 128; 26 | client_header_buffer_size 32k; 27 | large_client_header_buffers 4 32k; 28 | client_max_body_size 8m; 29 | 30 | sendfile on; 31 | tcp_nopush on; 32 | 33 | keepalive_timeout 60; 34 | 35 | tcp_nodelay on; 36 | 37 | fastcgi_connect_timeout 300; 38 | fastcgi_send_timeout 300; 39 | fastcgi_read_timeout 300; 40 | fastcgi_buffer_size 128k; 41 | fastcgi_buffers 4 256k; 42 | fastcgi_busy_buffers_size 256k; 43 | fastcgi_temp_file_write_size 256k; 44 | 45 | gzip on; 46 | gzip_min_length 1k; 47 | gzip_buffers 4 16k; 48 | gzip_http_version 1.0; 49 | gzip_comp_level 2; 50 | gzip_types text/plain application/x-javascript text/css application/xml; 51 | gzip_vary on; 52 | 53 | #limit_zone crawler $binary_remote_addr 10m; 54 | 55 | log_format access '$remote_addr - $remote_user [$time_local] "$request" ' 56 | '$status $body_bytes_sent "$http_referer" ' 57 | '"$http_user_agent" $http_x_forwarded_for'; 58 | 59 | server 60 | { 61 | listen 80; 62 | server_name _; 63 | index index.html index.htm index.php; 64 | root /home/webadm; 65 | 66 | #limit_conn crawler 20; 67 | 68 | location ~ .*\.(php|php5)?$ 69 | { 70 | #fastcgi_pass unix:/tmp/php-cgi.sock; 71 | fastcgi_pass 127.0.0.1:9000; 72 | fastcgi_index index.php; 73 | include fcgi.conf; 74 | } 75 | 76 | location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ 77 | { 78 | expires 30d; 79 | } 80 | 81 | location ~ .*\.(js|css)?$ 82 | { 83 | expires 1h; 84 | } 85 | 86 | 87 | access_log /usr/local/nginx/logs/access.log access; 88 | } 89 | 90 | server 91 | { 92 | listen 80; 93 | server_name autosetup.inbelle.cn; 94 | 95 | location /status { 96 | stub_status on; 97 | access_log off; 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /nginx_cache.conf: -------------------------------------------------------------------------------- 1 | user webadm webadm; 2 | 3 | worker_processes 8; 4 | 5 | error_log /usr/local/nginx/logs/nginx_error.log crit; 6 | 7 | pid /usr/local/nginx/logs/nginx.pid; 8 | 9 | #Specifies the value for maximum file descriptors that can be opened by this process. 10 | worker_rlimit_nofile 51200; 11 | 12 | events 13 | { 14 | use epoll; 15 | worker_connections 51200; 16 | } 17 | 18 | http 19 | { 20 | include mime.types; 21 | default_type application/octet-stream; 22 | 23 | #charset gb2312; 24 | 25 | server_names_hash_bucket_size 128; 26 | client_header_buffer_size 32k; 27 | large_client_header_buffers 4 32k; 28 | 29 | sendfile on; 30 | tcp_nopush on; 31 | 32 | keepalive_timeout 60; 33 | 34 | tcp_nodelay on; 35 | 36 | fastcgi_connect_timeout 300; 37 | fastcgi_send_timeout 300; 38 | fastcgi_read_timeout 300; 39 | fastcgi_buffer_size 64k; 40 | fastcgi_buffers 4 64k; 41 | fastcgi_busy_buffers_size 128k; 42 | fastcgi_temp_file_write_size 128k; 43 | 44 | client_max_body_size 50m; 45 | proxy_connect_timeout 5; 46 | proxy_read_timeout 60; 47 | proxy_send_timeout 5; 48 | proxy_buffer_size 16k; 49 | proxy_buffers 4 64k; 50 | proxy_busy_buffers_size 128k; 51 | proxy_temp_file_write_size 128k; 52 | 53 | gzip on; 54 | gzip_min_length 1k; 55 | gzip_buffers 4 16k; 56 | gzip_http_version 1.0; 57 | gzip_comp_level 2; 58 | gzip_types text/plain application/x-javascript text/css application/xml; 59 | gzip_vary on; 60 | 61 | #limit_zone crawler $binary_remote_addr 10m; 62 | 63 | proxy_temp_path /usr/local/nginx/nginx_temp; 64 | proxy_cache_path /usr/local/nginx/nginx_cache levels=1:2 keys_zone=NCache:400m inactive=2d max_size=5G; 65 | 66 | client_body_temp_path /dev/shm/client_body_temp; 67 | 68 | #proxy 69 | include proxy.conf; 70 | 71 | 72 | } 73 | 74 | -------------------------------------------------------------------------------- /nginx_tcp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | useradd www 4 | wget --no-check-certificate https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz 5 | tar -zxvf pcre-8.43.tar.gz 6 | cd pcre-8.43 7 | ./configure 8 | make&&make install 9 | cd .. 10 | 11 | wget http://nginx.org/download/nginx-1.17.4.tar.gz 12 | wget --no-check-certificate -O openssl-1.1.1c.tar.gz https://www.openssl.org/source/openssl-1.1.1c.tar.gz 13 | wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.11.tar.gz 14 | 15 | tar xf nginx-1.17.4.tar.gz 16 | tar xf openssl-1.1.1c.tar.gz 17 | tar xf zlib-1.2.11.tar.gz 18 | 19 | cd nginx-1.17.4 20 | ./configure --prefix=/usr/local/nginx-tcp --user=www --group=www --with-stream --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-pcre=../pcre-8.43 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.1.1c 21 | make 22 | make install 23 | cd .. 24 | 25 | rm -rf /usr/local/nginx-tcp/conf/nginx.conf 26 | wget -O /usr/local/nginx-tcp/conf/nginx.conf https://raw.githubusercontent.com/akin520/AutoSetup/master/nginx-tcp.conf 27 | /usr/local/nginx-tcp/sbin/nginx -t 28 | -------------------------------------------------------------------------------- /proxy.conf: -------------------------------------------------------------------------------- 1 | upstream p2p { 2 | server 127.0.0.1:80; 3 | } 4 | 5 | server 6 | { 7 | listen 80; 8 | server_name _; 9 | 10 | location / { 11 | proxy_pass http://p2p; 12 | proxy_set_header Host $host; 13 | proxy_set_header X-Real-IP $remote_addr; 14 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 15 | } 16 | 17 | access_log off; 18 | } 19 | -------------------------------------------------------------------------------- /proxy_cache.conf: -------------------------------------------------------------------------------- 1 | upstream p2p { 2 | server 127.0.0.1:8086; 3 | } 4 | 5 | server 6 | { 7 | listen 80; 8 | server_name _; 9 | 10 | location / { 11 | proxy_pass http://p2p; 12 | proxy_set_header Host $host; 13 | proxy_set_header X-Real-IP $remote_addr; 14 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 15 | } 16 | 17 | location ~ /purge(/.*) { 18 | #allow 127.0.0.1; 19 | #allow 192.168.0.0/16; 20 | #deny all; 21 | proxy_cache_purge NCache $host$1$is_args$args; 22 | } 23 | 24 | #ctrl+f5 25 | #curl -H "Cache-Control: no-cache" http://127.0.0.1/ 26 | if ($http_Cache_Control = "no-cache") { 27 | rewrite ^(.*)$ /purge$1 last; 28 | } 29 | 30 | 31 | location ~.*\.(gif|jpg|jpeg|png)$ { 32 | proxy_next_upstream http_502 http_504 error timeout invalid_header; 33 | proxy_cache NCache; 34 | proxy_cache_valid 200 304 1d; 35 | proxy_cache_key $host$uri$is_args$args; 36 | proxy_set_header Host $host; 37 | proxy_set_header X-Forwarded-For $remote_addr; 38 | proxy_pass http://p2p; 39 | expires 1d; 40 | add_header X-Cache NCache; 41 | } 42 | 43 | access_log off; 44 | } 45 | -------------------------------------------------------------------------------- /xen-cli-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akin520/AutoSetup/3abd16da59deb0a7a0989deba63824d634403b37/xen-cli-0.0.1.tar.gz --------------------------------------------------------------------------------