RHEL6 1下從原始碼安裝Mysql5 5 18

2021-06-02 07:01:39 字數 1590 閱讀 3743

在rhel6.1上安裝了gcc後,就是對mysql源**的編譯。過程如下:

根據網上的一些資料,都是無法實現,只能嘗試根據原始碼包自帶的說明文件install-source來安裝。

根據2.9.2. installing mysql from a standard source distribution

shell> groupadd mysql

shell> useradd -r -g mysql mysql

# beginning of source-build specific instructions

shell> tar zxvf mysql-version.tar.gz

shell> cd mysql-version

shell> cmake .

shell> make

shell> make install

# end of source-build specific instructions

# postinstallation setup

shell> cd /usr/local/mysql

shell> chown -r mysql .

shell> chgrp -r mysql .

shell> scripts/mysql_install_db --user=mysql

shell> chown -r root .

shell> chown -r mysql data

# next command is optional

shell> cp support-files/my-medium.cnf /etc/my.cnf

shell> bin/mysqld_safe --user=mysql &

# next command is optional

shell> cp support-files/mysql.server /etc/init.d/mysql.server

補充說明,如果copy失敗,可先建立乙個檔案,在複製進行覆蓋。

接著把mysql.server的屬性改為x

# chmod +x mysql.server

最後,執行chkconfig把mysql.server新增到你系統的啟動服務組裡面去

#/sbin/chkconfig --del mysql.server

#/sbin/chkconfig --add mysql.server

按照說明一步步執行就沒問題了。

安裝完畢後資料庫還沒有對root使用者設定密碼,mysql預設是不可以通過遠端機器訪問的,通過下面的配置可以開啟遠端訪問

shell>cd /usr/local/mysql/bin

shell>mysql

mysql>use mysql;   

mysql>set password for 'root'@'localhost' = password('root');

mysql> grant

allon *.* to

root@

'%' identified by

'root'

with

grant

option;   

rhel安裝核心原始碼

有些軟體包是以.src.rpm結尾的,這類軟體包是包含了源 的rpm包,在安裝時需要進行編譯。這類軟體包有兩種安裝方法 方法一 1.rpm i your package.src.rpm 2.cd usr src redhat specs 3.rpmbuild bp your package.spec...

Centos7使用編譯原始碼方式安裝mysql

注 本文參考 最美的痕跡博文 首先,把工具包安裝上 yum y install gcc libxml2 dev curl screen libpng12 dev autoconf libpcre3 dev make bzip2 libevent dev patch libjpeg62 dev lib...

Linux下安裝Mysql 原始碼安裝

1 用root登入系統,增加mysql使用者和組 groupadd mysql useradd g mysql mysql 2 解壓原始碼包,並進入解壓後的目錄 tar xvfz mysql 5.1.38.tar.gz cd mysql 5.1.38 3 用configure工具來編譯源 這裡我們可...