php on windows

PHP remains the most widespread and popular server-side programming language on the web. It is installed by most web hosts, has a simple learning curve, close ties with the MySQL database, and an excellent collection of libraries to cut your development time. PHP may not be perfect, but it should certainly be considered for your next web application. Both Yahoo and Facebook use it with great success.

Why Install PHP Locally?

Installing PHP on your development PC allows you to safely create and test a web application without affecting the data or systems on your live website. This article describes PHP installation as a module within the Windows version of Apache 2.2. Mac and Linux users will probably have it installed already.

All-in-One packages

There are some excellent all-in-one Windows distributions that contain Apache, PHP, MySQL and other applications in a single installation file, e.g. XAMPP (including a Mac version), WampServer and Web.Developer. There is nothing wrong with using these packages, although manually installing Apache and PHP will help you learn more about the system and its configuration options.

The PHP Installer

Although an installer is available from php.net, I would recommend the manual installation if you already have a web server configured and running.

Manual Installation

Manual installation offers several benefits:

  • backing up, reinstalling, or moving the web server can be achieved in seconds
  • you have more control over PHP and Apache configuration.

Step 1: download the files

Download the latest PHP 5 ZIP package from www.php.net/downloads.php

As always, virus scan the file and check its MD5 checksum using a tool such as fsum.

Step 2: extract the files

We will install the PHP files to C:php, so create that folder and extract the contents of the ZIP file into it.

PHP can be installed anywhere on your system, but you will need to change the paths referenced in the following steps.

Step 3: configure php.ini

Copy C:phpphp.ini-recommended to C:phpphp.ini. There are several lines you will need to change in a text editor (use search to find the current setting).

Define the extension directory:

Enable extensions. This will depend on the libraries you want to use, but the following extensions should be suitable for the majority of applications (remove the semi-colon comment):

If you want to send emails using the PHP mail() function, enter the details of an SMTP server (your ISP’s server should be suitable):

Step 4: add C:php to the path environment variable

To ensure Windows can find PHP, you need to change the path environment variable. From the Control Panel, choose System, (then “Advanced system settings” in Vista), select the “Advanced” tab, and click the “Environment Variables” button.

Scroll down the System variables list and click on “Path” followed by the “Edit” button. Enter “;C:php” to the end of the Variable value line (remember the semi-colon).

PHP path environment variable

Now OK your way out. You might need to reboot at this stage.

Step 5: configure PHP as an Apache module

Ensure Apache is not running (use “net stop Apache2.2” from the command line) and open its confhttpd.conf configuration file in an editor. The following lines should be changed:

Line 239, add index.php as a default file name:

At the bottom of the file, add the following lines (change the PHP file locations if necessary):

Save the configuration file and test it from the command line (Start > Run > cmd):

Step 6: test a PHP file

Create a file named index.php in Apache’s web page root (either htdocs or D:WebPages) and add this code:

Ensure Apache has started successfully, open a web browser and enter the address http://localhost/. If all goes well, a “PHP version” page should appear showing all the configuration settings.

One of the most critical parts of your WordPress installation is the database. Every smart admin will backup their database on at least weekly basis or even more often depending on the website change dynamic.

We saw in previous articles how WP-CLI can facilitate Wordp   ress administration and make us more efficient when dealing with WordPress.

Let us go ahead and see how we can automate database backups with the help of WP-CLI.

 

How to backup your WordPress Database with wp-cli

Note: – this will backup the database in a .sql format

This is very efficient and you do not have to create separate mysqldump backup strategies or new scripts for you to develop and manage.

 

In our last article we went thru some wp-cli usage examples and got a bit familiar with the wp-cli tool. In this article we will see how we can manage our posts using the wp-cli tool.

The basic syntax is :

 So let us give some examples of the most common and useful post activities using the wp-cli tool.

How to list all the posts in WordPress using WP-CLI

 

How to list all the posts for a specific user in WordPress using WP-CLI

 

How to create new post in WordPress using WP-CLI

 

How to edit a post in WordPress using WP-CLI

 

How to change the wp-cli editor

  • you can choose your preffred editor, the only thing you need to do is added in your .bashrc file.

Assuming vim is your editor of choice

How to delete a post in WordPress using WP-CLI

How to delete all posts from the trash in WordPress using WP-CLI

How to update the Name a post in WordPress using WP-CLI

We will update the post name.

 

How to update the Title of a post in WordPress using WP-CLI

 

Still wanna know more about WP-CLI ? Read the next article on what are the database operations we can do with WP-CLI.

 

In our last article we have installed WP-CLI and saw how wp-cli can help us with WordPress administration. (if you have not read it see here Install WP-CLI).

