Last active
September 10, 2015 13:54
-
-
Save iagodahlem/33ea5177c57f3122ba1c to your computer and use it in GitHub Desktop.
Instalação e configuração de softwares para desenvolvimento Web.
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
1.Coisas Básicas | |
sudo apt-get install vim git curl python-software-properties | |
2.ZSH | OH-MY-ZSH | |
sudo apt-get install zsh | |
zsh --version | |
chsh -s /usr/bin/zsh | |
Reiniciar Sessão | |
echo $SHELL | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
3.Web Server Instalação | |
sudo apt-get install nginx | |
sudo apt-get install mysql-server | |
mysql_secure_installation | |
sudo add-apt-repository ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get install php5-fpm php5-mysql php5-cli php5-curl | |
4.Sublime Text 3 | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
sudo apt-get update | |
sudo apt-get install sublime-text-installer | |
subl | |
5.Configuração Web Server e seus Componentes | |
Configurando PHP pra rodar bem com o Nginx | |
cd /etc/php5/fpm | |
sudo subl php.ini | |
Alterar a Linha 773 | |
cgi.fix_pathinfo=0 | |
Configurando Virtual Host (URL Interna) | |
Aplicar Entrada | |
cd /etc/ | |
sudo subl hosts | |
Aplicar nova entrada | |
127.0.0.1 CHANGEME.app | |
Adicionar Caminho ao Nginx | |
cd etc/nginx | |
cd sites-available/ | |
sudo subl CHANGEME.app.conf | |
Adicionar | |
server { | |
listen 80; | |
server_name CHANGEME.app; | |
root /var/www/vhosts/CHANGEME.app/public; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
access_log off; | |
error_log /var/log/nginx/CHANGEME.app-error.log error; | |
error_page 404 /index.php; | |
sendfile off; | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_intercept_errors on; | |
fastcgi_buffer_size 16k; | |
fastcgi_buffers 4 16k; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} | |
sudo mkdir -p /var/www/vhosts/CHANGEME.app/public | |
sudo subl /var/www/vhosts/CHANGEME.app/public/index.php | |
<?php phpinfo(); ?> | |
cd etc/nginx/sites-enabled | |
ln -s ../site-available/CHANGEME.app.conf | |
service nginx restart | |
service php5-fpm restart | |
php5enmod mysql | |
service nginx restart | |
service php5-fpm restart | |
Apontar a pasta Vhosts com um link simbólico | |
cd var/www/ | |
sudo rm -Rf vhosts/ | |
sudo mkdir -p ~/vhosts/CHANGEME.app/public | |
sudo ln -s ~/vhosts/ | |
cd ~/vhosts/CHANGEME.app/public | |
sudo subl index.php | |
teste | |
Mudando permissões da pasta do projeto CHANGEME.app | |
cd ~/vhosts/ | |
sudo chown -R www-data:www-data CHANGEME.app/ | |
sudo chown -R iago:www-data CHANGEME.app | |
Instalando Outras Ferramentas | |
sudo apt-get install nodejs | |
nodejs -v | |
sudo apt-get install npm | |
npm -v | |
Configurar nodejs para responder como node | |
cd /usr/bin/ | |
ln -s nodejs node | |
npm install -g bower | |
bower -v | |
npm install -g grunt | |
grunt -v | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment