Categories
aws

AWS Database Types

  • RDS OLTP
    • SQL
    • Oracle
    • MariaDB
    • PostgreSQL
    • MySQL
    • Aurora
  • DynamoDB – No SQL
  • RedShift- OLAP
  • Elasticache- In memory caching
    • Memcached
    • redis

 

The following table shows the IOPS and storage range for each database engine.

Range of Provisioned IOPS Range of Storage Range of IOPS to Storage (GB) Ratio
MySQL 1000 – 30,000 IOPS 100 GB – 6 TB 3:1 – 10:1
MariaDB 1000 – 30,000 IOPS 100 GB – 6 TB 3:1 – 10:1
PostgreSQL 1000 – 30,000 IOPS 100 GB – 6 TB 3:1 – 10:1
Oracle 1000 – 30,000 IOPS 100 GB – 6 TB 3:1 – 10:1
SQL Server Express and Web 1000 – 20,000 IOPS 100 GB – 4 TB 3:1 – 10:1
SQL Server Standard and Enterprise 1000 – 20,000 IOPS 200 GB – 4 TB 3:1 – 10:1

You can modify an existing Oracle, MySQL, or MariaDB DB instance to use Provisioned IOPS storage, and you can modify Provisioned IOPS storage settings.

Elasticache:

Elasticache is a web service that makes it easy to deploy, operate and scale an in-memory cache in the cloud. The service improves the performance of web applications by allowing you to retrive information from fast, managed, in-memory caches, instead of relying entirely on slower disk-based databases. Elasticache supports two open-source in-memory caching engines:

