Changeset 2256 for sandbox/doc-expressolivre/arquivos/scripts/http.sh
- Timestamp:
- 03/15/10 17:04:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/doc-expressolivre/arquivos/scripts/http.sh
r2245 r2256 2 2 # APACHE 3 3 4 http-debian-etch()4 expresso () 5 5 { 6 http-debian-lenny 6 # Copia o Expresso para o diretório indicado como parâmetro 7 cp -r `dirname `pwd`` $1 8 # Requisita a senha 9 get_pass 10 HEADER_PWD=`php $ARQS/scripts/pass.php $LDAP_PWD` 11 sed -e "s/HEADER_PWD/$HEADER_PWD/g" $ARQS/header.inc.php > $1/header.inc.php 12 # Copia o mkntpwd para o home do Expresso 13 mkdir -p /home/expressolivre 14 cp $ARQS/home/expressolivre/* /home/expressolivre/ 7 15 } 8 16 9 http -debian-lenny ()17 http_debian-lenny () 10 18 { 11 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 12 # Copia os arquivos do Expresso Livre 13 expresso 19 # Instala o apache2 juntamente com o PHP5 e seus respectivos módulos 20 apt-get install -y apache2-mpm-prefork libapache2-mod-php5 apache2-utils \ 21 php5 php5-common php5-dev php5-gd php5-imap php5-ldap php5-pgsql php5-cgi php5-cli php5-xmlrpc \ 22 zip unzip 23 # Copia os arquivos do Expresso Livre 24 expresso /var/www/ 14 25 chown -R www-data:www-data /var/www/expresso /home/expressolivre 15 26 16 # Copia a configuração do servidor http 17 cp ./arqs-conf-rhel5/etc/httpd/conf/httpd.conf /etc/httpd/conf/ 18 cp ./arqs-conf-rhel5/etc/httpd/conf.d/expresso.conf /etc/httpd/conf.d/ 19 cp ./arqs-conf-rhel5/etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ 20 cp ./arqs-conf-rhel5/etc/php.ini /etc/ 27 # descomente para gerar o certificado para o https 28 #apache2-ssl-certificate; 29 a2enmod rewrite 21 30 31 # Copia a configuração do servidor apache2 32 cp -a debian/lenny/etc/apache2/apache2.conf /etc/apache2/ 33 cp -a debian/lenny/etc/apache2/ports.conf /etc/apache2/ 34 cp -a debian/lenny/etc/apache2/sites-available/default /etc/apache2/sites-available/ 35 cp -a debian/lenny/etc/apache2/ssl/ /etc/apache2/ 36 37 # Copia a configuração do PHP 38 cp -a debian/lenny/php.ini /etc/php5/apache2/ 22 39 23 40 #mkdir /php_sessions/ || { echo "Diretório já existe. [OK]"; } 24 41 #chmod -R 777 /php_sessions/ 42 43 /etc/init.d/apache2 restart 44 } 45 46 http_debian-etch () 47 { 48 http_debian-lenny 49 } 50 51 http_rhel5 () 52 { 53 yum -y install httpd mod_ssl \ 54 php php-cli php-ldap php-pgsql php-imap php-mbstring php-gd php-xml \ 55 unzip zip 56 57 expresso /var/www/html/ 58 chown -R apache:apache /var/www/html/expresso /home/expressolivre 59 60 cp -a rhel5/etc/httpd/conf/httpd.conf /etc/httpd/conf/ 61 cp -a rhel5/etc/httpd/conf.d/expresso.conf /etc/httpd/conf.d/ 62 cp -a rhel5/etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ 63 cp -a rhel5/etc/php.ini /etc/ 25 64 26 65 service httpd restart … … 28 67 } 29 68 30 expresso()69 http_sles10 () 31 70 { 32 cp -a `dirname `pwd`` /var/www/ 33 34 #TODO: Verificar erro: 35 sed -e "s/HEADER_PWD/$HEADER_PWD/g" ./generico/header.inc.php > /var/www/expresso/header.inc.php 71 yast -i apache2 apache2-prefork apache2-mod_php5 \ 72 php5 php5-devel php5-gd php5-imap php5-ldap php5-pgsql php5-fastcgi php5-mbstring php5-pear-auth \ 73 zip unzip 36 74 37 mkdir /home/expressolivre 38 cp ./generico/home/expressolivre/* /home/expressolivre/ 75 a2enmod rewrite; 76 77 ### Se já existir uma instalação no expresso no apache, ela será removida. 78 rm -Rf /srv/www/htdocs/expresso/ 79 80 ### Copia dos arquivos do expresso para o apache. Seta as permissões corretas. 81 cp -R -p ../../../expresso/ /srv/www/htdocs/ 82 chown -R wwwrun:www /srv/www/htdocs/expresso/ 83 84 ### Troca os arquivos de configuração do apache pelos corretos do Expresso. 85 cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.bkpexpresso 86 cp ./arqs-conf-suse/etc/apache2/httpd.conf /etc/apache2/ 87 88 cp /etc/apache2/server-tuning.conf /etc/apache2/server-tuning.conf.bkpexpresso 89 cp ./arqs-conf-suse/etc/apache2/server-tuning.conf /etc/apache2/ 90 cp ./arqs-conf-suse/etc/apache2/vhosts.d/expresso.conf /etc/apache2/vhosts.d/ 91 92 cp /etc/apache2/sysconfig.d/global.conf /etc/apache2/sysconfig.d/global.conf.bkpexpresso 93 cp ./arqs-conf-suse/etc/apache2/sysconfig.d/global.conf /etc/apache2/sysconfig.d/ 94 95 ### Troca o arquivo de configurações do PHP com as exigências do Expresso. 96 cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.bkpexpresso 97 cp ./arqs-conf-suse/etc/php5/apache2/php.ini /etc/php5/apache2/ 98 99 ### Reinicia o apache. 100 rcapache2 restart 39 101 }
Note: See TracChangeset
for help on using the changeset viewer.