procedure of intall and setup centos 6.5


  1. select webserver install option,and select ,uncheck the postgresql option

selected some 「… platform」 optionshtml

selected all virtualization optionsmysql

  1. setup network and check ssh service

 

ok,now install mysqlweb

開始先下載了mysql的二進制包 發現安裝過程各類不順利,放棄sql

而後下載源碼安裝,因爲是5.6.15版本 須要cmake,shell

cmake . 報錯ssh

發現gcc也沒有,原來是安裝系統的時候沒有選擇Development tools,當時覺得是ide之類的 原來是些cmake gcc等之類的開發工具,而後ide

yum groupinstall "Development tools"工具

ok搞定,再次cmakepost

發現報錯:Could NOT find Threads  (missing:  Threads_FOUND)開發工具

google之,嘗試刪掉CMakeCache.txt

 

安裝msyql(cellar目錄是我本身建的,可任意):

cmake -DMAKE_INSTALL_PREFIX=/usr/local/cellar/mysql-5.6.15 -DMYSQL_DATADIR=/usr/local/cellar/mysql-5.6.15/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_UNIX_ADDR=/usr/local/cellar/mysql-5.6.15/var/run/mysql.sock -DMYSQL_TCP_PORT=3306 -DEXTRA_CHARSETS=all

make && make install

 

./scripts/mysql_install_db --user=mysql --basedir=/usr/local/cellar/mysql-5.6.15/ --datadir=/usr/local/cellar/mysql-5.6.15/data/

注意:utf8 不要寫成utf-8 不然會啓動時候出錯

而後出現了2個警告:

一、WARNING: The host 'host01.funplus' could not be looked up with /usr/local/cellar/mysql-5.6.15//bin/resolveip.

This probably means that your libc libraries are not 100 % compatible

with this binary MySQL version. The MySQL daemon, mysqld, should work

normally with the exception that host name resolving will not work.

This means that you should use IP addresses instead of hostnames

when specifying MySQL privileges !

二、Installing MySQL system tables...2014-01-26 21:38:51 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

 

mysql 安裝成功後提示內容:

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

 

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands: 

  /usr/local/cellar/mysql-5.6.15//bin/mysqladmin -u root password 'new-password'

  /usr/local/cellar/mysql-5.6.15//bin/mysqladmin -u root -h host01.funplus password 'new-password'

 

Alternatively you can run:

  /usr/local/cellar/mysql-5.6.15//bin/mysql_secure_installation

 

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd . ; /usr/local/cellar/mysql-5.6.15//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/local/cellar/mysql-5.6.15//my.cnf and

will be used by default by the server when you start it.

You may edit this file to change server settings

 

  

5.1.3. Server Command Options

When you start the mysqld server, you can specify program options using any of the methods described inSection 4.2.3, 「Specifying Program Options」. The most common methods are to provide options in an option file or on the command line. However, in most cases it is desirable to make sure that the server uses the same options each time it runs. The best way to ensure this is to list them in an option file. See Section 4.2.3.3, 「Using Option Files」. That section also describes option file format and syntax.

mysqld reads options from the [mysqld] and [server] groups. mysqld_safe reads options from the[mysqld][server][mysqld_safe], and [safe_mysqld] groups. mysql.server reads options from the[mysqld] and [mysql.server] groups.

 

2.9.4. MySQL Source-Configuration Options

The following table shows the available CMake options. In the Default column, PREFIX stands for the value of the CMAKE_INSTALL_PREFIX option, which specifies the installation base directory. This value is used as the parent location for several of the installation subdirectories.

 

mysql安裝總結:

裝了N屢次,仍是常常出問題,不要選擇二進制包,用源碼安裝,若是不須要更方便配置的話能夠用yum安裝

cmake的參數官網上有詳細介紹,網上搜到的不少處理錯誤的方法多是針對低版本的,像mysql 5.6這樣比較新的版本不必定適用

基本步驟:

  1. 下載源碼包,解壓
  2. 創建mysql用戶和組,並分配指定目錄的權限
  3. cmake編譯,注意設定合適的參數
  4. 到安裝後的目錄中找到執行./script/mysql_install_db,注意指定user basedir datadir參數
  5. 啓動mysql 可按照提示信息處理

 

# Preconfiguration setup
shell> 
shell> 
# Beginning of source-build specific instructions
shell> 
shell> 
shell> 
shell> 
shell> 
# End of source-build specific instructions
# Postinstallation setup
shell> 
shell> 
shell> 
shell> 
shell> 
shell> 
shell> 
# Next command is optional
shell> 
groupadd mysqluseradd -r -g mysql mysqltar zxvf mysql-VERSION.tar.gzVERSIONcd mysql-VERSIONVERSIONcmake .makemake installcd /usr/local/mysqlchown -R mysql .chgrp -R mysql .scripts/mysql_install_db --user=mysqlchown -R root .chown -R mysql databin/mysqld_safe --user=mysql &cp support-files/mysql.server /etc/init.d/mysql.server

mysql_install_db creates a default option file named my.cnf in the base installation directory. This file is created from a template included in the distribution package named my-default.cnf. For more information, seeSection 5.1.2.2, 「Using a Sample Default Server Configuration File」.

 

三、前面因爲選了虛擬化相關組件,可是發現版本較低

yum remove kvm

yum install kvm

ok 版本提升了

yum remove libvirt libvirt-client

yum install libvirt libirt-client

發現版本沒變 仍是0.10.2

相關文章
相關標籤/搜索