Terry.Li-彬

          虛其心,可解天下之問;專其心,可治天下之學;靜其心,可悟天下之理;恒其心,可成天下之業。

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            143 隨筆 :: 344 文章 :: 130 評論 :: 0 Trackbacks
          https://github.com/fly2wind/TSShellScript

          #!/bin/sh
          ########################################################################################
          #
          # Install Ejabberd Server
          #
          # Shawn Ma
          #
          ########################################################################################
          # Define
          TARGET=redis-2.6.7.tar.gz
          SOURCE=http://redis.googlecode.com/files/redis-2.6.7.tar.gz

          # Create a build directory
          mkdir -p /opt/install/redis && cd /opt/install/redis

          # Prepare for compilation source
          curl -o $TARGET $SOURCE
          mkdir -p tmp && tar -zxvf $TARGET -C tmp

          # Install build dependencies
          yum install -y gcc gcc-c++ make cmake autoconf automake

          # Create a User Group
          groupadd redis
          useradd -r -g redis redis

          # Compile and deploy
          mv tmp/* source && cd source
          make PREFIX=/opt/server/cache/redis
          make install PREFIX=/opt/server/cache/redis

          cd /opt/server/cache/redis
          mkdir -p conf var/run var/lock var/snapshot logs
          curl -o conf/redis.conf https://raw.github.com/fly2wind/TSShellScript/master/redis/conf/redis.conf

          # Postinstallation setup
          cd /opt/server/cache/redis
          chown -R redis .
          chgrp -R redis .
          chown -R root .
          chown -R redis var logs

          # Configuration
          curl -o /etc/init.d/redis https://raw.github.com/fly2wind/TSShellScript/master/redis/init/redis
          chmod a+x /etc/init.d/redis

          # Additional
          chkconfig --add redis
          chkconfig redis on


          posted on 2013-01-09 15:00 禮物 閱讀(1118) 評論(0)  編輯  收藏 所屬分類: Linux
          主站蜘蛛池模板: 垦利县| 巫溪县| 达尔| 新乡县| 疏附县| 疏勒县| 扶沟县| 延长县| 怀宁县| 洛川县| 寿阳县| 洪江市| 民和| 东安县| 英山县| 阿拉善盟| 贡山| 元氏县| 顺平县| 泰兴市| 额济纳旗| 锡林郭勒盟| 新邵县| 海阳市| 福鼎市| 嘉荫县| 南汇区| 张家川| 卫辉市| 达日县| 从化市| 清原| 芦溪县| 洛浦县| 修水县| 沅陵县| 叶城县| 阳泉市| 阳新县| 城固县| 区。|