Browse Source

Update redis.sh

lj2007331 8 years ago
parent
commit
83705940a5
9 changed files with 27 additions and 114 deletions
  1. 5 0
      README.md
  2. 2 2
      include/php-5.4.sh
  3. 2 2
      include/php-5.5.sh
  4. 2 2
      include/php-5.6.sh
  5. 2 2
      include/php-7.sh
  6. 12 2
      include/redis.sh
  7. 1 1
      init.d/Redis-server-init
  8. 0 102
      init.d/Redis-server-init-CentOS
  9. 1 1
      versions.txt

+ 5 - 0
README.md

@@ -24,6 +24,7 @@ Script properties:
 - Provided under HHVM install CentOS 6,7
 
 ## How to use 
+
 If your server system: CentOS/Redhat (Do not enter "//" and "// subsequent sentence)
 ```bash
 yum -y install wget screen python   // for CentOS / Redhat
@@ -44,6 +45,7 @@ screen -S oneinstack    // If network interruption, you can execute the command
 ```
 
 ## How to add Extensions 
+
 ```bash
 cd ~/oneinstack    // Must enter the directory execution under oneinstack
 ./addons.sh    // Do not sh addons.sh or bash addons.sh such execution
@@ -82,6 +84,7 @@ crontab -l    // Can be added to scheduled tasks, such as automatic backups ever
 ```
 
 ## How to manage service
+
 Nginx/Tengine/OpenResty:
 ```bash
 service nginx {start|stop|status|restart|reload|configtest}
@@ -120,6 +123,7 @@ service memcached {start|stop|status|restart|reload}
 ```
 
 ## How to upgrade 
+
 ```bash
 ./upgrade.sh
 ```
@@ -131,5 +135,6 @@ service memcached {start|stop|status|restart|reload}
 ```
 
 ## Installation
+
 For feedback, questions, and to follow the progress of the project (Chinese): <br />
 [OneinStack](https://oneinstack.com)<br />

+ 2 - 2
include/php-5.4.sh

@@ -71,7 +71,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -82,7 +82,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 2 - 2
include/php-5.5.sh

@@ -71,7 +71,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -82,7 +82,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 2 - 2
include/php-5.6.sh

@@ -70,7 +70,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -81,7 +81,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 2 - 2
include/php-7.sh

@@ -71,7 +71,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -82,7 +82,7 @@ else
 --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --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-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-inline-optimization \
+--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 12 - 2
include/redis.sh

@@ -36,8 +36,18 @@ if [ -f "src/redis-server" ];then
     echo "${CSUCCESS}Redis-server install successfully! ${CEND}"
     cd ..
     rm -rf redis-$redis_version
-    [ "$OS" == 'CentOS' ] && { /bin/cp ../init.d/Redis-server-init-CentOS /etc/init.d/redis-server; chkconfig --add redis-server; chkconfig redis-server on; }
-    [[ $OS =~ ^Ubuntu$|^Debian$ ]] && { useradd -M -s /sbin/nologin redis; chown -R redis:redis $redis_install_dir/var/; /bin/cp ../init.d/Redis-server-init-Ubuntu /etc/init.d/redis-server; update-rc.d redis-server defaults; }
+    id -u redis >/dev/null 2>&1
+    [ $? -ne 0 ] && useradd -M -s /sbin/nologin redis 
+    chown -R redis:redis $redis_install_dir/var
+    /bin/cp ../init.d/Redis-server-init /etc/init.d/redis-server
+    if [ "$OS" == 'CentOS' ];then
+        src_url=http://mirrors.linuxeye.com/oneinstack/src/start-stop-daemon.c && Download_src
+        cc start-stop-daemon.c -o /sbin/start-stop-daemon
+        chkconfig --add redis-server
+        chkconfig redis-server on
+    elif [[ $OS =~ ^Ubuntu$|^Debian$ ]];then
+        update-rc.d redis-server defaults
+    fi
     sed -i "s@/usr/local/redis@$redis_install_dir@g" /etc/init.d/redis-server
     #[ -z "`grep 'vm.overcommit_memory' /etc/sysctl.conf`" ] && echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf
     #sysctl -p

+ 1 - 1
init.d/Redis-server-init-Ubuntu → init.d/Redis-server-init

@@ -29,7 +29,7 @@ case "$1" in
     echo -n "Starting $DESC: "
     touch $PIDFILE
     chown redis:redis $PIDFILE
-    if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
+    if start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
     then
         echo "$NAME."
     else

+ 0 - 102
init.d/Redis-server-init-CentOS

@@ -1,102 +0,0 @@
-#!/bin/sh
-#
-# redis - this script starts and stops the redis-server daemon
-#
-# chkconfig:   - 85 15
-# description:  Redis is a persistent key-value database
-# processname: redis-server
-# config:      /usr/local/redis/etc/redis.conf
-# config:      /etc/sysconfig/redis
-# pidfile:     /var/run/redis.pid
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# Source networking configuration.
-. /etc/sysconfig/network
-
-# Check that networking is up.
-[ "$NETWORKING" = "no" ] && exit 0
-
-redis="/usr/local/redis/bin/redis-server"
-prog=$(basename $redis)
-
-REDIS_CONF_FILE="/usr/local/redis/etc/redis.conf"
-
-[ -f /etc/sysconfig/redis ] && . /etc/sysconfig/redis
-
-lockfile=/var/lock/subsys/redis
-
-start() {
-    [ -x $redis ] || exit 5
-    [ -f $REDIS_CONF_FILE ] || exit 6
-    echo -n $"Starting $prog: "
-    daemon $redis $REDIS_CONF_FILE
-    retval=$?
-    echo
-    [ $retval -eq 0 ] && touch $lockfile
-    return $retval
-}
-
-stop() {
-    echo -n $"Stopping $prog: "
-    killproc $prog -QUIT
-    retval=$?
-    echo
-    [ $retval -eq 0 ] && rm -f $lockfile
-    return $retval
-}
-
-restart() {
-    stop
-    start
-}
-
-reload() {
-    echo -n $"Reloading $prog: "
-    killproc $redis -HUP
-    RETVAL=$?
-    echo
-}
-
-force_reload() {
-    restart
-}
-
-rh_status() {
-    status $prog
-}
-
-rh_status_q() {
-    rh_status >/dev/null 2>&1
-}
-
-case "$1" in
-    start)
-        rh_status_q && exit 0
-        $1
-        ;;
-    stop)
-        rh_status_q || exit 0
-        $1
-        ;;
-    restart|configtest)
-        $1
-        ;;
-    reload)
-        rh_status_q || exit 7
-        $1
-        ;;
-    force-reload)
-        force_reload
-        ;;
-    status)
-        rh_status
-        ;;
-    condrestart|try-restart)
-        rh_status_q || exit 0
-        ;;
-    *)
-        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
-        exit 2
-esac

+ 1 - 1
versions.txt

@@ -66,7 +66,7 @@ memcached_pecl_version=2.2.0
 memcache_pecl_version=3.0.8
 
 # phpMyadmin
-phpMyAdmin_version=4.4.15.6
+phpMyAdmin_version=4.4.15.7
 
 # jemalloc
 jemalloc_version=4.2.1