Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
- export PATH
- #######################################################
- # NGINXAUTO v2.0 #
- # Written by 2298@otoinstall.com and Junker@vbfk.com #
- # Based on LNMP Script #
- #######################################################
- if [ $(id -u) != "0" ]; then
- echo "Error: You must be root to run this script, please use root to install this script"
- exit 0
- fi
- if [ -a "/etc/debian_version" ] || [ -a "/etc/ubuntu-release" ]; then
- clear
- echo "=============================================================================="
- echo " NGINX - PHP - MYSQL AUTO INSTALLER 2.0 FOR DEBIAN 7 & UBUNTU 14.04"
- echo "=============================================================================="
- echo " 2298@otoinstall.com & Junker@vbfk.com"
- echo " http://otoinstall.com/nginx-auto-installer-php-mysql-lnmp-v2-0"
- echo " For more information please visit:"
- echo " http://otoinstall.com"
- echo "=============================================================================="
- arch=`uname -m`
- proc=`cat /proc/cpuinfo | grep -c processor`
- # myhome=`ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | grep -v '127.0.0.2' | cut -d: -f2 | awk {'print $1'} | head -n 1`
- myhome=`hostname --ip-address`
- mkdir -p /tmp/pkgs
- if [ "$arch" == "x86_64" ]; then
- tipe="x86_64-linux-gnu"
- else
- tipe="i386-linux-gnu"
- fi
- #Set MySQL root password
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred mysql root password: " mysqlrootpwd
- if [ "$mysqlrootpwd" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- mysqlrootpwd="$mysqlrootpwd"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Set phpMyAdmin blowfish_secret
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred phpmyadmin blowfish_secret (eg: mysecret): " ppblow
- if [ "$ppblow" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- ppblow="$ppblow"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Set phpMyAdmin directory name
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred phpmyadmin directory name: " phpmyadmin
- if [ "$phpmyadmin" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- phpmyadmin="$phpmyadmin"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Set FTP/SFTP password
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred ftp/sftp password: " ftppwd
- if [ "$ftppwd" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- ftppwd="$ftppwd"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Confirm PHP
- echo "Type 'php54' for PHP 5.4.x"
- echo "Type 'php55' for PHP 5.5.x"
- echo "Type 'php56' for PHP 5.6.x"
- while read -p "Please choose your preferred PHP version: " php5
- do case $php5 in
- php54) [ "php5" = "$php5" ]; break;;
- php55) [ "php5" = "$php5" ]; break;;
- php56) [ "php5" = "$php5" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- echo ""
- #Confirm PHP Accelerator
- echo "Would you like to install PHP Accelerator?"
- echo ""
- echo "Type 'zopt' for Zend Opcache"
- echo "Type 'xcache' for XCache"
- echo "Type 'noop' if you don't want to install PHP Accelerator"
- while read -p "Please choose your preferred PHP Opcode Cacher: " phpcacher
- do case $phpcacher in
- zopt) [ "phpcacher" = "$phpcacher" ]; break;;
- xcache) [ "phpcacher" = "$phpcacher" ]; break;;
- noop) [ "phpcacher" = "$phpcacher" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- echo ""
- #Confirm IMAGICK
- while read -p "Would you like to install ImageMagick?[Y/n] " imagick
- do case $imagick in
- Y) [ "imagick" = "$imagick" ]; break;;
- y) [ "imagick" = "$imagick" ]; break;;
- N) [ "imagick" = "$imagick" ]; break;;
- n) [ "imagick" = "$imagick" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- echo ""
- #Confirm PureFTPD
- while read -p "Would you like to install PureFTPD?[Y/n] " pureftpd
- do case $pureftpd in
- Y) [ "pureftpd" = "$pureftpd" ]; break;;
- y) [ "pureftpd" = "$pureftpd" ]; break;;
- N) [ "pureftpd" = "$pureftpd" ]; break;;
- n) [ "pureftpd" = "$pureftpd" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- get_char()
- {
- SAVEDSTTY=`stty -g`
- stty -echo
- stty cbreak
- dd if=/dev/tty bs=1 count=1 2> /dev/null
- stty -raw
- stty echo
- stty $SAVEDSTTY
- }
- echo ""
- echo "Press any key to start the installation..."
- char=`get_char`
- echo ""
- echo "==================================PREPARATION================================="
- echo ""
- if [ -s /etc/selinux/config ]; then
- sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
- fi
- /usr/sbin/setenforce 0
- echo ""
- echo "=======================INSTALLING INSTALLER DEPENDENCIES======================"
- echo ""
- apt-get update -y
- apt-get install -y build-essential zip unzip
- echo ""
- echo "=======================DEPENDENCIES INSTALLATION COMPLETED===================="
- echo ""
- echo ""
- echo "================================INSTALLING NGINX=============================="
- echo ""
- useradd www
- echo www:$ftppwd|chpasswd
- mkdir -p /home/www
- wget -O /tmp/pkgs/nginx_signing.key http://nginx.org/keys/nginx_signing.key
- apt-key add /tmp/pkgs/nginx_signing.key
- if [ -s /etc/lsb-release ]; then
- echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" >> /etc/apt/sources.list
- echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" >> /etc/apt/sources.list
- fi
- if [[ $(cat /etc/debian_version) == *7.* ]]; then
- echo "deb http://nginx.org/packages/mainline/debian/ wheezy nginx" >> /etc/apt/sources.list
- echo "deb-src http://nginx.org/packages/mainline/debian/ wheezy nginx" >> /etc/apt/sources.list
- fi
- apt-get update -y
- apt-get install -y nginx
- apt-get install openssl
- mkdir -p /etc/nginx/sslconf
- cd /etc/nginx/sslconf
- openssl genrsa -out server.key 2048
- openssl req -new -key server.key -out server.csr -subj "/C=ab/ST=cd/L=ef/CN=ghij"
- mv server.key server.key.org
- openssl rsa -in server.key.org -out server.key
- openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
- echo ""
- echo " ----------------CREATING MASTER VIRTUAL HOST-------------- "
- echo ""
- mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.default
- cat >/etc/nginx/nginx.conf<<EOF
- user www;
- worker_processes $proc;
- error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- client_max_body_size 10M;
- client_body_buffer_size 128k;
- server_names_hash_bucket_size 64;
- types_hash_max_size 2048;
- log_format main '$remote_addr | $remote_user [$time_local] | "$request"'
- ' | $status | $body_bytes_sent bytes | "$http_referer"'
- ' | "$http_user_agent" | "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
- sendfile on;
- #tcp_nopush on;
- keepalive_timeout 65;
- tcp_nodelay on;
- gzip on;
- server {
- listen 80;
- server_name $myhome;
- return 301 https://$myhome\$request_uri;
- location / {
- root /usr/share/nginx/html;
- index index.html index.htm index.php;
- }
- location ~ \.php$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html\$fastcgi_script_name;
- }
- }
- server {
- listen 443 ssl;
- server_name $myhome;
- ssl_certificate /etc/nginx/sslconf/server.crt;
- ssl_certificate_key /etc/nginx/sslconf/server.key;
- ssl_session_timeout 5m;
- location / {
- root /usr/share/nginx/html;
- index index.html index.htm index.php;
- }
- location ~ \.php$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html\$fastcgi_script_name;
- }
- }
- # Load virtual host configuration files.
- include /etc/nginx/sites-enabled/*;
- }
- EOF
- echo ""
- echo "==========================NGINX INSTALLATION COMPLETED========================"
- echo ""
- echo ""
- echo "===============================INSTALLING MYSQL==============================="
- echo ""
- dpkg -P mysql
- apt-get remove -y mysql-server
- wget -O /tmp/pkgs/mysql_pubkey.asc http://txt.otoinstall.com/mysql_pubkey.asc
- gpg --import /tmp/pkgs/mysql_pubkey.asc
- apt-key add /tmp/pkgs/mysql_pubkey.asc
- if [ -s /etc/lsb-release ]; then
- wget -O /etc/apt/sources.list.d/mysql_ubuntu_t.list http://txt.otoinstall.com/mysql_ubuntu_t.list
- fi
- if [[ $(cat /etc/debian_version) == *7.* ]]; then
- wget -O /etc/apt/sources.list.d/mysql_debian_w.list http://txt.otoinstall.com/mysql_debian_w.list
- fi
- apt-get update -y
- apt-get install -y mysql-server
- echo ""
- echo " -----------------------SECURING MYSQL--------------------- "
- echo ""
- service mysql start
- mysqladmin -u root password $mysqlrootpwd
- echo 'DROP DATABASE 'test';' | mysql -u root -p$mysqlrootpwd
- echo "SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('$mysqlrootpwd');" | mysql -u root -p$mysqlrootpwd
- echo "SET PASSWORD FOR 'root'@'`hostname`' = PASSWORD('$mysqlrootpwd');" | mysql -u root -p$mysqlrootpwd
- echo "DELETE FROM mysql.user WHERE User = '';" | mysql -u root -p$mysqlrootpwd
- echo "DROP USER ''@'%';" | mysql -u root -p$mysqlrootpwd
- echo "DROP USER 'root'@'::1';" | mysql -u root -p$mysqlrootpwd
- service mysql stop
- echo ""
- echo "==========================MYSQL INSTALLATION COMPLETED========================"
- echo ""
- echo ""
- echo "=================================INSTALLING PHP==============================="
- echo ""
- apt-get install -y python-dev libssl-dev libbz2-dev libjpeg-dev libvpx-dev libpng-dev libfreetype6-dev libgmp-dev libc-client-dev libicu-dev libaspell-dev \
- libtidy-dev libenchant-dev libxpm-dev libedit-dev libsnmp-dev xinetd libpam0g-dev libpspell-dev autoconf
- wget -O /tmp/pkgs/libxml2-2.9.2.tar.gz http://pkgs.otoinstall.com/libxml2-2.9.2.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/libxml2-2.9.2.tar.gz
- cd /tmp/pkgs/libxml2-2.9.2
- rm -rf /usr/lib/libxml2*
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- wget -O /tmp/pkgs/libxslt-1.1.28.tar.gz http://pkgs.otoinstall.com/libxslt-1.1.28.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/libxslt-1.1.28.tar.gz
- cd /tmp/pkgs/libxslt-1.1.28
- rm -rf /usr/lib/libxslt* /usr/lib/libexslt*
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- wget -O /tmp/pkgs/curl-7.44.0.tar.gz http://pkgs.otoinstall.com/curl-7.44.0.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/curl-7.44.0.tar.gz
- cd /tmp/pkgs/curl-7.44.0
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- wget -O /tmp/pkgs/libmcrypt-2.5.8.tar.gz http://pkgs.otoinstall.com/libmcrypt-2.5.8.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/libmcrypt-2.5.8.tar.gz
- cd /tmp/pkgs/libmcrypt-2.5.8
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- wget -O /tmp/pkgs/mm-1.4.2.tar.gz http://pkgs.otoinstall.com/mm-1.4.2.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/mm-1.4.2.tar.gz
- cd /tmp/pkgs/mm-1.4.2
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- ln -s /usr/lib/$tipe/libXpm.* /usr/lib/
- if [ -s /etc/lsb-release ]; then
- ln -s /usr/include/$tipe/gmp.h /usr/include
- fi
- if [ $php5 = "php54" ]; then
- wget -O /tmp/pkgs/php-5.4.45.tar.gz http://pkgs.otoinstall.com/php-5.4.45.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/php-5.4.45.tar.gz
- cd /tmp/pkgs/php-5.4.45
- ./configure --prefix=/usr --libdir=/usr/lib --with-libdir=lib --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir=/usr/bin/xml2-config \
- --with-openssl --with-kerberos --with-zlib-dir=/usr/lib --enable-bcmath --with-bz2=/usr/lib --enable-calendar --with-curl=/usr/include/curl --with-enchant \
- --with-curlwrappers --enable-exif --enable-ftp --with-openssl-dir=/usr/include/openssl --with-gd --with-vpx-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib \
- --with-zlib-dir=/usr/lib --with-xpm-dir=/usr/lib --with-freetype-dir=/usr/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext=/usr/lib/gettext \
- --with-gmp --with-mhash --with-imap=/usr/lib --with-imap-ssl=/usr/include/openssl --enable-intl --enable-mbstring --with-mcrypt=/usr/lib--with-mysql --with-mysqli \
- --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql --with-pspell --enable-shmop --enable-soap --enable-sockets --with-tidy --enable-wddx --with-xmlrpc \
- --with-xsl=/usr/lib --enable-zip
- make
- make install
- /tmp/pkgs/php-5.4.45/build/shtool install -c ext/phar/phar.phar /usr/bin
- ln -s -f /usr/bin/phar.phar /usr/bin/phar
- cp php.ini-production /usr/lib/php.ini
- cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
- chmod +x /etc/init.d/php-fpm
- update-rc.d php-fpm defaults
- cp sapi/fpm/php-fpm.conf /usr/etc/php-fpm.conf
- else if [ $php5 = "php55" ]; then
- wget -O /tmp/pkgs/php-5.5.29.tar.gz http://pkgs.otoinstall.com/php-5.5.29.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/php-5.5.29.tar.gz
- cd /tmp/pkgs/php-5.5.29
- ./configure --prefix=/usr --libdir=/usr/lib --with-libdir=lib --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir=/usr/bin/xml2-config \
- --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --enable-exif --enable-ftp --with-gd --with-vpx-dir \
- --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext \
- --with-gmp --with-mhash --with-imap --with-imap-ssl --with-kerberos --enable-intl --enable-mbstring --with-libmbfl --with-onig --with-mcrypt --with-mysql \
- --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli --enable-embedded-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline \
- --with-mm --enable-shmop --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip
- make
- make install
- /tmp/pkgs/php-5.5.29/build/shtool install -c ext/phar/phar.phar /usr/bin
- ln -s -f /usr/bin/phar.phar /usr/bin/phar
- cp php.ini-production /usr/lib/php.ini
- cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
- chmod +x /etc/init.d/php-fpm
- update-rc.d php-fpm defaults
- cp sapi/fpm/php-fpm.conf /usr/etc/php-fpm.conf
- else if [ $php5 = "php56" ]; then
- wget -O /tmp/pkgs/php-5.6.13.tar.gz http://pkgs.otoinstall.com/php-5.6.13.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/php-5.6.13.tar.gz
- cd /tmp/pkgs/php-5.6.13
- ./configure --prefix=/usr --libdir=/usr/lib --with-libdir=lib --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir=/usr/bin/xml2-config \
- --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --enable-exif --enable-ftp --with-gd --with-vpx-dir \
- --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext \
- --with-gmp --with-mhash --with-imap --with-imap-ssl --with-kerberos --enable-intl --enable-mbstring --with-libmbfl --with-onig --with-mcrypt --with-mysql \
- --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli --enable-embedded-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline \
- --with-mm --enable-shmop --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip
- make
- make install
- /tmp/pkgs/php-5.6.13/build/shtool install -c ext/phar/phar.phar /usr/bin
- ln -s -f /usr/bin/phar.phar /usr/bin/phar
- cp php.ini-production /usr/lib/php.ini
- cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
- chmod +x /etc/init.d/php-fpm
- update-rc.d php-fpm defaults
- cp sapi/fpm/php-fpm.conf /usr/etc/php-fpm.conf
- fi
- fi
- fi
- echo ""
- echo " ---------------------INSTALLING MODULES------------------- "
- echo ""
- if [ "$arch" == "x86_64" ]; then
- wget -O /tmp/pkgs/ioncube_loaders_lin_x86-64.tar.gz http://pkgs.otoinstall.com/ioncube_loaders_lin_x86-64.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/ioncube_loaders_lin_x86-64.tar.gz
- else
- wget -O /tmp/pkgs/ioncube_loaders_lin_x86.tar.gz http://pkgs.otoinstall.com/ioncube_loaders_lin_x86.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/ioncube_loaders_lin_x86.tar.gz
- fi
- if [ $php5 = "php54" ]; then
- mkdir -p /usr/lib/extensions/no-debug-non-zts-20100525
- mv /tmp/pkgs/ioncube/ioncube_loader_lin_5.4.so /usr/lib/extensions/no-debug-non-zts-20100525
- echo "
- zend_extension="/usr/lib/extensions/no-debug-non-zts-20100525/ioncube_loader_lin_5.4.so"" >> /usr/lib/php.ini
- else if [ $php5 = "php55" ]; then
- mv /tmp/pkgs/ioncube/ioncube_loader_lin_5.5.so /usr/lib/extensions/no-debug-non-zts-20121212
- echo "
- zend_extension="/usr/lib/extensions/no-debug-non-zts-20121212/ioncube_loader_lin_5.5.so"" >> /usr/lib/php.ini
- else if [ $php5 = "php56" ]; then
- mv /tmp/pkgs/ioncube/ioncube_loader_lin_5.6.so /usr/lib/extensions/no-debug-non-zts-20131226
- echo "
- zend_extension="/usr/lib/extensions/no-debug-non-zts-20131226/ioncube_loader_lin_5.6.so"" >> /usr/lib/php.ini
- fi
- fi
- fi
- if [ $phpcacher = "xcache" ]; then
- wget -O /tmp/pkgs/xcache-3.2.0.tar.gz http://pkgs.otoinstall.com/xcache-3.2.0.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/xcache-3.2.0.tar.gz
- cd /tmp/pkgs/xcache-3.2.0
- phpize
- ./configure --prefix=/usr --libdir=/usr/lib --enable-xcache --enable-xcache-constant --enable-xcache-optimizer
- make
- make install
- if [ $php5 = "php54" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20100525/xcache.so"
- xcache.shm_scheme="mmap"
- xcache.mmap_path="/dev/zero"
- xcache.readonly_protection=Off
- xcache.size=0
- xcache.count=1
- xcache.slots=8K
- xcache.ttl=0
- xcache.gc_interval=0
- xcache.cacher=On
- xcache.stat=On
- xcache.var_size=0
- xcache.var_count=1
- xcache.var_slots=8K
- xcache.var_ttl=0
- xcache.var_maxttl=0
- xcache.var_gc_interval=300" >> /usr/lib/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20121212/xcache.so"
- xcache.shm_scheme="mmap"
- xcache.mmap_path="/dev/zero"
- xcache.readonly_protection=Off
- xcache.size=0
- xcache.count=1
- xcache.slots=8K
- xcache.ttl=0
- xcache.gc_interval=0
- xcache.cacher=On
- xcache.stat=On
- xcache.var_size=0
- xcache.var_count=1
- xcache.var_slots=8K
- xcache.var_ttl=0
- xcache.var_maxttl=0
- xcache.var_gc_interval=300" >> /usr/lib/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20131226/xcache.so"
- xcache.shm_scheme="mmap"
- xcache.mmap_path="/dev/zero"
- xcache.readonly_protection=Off
- xcache.size=0
- xcache.count=1
- xcache.slots=8K
- xcache.ttl=0
- xcache.gc_interval=0
- xcache.cacher=On
- xcache.stat=On
- xcache.var_size=0
- xcache.var_count=1
- xcache.var_slots=8K
- xcache.var_ttl=0
- xcache.var_maxttl=0
- xcache.var_gc_interval=300" >> /usr/lib/php.ini
- fi
- fi
- fi
- else if [ $phpcacher = "zopt" ]; then
- if [ $php5 = "php54" ]; then
- wget -O /tmp/pkgs/zendopcache-7.0.5.tgz http://pkgs.otoinstall.com/zendopcache-7.0.5.tgz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/zendopcache-7.0.5.tgz
- cd /tmp/pkgs/zendopcache-7.0.5
- phpize
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- echo "
- zend_extension="/usr/lib/extensions/no-debug-non-zts-20100525/opcache.so"
- opcache.memory_consumption=128
- opcache.interned_strings_buffer=8
- opcache.max_accelerated_files=4000
- opcache.revalidate_freq=60
- opcache.fast_shutdown=1
- opcache.enable_cli=1
- opcache.enable=1" >> /usr/lib/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- zend_extension="/usr/lib/extensions/no-debug-non-zts-20121212/opcache.so"
- opcache.memory_consumption=128
- opcache.interned_strings_buffer=8
- opcache.max_accelerated_files=4000
- opcache.revalidate_freq=60
- opcache.fast_shutdown=1
- opcache.enable_cli=1
- opcache.enable=1" >> /usr/lib/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- zend_extension="/usr/lib/extensions/no-debug-non-zts-20131226/opcache.so"
- opcache.memory_consumption=128
- opcache.interned_strings_buffer=8
- opcache.max_accelerated_files=4000
- opcache.revalidate_freq=60
- opcache.fast_shutdown=1
- opcache.enable_cli=1
- opcache.enable=1" >> /usr/lib/php.ini
- fi
- fi
- fi
- fi
- fi
- wget -O /tmp/pkgs/suhosin-0.9.38.tar.gz http://pkgs.otoinstall.com/suhosin-0.9.38.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/suhosin-0.9.38.tar.gz
- cd /tmp/pkgs/suhosin-0.9.38
- phpize
- ./configure --prefix=/usr --libdir=/usr/lib --enable-suhosin
- make
- make install
- if [ $php5 = "php54" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20100525/suhosin.so"
- suhosin.request.max_vars=2048
- suhosin.post.max_vars=2048
- suhosin.request.max_array_index_length=256
- suhosin.post.max_array_index_length=256
- suhosin.request.max_totalname_length=8192
- suhosin.post.max_totalname_length=8192" >> /usr/lib/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20121212/suhosin.so"
- suhosin.request.max_vars=2048
- suhosin.post.max_vars=2048
- suhosin.request.max_array_index_length=256
- suhosin.post.max_array_index_length=256
- suhosin.request.max_totalname_length=8192
- suhosin.post.max_totalname_length=8192" >> /usr/lib/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20131226/suhosin.so"
- suhosin.request.max_vars=2048
- suhosin.post.max_vars=2048
- suhosin.request.max_array_index_length=256
- suhosin.post.max_array_index_length=256
- suhosin.request.max_totalname_length=8192
- suhosin.post.max_totalname_length=8192" >> /usr/lib/php.ini
- fi
- fi
- fi
- if [ "d$imagick" = "d" ] || [ `expr "$imagick" : '[yY]'` -gt 0 ]; then
- wget -O /tmp/pkgs/ImageMagick.tar.gz http://pkgs.otoinstall.com/ImageMagick.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/ImageMagick.tar.gz
- cd /tmp/pkgs/ImageMagick-6.9.2-0
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- wget -O /tmp/pkgs/imagick-3.3.0RC2.tgz http://pkgs.otoinstall.com/imagick-3.3.0RC2.tgz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/imagick-3.3.0RC2.tgz
- cd /tmp/pkgs/imagick-3.3.0RC2
- phpize
- ./configure --prefix=/usr --libdir=/usr/lib
- make
- make install
- if [ $php5 = "php54" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20100525/imagick.so"" >> /usr/lib/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20121212/imagick.so"" >> /usr/lib/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- extension="/usr/lib/extensions/no-debug-non-zts-20131226/imagick.so"" >> /usr/lib/php.ini
- fi
- fi
- fi
- fi
- echo ""
- echo "===========================PHP INSTALLATION COMPLETED========================="
- echo ""
- echo ""
- echo "==============================CREATING WELCOME PAGE==========================="
- echo ""
- OUTFILE=/usr/share/nginx/html/index.html
- (
- echo "<html>"
- echo "<head>"
- echo "<title>NginX Auto Installer 2.0 - Powered By Otoinstall.com</title>"
- echo "<style type=text/css media=screen>"
- echo "td, tr {background: #FFFFFF;"
- echo "font-size: 15px;"
- echo "border: none;"
- echo "}"
- echo "td.head1 {background: #000000;"
- echo "color: #FFFFFF;"
- echo "}"
- echo "td.head2 {font-weight: bold;"
- echo "}"
- echo "</style>"
- echo "</head>"
- echo "<body>"
- echo "<center><h3>NginX Works!!!</h3></center>"
- echo "<table width=500 border=0 align=center>"
- echo "<tr>"
- echo "<td class=head1 colspan=8><center><strong>SERVER HARDWARE</strong></center></td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> CPU:</td><td> `cat /proc/cpuinfo | grep 'model name' | head -n 1 | awk {'print $4, $5, $6, $7, $8, $9'}`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> Number of CPU(s):</td><td> `cat /proc/cpuinfo | grep -c processor`</td></tr>"
- echo "</table>"
- echo "<table width=500 border=0 align=center>"
- echo "<tr>"
- echo "<td class=head1 colspan=8><center><strong>SERVER SOFTWARE</strong></center></td></tr>"
- echo "<tr>"
- if [ -s /etc/lsb-release ]; then
- echo "<td class=head2 width=130> Operating System:</td><td> Ubuntu 14.04 Trusty</td></tr>"
- fi
- if [[ $(cat /etc/debian_version) == *7.* ]]; then
- echo "<td class=head2 width=130> Operating System:</td><td> Debian `cat /etc/debian_version` Wheezy</td></tr>"
- else if [[ $(cat /etc/debian_version) == *8.* ]]; then
- echo "<td class=head2 width=130> Operating System:</td><td> Debian `cat /etc/debian_version` Jessie</td></tr>"
- fi
- fi
- echo "<tr>"
- echo "<td class=head2 width=130> Kernel Version:</td><td> `uname -r`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> NginX Version:</td><td> 1.9.4</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> PHP Version:</td><td> `php -v | grep -v 'with' | grep -v 'Copyright' | awk {'print $2'}`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> Zend Version:</td><td> `php -v | grep -v 'PHP' | grep -v 'with' | awk {'print $3'} | cut -c2-6`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> MySQL Version:</td><td> `mysql -V | awk {'print $5'} | cut -c1-6`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> PHPINFO:</td><td> <a href=../phpinfo.php>here</a></td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> phpMyAdmin:</td><td> <a href=../$phpmyadmin>here</a></td></tr>"
- echo "</table>"
- echo "<center><p>If you feel this script is helpul, you can give a feedback by spreading or promoting to your friends or communities.</p>"
- echo "<p>Created by <a href=http://otoinstall.com>NginX Auto Installer</a> & <a href=http://www.vbfk.com>Junker</a></p></center>"<< EOF
- EOF
- ) > $OUTFILE
- cat >/usr/share/nginx/html/phpinfo.php<<EOF
- <?php phpinfo(); ?>
- EOF
- echo ""
- echo "==============================INSTALLING PHPMYADMIN==========================="
- echo ""
- wget -O /tmp/pkgs/phpMyAdmin-4.4.14-all-languages.zip http://pkgs.otoinstall.com/phpMyAdmin-4.4.14-all-languages.zip
- unzip -d /usr/share/nginx/html /tmp/pkgs/phpMyAdmin-4.4.14-all-languages.zip
- cd /usr/share/nginx/html/phpMyAdmin-4.4.14-all-languages
- sed -i -e 's@blowfi55@'$ppblow'@' config.inc.php
- sed -i 's/localhost/127.0.0.1/g' config.inc.php
- cd /usr/share/nginx/html
- mv phpMyAdmin-4.4.14-all-languages $phpmyadmin
- echo ""
- echo "===============================INSTALLING PUREFTPD============================"
- echo ""
- if [ "d$pureftpd" = "d" ] || [ `expr "$pureftpd" : '[yY]'` -gt 0 ]; then
- wget -O /tmp/pkgs/pure-ftpd-1.0.42.tar.gz http://pkgs.otoinstall.com/pure-ftpd-1.0.42.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/pure-ftpd-1.0.42.tar.gz
- cd /tmp/pkgs/pure-ftpd-1.0.42
- ./configure --prefix=/usr --libdir=/usr/lib
- make install-strip
- /usr/sbin/pure-ftpd &
- wget -O /etc/init.d/pureftpd http://txt.otoinstall.com/pureftpd
- chmod +x /etc/init.d/pureftpd
- update-rc.d pureftpd defaults
- fi
- echo ""
- echo "====================================CLEANING UP=============================="
- echo ""
- rm -rf /tmp/pkgs
- echo ""
- echo "===========================STARTING YOUR ROCK MACHINE!!!======================"
- echo ""
- service nginx restart
- service php-fpm start
- service mysql start
- echo ""
- echo "==============================INSTALLATION COMPLETED=========================="
- echo ""
- echo "You're suggested to reboot first before start using your box."
- echo ""
- echo "=============================================================================="
- echo " PLEASE SAVE THE FOLLOWING DATA FOR YOUR CREDENTIALS"
- echo "=============================================================================="
- echo "Post Installation: http://$myhome"
- echo ""
- echo "FTP/SFTP Hostname: $myhome"
- echo "FTP/SFTP URI: ftp://www@$myhome"
- echo "FTP/SFTP User: www"
- echo "FTP/SFTP Pass: $ftppwd"
- echo "FTP/SFTP Directory: /home/www"
- echo ""
- echo "MySQL Root Pass: $mysqlrootpwd"
- echo "phpMyAdmin URL: https://$myhome/$phpmyadmin"
- echo "phpMyAdmin User: root"
- echo "phpMyAdmin Pass: $mysqlrootpwd"
- echo "=============================================================================="
- echo ""
- else
- if [ -a "/etc/centos-release" ]; then
- clear
- echo "=============================================================================="
- echo " NGINX - PHP - MYSQL AUTO INSTALLER 2.0 FOR CENTOS 6 & 7"
- echo "=============================================================================="
- echo " 2298@otoinstall.com & Junker@vbfk.com"
- echo " http://otoinstall.com/nginx-auto-installer-php-mysql-lnmp-v2-0"
- echo " For more information please visit:"
- echo " http://otoinstall.com"
- echo "=============================================================================="
- arch=`uname -i`
- proc=`cat /proc/cpuinfo | grep -c processor`
- centos=`cat /etc/redhat-release`
- # myhome=`ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | grep -v '127.0.0.2' | cut -d: -f2 | awk {'print $1'} | head -n 1`
- myhome=`hostname --ip-address`
- mkdir -p /tmp/pkgs
- if [ "$arch" == "x86_64" ]; then
- library="lib64"
- else
- library="lib"
- fi
- #Set MySQL root password
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred mysql root password: " mysqlrootpwd
- if [ "$mysqlrootpwd" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- mysqlrootpwd="$mysqlrootpwd"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Set phpMyAdmin blowfish_secret
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred phpmyadmin blowfish_secret (eg: mysecret): " ppblow
- if [ "$ppblow" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- ppblow="$ppblow"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Set phpMyAdmin directory name
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred phpmyadmin directory name: " phpmyadmin
- if [ "$phpmyadmin" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- phpmyadmin="$phpmyadmin"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Set FTP/SFTP password
- SAKSESBUNG=0
- COBALAGI=1
- while [ $SAKSESBUNG -eq "0" ]; do
- read -p "Please input your preferred ftp/sftp password: " ftppwd
- if [ "$ftppwd" = "" ]; then
- if [ $COBALAGI -lt 3 ]; then
- echo ""
- echo "You're not typing, it is still empty!"
- echo ""
- COBALAGI=`expr $COBALAGI + 1`
- else
- echo ""
- echo "You might want to try it again later."
- echo ""
- exit 0
- fi
- else
- ftppwd="$ftppwd"
- SAKSESBUNG=1
- fi
- done
- echo ""
- #Confirm PHP
- echo "Type 'php54' for PHP 5.4.x"
- echo "Type 'php55' for PHP 5.5.x"
- echo "Type 'php56' for PHP 5.6.x"
- while read -p "Please choose your preferred PHP version: " php5
- do case $php5 in
- php54) [ "php5" = "$php5" ]; break;;
- php55) [ "php5" = "$php5" ]; break;;
- php56) [ "php5" = "$php5" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- echo ""
- #Confirm PHP Accelerator
- echo "Would you like to install PHP Accelerator?"
- echo ""
- echo "Type 'zopt' for Zend Opcache"
- echo "Type 'xcache' for XCache"
- echo "Type 'noop' if you don't want to install PHP Accelerator"
- while read -p "Please choose your preferred PHP Opcode Cacher: " phpcacher
- do case $phpcacher in
- zopt) [ "phpcacher" = "$phpcacher" ]; break;;
- xcache) [ "phpcacher" = "$phpcacher" ]; break;;
- noop) [ "phpcacher" = "$phpcacher" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- echo ""
- #Confirm IMAGICK
- while read -p "Would you like to install ImageMagick?[Y/n] " imagick
- do case $imagick in
- Y) [ "imagick" = "$imagick" ]; break;;
- y) [ "imagick" = "$imagick" ]; break;;
- N) [ "imagick" = "$imagick" ]; break;;
- n) [ "imagick" = "$imagick" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- echo ""
- #Confirm PureFTPD
- while read -p "Would you like to install PureFTPD?[Y/n] " pureftpd
- do case $pureftpd in
- Y) [ "pureftpd" = "$pureftpd" ]; break;;
- y) [ "pureftpd" = "$pureftpd" ]; break;;
- N) [ "pureftpd" = "$pureftpd" ]; break;;
- n) [ "pureftpd" = "$pureftpd" ]; break;;
- *) echo "";
- echo "Please type the right choice!";;
- esac
- done
- get_char()
- {
- SAVEDSTTY=`stty -g`
- stty -echo
- stty cbreak
- dd if=/dev/tty bs=1 count=1 2> /dev/null
- stty -raw
- stty echo
- stty $SAVEDSTTY
- }
- echo ""
- echo "Press any key to start the installation..."
- char=`get_char`
- echo ""
- echo "==================================PREPARATION================================="
- echo ""
- if [ -s /etc/selinux/config ]; then
- sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
- fi
- /usr/sbin/setenforce 0
- if [[ $(cat /etc/redhat-release | awk {'print $4'}) == *7.* ]]; then
- firewall-cmd --permanent --zone=public --add-port=80/tcp
- firewall-cmd --permanent --zone=public --add-port=443/tcp
- firewall-cmd --permanent --zone=public --add-port=21/tcp
- firewall-cmd --reload
- firewall-cmd --zone=public --query-port=80/tcp
- firewall-cmd --zone=public --query-port=443/tcp
- firewall-cmd --zone=public --query-port=21/tcp
- fi
- echo ""
- echo "=======================INSTALLING INSTALLER DEPENDENCIES======================"
- echo ""
- yum remove -y httpd* php* mysql*
- yum install -y gcc gcc-c++ make automake wget zip unzip
- echo ""
- echo "=======================DEPENDENCIES INSTALLATION COMPLETED===================="
- echo ""
- echo ""
- echo "================================INSTALLING NGINX=============================="
- echo ""
- useradd www
- echo www:$ftppwd|chpasswd
- mkdir -p /home/www
- if [[ $(cat /etc/redhat-release | awk {'print $4'}) == *7.* ]]; then
- wget -O /etc/yum.repos.d/nginx.repo http://txt.otoinstall.com/centos7/nginx.repo
- else
- wget -O /etc/yum.repos.d/nginx.repo http://txt.otoinstall.com/centos6/nginx.repo
- fi
- yum install -y nginx
- mkdir -p /etc/nginx/sslconf
- cd /etc/nginx/sslconf
- openssl genrsa -out server.key 2048
- openssl req -new -key server.key -out server.csr -subj "/C=ab/ST=cd/L=ef/CN=ghij"
- mv server.key server.key.org
- openssl rsa -in server.key.org -out server.key
- openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
- echo ""
- echo " ----------------CREATING MASTER VIRTUAL HOST-------------- "
- echo ""
- mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.default
- cat >/etc/nginx/nginx.conf<<EOF
- user www;
- worker_processes $proc;
- error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- client_max_body_size 10M;
- client_body_buffer_size 128k;
- server_names_hash_bucket_size 64;
- log_format main '$remote_addr | $remote_user [$time_local] | "$request"'
- ' | $status | $body_bytes_sent bytes | "$http_referer"'
- ' | "$http_user_agent" | "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
- sendfile on;
- #tcp_nopush on;
- keepalive_timeout 65;
- tcp_nodelay on;
- gzip on;
- server {
- listen 80;
- server_name $myhome;
- return 301 https://$myhome\$request_uri;
- location / {
- root /usr/share/nginx/html;
- index index.html index.htm index.php;
- }
- location ~ \.php$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html\$fastcgi_script_name;
- }
- }
- server {
- listen 443 ssl;
- server_name $myhome;
- ssl_certificate /etc/nginx/sslconf/server.crt;
- ssl_certificate_key /etc/nginx/sslconf/server.key;
- ssl_session_timeout 5m;
- location / {
- root /usr/share/nginx/html;
- index index.html index.htm index.php;
- }
- location ~ \.php$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html\$fastcgi_script_name;
- }
- }
- # Load virtual host configuration files.
- include /etc/nginx/sites-enabled/*;
- }
- EOF
- echo ""
- echo "==========================NGINX INSTALLATION COMPLETED========================"
- echo ""
- echo ""
- echo "===============================INSTALLING MYSQL==============================="
- echo ""
- if [[ $(cat /etc/redhat-release | awk {'print $4'}) == *7.* ]]; then
- yum localinstall -y http://pkgs.otoinstall.com/mysql-community-release-el7-5.noarch.rpm
- else
- yum localinstall -y http://pkgs.otoinstall.com/mysql-community-release-el6-5.noarch.rpm
- fi
- yum install -y mysql-community-server mysql-community-devel
- echo ""
- echo " -----------------------SECURING MYSQL--------------------- "
- echo ""
- service mysqld start
- mysqladmin -u root password $mysqlrootpwd
- echo 'DROP DATABASE 'test';' | mysql -u root -p$mysqlrootpwd
- echo "SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('$mysqlrootpwd');" | mysql -u root -p$mysqlrootpwd
- echo "SET PASSWORD FOR 'root'@'`hostname`' = PASSWORD('$mysqlrootpwd');" | mysql -u root -p$mysqlrootpwd
- echo "DELETE FROM mysql.user WHERE User = '';" | mysql -u root -p$mysqlrootpwd
- echo "DROP USER ''@'%';" | mysql -u root -p$mysqlrootpwd
- echo "DROP USER 'root'@'::1';" | mysql -u root -p$mysqlrootpwd
- service mysqld stop
- echo ""
- echo "==========================MYSQL INSTALLATION COMPLETED========================"
- echo ""
- echo ""
- echo "=================================INSTALLING PHP==============================="
- echo ""
- yum install -y python-devel openssl-devel bzip2-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel t1lib-devel gmp-devel libc-client-devel \
- libicu-devel aspell-devel libtidy-devel enchant-devel libXpm-devel libedit-devel net-snmp-devel xinetd pam-devel
- if [[ $(cat /etc/redhat-release | awk {'print $4'}) == *7.* ]]; then
- wget -O /tmp/pkgs/epel-release-latest-7.noarch.rpm http://pkgs.otoinstall.com/epel-release-latest-7.noarch.rpm
- rpm -ivh /tmp/pkgs/epel-release-latest-7.noarch.rpm
- yum install -y libc-client-devel libtidy-devel
- cd /etc/yum.repos.d/
- mv epel.repo epel.repo.backup
- mv epel-testing.repo epel-testing.repo.backup
- fi
- wget -O /tmp/pkgs/libxml2-2.9.2.tar.gz http://pkgs.otoinstall.com/libxml2-2.9.2.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/libxml2-2.9.2.tar.gz
- cd /tmp/pkgs/libxml2-2.9.2
- rm -rf /usr/$library/libxml2*
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- wget -O /tmp/pkgs/libxslt-1.1.28.tar.gz http://pkgs.otoinstall.com/libxslt-1.1.28.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/libxslt-1.1.28.tar.gz
- cd /tmp/pkgs/libxslt-1.1.28
- rm -rf /usr/$library/libxslt* /usr/$library/libexslt*
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- wget -O /tmp/pkgs/curl-7.44.0.tar.gz http://pkgs.otoinstall.com/curl-7.44.0.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/curl-7.44.0.tar.gz
- cd /tmp/pkgs/curl-7.44.0
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- wget -O /tmp/pkgs/libmcrypt-2.5.8.tar.gz http://pkgs.otoinstall.com/libmcrypt-2.5.8.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/libmcrypt-2.5.8.tar.gz
- cd /tmp/pkgs/libmcrypt-2.5.8
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- wget -O /tmp/pkgs/mm-1.4.2.tar.gz http://pkgs.otoinstall.com/mm-1.4.2.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/mm-1.4.2.tar.gz
- cd /tmp/pkgs/mm-1.4.2
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- if [ $php5 = "php54" ]; then
- wget -O /tmp/pkgs/php-5.4.45.tar.gz http://pkgs.otoinstall.com/php-5.4.45.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/php-5.4.45.tar.gz
- cd /tmp/pkgs/php-5.4.45
- ./configure --prefix=/usr --libdir=/usr/$library --with-libdir=$library --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir=/usr/bin/xml2-config \
- --with-openssl --with-kerberos --with-zlib-dir=/usr/$library --enable-bcmath --with-bz2=/usr/$library --enable-calendar --with-curl=/usr/include/curl --with-enchant \
- --with-curlwrappers --enable-exif --enable-ftp --with-openssl-dir=/usr/include/openssl --with-gd --with-vpx-dir=/usr/$library --with-jpeg-dir=/usr/$library \
- --with-png-dir=/usr/$library --with-zlib-dir=/usr/$library --with-xpm-dir=/usr/$library --with-freetype-dir=/usr/$library --with-t1lib=/usr/include --enable-gd-native-ttf \
- --enable-gd-jis-conv --with-gettext=/usr/$library/gettext --with-gmp --with-mhash --with-imap=/usr/$library --with-imap-ssl=/usr/include/openssl --enable-intl \
- --enable-mbstring --with-mcrypt=/usr/$library --with-mysql --with-mysqli --with-mysql-sock=/var/$library/mysql/mysql.sock --with-pdo-mysql --with-pspell --enable-shmop \
- --enable-soap --enable-sockets --with-tidy --enable-wddx --with-xmlrpc --with-xsl=/usr/$library --enable-zip
- make
- make install
- /tmp/pkgs/php-5.4.45/build/shtool install -c ext/phar/phar.phar /usr/bin
- ln -s -f /usr/bin/phar.phar /usr/bin/phar
- cp php.ini-production /usr/$library/php.ini
- cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
- chmod +x /etc/init.d/php-fpm
- chkconfig php-fpm on
- cp sapi/fpm/php-fpm.conf /usr/etc/php-fpm.conf
- else if [ $php5 = "php55" ]; then
- wget -O /tmp/pkgs/php-5.5.29.tar.gz http://pkgs.otoinstall.com/php-5.5.29.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/php-5.5.29.tar.gz
- cd /tmp/pkgs/php-5.5.29
- ./configure --prefix=/usr --libdir=/usr/$library --with-libdir=$library --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir=/usr/bin/xml2-config \
- --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --enable-exif --enable-ftp --with-gd --with-vpx-dir \
- --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext \
- --with-gmp --with-mhash --with-imap --with-imap-ssl --with-kerberos --enable-intl --enable-mbstring --with-libmbfl --with-onig --with-mcrypt --with-mysql \
- --with-mysql-sock=/var/$library/mysql/mysql.sock --with-mysqli --enable-embedded-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline \
- --with-mm --enable-shmop --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip
- make
- make install
- /tmp/pkgs/php-5.5.29/build/shtool install -c ext/phar/phar.phar /usr/bin
- ln -s -f /usr/bin/phar.phar /usr/bin/phar
- cp php.ini-production /usr/$library/php.ini
- cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
- chmod +x /etc/init.d/php-fpm
- chkconfig php-fpm on
- cp sapi/fpm/php-fpm.conf /usr/etc/php-fpm.conf
- else if [ $php5 = "php56" ]; then
- wget -O /tmp/pkgs/php-5.6.13.tar.gz http://pkgs.otoinstall.com/php-5.6.13.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/php-5.6.13.tar.gz
- cd /tmp/pkgs/php-5.6.13
- ./configure --prefix=/usr --libdir=/usr/$library --with-libdir=$library --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir=/usr/bin/xml2-config \
- --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --enable-exif --enable-ftp --with-gd --with-vpx-dir \
- --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext \
- --with-gmp --with-mhash --with-imap --with-imap-ssl --with-kerberos --enable-intl --enable-mbstring --with-libmbfl --with-onig --with-mcrypt --with-mysql \
- --with-mysql-sock=/var/$library/mysql/mysql.sock --with-mysqli --enable-embedded-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline \
- --with-mm --enable-shmop --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip
- make
- make install
- /tmp/pkgs/php-5.6.13/build/shtool install -c ext/phar/phar.phar /usr/bin
- ln -s -f /usr/bin/phar.phar /usr/bin/phar
- cp php.ini-production /usr/$library/php.ini
- cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
- chmod +x /etc/init.d/php-fpm
- chkconfig php-fpm on
- cp sapi/fpm/php-fpm.conf /usr/etc/php-fpm.conf
- fi
- fi
- fi
- echo ""
- echo " ---------------------INSTALLING MODULES------------------- "
- echo ""
- if [ $library = "lib" ]; then
- wget -O /tmp/pkgs/ioncube_loaders_lin_x86.tar.gz http://pkgs.otoinstall.com/ioncube_loaders_lin_x86.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/ioncube_loaders_lin_x86.tar.gz
- else if [ $library = "lib64" ]; then
- wget -O /tmp/pkgs/ioncube_loaders_lin_x86-64.tar.gz http://pkgs.otoinstall.com/ioncube_loaders_lin_x86-64.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/ioncube_loaders_lin_x86-64.tar.gz
- fi
- fi
- if [ $php5 = "php54" ]; then
- mkdir -p /usr/$library/extensions/no-debug-non-zts-20100525
- mv /tmp/pkgs/ioncube/ioncube_loader_lin_5.4.so /usr/$library/extensions/no-debug-non-zts-20100525
- echo "
- zend_extension="/usr/$library/extensions/no-debug-non-zts-20100525/ioncube_loader_lin_5.4.so"" >> /usr/$library/php.ini
- else if [ $php5 = "php55" ]; then
- mv /tmp/pkgs/ioncube/ioncube_loader_lin_5.5.so /usr/$library/extensions/no-debug-non-zts-20121212
- echo "
- zend_extension="/usr/$library/extensions/no-debug-non-zts-20121212/ioncube_loader_lin_5.5.so"" >> /usr/$library/php.ini
- else if [ $php5 = "php56" ]; then
- mv /tmp/pkgs/ioncube/ioncube_loader_lin_5.6.so /usr/$library/extensions/no-debug-non-zts-20131226
- echo "
- zend_extension="/usr/$library/extensions/no-debug-non-zts-20131226/ioncube_loader_lin_5.6.so"" >> /usr/$library/php.ini
- fi
- fi
- fi
- if [ $phpcacher = "xcache" ]; then
- wget -O /tmp/pkgs/xcache-3.2.0.tar.gz http://pkgs.otoinstall.com/xcache-3.2.0.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/xcache-3.2.0.tar.gz
- cd /tmp/pkgs/xcache-3.2.0
- phpize
- ./configure --prefix=/usr --libdir=/usr/$library --enable-xcache --enable-xcache-constant --enable-xcache-optimizer
- make
- make install
- if [ $php5 = "php54" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20100525/xcache.so"
- xcache.shm_scheme="mmap"
- xcache.mmap_path="/dev/zero"
- xcache.readonly_protection=Off
- xcache.size=0
- xcache.count=1
- xcache.slots=8K
- xcache.ttl=0
- xcache.gc_interval=0
- xcache.cacher=On
- xcache.stat=On
- xcache.var_size=0
- xcache.var_count=1
- xcache.var_slots=8K
- xcache.var_ttl=0
- xcache.var_maxttl=0
- xcache.var_gc_interval=300" >> /usr/$library/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20121212/xcache.so"
- xcache.shm_scheme="mmap"
- xcache.mmap_path="/dev/zero"
- xcache.readonly_protection=Off
- xcache.size=0
- xcache.count=1
- xcache.slots=8K
- xcache.ttl=0
- xcache.gc_interval=0
- xcache.cacher=On
- xcache.stat=On
- xcache.var_size=0
- xcache.var_count=1
- xcache.var_slots=8K
- xcache.var_ttl=0
- xcache.var_maxttl=0
- xcache.var_gc_interval=300" >> /usr/$library/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20131226/xcache.so"
- xcache.shm_scheme="mmap"
- xcache.mmap_path="/dev/zero"
- xcache.readonly_protection=Off
- xcache.size=0
- xcache.count=1
- xcache.slots=8K
- xcache.ttl=0
- xcache.gc_interval=0
- xcache.cacher=On
- xcache.stat=On
- xcache.var_size=0
- xcache.var_count=1
- xcache.var_slots=8K
- xcache.var_ttl=0
- xcache.var_maxttl=0
- xcache.var_gc_interval=300" >> /usr/$library/php.ini
- fi
- fi
- fi
- else if [ $phpcacher = "zopt" ]; then
- if [ $php5 = "php54" ]; then
- wget -O /tmp/pkgs/zendopcache-7.0.5.tgz http://pkgs.otoinstall.com/zendopcache-7.0.5.tgz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/zendopcache-7.0.5.tgz
- cd /tmp/pkgs/zendopcache-7.0.5
- phpize
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- echo "
- zend_extension="/usr/$library/extensions/no-debug-non-zts-20100525/opcache.so"
- opcache.memory_consumption=128
- opcache.interned_strings_buffer=8
- opcache.max_accelerated_files=4000
- opcache.revalidate_freq=60
- opcache.fast_shutdown=1
- opcache.enable_cli=1
- opcache.enable=1" >> /usr/$library/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- zend_extension="/usr/$library/extensions/no-debug-non-zts-20121212/opcache.so"
- opcache.memory_consumption=128
- opcache.interned_strings_buffer=8
- opcache.max_accelerated_files=4000
- opcache.revalidate_freq=60
- opcache.fast_shutdown=1
- opcache.enable_cli=1
- opcache.enable=1" >> /usr/$library/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- zend_extension="/usr/$library/extensions/no-debug-non-zts-20131226/opcache.so"
- opcache.memory_consumption=128
- opcache.interned_strings_buffer=8
- opcache.max_accelerated_files=4000
- opcache.revalidate_freq=60
- opcache.fast_shutdown=1
- opcache.enable_cli=1
- opcache.enable=1" >> /usr/$library/php.ini
- fi
- fi
- fi
- fi
- fi
- wget -O /tmp/pkgs/suhosin-0.9.38.tar.gz http://pkgs.otoinstall.com/suhosin-0.9.38.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/suhosin-0.9.38.tar.gz
- cd /tmp/pkgs/suhosin-0.9.38
- phpize
- ./configure --prefix=/usr --libdir=/usr/$library --enable-suhosin
- make
- make install
- if [ $php5 = "php54" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20100525/suhosin.so"
- suhosin.request.max_vars=2048
- suhosin.post.max_vars=2048
- suhosin.request.max_array_index_length=256
- suhosin.post.max_array_index_length=256
- suhosin.request.max_totalname_length=8192
- suhosin.post.max_totalname_length=8192" >> /usr/$library/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20121212/suhosin.so"
- suhosin.request.max_vars=2048
- suhosin.post.max_vars=2048
- suhosin.request.max_array_index_length=256
- suhosin.post.max_array_index_length=256
- suhosin.request.max_totalname_length=8192
- suhosin.post.max_totalname_length=8192" >> /usr/$library/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20131226/suhosin.so"
- suhosin.request.max_vars=2048
- suhosin.post.max_vars=2048
- suhosin.request.max_array_index_length=256
- suhosin.post.max_array_index_length=256
- suhosin.request.max_totalname_length=8192
- suhosin.post.max_totalname_length=8192" >> /usr/$library/php.ini
- fi
- fi
- fi
- if [ "d$imagick" = "d" ] || [ `expr "$imagick" : '[yY]'` -gt 0 ]; then
- wget -O /tmp/pkgs/ImageMagick.tar.gz http://pkgs.otoinstall.com/ImageMagick.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/ImageMagick.tar.gz
- cd /tmp/pkgs/ImageMagick-6.9.2-0
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- wget -O /tmp/pkgs/imagick-3.3.0RC2.tgz http://pkgs.otoinstall.com/imagick-3.3.0RC2.tgz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/imagick-3.3.0RC2.tgz
- cd /tmp/pkgs/imagick-3.3.0RC2
- phpize
- ./configure --prefix=/usr --libdir=/usr/$library
- make
- make install
- if [ $php5 = "php54" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20100525/imagick.so"" >> /usr/$library/php.ini
- else if [ $php5 = "php55" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20121212/imagick.so"" >> /usr/$library/php.ini
- else if [ $php5 = "php56" ]; then
- echo "
- extension="/usr/$library/extensions/no-debug-non-zts-20131226/imagick.so"" >> /usr/$library/php.ini
- fi
- fi
- fi
- fi
- echo ""
- echo "===========================PHP INSTALLATION COMPLETED========================="
- echo ""
- echo ""
- echo "==============================CREATING WELCOME PAGE==========================="
- echo ""
- OUTFILE=/usr/share/nginx/html/index.html
- (
- echo "<html>"
- echo "<head>"
- echo "<title>NginX Auto Installer 2.0 - Powered By Otoinstall.com</title>"
- echo "<style type=text/css media=screen>"
- echo "td, tr {background: #FFFFFF;"
- echo "font-size: 15px;"
- echo "border: none;"
- echo "}"
- echo "td.head1 {background: #000000;"
- echo "color: #FFFFFF;"
- echo "}"
- echo "td.head2 {font-weight: bold;"
- echo "}"
- echo "</style>"
- echo "</head>"
- echo "<body>"
- echo "<center><h3>NginX Works!!!</h3></center>"
- echo "<table width=500 border=0 align=center>"
- echo "<tr>"
- echo "<td class=head1 colspan=8><center><strong>SERVER HARDWARE</strong></center></td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> CPU:</td><td> `cat /proc/cpuinfo | grep 'model name' | head -n 1 | awk {'print $4, $5, $6, $7, $8, $9'}`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> Number of CPU(s):</td><td> `cat /proc/cpuinfo | grep -c processor`</td></tr>"
- echo "</table>"
- echo "<table width=500 border=0 align=center>"
- echo "<tr>"
- echo "<td class=head1 colspan=8><center><strong>SERVER SOFTWARE</strong></center></td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> Operating System:</td><td> `cat /etc/redhat-release`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> Kernel Version:</td><td> `uname -r`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> NginX Version:</td><td> 1.9.4</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> PHP Version:</td><td> `php -v | grep -v 'with' | grep -v 'Copyright' | awk {'print $2'}`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> Zend Version:</td><td> `php -v | grep -v 'PHP' | grep -v 'with' | awk {'print $3'} | cut -c2-6`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> MySQL Version:</td><td> `mysql -V | awk {'print $5'} | cut -c1-6`</td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> PHPINFO:</td><td> <a href=../phpinfo.php>here</a></td></tr>"
- echo "<tr>"
- echo "<td class=head2 width=130> phpMyAdmin:</td><td> <a href=../$phpmyadmin>here</a></td></tr>"
- echo "</table>"
- echo "<center><p>If you feel this script is helpul, you can give a feedback by spreading or promoting to your friends or communities.</p>"
- echo "<p>Created by <a href=http://otoinstall.com>NginX Auto Installer</a> & <a href=http://www.vbfk.com>Junker</a></p></center>"<< EOF
- EOF
- ) > $OUTFILE
- cat >/usr/share/nginx/html/phpinfo.php<<EOF
- <?php phpinfo(); ?>
- EOF
- echo ""
- echo "==============================INSTALLING PHPMYADMIN==========================="
- echo ""
- wget -O /tmp/pkgs/phpMyAdmin-4.4.14-all-languages.zip http://pkgs.otoinstall.com/phpMyAdmin-4.4.14-all-languages.zip
- unzip -d /usr/share/nginx/html /tmp/pkgs/phpMyAdmin-4.4.14-all-languages.zip
- cd /usr/share/nginx/html/phpMyAdmin-4.4.14-all-languages
- sed -i -e 's@blowfi55@'$ppblow'@' config.inc.php
- sed -i 's/localhost/127.0.0.1/g' config.inc.php
- cd /usr/share/nginx/html
- mv phpMyAdmin-4.4.14-all-languages $phpmyadmin
- echo ""
- echo "===============================INSTALLING PUREFTPD============================"
- echo ""
- if [ "d$pureftpd" = "d" ] || [ `expr "$pureftpd" : '[yY]'` -gt 0 ]; then
- wget -O /tmp/pkgs/pure-ftpd-1.0.42.tar.gz http://pkgs.otoinstall.com/pure-ftpd-1.0.42.tar.gz
- tar -C /tmp/pkgs -zxvf /tmp/pkgs/pure-ftpd-1.0.42.tar.gz
- cd /tmp/pkgs/pure-ftpd-1.0.42
- ./configure --prefix=/usr --libdir=/usr/$library
- make install-strip
- /usr/sbin/pure-ftpd &
- wget -O /etc/init.d/pureftpd http://txt.otoinstall.com/pureftpd
- chmod +x /etc/init.d/pureftpd
- chkconfig pureftpd on
- fi
- echo ""
- echo "====================================CLEANING UP=============================="
- echo ""
- rm -rf /tmp/pkgs
- echo ""
- echo "===========================STARTING YOUR ROCK MACHINE!!!======================"
- echo ""
- service nginx start
- service php-fpm start
- service mysqld start
- echo ""
- echo "==============================INSTALLATION COMPLETED=========================="
- echo ""
- echo "You're suggested to reboot first before start using your box."
- echo ""
- echo "=============================================================================="
- echo " PLEASE SAVE THE FOLLOWING DATA FOR YOUR CREDENTIALS"
- echo "=============================================================================="
- echo "Post Installation: http://$myhome"
- echo ""
- echo "FTP/SFTP Hostname: $myhome"
- echo "FTP/SFTP URI: ftp://www@$myhome"
- echo "FTP/SFTP User: www"
- echo "FTP/SFTP Pass: $ftppwd"
- echo "FTP/SFTP Directory: /home/www"
- echo ""
- echo "MySQL Root Pass: $mysqlrootpwd"
- echo "phpMyAdmin URL: https://$myhome/$phpmyadmin"
- echo "phpMyAdmin User: root"
- echo "phpMyAdmin Pass: $mysqlrootpwd"
- echo "=============================================================================="
- echo ""
- else
- echo "Operating system not supported. Please use CentOS/Debian/Ubuntu."
- fi
Add Comment
Please, Sign In to add comment