Explorar el Código

Update phpMyAdmin

lj2007331@gmail.com hace 7 años
padre
commit
bcc730eaad

+ 7 - 7
README.md

@@ -21,7 +21,7 @@ Script properties:
 - Provide local backup,remote backup (rsync between servers),Aliyun OSS,Qcloud COS and UPYUN script
 - Provided under HHVM install CentOS 6,7
 
-## How to use 
+## How to use
 
 If your server system: CentOS/Redhat (Do not enter "//" and "// subsequent sentence)
 ```bash
@@ -42,7 +42,7 @@ screen -S oneinstack    // If network interruption, you can execute the command
 ./install.sh   // Do not sh install.sh or bash install.sh such execution
 ```
 
-## How to add Extensions 
+## How to add Extensions
 
 ```bash
 cd ~/oneinstack    // Must enter the directory execution under oneinstack
@@ -93,11 +93,11 @@ service mysqld {start|stop|restart|reload|status}
 ```
 PostgreSQL:
 ```bash
-service postgresql {start|stop|restart|status} 
+service postgresql {start|stop|restart|status}
 ```
 MongoDB:
 ```bash
-service mongod {start|stop|status|restart|reload} 
+service mongod {start|stop|status|restart|reload}
 ```
 PHP:
 ```bash
@@ -113,7 +113,7 @@ service httpd {start|restart|stop}
 ```
 Tomcat:
 ```bash
-service tomcat {start|stop|status|restart} 
+service tomcat {start|stop|status|restart}
 ```
 Pure-Ftpd:
 ```bash
@@ -128,13 +128,13 @@ Memcached:
 service memcached {start|stop|status|restart|reload}
 ```
 
-## How to upgrade 
+## How to upgrade
 
 ```bash
 ./upgrade.sh
 ```
 
-## How to uninstall 
+## How to uninstall
 
 ```bash
 ./uninstall.sh

+ 21 - 21
config/magento2.conf

@@ -1,14 +1,14 @@
 server {
   listen 80;
   server_name oneinstack.com;
-  set $MAGE_ROOT /data/wwwroot/default; 
+  set $MAGE_ROOT /data/wwwroot/default;
   root $MAGE_ROOT/pub;
   index index.php;
   autoindex off;
   charset UTF-8;
   error_page 404 403 /errors/404.php;
   #add_header "X-UA-Compatible" "IE=Edge";
-  
+
   # PHP entry point for setup application
   location ~* ^/setup($|/) {
     root $MAGE_ROOT;
@@ -19,16 +19,16 @@ server {
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       include fastcgi_params;
     }
-  
+
     location ~ ^/setup/(?!pub/). {
       deny all;
     }
-  
+
     location ~ ^/setup/pub/ {
       add_header X-Frame-Options "SAMEORIGIN";
     }
   }
-  
+
   # PHP entry point for update application
   location ~* ^/update($|/) {
     root $MAGE_ROOT;
@@ -40,21 +40,21 @@ server {
       fastcgi_param PATH_INFO $fastcgi_path_info;
       include fastcgi_params;
     }
-  
+
     # Deny everything but index.php
     location ~ ^/update/(?!pub/). {
       deny all;
     }
-    
+
     location ~ ^/update/pub/ {
       add_header X-Frame-Options "SAMEORIGIN";
     }
   }
-  
+
   location / {
     try_files $uri $uri/ /index.php?$args;
   }
-  
+
   location /pub/ {
     location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
       deny all;
@@ -62,7 +62,7 @@ server {
     alias $MAGE_ROOT/pub/;
     add_header X-Frame-Options "SAMEORIGIN";
   }
-  
+
   location /static/ {
     # Uncomment the following line in production mode
     # expires max;
@@ -70,7 +70,7 @@ server {
     location ~ ^/static/version {
       rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
     }
- 
+
     location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
       add_header Cache-Control "public";
       add_header X-Frame-Options "SAMEORIGIN";
@@ -94,13 +94,13 @@ server {
     }
     add_header X-Frame-Options "SAMEORIGIN";
   }
-  
+
   location /media/ {
     try_files $uri $uri/ /get.php?$args;
     location ~ ^/media/theme_customization/.*\.xml {
       deny all;
     }
-  
+
     location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
       add_header Cache-Control "public";
       add_header X-Frame-Options "SAMEORIGIN";
@@ -115,35 +115,35 @@ server {
     }
     add_header X-Frame-Options "SAMEORIGIN";
   }
-  
+
   location /media/customer/ {
     deny all;
   }
-  
+
   location /media/downloadable/ {
     deny all;
   }
-  
+
   location /media/import/ {
     deny all;
   }
-  
+
   # PHP entry point for main application
   location ~ (index|get|static|report|404|503)\.php$ {
     try_files $uri =404;
     fastcgi_pass unix:/dev/shm/php-cgi.sock;
     fastcgi_buffers 1024 4k;
-  
+
     fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
     fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=600";
     fastcgi_read_timeout 600s;
     fastcgi_connect_timeout 600s;
-  
+
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;
   }
-  
+
   gzip on;
   gzip_disable "msie6";
   gzip_comp_level 6;
@@ -163,7 +163,7 @@ server {
     application/xml+rss
     image/svg+xml;
   gzip_vary on;
-  
+
   # Banned locations (only reached if the earlier PHP entry point regexes don't match)
   location ~* (\.php$|\.htaccess$|\.git) {
     deny all;

+ 7 - 7
config/nextcloud.conf

@@ -16,16 +16,16 @@ location = /.well-known/carddav {
 location = /.well-known/caldav {
   return 301 $scheme://$host/remote.php/dav;
 }
-    
+
 #设置上传文件的最大大小(还和php里的那个设置有关)
 client_max_body_size 512M;
 fastcgi_buffers 64 4K;
-    
+
 #最主要的,将所有请求转发到index.php上
 location / {
   rewrite ^ /index.php$uri;
 }
-    
+
 #安全设置,禁止访问部分敏感内容
 location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
   deny all;
@@ -33,7 +33,7 @@ location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
 location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
   deny all;
 }
-    
+
 #这部分吧,默认就有,不过有所不同,所以我合并了下,替换原来的就行
 location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
   fastcgi_split_path_info ^(.+\.php)(/.*)$;
@@ -45,13 +45,13 @@ location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updat
   fastcgi_request_buffering off;
   include fastcgi.conf;
 }
-    
+
 #安全设置,禁止访问部分敏感内容
 location ~ ^/(?:updater|ocs-provider)(?:$|/) {
   try_files $uri/ =404;
   index index.php;
 }
-    
+
 location ~ \.(?:css|js|woff|svg|gif)$ {
   try_files $uri /index.php$uri$is_args$args;
   add_header Cache-Control "public, max-age=15778463";
@@ -62,7 +62,7 @@ location ~ \.(?:css|js|woff|svg|gif)$ {
   add_header X-Permitted-Cross-Domain-Policies none;
   access_log off;
 }
-    
+
 location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
   try_files $uri /index.php$uri$is_args$args;
   access_log off;

+ 5 - 1
include/check_download.sh

@@ -702,7 +702,11 @@ checkDownload() {
 
   if [ "${phpmyadmin_yn}" == 'y' ]; then
     echo "Download phpMyAdmin..."
-    src_url=https://files.phpmyadmin.net/phpMyAdmin/${phpmyadmin_ver}/phpMyAdmin-${phpmyadmin_ver}-all-languages.tar.gz && Download_src
+    if [[ "${php_option}" =~ ^[1-2]$ ]]; then
+      src_url=https://files.phpmyadmin.net/phpMyAdmin/${phpmyadmin_oldver}/phpMyAdmin-${phpmyadmin_oldver}-all-languages.tar.gz && Download_src
+    else
+      src_url=https://files.phpmyadmin.net/phpMyAdmin/${phpmyadmin_ver}/phpMyAdmin-${phpmyadmin_ver}-all-languages.tar.gz && Download_src
+    fi
   fi
 
   if [ "${redis_yn}" == 'y' ]; then

+ 4 - 4
include/init_CentOS.sh

@@ -43,10 +43,10 @@ EOF
 sed -i '/^# End of file/,$d' /etc/security/limits.conf
 cat >> /etc/security/limits.conf <<EOF
 # End of file
-* soft nproc 1000000 
-* hard nproc 1000000 
-* soft nofile 1000000 
-* hard nofile 1000000 
+* soft nproc 1000000
+* hard nproc 1000000
+* soft nofile 1000000
+* hard nofile 1000000
 EOF
 
 # /etc/hosts

+ 9 - 2
include/phpmyadmin.sh

@@ -10,8 +10,15 @@
 
 Install_phpMyAdmin() {
   pushd ${oneinstack_dir}/src > /dev/null
-  tar xzf phpMyAdmin-${phpmyadmin_ver}-all-languages.tar.gz
-  /bin/mv phpMyAdmin-${phpmyadmin_ver}-all-languages ${wwwroot_dir}/default/phpMyAdmin
+  PHP_detail_ver=`${php_install_dir}/bin/php -r 'echo PHP_VERSION;'`
+  PHP_main_ver=${PHP_detail_ver%.*}
+  if [[ "${PHP_main_ver}" =~ ^5.[3-4]$ ]]; then
+    tar xzf phpMyAdmin-${phpmyadmin_oldver}-all-languages.tar.gz
+    /bin/mv phpMyAdmin-${phpmyadmin_oldver}-all-languages ${wwwroot_dir}/default/phpMyAdmin
+  else
+    tar xzf phpMyAdmin-${phpmyadmin_ver}-all-languages.tar.gz
+    /bin/mv phpMyAdmin-${phpmyadmin_ver}-all-languages ${wwwroot_dir}/default/phpMyAdmin
+  fi
   /bin/cp ${wwwroot_dir}/default/phpMyAdmin/{config.sample.inc.php,config.inc.php}
   mkdir ${wwwroot_dir}/default/phpMyAdmin/{upload,save}
   sed -i "s@UploadDir.*@UploadDir'\] = 'upload';@" ${wwwroot_dir}/default/phpMyAdmin/config.inc.php

+ 1 - 1
init.d/Memcached-init-CentOS

@@ -43,7 +43,7 @@ stop () {
   echo
   if [ $RETVAL -eq 0 ] ; then
     rm -f /var/lock/subsys/memcached
-    rm -f $PIDFILE 
+    rm -f $PIDFILE
   fi
 }
 

+ 8 - 8
init.d/Nginx-init-Ubuntu

@@ -1,5 +1,5 @@
 #! /bin/sh
- 
+
 ### BEGIN INIT INFO
 # Provides:          nginx
 # Required-Start:    $all
@@ -9,22 +9,22 @@
 # Short-Description: starts the nginx web server
 # Description:       starts nginx using start-stop-daemon
 ### END INIT INFO
- 
+
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 DAEMON=/usr/local/nginx/sbin/nginx
 DAEMON_OPTS='-c /usr/local/nginx/conf/nginx.conf'
 NAME=nginx
 DESC=nginx
- 
+
 test -x $DAEMON || exit 0
- 
+
 # Include nginx defaults if available
 if [ -f /etc/default/nginx ] ; then
   . /etc/default/nginx
 fi
- 
+
 set -e
- 
+
 case "$1" in
   start)
     echo -n "Starting $DESC: "
@@ -50,7 +50,7 @@ case "$1" in
     echo "$NAME."
     ;;
   configtest)
-    $DAEMON -t $DAEMON_OPTS 
+    $DAEMON -t $DAEMON_OPTS
     ;;
   *)
     N=/etc/init.d/$NAME
@@ -58,5 +58,5 @@ case "$1" in
     exit 1
     ;;
 esac
- 
+
 exit 0

+ 1 - 1
init.d/SS-libev-init-CentOS

@@ -80,7 +80,7 @@ start() {
 }
 
 
-# Stop SS. 
+# Stop SS.
 #
 stop() {
   echo -n $"Shutting down ${NAME}: "

+ 1 - 1
init.d/SS-python-init

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.cn
 ### BEGIN INIT INFO
-# Provides:          SS 
+# Provides:          SS
 # Required-Start:    $local_fs $remote_fs $network $syslog
 # Required-Start:    $local_fs $remote_fs $network $syslog
 # Default-Start:     2 3 4 5

+ 3 - 3
src/php5.3patch

@@ -8,9 +8,9 @@ index b3f94ec..7613119 100644
  #include "ext/standard/php_string.h"
 +#include "ext/standard/php_smart_str.h"
 +
- 
+
  #define DEBUG_FILE_UPLOAD ZEND_DEBUG
- 
+
 @@ -462,6 +464,66 @@ static int find_boundary(multipart_buffer *self, char *boundary TSRMLS_DC)
  static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header TSRMLS_DC)
  {
@@ -77,4 +77,4 @@ index b3f94ec..7613119 100644
 +	char *line;
  	mime_header_entry prev_entry, entry;
  	int prev_len, cur_len;
- 
+

+ 2 - 1
versions.txt

@@ -91,7 +91,8 @@ mongodb_pecl_ver=1.4.2
 mongo_pecl_ver=1.6.16
 
 # phpMyadmin
-phpmyadmin_ver=4.4.15.10
+phpmyadmin_ver=4.8.0
+phpmyadmin_oldver=4.4.15.10
 
 # jemalloc
 jemalloc_ver=5.0.1