1. Compile the previous conditions to check whether the following software has been installed. Some of them may not be necessary, but we recommend that you install them all.
Apt-get install autoconf automake autotools-dev cpp curl gawk gcclftp libc6-dev linux-libc-dev make libpcre3-dev libpcrecpp0 g ++ libtoollibncurses5-dev
Aptitude install libmysql + +-dev libmysqlclient15-dev checkinstall
Apt-get install python-dev
Ii. List of files required for Installation
Mmseg-0.7.3.tar.gz Chinese Word Segmentation
Mysql-5.1.26-rc.tar.gz mysql-5.1.26 source code
Sphinx-0.9.8-rc2.tar.gz sphinx-0.9.8-rc2 source code
Fix-crash-in-excerpts.patch sphinx support word segmentation patch
Sphinx-0.98rc2.zhcn-support.patch sphinx support word segmentation patch
Files can be downloaded from the official website. I will provide these files in the attachment.
3. Start installation and upload the above files to the root directory.
1, mmseg-0.7.3 Installation
Unzip the Installation File tar-zxvf mmseg-0.7.3.tar.gz first
Cd mmseg-0.7.3/
./Configure
Make
Make install
Cd ../
Mmseg has been installed.
Run the mmseg command to check whether the installation is successful.
2. Install the MySQL 5.1.26-rc, Sphinx, and SphinxSE storage engines
Decompress the mysql and sphinx source files first.
Tar zxvf mysql-5.1.26-rc.tar.gz
Tar zxvf sphinx-0.9.8-rc2.tar.gz
Then patch the sphenders. This patch is required to support Chinese characters.
Cd sphinx-0.9.8-rc2/
(Verify that the patch has been installed. If no patch is installed, use apt-get install patch)
Patch-p1 <../sphinx-0.98rc2.zhcn-support.patch
Patch-p1 <../fix-crash-in-excerpts.patch
Then copy the data in the mysqlse folder under sphinx to the mysql-5.1.26-rc/storage/sphinx (so that the SphinxSE storage engine can be compiled when mysql is compiled)
Cp-rf mysqlse ../mysql-5.1.26-rc/storage/sphse
Go to the/mysql-5.1.26-rc/storage/sphinx directory to check if the file has been copied successfully
Cd ../
Next let's compile and install the mysql-5.1.26-rc
Cd mysql-5.1.26-rc/
Sh BUILD/autorun. sh is required. Do not omit it.
Use the configure command to confirm Installation
./Configure -- prefix =/usr/local/mysql -- with-charset = utf8 -- with-extra-charsets = all -- with-plugins = sphsets
Check whether a prompt can be compiled using make. If yes.
Run
Make
This step takes a long time, generally in 10-20 minutes, mainly depends on the personal computer configuration
After the compilation is successful, run the installation command again (if an error occurs, you need to re-compile it. Generally, 80% of errors are not installed in the compilation environment (my compilation experience ))
Make install // This process takes less than 1 minute
In this way, mysql has been installed.