Skip to content

Commit

Permalink
Fit Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-q committed Oct 24, 2015
1 parent a167a82 commit 2128848
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 20 deletions.
35 changes: 25 additions & 10 deletions prepare/standalone/4-mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,38 @@ mkdir -p $HOME/share/

echo "====> Install MongoDB <===="

echo "==> download"
cd /prepare/resource/
wget -N https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-3.0.7.tgz
mkdir -p $HOME/share/mongodb

echo "==> untar"
cd $HOME/share/
tar xvfz /prepare/resource/mongodb-linux*.tgz
if [[ `uname` == 'Darwin' ]];
then
echo "==> download"
cd /prepare/resource/
wget -N https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.0.7.tgz

mkdir -p $HOME/share/mongodb
cp -R -n mongodb-linux*/ mongodb
echo "==> untar"
cd $HOME/share/
tar xvfz /prepare/resource/mongodb-osx*-3.*.tgz
cp -R -n mongodb-osx*/ mongodb

rm -fr mongodb-osx*/
else
echo "==> download"
cd /prepare/resource/
wget -N https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-3.0.7.tgz

echo "==> untar"
cd $HOME/share/
tar xvfz /prepare/resource/mongodb-linux*-3.*.tgz
cp -R -n mongodb-linux*/ mongodb

rm -fr mongodb-osx*/
fi

mkdir -p $HOME/share/mongodb/log
mkdir -p $HOME/share/mongodb/data

echo "==> cnf file"
cd $HOME/share/mongodb
cat <<EOF > mongod.cnf
cat <<EOF > $HOME/share/mongodb/mongod.cnf
systemLog:
destination: file
path: $HOME/share/mongodb/log/mongod.log
Expand Down
35 changes: 25 additions & 10 deletions prepare/standalone/4-mongodb26.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,38 @@ mkdir -p $HOME/share/

echo "====> Install MongoDB <===="

echo "==> download"
cd /prepare/resource/
wget -N https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-2.6.11.tgz
mkdir -p $HOME/share/mongodb

echo "==> untar"
cd $HOME/share/
tar xvfz /prepare/resource/mongodb-linux*.tgz
if [[ `uname` == 'Darwin' ]];
then
echo "==> download"
cd /prepare/resource/
wget -N https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.6.11.tgz

mkdir -p $HOME/share/mongodb
cp -R -n mongodb-linux*/ mongodb
echo "==> untar"
cd $HOME/share/
tar xvfz /prepare/resource/mongodb-osx*-2.*.tgz
cp -R -n mongodb-osx*/ mongodb

rm -fr mongodb-osx*/
else
echo "==> download"
cd /prepare/resource/
wget -N https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-2.6.11.tgz

echo "==> untar"
cd $HOME/share/
tar xvfz /prepare/resource/mongodb-linux*-2.*.tgz
cp -R -n mongodb-linux*/ mongodb

rm -fr mongodb-osx*/
fi

mkdir -p $HOME/share/mongodb/log
mkdir -p $HOME/share/mongodb/data

echo "==> cnf file"
cd $HOME/share/mongodb
cat <<EOF > mongod.cnf
cat <<EOF > $HOME/share/mongodb/mongod.cnf
systemLog:
destination: file
path: $HOME/share/mongodb/log/mongod.log
Expand Down

0 comments on commit 2128848

Please sign in to comment.