Is time for us to see how to use wp-cli to optimize our WordPress administration and be more efficient and exact on what we are doing. Follow the examples and apply them by your self.

How to list all the themes available in WordPress with WP-CLI

 

How to  list all available plugins in WordPress with WP-CLI

 

How to list all users  in WordPress with WP-CLI

 

How to  create a new user in WordPress with WP-CLI

 

How to optimize your Database  in WordPress with WP-CLI

 

How to  update an user in WordPress with WP-CLI

 

How to  download and install a plugin in WordPress with WP-CLI

Install and Activate Plugin

How to  verifiy a plugin status in WordPress with WP-CLI

 

How to  search for a plugin in WordPress with WP-CLI

 

How to disable/deactivate a plugin  in WordPress with WP-CLI

 

How to  enable/activate a plugin in WordPress with WP-CLI

 

How to  delete a plugin in WordPress with WP-CLI

The will completely remove the plugin from your WordPress installation

 

How to update a plugin in WordPress with WP-CLI

List available for update plugins and update one of them.

 

 

We all know that WordPress is the most used Open source application these days and there are quite a lot of useful tools released for improving the client experience with that application.

The Best way to manage your WordPress is with WP-CLI, this article will cover how to install and how to manage your WordPress using wp-cli tool.

     WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, configure multi-site installs and much more, without using a web browser. WP-CLI provides a command-line interface for any action you might want to perform in the WordPress admin.

       The Command Line Interface and it is used to execute shell commands towards the operating system of a computer. No matter if you would like to send the commands to your local computer or the web server hosting your website you will have to use a Command Line Interface in order to interact with different services.

Login into your WordPress host and download the wp-cli

Verify the wp-cli package info

Change the permission of the wp-cli.phar file and put it in the /usr/local/bin/wp folder, this is make it available from any point in your sistem

Configure your wp-cli with your WordPress installation

  • if you try to run it without the configuration setup you will get an error

Note:  seems like you need to install wordpress core.

 

Install wordpress core using the wp-cli tools

Conclusion:

We have installed wp-cli and therefore we are ready to learn how to manage our WordPress instance with it.

 

Check the next article on how to use WP-CLI with full examples and details

 

 

 

 

 

a

Raid Level 1

Isso é útil quando o desempenho ou a confiabilidade de leitura é mais importante do que a capacidade de armazenamento de dados.

Essa matriz só pode ser tão grande quanto o disco membro menor. Um clássico RAID 1 par espelhado contém dois discos ao longo de um único disco. Uma vez que cada membro contém uma cópia completa e podem ser analisadas separadamente, a confiabilidade desgaste-e-rasga comum é elevado à potência do número de cópias auto-suficientes.

Representação gráfica do layout RAID:

Raid Level 1

Raid Nivel 1

Raid Level 0

RAID nível 0
RAID 0 é usado para aumentar o desempenho de um servidor.
Ela também é conhecida como “a distribuição de disco“. Com RAID 0, os dados são gravados em vários discos. Isso significa que o trabalho que o computador está fazendo é tratado por vários discos em vez de apenas um, aumentando o desempenho, porque várias unidades estão lendo e escrevendo dados, melhorando disco I/O. É necessário um mínimo de dois discos. Ambos software e hardware RAID suporte RAID 0 como fazem a maioria dos controladores. A desvantagem é que não há nenhuma tolerância a falhas. Se um disco falhar, então, que afeta toda a matriz e as chances de perda de dados ou corrupção aumenta.

Representação gráfica do layout RAID:

Raid Nivel 0

Raid Level 0

Níveis de RAID

RAID é uma tecnologia de armazenamento que combina vários componentes da unidade de disco em uma unidade lógica, para oferecer redundância de dados e melhoria do desempenho. Os dados são distribuídos entre as unidades em uma das várias maneiras, chamados de níveis de RAID, dependendo do nível específico de redundância e desempenho exigido.

Existem dois tipos de RAID:

Hardware RAID
Vantagens e desvantagens com RAID baseado em hardware. É mais caro, porque a configuração requer um componente de hardware adicional, um controlador RAID, que é uma peça de hardware que controla o array RAID. RAID baseado em hardware também é considerado um melhor desempenho, maneira mais eficiente de implementar RAID de software RAID. RAID baseado em hardware é o mais utilizado em servidores corporativos e de classe empresarial unidades NAS(Network-attached storage).

Software RAID
Software RAID sem dúvida não é tão confiável quanto hardware RAID, mas é definitivamente mais econômico e ainda pode entregar tolerância básica falha. Você não pode configurar arrays RAID tão complexo com software como você pode com hardware, mas se você quiser apenas para implementar o espelhamento (que é cópia de dados de uma unidade para outra, para manter os dados acessíveis no caso de uma unidade falhar), em seguida, o software RAID é um mais barato, menos complicado para configurar opção. Em vez de usar um monte de discos e um controlador para fazer uma matriz, algumas soluções RAID de software pode usar partições lógicas em um único disco. Isso é o que faz com que seja mais barato e menos fiáveis que se único disco falhar completamente, seus dados se foi.

Qual o nível/tipo de RAID melhor para mim?

Assim que tiver decidido se o software ou hardware RAID melhor se adapte às suas finalidades, você precisa escolher um nível de RAID esta refere-se a como você está indo para configurar RAID no seu dispositivo. Existem vários níveis de RAID, e aquele que você escolher depende se você estiver usando RAID para o desempenho ou a tolerância a falhas (ou ambos). Também importa se você tem hardware ou software RAID, porque o software suporta menos do que os níveis de RAID baseado em hardware. No caso de hardware RAID, o tipo de controlador você tem questões, também. Diferentes controladores de apoiar diferentes níveis de RAID e também ditam os tipos de discos que você pode usar em uma matriz: SAS(Server Attached Storage), SATA(Serial Advanced Technology Attachment) ou SSD(Solid State Disk)).

Lista de níveis de RAID:

RAID Nivel 0

Raid Level 0

Raid Nivel 0


RAID LEVEL 1
Raid Level 1

Raid Nivel 1

RAID Nivel 2

Raid Level 2

Raid Level 2

RAID Nivel 3

Raid Level 3

Raid Nivel 3

RAID Nivel 4

Raid Level 4

Raid Nivel 4

RAID Nivel 5

Raid Level 5

Raid Nivel 5


RAID Nivel 6
Raid Level 6

Raid Nivel 6


RAID Nivel 10
Raid Level 10

Raid Nivel 10


RAID Nivel 50
Raid Level 50

Raid Nivel 50


Para saber mais sobre cada nível de RAID basta clicar em seus links.

Optimal Hardware for HP Vertica

Processor
For optimal performance, HP recommends running two socket servers with six or eight core CPUs, clocked at or above 2.2 GHz (Note: in some smaller applications it may be acceptable to run four core CPUs).
Memory
HP requires a minimum of 4 GB of memory per physical CPU core in the server, however you should run 8 GB of memory per physical core. (Note: Some heavy analytics workloads may require up to 16 GB of memory per physical core.) The memory should be at least DDR3-1333 (preferably DDR3-1600), and should be appropriately distributed across all memory channels in the server.
Storage
HP requires a minimum read/write speed of 20 MB/s per physical core of the CPU. However, you should have 40–60 MB/s per physical core. Each node should have 1–9 TB of storage post RAID. In a production setting, RAID 10 is recommended but, in some cases, RAID 50 is acceptable. (Note:SSDs are not required due to the heavy compression/encoding done by HP Vertica. In most cases, a RAID array of more, less expensive HDDs will work just as well as a RAID array of fewer SSDs to satisfy HP Vertica’s requirements.)
Network
On a cluster with more than three nodes, and more than 10 TB, 10 GB networking is highly recommended. HP Vertica works well in smaller instances on 1 GB networking, but for large cluster sizes and large data sets, 10 GB networking is highly recommended. In some cases, it may also be acceptable to run quad-bonded 1G networking (4G throughput).

Sizing Your Cluster

