Browse Source

Update apps.conf and bugs

lj2007331 9 years ago
parent
commit
d7efb649df
11 changed files with 51 additions and 28 deletions
  1. 1 1
      README.md
  2. 1 1
      apps.conf
  3. 3 3
      config/nginx.conf
  4. 3 3
      config/nginx_apache.conf
  5. 3 3
      config/nginx_tomcat.conf
  6. 5 2
      include/GraphicsMagick.sh
  7. 5 2
      include/ImageMagick.sh
  8. 1 1
      include/demo.sh
  9. 14 5
      include/memcached.sh
  10. 6 3
      include/redis.sh
  11. 9 4
      install.sh

+ 1 - 1
README.md

@@ -5,7 +5,7 @@ Script properties:
 - Source compiler installation, most stable source is the latest version, and download from the official site
 - Some security optimization
 - Providing a plurality of database versions (MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.1, MariaDB-10.0, MariaDB-5.5, Percona-5.6, Percona-5.5)
-- Providing multiple PHP versions (php-5.3, php-5.4, php-5.5, php-5.6, php-7(RC))
+- Providing multiple PHP versions (php-5.3, php-5.4, php-5.5, php-5.6, php-7)
 - Provide Nginx, Tengine
 - Providing a plurality of Tomcat version (Tomcat-8, Tomcat-7)
 - Providing a plurality of JDK version (JDK-1.6, JDK-1.7, JDK-1.8)

+ 1 - 1
apps.conf

@@ -34,7 +34,7 @@ php_3_version=5.3.29
 php_4_version=5.4.45
 php_5_version=5.5.30
 php_6_version=5.6.15
-php_7_version=7.0.0RC6
+php_7_version=7.0.0RC7
 
 zendopcache_version=7.0.5
 xcache_version=3.2.0

+ 3 - 3
config/nginx.conf

