【安装nginx-gridfs模块】
yum info git
yum -y install git
cd /usr/local
git clone https://github.com/mdirolf/nginx-gridfs.git
cd nginx-gridfs
git submodule init
git submodule update
cd /usr/local/nginx
./nginx -V
nginx version: nginx/1.9.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
built with OpenSSL 1.0.2d 9 Jul 2015
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/nginx/nginx --conf- path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/pcre --with-zlib=/usr/local/zlib --with-openssl=/usr/local/openssl --with-http_realip_module
#./configure --sbin-path=/usr/local/nginx/nginx --conf- path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/pcre --with-zlib=/usr/local/zlib --with-openssl=/usr/local/openssl --with-http_realip_module --add-module=/usr/local/nginx-gridfs
#make
#make install
#./nginx -s reload
【mongodb安装】
上传mongodb-linux-x86_64-3.2.9.tgz
#cd /usr/local
#tar -zxvf mongodb-linux-x86_64-3.2.9.tgz
#mv mongodb-linux-x86_64-3.2.9 mongodb
#cd mongodb
#vi /usr/local/mongodb/mongodb.cnf
dbpath=/mnt/mongodb/mongodb_data
logpath=/mnt/mongodb/mongodb_log
logappend=true
fork=true
port=27017
#/usr/local/mongodb/bin/mongod -f /usr/local/mongodb/mongodb.cnf
#vi /etc/rc.d/rc.local
/usr/local/mongodb/bin/mongod -f /usr/local/mongodb/mongodb.cnf
【mongodb主从配置】
主,需要替换source的ip地址:
dbpath=/mnt/mongodb/mongodb_data
logpath=/mnt/mongodb/mongodb_log
logappend=true
fork=true
port=27017
pidfilepath=/usr/local/mongodb/mongodb.pid
master=true
dbpath=/mnt/mongodb/mongodb_data
logpath=/mnt/mongodb/mongodb_log
logappend=true
fork=true
port=27017
pidfilepath=/usr/local/mongodb/mongodb.pid
slave=true
source=10.*.*.*
yum info git
yum -y install git
cd /usr/local
git clone https://github.com/mdirolf/nginx-gridfs.git
cd nginx-gridfs
git submodule init
git submodule update
cd /usr/local/nginx
./nginx -V
nginx version: nginx/1.9.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
built with OpenSSL 1.0.2d 9 Jul 2015
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/nginx/nginx --conf- path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/pcre --with-zlib=/usr/local/zlib --with-openssl=/usr/local/openssl --with-http_realip_module
#./configure --sbin-path=/usr/local/nginx/nginx --conf- path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/pcre --with-zlib=/usr/local/zlib --with-openssl=/usr/local/openssl --with-http_realip_module --add-module=/usr/local/nginx-gridfs
#make
#make install
#./nginx -s reload
【mongodb安装】
上传mongodb-linux-x86_64-3.2.9.tgz
#cd /usr/local
#tar -zxvf mongodb-linux-x86_64-3.2.9.tgz
#mv mongodb-linux-x86_64-3.2.9 mongodb
#cd mongodb
#vi /usr/local/mongodb/mongodb.cnf
dbpath=/mnt/mongodb/mongodb_data
logpath=/mnt/mongodb/mongodb_log
logappend=true
fork=true
port=27017
#/usr/local/mongodb/bin/mongod -f /usr/local/mongodb/mongodb.cnf
#vi /etc/rc.d/rc.local
/usr/local/mongodb/bin/mongod -f /usr/local/mongodb/mongodb.cnf
【mongodb主从配置】
主,需要替换source的ip地址:
dbpath=/mnt/mongodb/mongodb_data
logpath=/mnt/mongodb/mongodb_log
logappend=true
fork=true
port=27017
pidfilepath=/usr/local/mongodb/mongodb.pid
master=true
source=10.*.*.*
dbpath=/mnt/mongodb/mongodb_data
logpath=/mnt/mongodb/mongodb_log
logappend=true
fork=true
port=27017
pidfilepath=/usr/local/mongodb/mongodb.pid
slave=true
source=10.*.*.*
3467

被折叠的 条评论
为什么被折叠?



