[Script] Owncloud Instalação automatica

Scripts para automa
Avatar do usuário
r0n4ld0
Administrator
Administrator
Mensagens: 107
Registrado em: 10 Jun 2013 12:29
Localização: Fortaleza
Status: Offline

[Script] Owncloud Instalação automatica

Mensagem por r0n4ld0 »

Este script realiza a instalação dos seguinte componentes:

Apache
PHP
Owncloud
Sqlite

Sistema testado e Homologado para "CENTOS 6"
Imagem
#!/bin/bash
#  Autor: Ronaldo davi
#  Forum ITBR www.itbr.org
#  Script de instalacao
#  Instalacao do sistema Owncloud
#  Homologado para Centos 6

yum install wget -y
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositori ... unity.repo
rpm -Uvh http://download.fedoraproject.org/pub/e ... noarch.rpm

echo "Deseja desabilitar o firewall? (s ou n)?"
read resposta
if [[ $resposta = "s" ]]; then
#Configurando firewall
/etc/init.d/iptables save
/etc/init.d/iptables stop
chkconfig iptables off
fi

echo "Selinux temporariamente Desabilitado(recomendado) (s ou n)?"
read resposta
if [[ $resposta = "s" ]]; then
setenforce 0
fi

echo "Atualizar sistema ? (s ou n)?"
read resposta
if [[ $resposta = "s" ]]; then
#Atualizando
yum update -y
fi

echo "Instalar Apache (s ou n)?"
read resposta
if [[ $resposta = "s" ]]; then
#Instalar Apache
yum install httpd -y
yum install httpd php php-mysql sqlite php-dom php-mbstring gd gd-devel php-gd php-pdo -y
chkconfig httpd on
fi

echo "Configurar httpd.conf (s ou n)?"
read resposta
if [[ $resposta = "s" ]]; then
#Adcionar Local host
echo "ServerName localhost" >> /etc/httpd/conf/httpd.conf
fi

yum install owncloud -y
service httpd start

echo "Selinux Desabilitado permanente(recomendado) (s ou n)?"
read resposta
if [[ $resposta = "s" ]]; then
#Desabilitando Permanentemente Selinux
FILE=/etc/sysconfig/selinux
echo "disabling SELinux"
echo "making backup to /tmp/"
cp $FILE /tmp
cat << EOF > $FILE
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
EOF
echo "done!"
fi
Em anexo script completo basta baixar dentro do centos e executar responder as perguntar solicitadas e pronto
Imagem
Você não está autorizado a ver ou baixar esse anexo.
Editado pela última vez por r0n4ld0 em 14 Set 2013 07:59, em um total de 1 vez.


________________________
Atenciosamente,
Ronaldo davi

Fortaleza CE - Brasil

Voltar para “Scripts”