@@ -54,13 +54,13 @@ http {
     open_file_cache_min_uses 2;
     open_file_cache_errors on;
 
-################### demo(you can delete) ############################
+######################## default ############################
     server {
     listen 80;
     server_name _;
     access_log /data/wwwlogs/access_nginx.log combined;
     root /data/wwwroot/default;
-    index index.html index.php;
+    index index.html index.htm index.php;
     location /nginx_status {
         stub_status on;
         access_log off;
@@ -83,6 +83,6 @@ http {
         }
     }
 
-##########################vhost#####################################
+########################## vhost #############################
     include vhost/*.conf;
 }

+ 3 - 3
config/nginx_apache.conf

@@ -54,13 +54,13 @@ http {
     open_file_cache_min_uses 2;
     open_file_cache_errors on;
 
-################### demo(you can delete) ############################
+######################## default ############################
     server {
     listen 80;
     server_name _;
     access_log /data/wwwlogs/access_nginx.log combined;
     root /data/wwwroot/default;
-    index index.html index.php;
+    index index.html index.htm index.php;
     location /nginx_status {
         stub_status on;
         access_log off;
@@ -88,6 +88,6 @@ http {
         }
     }
 
-##########################vhost#####################################
+########################## vhost #############################
     include vhost/*.conf;
 }

+ 3 - 3
config/nginx_tomcat.conf

@@ -54,13 +54,13 @@ http {
     open_file_cache_min_uses 2;
     open_file_cache_errors on;
 
-################### demo(you can delete) ############################
+######################## default ############################
     server {
     listen 80;
     server_name _;
     access_log /data/wwwlogs/access_nginx.log combined;
     root /data/wwwroot/default;
-    index index.html index.php;
+    index index.html index.htm index.jsp;
     location /nginx_status {
         stub_status on;
         access_log off;
@@ -81,6 +81,6 @@ http {
         }
     }
 
-##########################vhost#####################################
+########################## vhost #############################
     include vhost/*.conf;
 }

+ 5 - 2
include/GraphicsMagick.sh

@@ -8,8 +8,7 @@
 #       http://oneinstack.com
 #       https://github.com/lj2007331/oneinstack
 
-Install_GraphicsMagick()
-{
+Install_GraphicsMagick() {
 cd $oneinstack_dir/src
 src_url=http://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/$GraphicsMagick_version/GraphicsMagick-$GraphicsMagick_version.tar.gz && Download_src
 
@@ -19,7 +18,11 @@ cd GraphicsMagick-$GraphicsMagick_version
 make && make install
 cd ..
 rm -rf GraphicsMagick-$GraphicsMagick_version
+cd ..
+}
 
+Install_php-gmagick() {
+cd $oneinstack_dir/src
 if [ -e "$php_install_dir/bin/phpize" ];then
     src_url=http://pecl.php.net/get/gmagick-$gmagick_version.tgz && Download_src
     tar xzf gmagick-$gmagick_version.tgz 

+ 5 - 2
include/ImageMagick.sh

@@ -8,8 +8,7 @@
 #       http://oneinstack.com
 #       https://github.com/lj2007331/oneinstack
 
-Install_ImageMagick()
-{
+Install_ImageMagick() {
 cd $oneinstack_dir/src
 src_url=http://downloads.sourceforge.net/project/imagemagick/old-sources/6.x/6.8/ImageMagick-$ImageMagick_version.tar.gz && Download_src
 
@@ -19,7 +18,11 @@ cd ImageMagick-$ImageMagick_version
 make && make install
 cd ..
 rm -rf ImageMagick-$ImageMagick_version
+cd ..
+}
 
+Install_php-imagick() {
+cd $oneinstack_dir/src
 if [ -e "$php_install_dir/bin/phpize" ];then
     src_url=http://pecl.php.net/get/imagick-$imagick_version.tgz && Download_src
     tar xzf imagick-$imagick_version.tgz

+ 1 - 1
include/demo.sh

@@ -14,7 +14,7 @@ cd $oneinstack_dir/src
 
 [ "$IPADDR_STATE"x == "CN"x ] && /bin/cp ../config/index_cn.html $wwwroot_dir/default/index.html || /bin/cp ../config/index.html $wwwroot_dir/default
 
-if [ -e "$php_install/bin/php" ];then
+if [ -e "$php_install_dir/bin/php" ];then
     if [ "$IPADDR_STATE"x == "CN"x ];then
         src_url=http://mirrors.linuxeye.com/oneinstack/src/tz.zip && Download_src
         unzip -q tz.zip -d $wwwroot_dir/default

+ 14 - 5
include/memcached.sh

@@ -8,8 +8,7 @@
 #       http://oneinstack.com
 #       https://github.com/lj2007331/oneinstack
 
-Install_memcached()
-{
+Install_memcached() {
 cd $oneinstack_dir/src
 src_url=http://www.memcached.org/files/memcached-$memcached_version.tar.gz && Download_src
 
@@ -35,17 +34,19 @@ update-rc.d memcached defaults'
     OS_command
     sed -i "s@/usr/local/memcached@$memcached_install_dir@g" /etc/init.d/memcached
     [ -n "`grep 'CACHESIZE=' /etc/init.d/memcached`" ] && sed -i "s@^CACHESIZE=.*@CACHESIZE=`expr $Mem / 8`@" /etc/init.d/memcached 
-    [ -n "`grep 'start_instance default 256;' /etc/init.d/memcached`" ] && sed -i "s@start_instance default 256;@start_instance default `expr $Mem / 8`;@" /etc/init.d/memcached 
+    [ -n "`grep 'start_instance default 256;' /etc/init.d/memcached`" ] && sed -i "s@start_instance default 256;@start_instance default `expr $Mem / 8`;@" /etc/init.d/memcached
     service memcached start
 else
     rm -rf $memcached_install_dir
     echo "${CFAILURE}memcached install failed, Please contact the author! ${CEND}"
     kill -9 $$
 fi
+cd ..
+}
 
+Install_php-memcache() {
+cd $oneinstack_dir/src
 if [ -e "$php_install_dir/bin/phpize" ];then
-    src_url=https://launchpad.net/libmemcached/1.0/$libmemcached_version/+download/libmemcached-$libmemcached_version.tar.gz && Download_src
-    src_url=http://pecl.php.net/get/memcached-$memcached_pecl_version.tgz && Download_src
     src_url=http://pecl.php.net/get/memcache-$memcache_pecl_version.tgz && Download_src
     # php memcache extension
     tar xzf memcache-$memcache_pecl_version.tgz 
@@ -64,7 +65,15 @@ if [ -e "$php_install_dir/bin/phpize" ];then
     else
         echo "${CFAILURE}PHP memcache module install failed, Please contact the author! ${CEND}" 
     fi
+fi
+cd ..
+}
 
+Install_php-memcached() {
+cd $oneinstack_dir/src
+if [ -e "$php_install_dir/bin/phpize" ];then
+    src_url=https://launchpad.net/libmemcached/1.0/$libmemcached_version/+download/libmemcached-$libmemcached_version.tar.gz && Download_src
+    src_url=http://pecl.php.net/get/memcached-$memcached_pecl_version.tgz && Download_src
     # php memcached extension
     tar xzf libmemcached-$libmemcached_version.tar.gz
     cd libmemcached-$libmemcached_version

+ 6 - 3
include/redis.sh

@@ -8,8 +8,7 @@
 #       http://oneinstack.com
 #       https://github.com/lj2007331/oneinstack
 
-Install_redis()
-{
+Install_redis-server() {
 cd $oneinstack_dir/src
 src_url=http://download.redis.io/releases/redis-$redis_version.tar.gz && Download_src
 
@@ -53,7 +52,11 @@ else
     echo "${CFAILURE}Redis-server install failed, Please contact the author! ${CEND}"
     kill -9 $$
 fi
+cd ..
+}
 
+Install_php-redis() {
+cd $oneinstack_dir/src
 if [ -e "$php_install_dir/bin/phpize" ];then
     src_url=http://pecl.php.net/get/redis-$redis_pecl_version.tgz && Download_src
     tar xzf redis-$redis_pecl_version.tgz
@@ -70,7 +73,7 @@ if [ -e "$php_install_dir/bin/phpize" ];then
         rm -rf redis-$redis_pecl_version
         [ "$Apache_version" != '1' -a "$Apache_version" != '2' ] && service php-fpm restart || service httpd restart
     else
-        echo "${CFAILURE}PHP Redis install failed, Please contact the author! ${CEND}"
+        echo "${CFAILURE}PHP Redis module install failed, Please contact the author! ${CEND}"
     fi
 fi
 cd ..

+ 9 - 4
install.sh

@@ -571,10 +571,12 @@ fi
 # ImageMagick or GraphicsMagick
 if [ "$Magick" == '1' ];then
     . include/ImageMagick.sh
-    Install_ImageMagick 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -d "/usr/local/imagemagick" ] && Install_ImageMagick 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -e "`$php_install_dir/bin/php-config --extension-dir`/imagick.so" ] && Install_php-imagick 2>&1 | tee -a $oneinstack_dir/install.log
 elif [ "$Magick" == '2' ];then
     . include/GraphicsMagick.sh
-    Install_GraphicsMagick 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -d "/usr/local/graphicsmagick" ] && Install_GraphicsMagick 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -e "`$php_install_dir/bin/php-config --extension-dir`/gmagick.so" ] && Install_php-gmagick 2>&1 | tee -a $oneinstack_dir/install.log
 fi
 
 # ionCube
@@ -651,13 +653,16 @@ fi
 # redis
 if [ "$redis_yn" == 'y' ];then
     . include/redis.sh
-    Install_redis 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -d "$redis_install_dir" ] && Install_redis-server 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -e "`$php_install_dir/bin/php-config --extension-dir`/redis.so" ] && Install_php-redis 2>&1 | tee -a $oneinstack_dir/install.log
 fi
 
 # memcached
 if [ "$memcached_yn" == 'y' ];then
     . include/memcached.sh
-    Install_memcached 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -d "$memcached_install_dir/include/memcached" ] && Install_memcached 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -e "`$php_install_dir/bin/php-config --extension-dir`/memcache.so" ] && Install_php-memcache 2>&1 | tee -a $oneinstack_dir/install.log
+    [ ! -e "`$php_install_dir/bin/php-config --extension-dir`/memcached.so" ] && Install_php-memcached 2>&1 | tee -a $oneinstack_dir/install.log
 fi
 
 # index example