Ubuntu 9.04的Alfresco社区安装程序

Alfresco社区安装程序Ubuntu 9.04

此脚本自动在Ubuntu Server 9.0.4和Ubuntu Desktop 9.0.4上设置Alfresco社区Alfresco是Microsoft Windows和类Unix操作系统的企业内容管理系统。 Alfresco有两种口味 。 Alfresco社区版是免费软件,GPL许可开源和开放标准,但从未正式稳定。 Alfresco企业版是商业/专有许可的开源,开放标准和企业规模。 其设计面向需要高度模块化和可扩展性能的用户。 Alfresco包括内容存储库,用于管理和使用标准门户内容的开箱即用的门户网站框架,提供Microsoft Windows和类Unix操作系统上的文件系统兼容性的CIFS界面,能够通过Apache TomcatLucene索引和jBPM工作流虚拟化webapps和静态站点。 Alfresco系统是使用Java技术开发的。

要求:

Ubuntu 9.0.4服务器或桌面没有Apache的全新安装。 只需要系统的核心,所以在安装Ubuntu服务器时,不要在“ 软件选择 ”菜单(OpenSSH Server除外)中选择LAMP Server那样安装的软件 。 此脚本安装Apache,并期望处理默认配置文件。

提示 :从零开始安装Ubuntu 9.04后,在虚拟机中测试此脚本。 在桥接网络中运行虚拟机(主机和客户机具有相同的子网,并且可以从LAN访问)。

使用以下命令以非root方式运行脚本:

$ chmod +x alfresco-installer-for-ubuntu9.04.sh
$ ./alfresco-installer-for-ubuntu9.04.sh

您将被要求:

1)您的Alfresco服务的DNS名称
2)您的Alfresco服务将收听的IP地址
3)你的LANG
4)等

您的全新Alfresco社区版将通过网络浏览器访问:

http://您的DNS-NAME / alfresco / faces /(admin / admin)
http://你的DNS-NAME / alfresco(guest)

语言包安装: http : //wiki.alfresco.com/wiki/Language_Pack_Installation

脚本内容“alfresco-installer-for-ubuntu9.04.sh”:

#!/bin/bash
echo "Enter the DNS Name of your Alfresco Service (i.e.: www.myalfresco.com): "
echo "Press ENTER for default one (www.myalfresco.com)"
read url
if [ -z "$url" ];
then
url=www.myalfresco.com
fi
echo "\"your DNS Name is\" = "$url""
echo "---------------------------------------------------------------------"


echo "Modifying /etc/hosts file. Enter your IP address: "
echo "Press ENTER for default one (127.0.1.1)"
read ipaddrvar
if [ -z "$ipaddrvar" ];
then
ipaddrvar=127.0.1.1
fi
echo "\"your IP address is\" = "$ipaddrvar""
echo "---------------------------------------------------------------------"


for lang in `apt-cache pkgnames language-pack-gnome- | grep -i base`;
do
array=( "${array[@]}" "$lang" )
done

element_count=${#array[@]}
# Special syntax to extract number of elements in array.
index=0
while [ "$index" -lt "$element_count" ];
do    # List all the elements in the array.
  echo $index.${array[$index]}
  #    ${array[index]} also works because it's within ${ ... } brackets.
  let "index+=1"
done

langnumber=200
array[$langnumber]="language-pack-gnome-es-base"
while [ $langnumber -ge $element_count -o $langnumber -lt 0 ];
do
echo
echo "---------------------------------------------------------"
echo "Please enter the number of your language pack            "
echo "Press ENTER for default one (language-pack-gnome-es-base)"
echo "---------------------------------------------------------"
read langnumber
if [ -z "$langnumber" ];
then
array[0]="language-pack-gnome-es-base"
break
fi
echo
done
LANGTOINSTALL=${array[$langnumber]}
echo "Your selected language pack to install is" $LANGTOINSTALL
echo

# Install the alfresco-community package after activating the "partner" repository in /etc/apt/sources.list :
# $ sudo vi /etc/apt/sources.list
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

sudo sed -i "s/\(^#[[:space:]]*\)\(deb http:\/\/archive.canonical.com\/ubuntu jaunty partner\)/\2/g" /etc/apt/sources.list
sudo sed -i "s/\(^#[[:space:]]*\)\(deb-src http:\/\/archive.canonical.com\/ubuntu jaunty partner\)/\2/g" /etc/apt/sources.list

sudo apt-get update -y
sudo apt-get install alfresco-community -y
sudo /etc/init.d/tomcat6 restart

sudo apt-get -y install $LANGTOINSTALL

sudo apt-get install apache2 -y
sudo a2enmod ssl
sudo a2ensite default-ssl
sudo a2enmod rewrite
sudo a2enmod suexec
sudo a2enmod include
sudo sed -i "s/\(^ServerRoot.*\)/\1\nServerName localhost/g" /etc/apache2/apache2.conf
#Forcing Apache to redirect HTTP traffic to HTTPS
sudo sed -i "s/\(ServerAdmin.*\)/\1\nRedirect \/ https:\/\/$url\//g" /etc/apache2/sites-available/default
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_connect
sudo a2enmod proxy_ftp
HOSTNAME=`hostname -s`
HOSTNAME=$(echo "$HOSTNAME"|tr -d " ")
sudo sed -i "s/\(^127\.0\.1\.1.*\)\($HOSTNAME\).*/#\0\n$ipaddrvar $url $HOSTNAME/g" /etc/hosts
sudo sed -i "s/\(ServerAdmin.*\)/\1\nServerName $url\n\<Proxy \*\>\nOrder deny,allow\nAllow from all\n\<\/Proxy\>\nProxyRequests Off\nProxyPass        \/   http:\/\/127.0.0.1:8080\/\nProxyPassReverse \/   http:\/\/127.0.0.1:8080\//g" /etc/apache2/sites-available/default-ssl
sudo /etc/init.d/apache2 restart
echo "######################################################################################################################"
echo " The installation process will stop here with the following warning if you launch the script through a SSH session:"
echo "           \"This command may affect the current SSH connections. Do you want to continue (y | n)?\""
echo " SOLUTION: Press \"y\" to complete the rest of the process"
echo "######################################################################################################################"
# FIREWALL:
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
clear
echo "######################################################################################################################"
echo " Your Alfresco System can now be reached with a web browser at:"
echo
echo "        http://$url/alfresco/faces/ (admin/admin)"
echo "        http://$url/alfresco (guest)"
echo
echo "Language Pack Installation: http://wiki.alfresco.com/wiki/Language_Pack_Installation"
echo "######################################################################################################################"

此脚本和相关内容可以在以下网址找到: http : //opensourceconsulting.wordpress.com/2009/08/03/alfresco-installation-script-for-ubuntu9-04-sh/

赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