The entire process of installing Mysql5.5 in CentOS is CentOS
BitsCN.com
1. install cmake # install the required dependency package yum-y install gcc libxml2-dev curl screen/libpng12-dev autoconf libpcre3-dev make bzip2/libevent-dev patch libjpeg62-dev libcurl4-openssl-dev libfreetype6-dev/libncurses5-dev g ++ libtool psmisc lrzsz # download file wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz # compile and install tar zxvf cmake-2.8.5.tar.gzcd cmake-2.8.5. /boostarpmakemake installcmake-version 2. installation configuration mysql # Download source file wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.17.tar.gz/from/ftp://ftp.ntu.edu.tw/pub/MySQL/# or wget ftp://ftp.ntu.edu.tw/pub/MySQL/Downloads/MySQL-5.5/mysql-5.5.17.tar.gz # create user and group groupadd mysqluseradd-g mysql-s/usr/sbin/nologin mysql # Create installation directory mkdir/usr/local/mysql # create Database Directory mkdir/usr/local/mysql/data # unzip tar-zxvf mysql-5.5.17.tar.gzcd mysql-5.5.17 # compile and install mysql # cmake compile: cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql/-plugin =/usr/local/mysql/data/-DDEFAULT_CHARSET = utf8/-DDEFAULT_COLLATION = logs/-DWITH_READLINE = 1/-DWITH_SSL = system/
-Plugin = 1/-DENABLED_LOCAL_INFILE = 1/-DDEFAULT_COLLATION = utf8_general_ci/-plugin = 1/-plugin = 1/-DWITH_DEBUG = 0 # install mysqlmake & make install # Copy the configuration file cp support-files/my-medium.cnf/etc/my. cnf # set the permission chmod + x/usr/local/mysqlchown-R mysql. mysql/usr/local/mysqlchown-R mysql: mysql/usr/local/mysql/data # configure automatic startup cp support-files/mysql. server/etc/init. d/mysqldchmod + x/etc/init. d/mysqldchkconfig-add mysqldchkconfg mysqld on # modify my. configure vim/etc/my. cnf # [mysqld] Add: datadir =/usr/local/mysql/datadefault-storage-engine = MyISAM # The following are optional: log-error =/usr/local/mysql/data/error. logpid-file =/usr/local/mysql/data/mysql. piduser = mysqltmpdir =/tmp # Initialize the database/usr/local/mysql/scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/usr/local/ mysql/data & # start MySQL/usr/local/mysql/bin/mysqld_safe-defaults-file =/etc/my. cnf & OR:/etc/init. d/mysql start (service mysql start) # test whether MySQL is started #1) check whether there is a process mysqlps-ef | grep mysql #2) check whether the port is running netstat-tnl | grep 3306 #3) read mysql version information/usr/local/mysql/bin/mysqladmin version # so far, MySQL installation is complete
BitsCN.com