You should consider several factors to properly size a cluster, but for the sake of simplicity we will focus on three:

  • 1. Data Volume (Compression): First look at the total raw data volume for the cluster, and then apply a reasonable compression number (in
    most cases 2:1 compression with high availability is a good start). You should use a previously attained compression number or run some
    quick tests to figure out a reasonable compression number for your data. To do this, install HP Vertica on an existing system and run
    Database Designer (DBD), or use a ddl you already have and load in several hundred gigabytes to 1 TB of data.
  • 2. Data Growth: Once you have a good idea of the starting compressed data volume, look at the amount of data ingest (the amount of data
    you will be saving each day) and the retention policy (how long you will be saving the data). Consider your starting compressed data volume
    and your ingest rate multiplied by the retention period; this gives you a good idea of the total data volume for your cluster.
  • 3. Workload: The next important factor to look into is the workload itself. Is it a high-concurrency workload? What type of workload
    management will you be doing? How much data will the average query be running against (that is, will partition pruning be happening)?
    These can all be major factors, but for the most part a high concurrency workload will require more disk speed (high spindle count) and
    more memory on each node.
  • Server Configuration

    HP recommends a minimum of three nodes for high availability. (Note: All configurations are based on compressed data volumes.) Always run your
    hardware BOM through the HP Vertica team before purchasing hardware for a production cluster.
    Data Volume Size Recommended Server Configuration and Comments

  • Up to 2 TB
  • Three nodes with at least eight 10 k rpm spinning disks for the data partition (total of 1–2 TB per node), dual 4-6 core processors with 4–8 GB of memory per core, and 1 GB networking. (Note: in cases with heavy workload, run the suggested configuration for a 2–5 TB cluster).

  • 2-5 TB
  • Three nodes with at least 10 10 k rpm spinning disks for the data partition (total of 1–4 TB per node), dual 6 core processors with 8 GB of memory per core, and 1 GB networking. (Note: in cases with heavy workload, run the suggested configuration for a 5–10 TB cluster).

  • 5-10 TB
  • Three nodes with at least 20 10 k rpm spinning disks (total of 5–8 TB per node), dual 8 core processors with 8 GB of memory per core, and either quad-bonded 1G networking (4G throughput) or 10 GB networking. (Note: in cases with heavy workload, or high concurrency, it may be beneficial to run 22 drives or 15 k rpm drives, with 16 GB of memory per core).

  • 10 TB – 1 PB
  • Given the node configuration for the 5–10 TB cluster, and 5 TB of usable storage per node, calculate the number of nodes you will need. (Note: the same changes apply for heavy workload environments).
    Larger than 1 PB In most cases the same configuration as listed above will work, but contact an HP Vertica Technical Representative for recommendations on sizing clusters over 1 PB (compressed). (Note: if you have 10:1 compression this becomes a 10 PB cluster.)

    Explaining the Explain Plan:Interpreting Execution Plans for SQL Statements is a paper that should be read by all Oracle DBA’s.
    The paper is written by Maria Colgan – Senior Principal Product Manager .



    Get the paper by clicking on the image bellow
    expplan

    Oracle Hints

    Great article wrote by Jonathan Lewis one of the leading database geeks now days.

    To get access to the article just click on the image bellow.

    Oracle Hints

    Oracle Hints

    Managing Oracle Exadata with Oracle Enterprise Manager 12c

    Today’s IT organizations want to reduce deployment costs and errors while ensuring maximum
    availability along with zero downtime application migration. They also want proactive
    monitoring for all components in order to ensure the highest service quality possible.



    Just click on the image to get the pdf document.

    Managing Oracle Exadata with Oracle Enterprise Manager 12c

    Managing Oracle Exadata with Oracle
    Enterprise Manager 12c

    Great document written by a team very smart people about Recovery Manager (RMAN) Configuration and Performance Tuning Best Practices
    Authors :
    Timothy Chien, Principal Product Manager Oracle America
    Greg Green,Senior Database Administrator Starbucks Coffee Company
    Just click on the image bellow to get the pdf document.
    rman

    Raid Level 50

    RAID 50 combines the straight block-level striping of RAID 0 with the distributed parity of RAID 5.

    RAID 50 improves upon the performance of RAID 5 particularly during writes, and provides better fault tolerance than a single RAID level does. This level is recommended for applications that require high fault tolerance, capacity and random positioning performance.

    Graphical representation of the RAID layout:

    Raid Level 50

    Raid Level 50

    Raid Level 10

       RAID 10 is a combination of RAID 1 and 0 and is often denoted as RAID 1+0. It combines the mirroring of RAID 1 with the striping of RAID 0. It’s the RAID level that gives the best performance, but it is also costly, requiring two times as many disks of other RAID levels, for a minimum of four. This is the RAID level ideal for highly used database servers or any server that’s performing many write operations. RAID 10 can be implemented as hardware or software but the general consensus is that many of the performance advantages are lost when you use software RAID 10. RAID 10 requires a minimum of four disks.

    Graphical representation of the RAID layout:

    Raid Level 10

    Raid Level 10

    Raid Level 6

          RAID 6 can be thought of as “RAID 5, but more”. It stripes blocks of data and parity across an array of drives like RAID 5, except that it calculates two sets of parity information for each parcel of data. The goal of this duplication is solely to improve fault tolerance; RAID 6 can handle the failure of any two drives in the array while other single RAID levels can handle at most one fault. Performance-wise, RAID 6 is generally slightly worse than RAID 5 in terms of writes due to the added overhead of more parity calculations, but may be slightly faster in random reads due to spreading of data over one more disk. As with RAID levels 4 and 5, performance can be adjusted by experimenting with different stripe sizes.

    Graphical representation of the RAID layout:

    Raid Level 6

    Raid Level 6