Install the configuration Nginx+php+mysql environment on Amazon AWS EC Cloud Linux Amis

Source: Internet
Author: User
Tags fpm install php openssl

1. System Update and Configuration
1) Update system software
$ sudo-s
# yum Check-update
# Yum Update
After the update reboot a bit, because there is likely to be kernel update!

2) Install Rz/sz:
# wget ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/releases/16/Fedora/i386/os/Packages/lrzsz-0.12.20-29.fc16.i686.rpm
# RPM-IVH lrzsz-0.12.20-29.fc16.i686.rpm

3) Modify the time zone:
$ sudo vi/etc/sysconfig/clock
Zone= "Asia/shanghai"
# Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

4) Turn off some services that do not need to be started automatically:
$ sudo chkconfig iptables off
$ sudo chkconfig ip6tables off
# chkconfig Netfs off
# chkconfig Lvm2-monitor off

2. Add 1024M swap file
1) Create and activate swap swap files:
# cd/var/
# dd If=/dev/zero of=swapfile bs=4096 count=262144
#/sbin/mkswap Swapfile
#/sbin/swapon Swapfile

2) Add to the Fstab file to allow the system to start automatically when booting:
# Vi/etc/fstab
Add the following at the end:
/var/swapfile swap swap defaults 0 0

3. Installing the GCC compiler# yum-y Install GCC
# yum-y Install gcc-c++
# yum-y Install make Automake

4. Installing Nginx
1) Install the Dependent libraries:
# yum-y Install pcre-devel zlib-devel OpenSSL openssl-devel

2) Install Nginx:
# yum Install Nginx
Add to boot auto start:

# chkconfig--level
#/etc/init.d/nginx Start

5. Install PHP
# Yum Search php5
# yum Install php54-fpm PHP54-GD
To modify the configuration:
# vi/etc/php-fpm.d/www.conf
; listen = 127.0.0.1:9000
Listen =/var/run/php-fpm/php-fpm.sock
user = Nginx
Group = Nginx
Pm.max_children = 20
Pm.start_servers = 3
Pm.min_spare_servers = 3
Pm.max_spare_servers = 10
Pm.max_requests = 5000
To create a Session directory:
# cd/var/lib/php/
# mkdir Session
# chown Nginx. Session
Add to boot auto start:
# chkconfig--level php-fpm on
#/ETC/INIT.D/PHP-FPM Start

6. Install MySQL Server
Install MySQL 5.5:
# yum Install Mysql55-server Php54-mysql
Add to boot auto start:
# chkconfig--level mysqld on
#/etc/init.d/mysqld Start

Reprint please specify the original address: http://www.server110.com/nginx/201310/2868.html

Install the configuration Nginx+php+mysql environment on an Amazon AWS EC Cloud Linux Ami

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.