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:
- Cd/opt
Download and unzip:
- wget http : //downloads.mysql.com/archives/mysql-5.0/mysql-5.5.30.tar.gz
- - zxf MySQL - 5.5 . 30.tar . GZ
Compile and install:
- CMake \
- - Dcmake_install_prefix = /usr/ Local / mysql \
- - Dmysql_datadir = /usr/ Local / MySQL / data \
- - Dsysconfdir =/ etc \
- - Dwith_myisam_storage_engine = 1 \
- - Dwith_innobase_storage_engine = 1 \
- - Dwith_memory_storage_engine = 1 \
- - Dwith_readline = 1 \
- - dmysql_unix_addr = /var/ Lib / MySQL / MySQL . sock \
- - Dmysql_tcp_port = 3306 \
- - Denabled_local_infile = 1 \
- - Dwith_partition_storage_engine = 1 \
- - dextra_charsets = All \
- - Ddefault_charset = UTF8 \
- - ddefault_collation = Utf8_general_ci
- Make && Make Install
Add Users and Modify permissions:
- Groupadd MySQL
- - g MySQL MySQL
- - R MySQL : /usr/local/MySQL
Enter the installation path and execute the initialization configuration script to create the system's own database and table
- CD / usr / Local / MySQL
- 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:
- CP Support - Files / MySQL . /etc/init. D / MySQL
- Chkconfig MySQL on
- service MySQL start --Start MySQL
Set path, support direct call to MySQL (Modify/etc/profile file, add at end of file):
- PATH = /usr/ Local / MySQL / bin : $PATH
- Export PATH
Close the file, run the following command, and let the configuration take effect immediately
- / 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)