安裝 OpenMeetings 於 Linode VPS (CentOS 5.4 64-bit)
原作者說明(文章發表日2010-05-21 22:21:51):
「最近把主機換到Linode VPS後,發現 OpenMeetings 也更新了版本,於是就跟著修改了 OpenMeetings 的自動安裝程式,主要是增加對 64 位元作業系統的支援, 並且增加安裝中文字型,以解決轉檔時出現中文字型變成問號的問題,這次的自動安裝程式可以在新增好一個新的Linode VPS CentOS 5.4 後直接執行,大約只需要花 15 分鐘就可以完成安裝。」
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
#!/bin/bash # Name: openmeetings.sh # Author: Andowson Chang (andowson [at] gmail [dot] com) # Version: 1.3 # Since: 2009-05-10 # Last Modified: 2010-05-17 # Modify here for newer version (版本有異動時,請自行異動) SWFTOOLS_VERSION=0.9.0 FFMPEG_VERSION=0.5.1 SOX_VERSION=14.3.1 FLASH_PLAYER_VERSION=10.0.45.2 OPENMEETINGS_VERSION=1_1_r3087 # install PostgreSQL (安裝資料庫) yum -y install postgresql-server /etc/init.d/postgresql start sed -i -e "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /var/lib/pgsql/data/postgresql.conf sed -i -e "s/local all all ident sameuser/local all all trust/g" /var/lib/pgsql/data/pg_hba.conf sed -i -e "s/host all all 127.0.0.1\/32 ident sameuser/host all all 127.0.0.1\/32 md5/g" /var/lib/pgsql/data/pg_hba.conf chkconfig --level 235 postgresql on /etc/init.d/postgresql restart # # install openoffice-service running on port 8100 in headless mode (安裝 openoffice-service) # yum -y install openoffice.org-base openoffice.org-headless openoffice.org-writer openoffice.org-impress openoffice.org-calc # # generate openoffice startup script (產生 openoffice 啟動指令檔) # echo '#!/bin/bash # openoffice.org headless server script # # chkconfig: 2345 80 30 # description: headless openoffice server script # processname: openoffice # # Author: Vic Vijayakumar # Modified by Federico Ch. Tomasczik, Andowson Chang # # Source function library. . /etc/rc.d/init.d/functions if [ "`uname -p | grep 64`" != "" ]; then OOo_HOME=/usr/lib64/openoffice.org3/program else OOo_HOME=/usr/lib/openoffice.org3/program fi SOFFICE_PATH=$OOo_HOME/soffice.bin PIDFILE=/var/run/openoffice-server.pid set -e case "$1" in start) if [ -f $PIDFILE ]; then echo "OpenOffice headless server has already started." sleep 5 exit fi echo "Starting OpenOffice headless server" $SOFFICE_PATH -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1 touch $PIDFILE ;; stop) if [ -f $PIDFILE ]; then echo "Stopping OpenOffice headless server." killall -9 soffice.bin rm -f $PIDFILE exit fi echo "Openoffice headless server is not running." exit ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0' > /etc/init.d/openoffice chmod 755 /etc/init.d/openoffice chkconfig --level 235 openoffice on /etc/init.d/openoffice start # # install ImageMagick(=>GhostScript will be installed as dependency) (安裝ImageMagick) # yum -y install ImageMagick yum -y install make gcc gcc-c++ # # install SWFTools (安裝SWFTools) # yum -y install giflib-devel libjpeg-devel freetype-devel if [ ! -r swftools-${SWFTOOLS_VERSION}.tar.gz ]; then wget http://www.swftools.org/swftools-${SWFTOOLS_VERSION}.tar.gz fi tar zxvf swftools-${SWFTOOLS_VERSION}.tar.gz cd swftools-* ./configure make make install cd .. # # install FFmpeg (安裝 FFmpeg) # if [ ! -r ffmpeg-${FFMPEG_VERSION}.tar.bz2 ]; then wget http://www.ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 fi tar jxvf ffmpeg-${FFMPEG_VERSION}.tar.bz2 cd ffmpeg-* ./configure make make install cd .. # # install SoX (Version > 12.xx) (安裝 SoX) # if [ ! -r sox-${SOX_VERSION}.tar.gz ]; then wget http://sourceforge.net/projects/sox/files/sox/${SOX_VERSION}/sox-${SOX_VERSION}.tar.gz/download fi tar zxvf sox-${SOX_VERSION}.tar.gz cd sox-* ./configure make make -s && make install cd .. # # install Flash player 10 (安裝 Flash Player) # rpm -Uvh http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-${FLASH_PLAYER_VERSION}-release.i386.rpm # # install Chinese Font(reboot if needed) (安裝中文字型,可能需要重開機) # yum -y install fonts-chinese fonts-ISO8859-2-75dpi service xfs restart # # install OpenMeetings with Red5 (連同 red5 一起安裝 OpenMeeting) # if [ ! -r openmeetings_${OPENMEETINGS_VERSION}.zip ]; then wget http://openmeetings.googlecode.com/files/openmeetings_${OPENMEETINGS_VERSION}.zip fi unzip openmeetings_${OPENMEETINGS_VERSION}.zip -d /var # modify hibernate.cfg.xml cd /var/red5/webapps/openmeetings/conf cp -fp postgres_hibernate.cfg.xml hibernate.cfg.xml sed -i -e '7c\ <session-factory>' hibernate.cfg.xml sed -i -e '9c\ <property name="connection.username">openmeetings</property>' hibernate.cfg.xml sed -i -e '10c\ <property name="connection.password">openmeetings</property>' hibernate.cfg.xml # # create user and database openmeetings (建立 OpenMeetings 的帳號及資料庫) # sudo -u postgres psql -c "create user openmeetings with encrypted password 'openmeetings' createdb;" template1 sudo -u postgres psql -c "create database openmeetings with encoding 'unicode';" -U openmeetings template1 sudo -u postgres psql -c "alter user openmeetings nocreatedb;" template1 # # start up red5 (啟動 red5) # chmod 755 /var/red5/red5*.sh cd /var/red5 nohup ./red5.sh & echo "SWFTools Path: `which pdf2swf`" echo "ImageMagick Path: `which convert`" echo "FFMPEG Path: `which ffmpeg`" echo "SoX Path: `which sox`" </session-factory> |
如果有找不到檔案問題,請修改/etc/sysconfig/i18n
1 2 |
LANG="zh_TW.UTF-8" SUPPORTED="zh_TW.UTF-8:zh_TW:zh" |
1 2 |
ProxyPass /openmeetings http://localhost:5080/openmeetings ProxyPassReverse /openmeetings http://localhost:5080/openmeetings |
安裝完成或日後升級OpenMeetings後,建議執行reboot重新開機。