windows: instalar apache 2.4, mysql 5.6.x + php 5.6.x - libs oracle e xdebug

33
2014 Tutorial de Instalação Windows 32bits – Apache, PHP e MySQL So2wares: Apache 2.4.x PHP 5.6.x MySQL 5.6.x Bruno Gastaldi @bgastaldi Iniciar Libs: Oracle Xdebug

Upload: bruno-gastaldi

Post on 28-Jan-2018

11.994 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

2014  Tutorial  de  Instalação  Windows  32bits  –  Apache,  PHP  e  MySQL  

So2wares:  -­‐  Apache  2.4.x  -­‐   PHP  5.6.x  -­‐   MySQL  5.6.x  

Bruno  Gastaldi  -­‐  @bgastaldi   Iniciar

Libs:  -­‐  Oracle    -­‐   Xdebug  

Page 2: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  Apache  2.4.x  e  PHP  5.6.x  2  

Bruno Gastaldi - @bgastaldi

Download  do  apache  –  URL:  hKp://www.apachelounge.com/download    Atualmente  a  versão  do  apache  é  a  hNpd-­‐2.4.10-­‐win32-­‐VC11.zip  

Extrair  o  arquivo  hKpd-­‐2.4.10-­‐win32-­‐VC11.zip  em  C:\Apache24      Crie  uma  pasta  “Apache24”  na  unidade  “C:\”  e  extraia  os  arquivos  do  ZIP  

Download  do  PHP  –  URL:  hKp://windows.php.net/download    Atualmente  a  versão  do  PHP  é  a  php-­‐5.6.0-­‐Win32-­‐VC11-­‐x86.zip  –  Thread  Safe    

1  

2  

3  

Page 3: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  Apache  2.4.x  e  PHP  5.6.x  3  

Bruno Gastaldi - @bgastaldi

Extrair  o  arquivo  php-­‐5.6.0-­‐Win32-­‐VC11-­‐x86.zip  em  C:\PHP      Crie  uma  pasta  “PHP”  na  unidade  “C:\”  e  extraia  os  arquivos  do  ZIP  4  

Page 4: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  4  

Bruno Gastaldi - @bgastaldi

5  

v  ServerRoot  "C:/Apache24"  

v  Remova  o  “#”  da  linha  #LoadModule  rewrite_module  modules/mod_rewrite.so  

v  As  configurações  da  tag  <Directory  />  devem  ser  as  seguintes:  

 

Configurar  o  Apache  através  do  arquivo  hKpd.conf  Abra  o  arquivo  hKpd.conf  que  está  na  pasta  “C:\  Apache24\conf\”  e  siga  as  configurações  abaixo:  

Page 5: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  5  

Bruno Gastaldi - @bgastaldi

v  OPCIONAL:  Troca  do  diretório  padrão  do  servidor  apache  para  unidade  “D:\”  

v  As  configurações  da  tag    <Directory  "D:/web"  />  ou  <Directory  “C:/Apache24/htdocs“  />  devem  ser  as  seguintes:  

 

Para  

Page 6: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  6  

Bruno Gastaldi - @bgastaldi

v  As  configurações  da  tag    <Files  ".ht*"  />  devem  ser  as  seguintes:  

 

v  As  configurações  da  tag    <IfModule  dir_module>  devem  ser  as  seguintes:  

 

Page 7: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  7  

Bruno Gastaldi - @bgastaldi

v  No  final  do  arquivo  hKpd.conf  adicione  as  seguintes  linhas:  

 

v  As  configurações  da  tag    <Directory  "C:/Apache2.4/cgi-­‐bin"  />  devem  ser  as  seguintes:  

 

Page 8: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  8  

Bruno Gastaldi - @bgastaldi

v  OPCIONAL:  Para  configurar  o  apache  usando  o  virtual  hosts  remova  o  “#”  da  linha    #Include  conf/extra/hKpd-­‐vhosts.conf    do  arquivo  hKpd.conf.  

 Abra  o  arquivo  hKpd-­‐vhosts.conf  que  está  na  pasta  “C:\  Apache24\conf\extra\”  e  defina  as  configurações  abaixo:  

Page 9: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  9  

Bruno Gastaldi - @bgastaldi

Agora  abra  o  arquivo  .hosts  que  está  na  pasta  “C:\WINDOWS\system32\drivers\etc\hosts”  e  defina  as  configurações  abaixo:  

6  Configurar  o  mime.types    Abra  o  arquivo  mime.types  que  está  na  pasta  “C:\  Apache24\conf\”  e  adicione  as  seguintes  linhas  no  final  do  arquivo:  

Page 10: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  PHP  5.6.x  10  

Bruno Gastaldi – @bgastaldi

7  

v  post_max_size  =  20M:  Tamanho  máximo  de  dados  POST  que  o  PHP  irá  aceitar.  

v  ;extension_dir  =  "ext  "  :  Remova  o  “;”  do  início  e  troque  o  caminho  para  "C:\PHP\ext"  

v  upload_max_filesize  =  20M  :  Tamanho  máximo  permiado  para  uploads  de  arquivos  

v  max_file_uploads  =  20:  Número  máximo  de  arquivos  enviados  através  de  um  único  pedido  

v  ;  date.nmezone  =  :  Remova  o  “;”  do  início  e  deixe  date.nmezone  =  'America/Sao_Paulo‘  

v  Para  liberar  as  extensões  (libs)  remova  o  “;”  das  seguintes  linhas:  

 

Configurar  o  PHP  através  do  arquivo  php.ini  Abra  o  arquivo  php.ini-­‐development  que  está  na  pasta  “C:\  PHP”,  renomeie  para    php.ini  e  defina  as  configurações  abaixo:  

Page 11: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  PHP  5.6.x  11  

Bruno Gastaldi – @bgastaldi

Page 12: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  PHP  5.6.x  12  

Bruno Gastaldi – @bgastaldi

v  Copie  os  arquivos  abaixo  que  estão  na  pasta  “C:\PHP”  para  a  pasta  “C:\Apache24\bin\”  

 

Page 13: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  PHP  5.6.x  13  

Bruno Gastaldi – @bgastaldi

v  OPCIONAL:  Para  configurar  o  xdebug  faça  o  download  da  extensão  (lib)  na  seguinte  URL:  hNp://xdebug.org/download.php.  Atualmente  a  versão  da  extensão  é  a  php_xdebug-­‐2.2.5-­‐5.6-­‐vc11.dll    

     

Mova  o  arquivo  php_xdebug-­‐2.2.5-­‐5.6-­‐vc11.dll  para  dentro  da  pasta  “C:\PHP\ext”    No  final  do  arquivo  php.ini  adicione  as  seguintes  linhas:  

Page 14: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  PHP  5.6.x  14  

Bruno Gastaldi – @bgastaldi

v  OPCIONAL:  Para  configurar  o  ORACLE  é  necessário  realizar  o  download  do  Instant  Client  (Windows  32-­‐bit)  na  URL:  hNp://www.oracle.com/technetwork/topics/winso2-­‐085727.html  Atualmente  a  versão  do  instant  cliente  é  a  instantclient-­‐basic-­‐nt-­‐12.1.0.1.0.zip.    

     

Crie  uma  pasta  “instantclient_12_1”  na  unidade  “C:\”  e  extraia  os  arquivos  do  ZIP    Copie  todos  os  arquivos  (exceto  as  pastas  vc10  e  vc11)  da  pasta  “C:\instantclient_12_1”  para  a  pasta  “C:\Apache24\bin\”  

Page 15: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  e  PHP  5.6.x  15  

Bruno Gastaldi – @bgastaldi

8  Adicionar  o  Apache,  PHP  e  o  Instant  Client  o  ulnmo  sendo  opcional  como  variáveis  de  ambiente  do  Windows  .  

Page 16: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  e  PHP  5.6.x  16  

Bruno Gastaldi – @bgastaldi

No  campo  nome  da  variável  digite  PATH  e  no  campo  valor  da  variável  adicione  os  caminhos  das  aplicações:  C:\PHP\php.exe;C:\Apache24;C:\Apache24\bin;C:\instantclient_12_1;  depois  clique  em  OK  até  fechar  todas  as  janelas.  

Page 17: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  e  PHP  5.6.x  17  

Bruno Gastaldi – @bgastaldi

9  Registrar  o  serviço  do  Apache  no  Windows  Abra  o  command  prompt  e  digite  o  comando  C:\apache24\bin\hKpd  -­‐k  install  

Page 18: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  e  PHP  5.6.x  18  

Bruno Gastaldi – @bgastaldi

10  Verificar  se  o  serviço  está  rodando  Abra  o  Services  do  windows  e  verifique  o  apache.  

Page 19: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  Apache  2.4.x  e  PHP  5.6.x  19  

Bruno Gastaldi – @bgastaldi

11  Verificar  se  o  serviço  está  rodando  via  navegador  Abra  o  navegador  e  digite  hKp://localhost  

Page 20: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  20  

Bruno Gastaldi – @bgastaldi

Download  do  MySQL–  URL:  hKp://dev.mysql.com/downloads/windows/installer        Atualmente  a  versão  do  MySQL  é  a  mysql-­‐installer-­‐web-­‐community-­‐5.6.20.0.msi  12  

DICA:  Após  clicar  no  botão  de  download  abrirá  uma  nova  página,  role  a  mesma  até  o  final  e  clique  em  “No  thanks,  just  start  my  download.”  

Page 21: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  21  

Bruno Gastaldi – @bgastaldi

Instalar  o  MySQL  e  o  Workbench  CE  (Opcional)  Execute  o  arquivo  baixado  e  acompanhe  a  sequência  abaixo:    13  

Page 22: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  22  

Bruno Gastaldi – @bgastaldi

Page 23: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  23  

Bruno Gastaldi – @bgastaldi

Page 24: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  24  

Bruno Gastaldi – @bgastaldi

Page 25: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  25  

Bruno Gastaldi – @bgastaldi

Page 26: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  26  

Bruno Gastaldi – @bgastaldi

v  Para  realizar  o  download  do  Microsox  Visual  C++  2010  (Windows  32-­‐bit)  acesse  a  URL:  hNp://www.microso2.com/en-­‐us/download/details.aspx?id=5555.      

     

DICA:  Após  clicar  no  botão  de  download  abrirá  uma  nova  página,  role  a  mesma  até  o  final  e  clique  em  “No  thanks  and  connnue” sem  selecionar  nada.  

Page 27: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  27  

Bruno Gastaldi – @bgastaldi

v  Para  instalar  Microsox  Visual  C++  2010  (Windows  32-­‐bit)  execute  o  arquivo  baixado  e  clique  em  instalar.    

     

Page 28: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  28  

Bruno Gastaldi – @bgastaldi

Page 29: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Instalação  –  MySQL  5.6.x  29  

Bruno Gastaldi – @bgastaldi

Page 30: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  MySQL  5.6.x  30  

Bruno Gastaldi – @bgastaldi

Page 31: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  MySQL  5.6.x  31  

Bruno Gastaldi – @bgastaldi

Page 32: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

Configuração  –  MySQL  5.6.x  32  

Bruno Gastaldi – @bgastaldi

Page 33: Windows: Instalar Apache 2.4, MySQL 5.6.x + PHP 5.6.x - Libs Oracle e Xdebug

FIM  Dúvidas  pelo  TwiNer:  @bgastaldi