-
Notifications
You must be signed in to change notification settings - Fork 7
Tutorial para instalação no Amazon EC2
Leandro Salvador edited this page Jul 15, 2014
·
4 revisions
Criar conta gratuita na Amazon Web Services (AWS) Elastic Compute Cloud (Amazon EC2) http://aws.amazon.com/pt/ec2/
Instalar WordPress powered by Bitnami no EC2
- conforme: https://aws.amazon.com/marketplace/pp/B007IP8BKQ
- escolher região: South America (Sao Paulo)
- escolher EC2 Instance Type: t1.micro
Voltar para o AWS Management Console
- conforme: https://bitnami.com/aws-credentials
- abrir https://console.aws.amazon.com/ec2/home?region=sa-east-1
- copiar senha do WordPress: Actions / Get System Log / Procurar pela string "Setting Bitnami application password to 'XPTOXPTOXPTO'"
Empacotar tema pdm-andamento
- conforme: https://github.com/prefeiturasp/programa-de-metas-wp
- baixar em ZIP todo o conteúdo: Download ZIP (na coluna da direita) --> programa-de-metas-wp-master.zip
- abrir o ZIP e extrair o diretório: /programa-de-metas-wp-master/wp-content/themes/pdm-andamento/
- criar ZIP com conteúdo do diretório pdm-andamento --> pdm-andamento.zip
Subir tema pdm-andamento pro WordPress
- acessar a interface de administração do WordPress: http://IP
- clicar em Acessar Meu Aplicativo / Log in
- usuário: user
- senha: copiada do 'System Log' em etapa anterior
- Appearance / Themes / Add New Theme / Upload Theme / selecionar o arquivo pdm-andamento.zip
Instalar o Composer
- conforme: https://getcomposer.org/doc/00-intro.md / seção 'Installation - *nix'
- no SSH:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Instalar o Node.js
- conforme: http://www.rosehosting.com/blog/how-to-install-the-latest-versions-of-node-js-and-bower-on-ubuntu-13-10/
- no SSH:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gcc cpp g++ automake1.9 autoconf libtool flex bison python-software-properties
cd /usr/local/src
sudo wget http://nodejs.org/dist/node-latest.tar.gz
sudo tar zxvf node-latest.tar.gz
cd node-v0.1*
sudo ./configure
sudo make
sudo make install
Conectar Wordpress ao GitHub via SSH
- conforme: https://help.github.com/articles/generating-ssh-keys
- (apenas para referência: https://help.github.com/articles/working-with-ssh-key-passphrases)
- no SSH:
ssh-keygen -t rsa -C "[email protected]"
# Enter file in which to save the key (/home/bitnami/.ssh/id_rsa): [Press enter]
# Enter passphrase (empty for no passphrase):
# Enter same passphrase again:
eval "$(ssh-agent -s)"
# Agent pid 59566
ssh-add ~/.ssh/id_rsa
cp ~/.ssh/id_rsa.pub /home/bitnami/
baixar o arquivo /home/bitnami/id_rsa.pub para computador local
https://github.com / Account settings / SSH keys / Add SSH key --> https://github.com/settings/ssh
- no SSH:
ssh -T [email protected]
Instalar o Bower
- conforme: http://www.rosehosting.com/blog/how-to-install-the-latest-versions-of-node-js-and-bower-on-ubuntu-13-10/
- no SSH:
sudo apt-get install git-core
sudo npm cache clean
sudo npm install -g bower
Atualizar dependências do tema pdm-andamento
- no SSH:
cd /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/pdm-andamento
composer install
bower install
Instalar tema pdm-andamento no WordPress
- instalar o plugin Timber --> https://downloads.wordpress.org/plugin/timber-library.0.20.1.zip
- ativar o tema 'Andamento do programa de metas' --> Appearance / Themes / Activate
- configurar o tema: Dashboard / Customize Your Site --> http://IP/wordpress/wp-admin/customize.php / Static Front Page / Front page displays: A static page / Front page: Sample Page / Posts page: Sample Page / Save & Publish
- configurar o endereço da API --> Appearance / Configurações / Endereço da API: ?????????????????
FIM