源碼安裝nginx、mysql的注意事項

來源:互聯網
上載者:User

標籤:伺服器   作業系統   軟體包   開源軟體   release   

作業系統:CentOS release 6.9 (Final)

伺服器採用迷你安裝:CentOS-6.8-x86_64-minimal.iso

在安裝nginx、mysql等開源軟體時需要安裝常用或特殊支援的軟體包或庫。

安裝nginx軟體時,常需要安裝下列依賴包或庫:

#yum install pcre pcre-devel openssl openssl-devel gcc wget -y

安裝mysql軟體時,常需要安裝下列依賴包或庫:

#yum install  gcc gcc-c++   cmake   ncurses-devel  git -y

常見mysql安裝配置的錯誤解決方式:

問題1:

[[email protected] bin]# mysql

-bash: mysql: command not found

[[email protected] bin]# ln -s /usr/local/mysql/bin/mysql  /usr/bin

問題2:

安裝通不過,可以通過以下命令嘗試:

#make clean

#rm CMakeCache.txt

再次編譯,即可。

問題3:

[[email protected] ~]# service mysqld start

Starting MySQL... ERROR! The server quit without updating PID file (/application/mysql/data/localhost.localdomain.pid). #原因是沒有成功初始化資料庫。

問題4

找不到類似的命令:-bash: mysql_install_db: command not found

一般不是沒有安裝相關庫,就是路徑書寫不對。

[[email protected] scripts]# ./mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data --user=mysql    #正確的方式


本文出自 “sky9890” 部落格,請務必保留此出處http://sky9896.blog.51cto.com/2330653/1932903

源碼安裝nginx、mysql的注意事項

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.