Web servers have always been built with one click, but the environment built with one click is relatively old. If you want to use a new environment, especially the official server, you must manually compile and build it (the following is a linuxcentos6.532-bit server ). 2. Install mysql and go to the installation directory: Cdopt download and unzip: wgeth
Web servers have always been built with one click, but the environment built with one click is relatively old. If you want to use a new environment, especially the official server, you must manually compile and build it (the following is a 32-bit linux centos6.5 server ). 2. Install mysql and go to the installation directory: Cd/opt download and unzip: wget h
Web servers have always been built with one click, but the environment built with one click is relatively old. If you want to use a new environment, especially the official server, you must manually compile and build it (the following is a 32-bit linux centos6.5 server ).
Ii. Install mysql
Go to the installation directory:
- Cd/opt
Download and unzip:
- wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.5.30.tar.gz
- tar -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
- useradd -g mysql mysql
- chown -R mysql:mysql /usr/local/mysql
Enter the installation path and execute the initialization configuration script to create the database and table that comes with the system.
- 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 startup to start:
- Cp support-files/mysql. server/etc/init. d/mysql
- Chkconfig mysql on
- Service mysql start -- start MySQL
You can set the PATH to directly call mysql (modify the/etc/profile file and add it at the end of the file ):
- PATH=/usr/local/mysql/bin:$PATH
- export PATH
Close the file and run the following command to make the configuration take effect immediately
- source /etc/profile
In addition, mysql5.5 supports cmake. Differences between the two:
./Configure is to execute the script named configure under your current directory, which generates Makefile. With Makefile, You can compile it through make and install make install.
Cmakeword is a compilation tool that is at the same level as makefiles. It only relies on the compilation rules instead of makefiles, and is compiled by cmakelists.txt.
Cmake control: http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html
Which has reference: http://www.cnblogs.com/xiongpq/p/3384681.html
More: http://www.webyang.net/Html/web/article_128.html