Redshift:

  • single node (160GB)
  • Multi-node
    • Leader node (manages client connections and receives queries).
    • Compute node(store data and perform queries and computations. Up to 128 compute nodes.

 

When replicating data from your primary RDS instance to your secondary RDS instance, what is the charge?

Charge is free

What AWS service is best suited for non relational databases?

DynamoDB

One read capacity unit represents one strongly consistent read per second, or two eventually consistent reads per second, for items up to 4 KB in size. If you need to read an item that is larger than 4 KB, DynamoDB will need to consume additional read capacity units. The total number of read capacity units required depends on the item size, and whether you want an eventually consistent or strongly consistent read.

  • One write capacity unit represents one write per second for items up to 1 KB in size. If you need to write an item that is larger than 1 KB, DynamoDB will need to consume additional write capacity units. The total number of write capacity units required depends on the item size.

DynamoDB uses eventually consistent reads, unless you specify otherwise. Read operations (such as GetItem, Query, and Scan) provide a ConsistentRead parameter: If you set this parameter to true, DynamoDB will use strongly consistent reads during the operation.

6 KB / 4 KB = 1.5 --> 2
2 read capacity units per item × 100 reads per second = 200

Thus, you would need to set the table’s provisioned read capacity units to 200. (If you wanted eventually consistent reads instead of strongly consistent reads, then you would only need to provision 100 read capacity units.)

To read a single item, you use the GetItem operation. If you want to read multiple items, you can use BatchGetItem to retrieve up to 100 items from a table.

To work with a single item, use the PutItem, UpdateItem, or DeleteItem operation as appropriate. You can also use BatchWriteItem to put or delete up to 25 items in a single operation. (Note that BatchWriteItem supports PutItem and DeleteItem operations, but not UpdateItem.)

Response code HTTP 200 returns result ok, code HTTP 400 returns result bad request accompanied by aProvisionedThroughputExceededException.

Secondary Indexes Per Table

You can define a maximum of 5 local secondary indexes and 5 global secondary indexes per table.

When you add a rule to an RDS security group you do not need to specify a port number or protocol? False

If you are using Amazon RDS Provisioned IOPS storage with MySQL and Oracle database engines what is the maximum size RDS volume you can have by default?

DynamoDB vs RDS:

Dynamodb offers “push button” scalling, meaning that you can scale your database on the fly, without any down time.

RDS is not so easy and you usually have to use a bigger instance size or to add a read replica.

Instance downgrade is not possible, If need then export the whole database into db formate. Reupload the db into a larger instance.

Service outage take place in snapshot

 

BACKUP, Multi-AZ & Read Replica:

 

Categories
Xen Server

Creating the ISO Library Folder in Xen Server

XenCentre doesn’t give the option to do this, so the CLI was the only option.

Step 1 – Creating the ISO Library Folder

Connect to the XenServer using SSH and then issue the following command:

mkdir -p /var/opt/xen/ISO_Store

Step 2 – Create a ISO Storage Repository

Issue the following command within an SSH session:

xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso

FOR Larger ISO Repository 
“cd /var/run/sr-mount/1b042bc0-16b3-fa45-f94d-7a6e4e3dafbe/”
“mkdir -p ISO_Storage”

Categories
Xen Server

Boot a guest VM from CD or DVD in XenServer

In order to boot from cd or dvd you need to change the guest virtualization type from HVM (fully virtualized) to PV (paravirtualized).

$ sudo xenstore-read vm | xargs -n1 basename
54a95df1-d4f3-67f7-46d3-6dcd1d1143ab

xe vm-param-set HVM-boot-policy="BIOS order" uuid=[uuid of your vm]

After you have booted from dvd, change back to fully virtualized mode:

xe vm-param-set HVM-boot-policy="" uuid=[uuid of your vm]

Read more about difference between HVM and PV:

http://serverfault.com/questions/222010/difference-between-xen-pv-xen-kvm-and-hvm

Categories
aws

Security Group AWS

  • All inbound traffic is blocked by default
  • All outbound traffic is Allowed by default
  • Changes to Security Group take effect immediately
  • You can have any number of EC2 instances within a security group
  • You can have multiple security groups attached to EC2 instance
  • Security Groups are STATEFULL
    • If you create an inbound rule allowing traffic in, That traffic is automatically allowed back out again
  • You cannot block specific IP addresses using security groups, instead use Network Access Control Lists
  • You cannot add a deny rule
Categories
Security

Hardening php with SuHosin

; Logging Configuration
suhosin.log.syslog.facility = 9
suhosin.log.use-x-forwarded-for = Off

; Executor Options
suhosin.executor.max_depth = 0
suhosin.executor.include.max_traversal = 4
suhosin.executor.disable_emodifier = Off
suhosin.executor.allow_symlink = Off

; Misc Options
suhosin.simulation = Off
suhosin.apc_bug_workaround = Off
suhosin.sql.bailout_on_error = Off
suhosin.multiheader = Off
suhosin.mail.protect = 1
suhosin.memory_limit = 20

; Transparent Encryption Options
suhosin.session.encrypt = On
;it can problem with RoundCube
suhosin.session.cryptua = On
suhosin.session.cryptdocroot = On
suhosin.session.cryptraddr = 0
suhosin.cookie.encrypt = On
suhosin.cookie.cryptua = On
suhosin.cookie.cryptraddr = 0

; Filtering Options
suhosin.filter.action = 406
suhosin.cookie.max_array_depth = 100
suhosin.cookie.max_array_index_length = 64
suhosin.cookie.max_name_length = 64
suhosin.cookie.max_totalname_length = 256
suhosin.cookie.max_value_length = 10000
suhosin.cookie.max_vars = 100
suhosin.cookie.disallow_nul = On
suhosin.get.max_array_depth = 50
suhosin.get.max_array_index_length = 64
suhosin.get.max_name_length = 64
suhosin.get.max_totalname_length = 256
suhosin.get.max_value_length = 512
suhosin.get.max_vars = 100
suhosin.get.disallow_nul = On
suhosin.post.max_array_depth = 100
suhosin.post.max_array_index_length = 64
suhosin.post.max_totalname_length = 256
suhosin.post.max_value_length = 65000
suhosin.post.max_vars = 200
suhosin.post.disallow_nul = On
suhosin.request.max_array_depth = 100
suhosin.request.max_array_index_length = 64
suhosin.request.max_totalname_length = 256
suhosin.request.max_value_length = 65000
suhosin.request.max_vars = 200
suhosin.request.max_varname_length = 64
suhosin.request.disallow_nul = On
suhosin.upload.max_uploads = 25
suhosin.upload.disallow_elf = On
suhosin.upload.disallow_binary = Off
suhosin.upload.remove_binary = Off
suhosin.session.max_id_length = 128

Categories
wordpress

How to Fix Pluggable.php File Errors in WordPress

Phasellus in nibh eu nisl hendrerit malesuada. Aenean pretium volutpat nisi et facilisis. Vivamus tristique nunc lorem, sit amet venenatis orci fermentum quis. In nisl sem, varius elementum nisl nec, tristique ultrices risus. Nunc mi ligula, fringilla id condimentum et, imperdiet in mauris. Cras lectus massa, facilisis vel aliquet non, blandit non neque. Cras varius risus eu tellus luctus, eu consequat urna euismod. Quisque in justo sodales, fermentum lacus nec, gravida sapien. Nulla volutpat tellus hendrerit risus tempor iaculis. Suspendisse vitae condimentum quam, ut euismod enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec suscipit velit enim, in euismod neque facilisis at. In eget purus tempus, convallis diam ut, ornare orci. Aenean quis sodales justo. Vivamus volutpat vitae mi ac tristique. Praesent ipsum tellus, pellentesque sodales velit non, consectetur suscipit arcu.

Cras euismod, leo a dapibus viverra, tellus magna dapibus purus, quis mollis diam ex vitae risus. Duis nec nulla ac justo gravida cursus vitae vel turpis. Etiam a elementum felis, eu feugiat arcu. Aliquam a faucibus enim. Vivamus malesuada suscipit tellus, pulvinar commodo libero pharetra gravida. Aenean vehicula rhoncus lacus, sed vestibulum turpis dapibus at. Donec viverra orci quis urna bibendum, et venenatis purus congue.

Mauris et lectus id elit vestibulum vestibulum. Nunc sollicitudin porttitor nunc, a eleifend urna. Nam arcu erat, consequat id molestie at, scelerisque ac nunc. Duis sed feugiat velit. In rhoncus nulla nunc, ut interdum purus congue in.

Curabitur auctor libero eros, sit amet semper eros placerat a. Duis dolor ante, volutpat sit amet libero a, faucibus aliquet erat. Curabitur at sapien nec sem pellentesque rutrum vitae ut odio. Nunc magna nunc, iaculis at turpis quis, mattis finibus neque. Aliquam nec tortor sapien. Donec nec mattis urna. Cras non facilisis dolor. Aliquam sodales sapien gravida, consequat nulla non, elementum ante. Sed eget nisi ipsum. Sed varius bibendum diam, a gravida dui ultricies sed. Curabitur eget felis dignissim tortor lacinia scelerisque.

Categories
wordpress

How to Add a WordPress Widget to Your Website Header

Phasellus in nibh eu nisl hendrerit malesuada. Aenean pretium volutpat nisi et facilisis. Vivamus tristique nunc lorem, sit amet venenatis orci fermentum quis. In nisl sem, varius elementum nisl nec, tristique ultrices risus. Nunc mi ligula, fringilla id condimentum et, imperdiet in mauris. Cras lectus massa, facilisis vel aliquet non, blandit non neque. Cras varius risus eu tellus luctus, eu consequat urna euismod. Quisque in justo sodales, fermentum lacus nec, gravida sapien. Nulla volutpat tellus hendrerit risus tempor iaculis. Suspendisse vitae condimentum quam, ut euismod enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec suscipit velit enim, in euismod neque facilisis at. In eget purus tempus, convallis diam ut, ornare orci. Aenean quis sodales justo. Vivamus volutpat vitae mi ac tristique. Praesent ipsum tellus, pellentesque sodales velit non, consectetur suscipit arcu.

Cras euismod, leo a dapibus viverra, tellus magna dapibus purus, quis mollis diam ex vitae risus. Duis nec nulla ac justo gravida cursus vitae vel turpis. Etiam a elementum felis, eu feugiat arcu. Aliquam a faucibus enim. Vivamus malesuada suscipit tellus, pulvinar commodo libero pharetra gravida. Aenean vehicula rhoncus lacus, sed vestibulum turpis dapibus at. Donec viverra orci quis urna bibendum, et venenatis purus congue.

Mauris et lectus id elit vestibulum vestibulum. Nunc sollicitudin porttitor nunc, a eleifend urna. Nam arcu erat, consequat id molestie at, scelerisque ac nunc. Duis sed feugiat velit. In rhoncus nulla nunc, ut interdum purus congue in.

Curabitur auctor libero eros, sit amet semper eros placerat a. Duis dolor ante, volutpat sit amet libero a, faucibus aliquet erat. Curabitur at sapien nec sem pellentesque rutrum vitae ut odio. Nunc magna nunc, iaculis at turpis quis, mattis finibus neque. Aliquam nec tortor sapien. Donec nec mattis urna. Cras non facilisis dolor. Aliquam sodales sapien gravida, consequat nulla non, elementum ante. Sed eget nisi ipsum. Sed varius bibendum diam, a gravida dui ultricies sed. Curabitur eget felis dignissim tortor lacinia scelerisque.

Categories
wordpress

WordPress.com Launches VR Content, Coming Soon to Jetpack

Phasellus in nibh eu nisl hendrerit malesuada. Aenean pretium volutpat nisi et facilisis. Vivamus tristique nunc lorem, sit amet venenatis orci fermentum quis. In nisl sem, varius elementum nisl nec, tristique ultrices risus. Nunc mi ligula, fringilla id condimentum et, imperdiet in mauris. Cras lectus massa, facilisis vel aliquet non, blandit non neque. Cras varius risus eu tellus luctus, eu consequat urna euismod. Quisque in justo sodales, fermentum lacus nec, gravida sapien. Nulla volutpat tellus hendrerit risus tempor iaculis. Suspendisse vitae condimentum quam, ut euismod enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec suscipit velit enim, in euismod neque facilisis at. In eget purus tempus, convallis diam ut, ornare orci. Aenean quis sodales justo. Vivamus volutpat vitae mi ac tristique. Praesent ipsum tellus, pellentesque sodales velit non, consectetur suscipit arcu.

Cras euismod, leo a dapibus viverra, tellus magna dapibus purus, quis mollis diam ex vitae risus. Duis nec nulla ac justo gravida cursus vitae vel turpis. Etiam a elementum felis, eu feugiat arcu. Aliquam a faucibus enim. Vivamus malesuada suscipit tellus, pulvinar commodo libero pharetra gravida. Aenean vehicula rhoncus lacus, sed vestibulum turpis dapibus at. Donec viverra orci quis urna bibendum, et venenatis purus congue.

Mauris et lectus id elit vestibulum vestibulum. Nunc sollicitudin porttitor nunc, a eleifend urna. Nam arcu erat, consequat id molestie at, scelerisque ac nunc. Duis sed feugiat velit. In rhoncus nulla nunc, ut interdum purus congue in.

Curabitur auctor libero eros, sit amet semper eros placerat a. Duis dolor ante, volutpat sit amet libero a, faucibus aliquet erat. Curabitur at sapien nec sem pellentesque rutrum vitae ut odio. Nunc magna nunc, iaculis at turpis quis, mattis finibus neque. Aliquam nec tortor sapien. Donec nec mattis urna. Cras non facilisis dolor. Aliquam sodales sapien gravida, consequat nulla non, elementum ante. Sed eget nisi ipsum. Sed varius bibendum diam, a gravida dui ultricies sed. Curabitur eget felis dignissim tortor lacinia scelerisque.

Categories
web server

Advance installation of VestaCP

Vesta CP panel have almost all features like MySQL, PhpMyAdmin, FTP, DNS and Mail Server etc . Vesta is free , open source based package but if you need more extra features then you have to check its commercial plug-ins  like file manager and sftp modules .

Users experience is good with this panel management like it fast and easy to use and quite good and user friendly .According to user reviews it look it best web hosting software .

Here we are going to do installation of latest version of vesta panel , You can get latest version of Vesta Panel  information before installing from its official website vestacp.com .

Prerequisite Operating System Supported:

RHEL / CentOS 5 / 6/ 7, Ubuntu 12.04 – 15.10, Debian 6 / 7 / 8 

Install  Vesta CP

Before proceed you should have proper root ssh access  via ssh to connect your server . Now connect your server from root account or switch to root account.

Your operating system should be update properly before proceed , Here we are using CentOs server , so below are command to update centos server, you can use it  for RHEL server also. After that we need curl  packages to install for  download vesta panel installer script from it source url. Run the below commands to update and install curl on centos / rhel .

yum update –y; yum install curl –y; curl -O http://vestacp.com/pub/vst-install.sh; chmod +x  vst-install.sh; bash vst-install.sh

 

Advance installation

Here we are also going discuss  some more feature  like if you want to use your parameter on different configuration in packages  like you want to install only +apache  with vsftpd ftp server , mysql server , dns then vesta control panel develop a tool in his official website vestacp.com to generate specific installer command. This command tool is  in  website “Advanced Install Settings”  Section.

Web :

1. nginx + apache  2. FTP : vsftpd   3. Mail : exim + dovecot + spamassassin + clamav 4. DNS: named. 5. Firewall : iptables + fail2ban. 6. DB : MySQL. 7. Additional Repository : remi. 8. File System Quota no.  9.Hostname :  Hostname of your computer . 10 email : Your email id

# The Final command

bash vst-install.sh --nginx yes --apache yes --phpfpm no --vsftpd yes --proftpd no --exim yes --dovecot yes --spamassassin yes --clamav yes --named yes --iptables yes --fail2ban yes --mysql yes --postgresql no --remi yes --quota no --hostname XXXXXXXXXXXX  --email  XXXXXXXXXX --password XXXXXXXXXX

At last after installer complete installation then it will show your Login details in the  output.

Congratulations, you have just successfully installed Vesta Control Panel    https://server_ip_address:8083   username: admin  password: XXXXXXX

https://server_ip_address:8083/