(原創)Drqueue + MAYA 2011 On CentOS 5.5
- 詳細內容
- 分類: Linux
- 發佈: 2012-01-12, 週四 14:00
- 作者 Super User
- 點擊數: 24649
yum -y update
vi /etc/hosts
192.168.10.242 master.jason-tang.com master
192.168.10.234 slave1.jason-tang.com slave1
192.168.10.244 slave2.jason-tang.com slave2
yum -y install mysql-devel pygtk2-devel libXp
wget http://downloads.sourceforge.net/project/scons/scons/1.3.1/scons-1.3.1-1.noarch.rpm
rpm -ivh scons-1.3.1-1.noarch.rpm
mkdir /usr/local/drqueue
vi /etc/exports
/usr/local/drqueue 192.168.10.0/255.255.255.0(rw,no_root_squash,sync)
/usr/autodesk 192.168.10.0/255.255.255.0(rw,no_root_squash,sync)
vi /etc/hosts.allow
ALL : ALL : allow
portmap: 192.168.10.0/255.255.0.0 : allow
/sbin/chkconfig --levels 235 nfs on
/sbin/chkconfig --levels 235 portmap on
/etc/init.d/nfs restart
/etc/init.d/portmap restart
service iptables stop
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
service iptables save
service iptables restart
reboot
cd /root
mkdir git
cd git
wget http://packages.sw.be/git/git-1.7.3-1.el5.rf.i386.rpm
wget http://packages.sw.be/git/git-1.7.3-1.el5.rf.x86_64.rpm
wget http://packages.sw.be/git/perl-Git-1.7.3-1.el5.rf.i386.rpm
wget http://packages.sw.be/git/perl-Git-1.7.3-1.el5.rf.x86_64.rpm
rpm -ivh *.rpm
cd /root
git clone https://ssl.drqueue.org/git/drqueue.git
cd ./drqueue
scons install
vi /usr/local/drqueue/etc/master.conf
logs=/usr/local/drqueue/logs
tmp=/usr/local/drqueue/tmp
db=/usr/local/drqueue/db
bin=/usr/local/drqueue/bin
etc=/usr/local/drqueue/etc
vi /usr/local/drqueue/etc/slave.conf
logs=/usr/local/drqueue/logs
tmp=/usr/local/drqueue/tmp
pool=Default,maya,blender
vi /usr/local/drqueue/etc/drqman.conf
logs=/usr/local/drqueue/logs
tmp=/usr/local/drqueue/tmp
db=/usr/local/drqueue/db
vi /root/.bashrc
PATH=${PATH}:/usr/local/drqueue/bin
export PATH
export DRQUEUE_ROOT=/usr/local/drqueue
export DRQUEUE_MASTER=192.168.10.242
vi /etc/rc.d/rc.local
PATH=${PATH}:/usr/local/drqueue/bin
export PATH
export DRQUEUE_ROOT=/usr/local/drqueue
export DRQUEUE_MASTER=192.168.10.242
/usr/local/drqueue/bin/master &
安裝 Maya license server
cd /root
wget http://images.autodesk.com/adsk/files/inux64_licenseserver_11.7.rpm
rpm -ivh inux64_licenseserver_11.7.rpm
用winscp upload file maya2011.lic 到 /opt/flexnetserver
改linux 的 MAC 跟 maya2011.lic 相同及boot機時 start Maya license service
vi /etc/rc.d/rc.local
ifconfig eth0 hw ether 00:30:48:9E:71:78
/etc/init.d/network restart
/opt/flexnetserver/lmgrd -c /opt/flexnetserver/maya2011.lic -L /var/log/debug.log
安裝 Maya 2011
安裝 Maya 2011 前,先看Maya license server是否正常運作,若沒有的話可用下一行使Maya license server正常運作.
/opt/flexnetserver/lmgrd -c /opt/flexnetserver/maya2011.lic -L /var/log/debug.log
用winscp upload Maya 2011(Linux 64 bit) 到 Master 及到安裝 Path
chmod 755 setup
./setup
vi /usr/local/drqueue/etc/maya_sg.py
改:
ENGINE_PATH="Render"
為:(不同版本的Maya path 可能不同)
ENGINE_PATH="/usr/autodesk/maya2011-x64/bin/Render"
安裝 DrQueueOnRails
cd /root
mkdir ruby
cd ruby
wget ftp://ftp.ruby-lang.org//pub/ruby/1.8/ruby-1.8.7-p302.tar.gz
tar -xvf ruby-1.8.7-p302.tar.gz
cd ruby-1.8.7-p302
./configure
make
make install
cd /root
mkdir rubygems
cd rubygems
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -zxf rubygems-1.3.7.tgz
cd rubygems-1.3.7
ruby setup.rb
yum -y remove ImageMagick
yum -y install ghostscript-devel lcms-devel libtiff-devel freeglut
cd /root
mkdir ImageMagick
cd ImageMagick
wget http://dev.centos.org/centos/5/testing/x86_64/RPMS/jasper-1.900.1-2.el5.centos.x86_64.rpm
wget http://dev.centos.org/centos/5/testing/x86_64/RPMS/jasper-devel-1.900.1-2.el5.centos.x86_64.rpm
rpm -ivh jasper-*.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-6.6.7-9.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-c++-6.6.7-9.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-c++-devel-6.6.7-9.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-debuginfo-6.6.7-9.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-devel-6.6.7-9.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-doc-6.6.7-9.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-perl-6.6.7-9.x86_64.rpm
rpm -ivh ImageMagick-*.rpm
ln -s /usr/lib64/libltdl.so.3.1.4 /usr/lib64/libltdl.so
gem sources -a http://gemcutter.org
gem sources -a http://gems.rubyforge.org
gem sources -a http://gems.github.com
gem update --system
gem install -v=2.3.8 rails
gem install ruby-net-ldap
gem install rmagick
gem install mislav-will_paginate
gem install mongrel
gem install DrQueueRubyBindings
gem install mysql
useradd drqueueonrails
rm -rf /home/drqueueonrails
cd /home
git clone https://ssl.drqueue.org/git/DrQueueOnRails.git DrQueueOnRails
mv /home/DrQueueOnRails /home/drqueueonrails
chown -R drqueueonrails:drqueueonrails /home/drqueueonrails
cd /home/drqueueonrails
ruby ./DrQueueOnRails_requirements_check.rb
/sbin/chkconfig --levels 235 mysqld on
/etc/init.d/mysqld restart
mysql
mysql>CREATE DATABASE drqueueonrails;
mysql>GRANT ALL ON drqueueonrails.* TO 'drqueueonrails'@'localhost' IDENTIFIED BY 'drqueueonrails';
mysql>quit
cp -rp /home/drqueueonrails/config/database.yml.example /home/drqueueonrails/config/database.yml
vi /home/drqueueonrails/config/database.yml
development:
adapter: mysql
database: drqueueonrails
username: drqueueonrails
password: drqueueonrails
cp -rp /home/drqueueonrails/config/environment.rb.example /home/drqueueonrails/config/environment.rb
vi /home/drqueueonrails/config/environment.rb
ENV['RAILS_ENV'] ||= 'development'
######## BEGIN DQOR CONFIG
# DrQueue variables
ENV['DRQUEUE_MASTER'] ||= 'MASTER'
ENV['DRQUEUE_TMP'] ||= '/usr/local/drqueue/tmp'
ENV['DRQUEUE_ETC'] ||= '/usr/local/drqueue/etc'
ENV['DRQUEUE_LOGS'] ||= '/usr/local/drqueue/logs'
# LDAP variables
#ENV['LDAP_TREEBASE'] ||= "dc=drqueue, dc=org"
#ENV['LDAP_HOST'] ||= "SERVER"
#ENV['LDAP_PORT'] ||= "389"
#ENV['LDAP_FILTER'] ||= "uid"
#ENV['LDAP_ATTRS'] ||= "mail,cn"
# protocol for webserver (HTTP, HTTPS)
ENV['WEB_PROTO'] ||= "http"
# user status, quota (disk space in GB), job priorities
ENV['USER_STATUS'] ||= "demo,student,advanced,admin"
ENV['USER_QUOTA'] ||= "0.5,5,15,35"
ENV['USER_PRIO'] ||= "100,500,750,1000"
ENV['USER_ADMIN_PW'] ||= "changeme"
# text for login dialog
ENV['LOG_SHOW_USER'] ||= "account name"
ENV['LOG_SHOW_PW'] ||= "password"
# owner and group of DrQueueOnRails instance
ENV['DQOR_USER'] ||= "drqueueonrails"
ENV['DQOR_GROUP'] ||= "drqueueonrails"
rake db:migrate
mkdir /usr/local/drqueue/tmp/user_filecache
mkdir /usr/local/drqueue/tmp/dist_filecache
vi /etc/rc.d/rc.local
su - drqueueonrails -c "/usr/local/bin/ruby /home/drqueueonrails/script/server >> /dev/null &"
reboot
其他節點 server
yum -y update
yum -y install libXp
vi /etc/hosts
192.168.10.242 master.jason-tang.com master
192.168.10.234 slave1.jason-tang.com slave1
192.168.10.244 slave2.jason-tang.com slave2
mkdir /usr/local/drqueue
mkdir /usr/autodesk
vi /root/.bashrc
PATH=${PATH}:/usr/local/drqueue/bin
export PATH
export DRQUEUE_ROOT=/usr/local/drqueue
export DRQUEUE_MASTER=192.168.10.242
vi /etc/rc.d/rc.local
mount 192.168.10.242:/usr/local/drqueue /usr/local/drqueue
mount 192.168.10.242:/usr/autodesk /usr/autodesk
PATH=${PATH}:/usr/local/drqueue/bin
export PATH
export DRQUEUE_ROOT=/usr/local/drqueue
export DRQUEUE_MASTER=192.168.10.242
/usr/local/drqueue/bin/slave &
reboot