Last active
October 5, 2015 06:17
-
-
Save marcosbrasil/2762183 to your computer and use it in GitHub Desktop.
Instalação dos Principais elementos do LAMP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "###############################################################\n" | |
echo "Instalacao dos componentes: Apache2 / php5 / mysql / phpmyadmin\n" | |
echo "###############################################################\n" | |
apt-get update | |
apt-get -yV install apache2 | |
apt-get -yV install php5 php5-mysql php5-curl php5-gd php5-mcrypt | |
apt-get -yV install mysql-server mysql-client | |
#habilitando mod_rewrite do apache | |
a2enmod rewrite | |
/etc/init.d/apache2 restart | |
#Baixando, descompactando e renomeando phpMyAdmin-3.5.2-all-languages | |
cd /var/www/ | |
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.0.5/phpMyAdmin-4.0.5-all-languages.tar.gz | |
tar -vzxf phpMyAdmin-4.0.5-all-languages.tar.gz | |
mv phpMyAdmin-4.0.5-all-languages phpmyadmin | |
rm phpMyAdmin-4.0.5-all-languages.tar.gz | |
#Criando phpinfo() para verificacao da instalacao | |
rm index.html | |
touch index.php | |
index_path='/var/www/index.php' | |
echo '<html><head><title>Lamp-install test</title></head><body><center><h2>Its works! =D</h2></center><?php phpinfo(); ?></body></html>'>>$index_path | |
#abrindo o navegador para verificar a instalacao | |
#x-www-browser http://localhost/index.php | |
echo '\n\n###################################################\n' | |
echo "A instalacao terminou...!\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment