Linux under Php+mysql+nginx Compilation and Construction (ii)

Source: Internet
Author: User

It has always been a one-click Web server, but the environment is relatively old for one-click construction. If you want to use a relatively new environment, especially the official server, you have to manually compile the build (the following build based on the Linux centos6.5 32-bit server).

Second, install MySQL
Enter the installation directory:

 
   
  
  1. Cd/opt

Download and unzip:

 
   
  
  1. wget http : //downloads.mysql.com/archives/mysql-5.0/mysql-5.5.30.tar.gz
  2. - zxf MySQL - 5.5 . 30.tar . GZ

Compile and install:

  
 
  1. CMake \
  2. - Dcmake_install_prefix = /usr/ Local / mysql \
  3. - Dmysql_datadir = /usr/ Local / MySQL / data \
  4. - Dsysconfdir =/ etc \
  5. - Dwith_myisam_storage_engine = 1 \
  6. - Dwith_innobase_storage_engine = 1 \
  7. - Dwith_memory_storage_engine = 1 \
  8. - Dwith_readline = 1 \
  9. - dmysql_unix_addr = /var/ Lib / MySQL / MySQL . sock \
  10. - Dmysql_tcp_port = 3306 \
  11. - Denabled_local_infile = 1 \
  12. - Dwith_partition_storage_engine = 1 \
  13. - dextra_charsets = All \
  14. - Ddefault_charset = UTF8 \
  15. - ddefault_collation = Utf8_general_ci
  16. Make && Make Install

Add Users and Modify permissions:

 
   
  
  1. Groupadd MySQL
  2. - g MySQL MySQL
  3. - R MySQL : /usr/local/MySQL

Enter the installation path and execute the initialization configuration script to create the system's own database and table

  
 
    1. CD / usr / Local / MySQL
    2. Scripts / mysql_install_db -- Basedir = /usr/ Local / MySQL -- DataDir = /usr/ Local / MySQL / Data -- User = MySQL

Add the service, copy the service script to the INIT.D directory, and set the boot up:

 
   
  
  1. CP Support - Files / MySQL . /etc/init. D / MySQL
  2. Chkconfig MySQL on
  3. service MySQL start --Start MySQL

Set path, support direct call to MySQL (Modify/etc/profile file, add at end of file):

 
   
  
  1. PATH = /usr/ Local / MySQL / bin : $PATH
  2. Export PATH

Close the file, run the following command, and let the configuration take effect immediately

 
   
  
  1. / etc / Profile

Another: mysql5.5 began to support CMake. As for the difference between the two:
The./configure is the execution of a script named configure in your current directory, generated makefile by it, and after makefile, it is generally possible to compile with make and install it.
CMake is a compilation tool that is the same as the make peer, except that it relies on makefile as a compilation rule and compiles it according to CMakeLists.txt.
Cmake Control: http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

There are references: http://www.cnblogs.com/xiongpq/p/3384681.html


MORE: http://www.webyang.net/Html/web/article_128.html

Linux under Php+mysql+nginx Compilation and Construction (ii)

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.