mogilefs 安装

来源:互联网 发布:2016最新网络词汇 编辑:程序博客网 时间:2024/06/02 13:12

####################1st step: install mysql ######################


$ sudo apt-get install mysql-server  //ubuntu 可以到 software center 安装mysql-server#trouble shooting: about mysql's remoting access#see http://blog.csdn.net/guanfu_jiang/article/details/7208794

###########################2nd step: install mofilefs command ############
#you should note the cpan's source url list , if cann't download data , change the source url#use command: cpan> o conf init$ sudo cpan$ cpan> install IO::AIO     $ cpan> install DBI$ cpan> install DBD::mysql $ cpan> install MogileFS::Server$ cpan> install Gearman::Client  $ cpan> install Gearman::Server  $ cpan> install Sys::Syscall  $ cpan> install Perlbal  $ cpan> install Net::Netmask  $ cpan> install Danga::Socket  $ cpan> install Gearman::Client::Async       $ cpan> install MogileFS::Utils$ cpan> install MogileFS::Client

###########################3rd step: install mofilefs database command ############
$ mogdbsetup --dbhost=127.0.0.1 --dbname=mogilefs --dbuser=mogile --dbpass=mogile#confirm: access mysql , check database & tables, if there are some tables like 'domain','class','file','class' etc.$sudo mysql -umogile -pmogilemysql> use mogilefs;mysql> show tables;

###########################4th step: confugure mofilefs tracker command ############
$ vim /etc/mogilefs/mogilefsd.confdb_dsn = DBI:mysql:mogilefs:host=127.0.0.1;port=3306;mysql_connect_timeout=5db_user = mogiledb_pass = mogileconf_port = 7001listener_jobs = 5node_timeout = 5rebalance_ignore_missing = 1

###########################5th step: start mofilefs tracker command ###############

$ adduser mogilefs$ su mogilefs$ mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon

###########################6th step: intial mofilefs storage command ###############
#add storage$ mogadm --lib=/usr/lib/perl5/5.12.4 --trackers=127.0.0.1:7001 host add mogilestorage --ip=127.0.0.1 --port=7500 --status=alive#confirm:$ mogadm --lib=/usr/lib/perl5/5.12.4 --trackers=127.0.0.1:7001 host list#add device$ mogadm --lib=/usr/lib/perl5/5.12.4 --trackers=127.0.0.1:7001 device add mogilestorage 1#confirm:$ mogadm --lib=/usr/lib/perl5/5.12.4 --trackers=127.0.0.1:7001 device list

##########################7th step: configure mofilefs storage command #############
$ vim /etc/mogstored.confhttplisten=0.0.0.0:7500mgmtlisten=0.0.0.0:7501docroot=/home/mogilefs/store$mkdir -p /home/mogilefs/store/dev1

##########################8th step: run mofilefs command ################
$ mogstored -c /etc/mogilefs/mogstored.conf --daemon#confirm:$ ps -ef | grep mogilefsd$ ps -ef | grep mogstored

##########################9th step: test mofilefs command ####################
#add domain$ mogadm --lib=/usr/lib/perl5/5.12.4 --trackers=127.0.0.1:7001 domain add testdomain#add class to above domain$ mogadm --lib=/usr/lib/perl5/5.12.4 --trackers=127.0.0.1:7001 class add testdomain testclass

##########################10th step: use mofilefs client api to access mogilefs ###########


原创粉丝点击