Académique Documents
Professionnel Documents
Culture Documents
Revision 01
November 2016
ebm@affilinet.co
Honesty
BITCOIN ETHEREUM
Contents
The guide requires no interpretation, you only need to follow the instructions exactly as laid out and you
will have one of the highest performing sites which increases ranking and indexing with Google.
Signup
The first step is to sign up with Amazon Web Services at http://aws.amazon.com, they require your
credit card but as long as you follow these instructions you will not be charged for the first year.
Download
While waiting for the Amazon AWS account to be activated you will need to download and install
MobaXterm from http://mobaxterm.mobatek.net/ choosing the home edition which is free.
AWS
Once your account is activated log in and you will see the dashboard. On the top right you will see the
dropdown for the region where your instances will be located, the most common is US East 1, North
Virginia USA so choose this. It is complex to change the region once you have created the instances so
please choose carefully.
webdft
GroupName: webdft
Description: Web Default
Inbound: RDP / TCP / PortRange 3389 / Source 0.0.0.0/0
webpub
GroupName: webpub
Description: Web Public
Inbound: HTTP / TCP / PortRange 80 / Source 0.0.0.0/0
webrds
GroupName: webrds
Description: Web Database
Inbound: none
webint
GroupName: webint
Description: Web Internal
Inbound: MySQL / TCP / PortRange 3306 / Source 172.0.0.0/8
Inbound: Custom / TCP / PortRange 6379 / Source 172.0.0.0/8
Instance
Cli k o AMIs o the left, the hoose Pu li i ages f o the d opdo , enter ami-5492ba3c and hit
e te , this should sho the e i sta e RightI age_Ce tOS_ . _ 4_ 4. . _HVM_EBS .
Domain
Now go to your domain hosting provider and create an A record to your website following the
instructions with the IP address of the Elastic IP.
Database
U de Se i es alo g the top li k RDS in the Database section. On the left click on Instances and
hoose Lau h DB I sta e .
Whe lau hed ake a ote of the data ase e dpoi t hi h ill e e d ds.a azo a s. o ,
ignore the :3306.
For the configuration to connect to your new instance enter the following.
You will then see the following screen being logged in to your web instance.
PHP
[root@ip-web ~]# wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-
0.el7.ngx.noarch.rpm
[root@ip-web ~]# rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm
[root@ip-web ~]# curl 'https://setup.ius.io/' -o setup-ius.sh
[root@ip-web ~]# sudo bash setup-ius.sh
[root@ip-web ~]# sudo yum -y install php70u-fpm-nginx php70u-cli php70u-mysqlnd
[root@ip-web ~]# yum -y install php70u-opcache php70u-soap php70u-mbstring php70u-dom php70u-
pdo php70u-mcrypt php70u-gd t1lib
[root@ip-web ~]# yum -y install php70u-intl
[root@ip-web ~]# yum -y install php70u-json
[root@ip-web ~]# yum -y install telnet
Change
;php_admin_value[memory_limit] = 128M
to before save and exit
php_admin_value[memory_limit] = 256M
user nginx;
worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_proxied any;
#gzip_http_version 1.0;
gzip_types text/plain text/css application/javascript application/x-javascript text/xml
application/xml application/xml+rss text/javascript image/jpeg image/jpg image/gif image/png;
set_real_ip_from 127.0.0.1;
real_ip_header X-Real-IP;
include /etc/nginx/conf.d/*.conf;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html;
location / {
index index.html index.htm index.php;
}
location /pydio/data/ {
deny all;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location / {
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
expires 30d;
}
location /help {
location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}
location ~ .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
fastcgi_pass 127.0.0.1:9000; #clientphp;
...
#TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"
TCP_IN = "22,80,443"
Now go to your web ip n.n.n.n/phpmyadmin in a web browser and you will see the log in to your
database. Now login using you webdbadmin username and the password your chose earlier.
Create Database
O the left li k Ne .
Cli k o the uppe left phpM Ad i logo a d hoose Use a ou ts the Add use a ou t . E te
magento as the Use a e a d li k Ge e ate fo a e pass o d, sa e the pass o d fo late . Then
li k Go at the otto ight of the page.
You can now install magento with the database endpoint, and username plus password created in
PHPMyAdmin earlier.
I EC hoose Load Bala es u de Load Bala i g a d C eate Load Bala e . Sele t Classi Load
Bala e a d hoose Co ti ue .
Once the Load Bala e has ee added hoose Close a d ou ill see the DNS a e as si ila to
e l -...el .a azo a s. o . I ou do ai DNS setti gs fo ou do ai p o ide ou eed to
e o e the DNS e t A e o d a d eate a a e e o d ith this e l do ai , you cannot use an
IP as they change so you need to use a subdomain such as www.domain.com for your website. CName
records cannot be in the root.
If you see a blank screen on your website it normally means that your load balancer is not working
correctly. You may have to wait for the server to re-initialize and the load balancer to pick it up.
Common Commands
service nginx restart #restart web server
service php-fpm restart #restart php
sudo reboot #restart the instance
tail /var/log/nginx/error.log #view the last errors
chown -R php-fpm:root /var/lib/php/fpm/session #occasional permission error
chown -R php-fpm:nginx /var/www/home/magento #web application permission error
Database backups are automatic in AWS using this guide, the web instance is not backed up and
recommend you either create an AMI by right-clicking on the left of Amazon AWS in the EC2 screen or
you backup the /var/www/home in to a zip file and download it to your local system when you make
changes.
Fo o figu atio of Mage to i ludi g i stalli g Redis ith ha e a fu the eBook Best P a ti e
Co figu atio of Mage to i ludi g Redis fo Google SEO . This eBook takes ou th ough the steps to
configure on new Magento installation for even higher performance and to index and rank you site
efficiently.