LNMP fully functional compilation install for CentOS 6.3 notes

Source: Internet
Author: User
Tags chmod mkdir mysql create openssl socket centos iptables mysql database

Linux operating system: centOS6.3 64bit

nginx:nginx-1.4.0

mysql:mysql-5.6.10

php:php-5.4.13

I. Installing the development pack (using the default CentOS update source):

# yum-y Install wget gcc-c++ ncurses ncurses-devel cmake make Perl bison OpenSSL openssl-devel gcc* libxml2 Curl-devel libjpeg* libpng* freetype*

Two. Close Iptables and SELinux

# Service Iptables Stop

# Setenforce 0

# Vi/etc/sysconfig/selinux

---------------

Selinux=disabled

---------------

Three. Install MySQL database

# wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/

# useradd-d/usr/local/mysql/mysql Create a MySQL user, specify the home directory to the/use/local directory.

# Mkdir/usr/local/mysql/data

# Mkdir/usr/local/mysql/log Create a new directory

# Chown-r mysql:mysql/usr/local/mysql/data/

# Chown-r mysql:mysql/usr/local/mysql/log/

# chmod 750/usr/local/mysql/data

# chmod 750/usr/local/mysql/log Modify the owner of the directory and the group to which it belongs

# tar-zxv-f Mysql-5.6.10.tar.gz Unpack

# CD mysql-5.6.10

# cmake-dcmake_install_prefix=/usr/local/mysql \

-dmysql_unix_addr=/var/lib/mysql/mysql.sock \

-DDEFAULT_CHARSET=GBK \

-DDEFAULT_COLLATION=GBK_CHINESE_CI \

-dextra_charsets=all \

-dwith_myisam_storage_engine=1 \

-dwith_innobase_storage_engine=1 \

-dwith_archive_storage_engine=1 \

-dwith_blackhole_storage_engine=1 \

-dwith_memory_storage_engine=1 \

-dwith_readline=1 \

-denabled_local_infile=1 \

-dmysql_datadir=/usr/local/mysql/data \

-dmysql_user=mysql \

-dmysql_tcp_port=3306

# make

# make Install

# Copy configuration file

Cp/usr/local/mysql/support-files/my-default.cnf/etc/my.cnf

# VI/ETC/MY.CNF

--------------------------------------

[MySQL]

# CLIENT #

Port = 3306

Socket =/var/lib/mysql/mysql.sock

[Mysqld]

# General #

user = MySQL

Default_storage_engine = InnoDB

Socket =/var/lib/mysql/mysql.sock

Pid_file =/var/run/mysqld/mysqld.pid

# MyISAM #

Key_buffer_size = 32M

Myisam_recover = Force,backup

# SAFETY #

Max_allowed_packet = 16M

Max_connect_errors = 1000000

Skip_name_resolve

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.