Index: /sandbox/doc-expressolivre/arquivos/scripts/http.sh
===================================================================
--- /sandbox/doc-expressolivre/arquivos/scripts/http.sh	(revision 2245)
+++ /sandbox/doc-expressolivre/arquivos/scripts/http.sh	(revision 2256)
@@ -2,25 +2,64 @@
 # APACHE
 
-http-debian-etch ()
+expresso ()
 {
-	http-debian-lenny
+	# Copia o Expresso para o diretÃ³rio indicado como parÃ¢metro
+	cp -r `dirname `pwd`` $1
+	# Requisita a senha
+	get_pass
+	HEADER_PWD=`php $ARQS/scripts/pass.php $LDAP_PWD`
+	sed -e "s/HEADER_PWD/$HEADER_PWD/g" $ARQS/header.inc.php > $1/header.inc.php
+	# Copia o mkntpwd para o home do Expresso
+	mkdir -p /home/expressolivre
+	cp $ARQS/home/expressolivre/* /home/expressolivre/
 }
 
-http-debian-lenny ()
+http_debian-lenny ()
 {
-	apt-get install -y apache2-mpm-prefork libapache2-mod-php5 apache2-utils php5 php5-common php5-dev php5-gd php5-imap php5-ldap php5-pgsql php5-cgi php5-cli
-	# Copia os arquivos do Expresso Livre	
-	expresso
+	# Instala o apache2 juntamente com o PHP5 e seus respectivos mÃ³dulos
+	apt-get install -y apache2-mpm-prefork libapache2-mod-php5 apache2-utils \
+		php5 php5-common php5-dev php5-gd php5-imap php5-ldap php5-pgsql php5-cgi php5-cli php5-xmlrpc \
+		zip unzip
+	# Copia os arquivos do Expresso Livre
+	expresso /var/www/
 	chown -R www-data:www-data /var/www/expresso /home/expressolivre
 
-	# Copia a configuraÃ§Ã£o do servidor http
-	cp ./arqs-conf-rhel5/etc/httpd/conf/httpd.conf /etc/httpd/conf/
-	cp ./arqs-conf-rhel5/etc/httpd/conf.d/expresso.conf /etc/httpd/conf.d/
-	cp ./arqs-conf-rhel5/etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/
-	cp ./arqs-conf-rhel5/etc/php.ini /etc/
+	# descomente para gerar o certificado para o https
+	#apache2-ssl-certificate;
+	a2enmod rewrite
 
+	# Copia a configuraÃ§Ã£o do servidor apache2
+	cp -a debian/lenny/etc/apache2/apache2.conf /etc/apache2/
+	cp -a debian/lenny/etc/apache2/ports.conf /etc/apache2/
+	cp -a debian/lenny/etc/apache2/sites-available/default /etc/apache2/sites-available/
+	cp -a debian/lenny/etc/apache2/ssl/ /etc/apache2/
+
+	# Copia a configuraÃ§Ã£o do PHP
+	cp -a debian/lenny/php.ini /etc/php5/apache2/
 
 	#mkdir /php_sessions/ || { echo "DiretÃ³rio jÃ¡ existe. [OK]"; }
 	#chmod -R 777 /php_sessions/
+
+	/etc/init.d/apache2 restart
+}
+
+http_debian-etch ()
+{
+	http_debian-lenny
+}
+
+http_rhel5 ()
+{
+	yum -y install httpd mod_ssl \
+		php php-cli php-ldap php-pgsql php-imap php-mbstring php-gd php-xml \
+		unzip zip
+
+	expresso /var/www/html/
+	chown -R apache:apache /var/www/html/expresso /home/expressolivre
+
+	cp -a rhel5/etc/httpd/conf/httpd.conf /etc/httpd/conf/
+	cp -a rhel5/etc/httpd/conf.d/expresso.conf /etc/httpd/conf.d/
+	cp -a rhel5/etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/
+	cp -a rhel5/etc/php.ini /etc/
 
 	service httpd restart
@@ -28,12 +67,35 @@
 }
 
-expresso ()
+http_sles10 ()
 {
-	cp -a `dirname `pwd`` /var/www/
-		
-	#TODO: Verificar erro:
-	sed -e "s/HEADER_PWD/$HEADER_PWD/g" ./generico/header.inc.php > /var/www/expresso/header.inc.php
+	yast -i apache2 apache2-prefork apache2-mod_php5 \
+		php5 php5-devel php5-gd php5-imap php5-ldap php5-pgsql php5-fastcgi php5-mbstring php5-pear-auth \
+		zip unzip
 
-	mkdir /home/expressolivre
-	cp ./generico/home/expressolivre/* /home/expressolivre/
+	a2enmod rewrite;
+
+	### Se jÃ¡ existir uma instalaÃ§Ã£o no expresso no apache, ela serÃ¡ removida.
+	rm -Rf /srv/www/htdocs/expresso/
+
+	### Copia dos arquivos do expresso para o apache. Seta as permissÃµes corretas.
+	cp -R -p ../../../expresso/ /srv/www/htdocs/
+	chown -R wwwrun:www /srv/www/htdocs/expresso/
+
+	### Troca os arquivos de configuraÃ§Ã£o do apache pelos corretos do Expresso.
+	cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.bkpexpresso
+	cp ./arqs-conf-suse/etc/apache2/httpd.conf /etc/apache2/
+
+	cp /etc/apache2/server-tuning.conf /etc/apache2/server-tuning.conf.bkpexpresso
+	cp ./arqs-conf-suse/etc/apache2/server-tuning.conf /etc/apache2/
+	cp ./arqs-conf-suse/etc/apache2/vhosts.d/expresso.conf /etc/apache2/vhosts.d/
+
+	cp /etc/apache2/sysconfig.d/global.conf /etc/apache2/sysconfig.d/global.conf.bkpexpresso
+	cp ./arqs-conf-suse/etc/apache2/sysconfig.d/global.conf /etc/apache2/sysconfig.d/
+
+	### Troca o arquivo de configuraÃ§Ãµes do PHP com as exigÃªncias do Expresso.
+	cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.bkpexpresso
+	cp ./arqs-conf-suse/etc/php5/apache2/php.ini /etc/php5/apache2/
+
+	### Reinicia o apache.
+	rcapache2 restart
 }
Index: /sandbox/doc-expressolivre/arquivos/scripts/ini.sh
===================================================================
--- /sandbox/doc-expressolivre/arquivos/scripts/ini.sh	(revision 2254)
+++ /sandbox/doc-expressolivre/arquivos/scripts/ini.sh	(revision 2256)
@@ -13,5 +13,5 @@
 
 	# Instala o dialog e debconf-utils
-	#aptitude -y install debconf-utils || { echo "Falha ao instalar o pacote do debconf-utils!" ; exit 1; }
+	#aptitude -y install debconf-utils openssl vim || { echo "Falha ao instalar o pacote do debconf-utils!" ; exit 1; }
 
 	# Mudamos o debconf para critical, para que nÃ£o sejam feitas perguntas desnecessÃ¡rias.
@@ -21,5 +21,31 @@
 ini_rhel5 ()
 {
+	LANG=pt_BR.UTF-8
+	LC_TELEPHONE=pt_BR.UTF-8
+	LC_CTYPE=pt_BR.UTF-8
+	LANGUAGE=pt_BR:pt_PT:pt
+	LC_MONETARY=pt_BR.UTF-8
+	LC_ADDRESS=pt_BR.UTF-8
+	LC_COLLATE=pt_BR.UTF-8
+	LC_PAPER=pt_BR.UTF-8
+	LC_NAME=pt_BR.UTF-8
+	LC_NUMERIC=pt_BR.UTF-8
+	SYSFONT=lat1-16
+	LC_MEASUREMENT=pt_BR.UTF-8
+	LC_TIME=pt_BR.UTF-8
+	LC_IDENTIFICATION=pt_BR.UTF-8
+	LC_MESSAGES=pt_BR.UTF-8
 
+	export LC_TELEPHONE LC_CTYPE LANGUAGE LC_MONETARY LC_ADDRESS LC_COLLATE LC_PAPER LC_NAME LC_NUMERIC SYSFONT LC_MEASUREMENT LC_TIME LANG LC_IDENTIFICATION LC_MESSAGES
+
+	# Deixa o SELinux permissivo
+	cp -f rhel5/etc/selinux/config /etc/selinux/config
+	setenforce 0
+	# Desativa o sendmail
+	service sendmail stop
+	chkconfig --del sendmail
+	yum -y erase sendmail
+
+	yum -y install openssl vim
 }
 
@@ -31,4 +57,5 @@
 ini_sles11 ()
 {
-
+	echo "TODO: Ã necessÃ¡rio alguma inicializaÃ§Ã£o para SLES?"
+	yast -i openssl vim
 }
Index: /sandbox/doc-expressolivre/arquivos/scripts/pass.php
===================================================================
--- /sandbox/doc-expressolivre/arquivos/scripts/pass.php	(revision 2256)
+++ /sandbox/doc-expressolivre/arquivos/scripts/pass.php	(revision 2256)
@@ -0,0 +1,6 @@
+#!/usr/bin/php -q
+<?php
+	global $argv;
+	$pass = $argv[1];
+	echo md5($pass);
+?>
