最好的LNMP配置在0.5G記憶體的Centos7.0上

來源:互聯網
上載者:User
伺服器配置

Centos7.0+0.5G記憶體+1CPU

Web伺服器配置

PHP 5.4.16 + Nginx 1.6.3+MariaDB 5.5.44

在上面跑了一個shadowsocks和一個wordpress,資料庫設定檔使用my-small.cnf,但是MariaDB經常掛掉,所以求一個好的配置。

資料庫掛掉後,重啟MariaDb

啟動

systemctl start mariadb

結果

Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.

Run

systemctl status mariadb.service

 mariadb.service - MariaDB database server   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)   Active: failed (Result: exit-code) since 三 2015-11-11 00:42:58 EST; 14s ago  Process: 10969 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)  Process: 10968 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)  Process: 10941 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 10968 (code=exited, status=0/SUCCESS)11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.

Run

journalctl -xn

 -- Logs begin at 日 2015-11-08 06:23:57 EST, end at 三 2015-11-11 00:42:58 EST. --11月 11 00:27:21 jack sshd[10936]: Failed password for invalid user pi from 104.233.81.149 port 53083 ssh211月 11 00:27:21 jack sshd[10936]: Received disconnect from 104.233.81.149: 11: Bye Bye [preauth]11月 11 00:40:43 jack kernel: Ack 2451881106 before 2451884026:245189862611月 11 00:42:57 jack systemd[1]: Starting MariaDB database server...-- Subject: Unit mariadb.service has begun with start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has begun starting up.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.-- Subject: Unit mariadb.service has failed-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has failed.-- The result is failed.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.

回複內容:

伺服器配置

Centos7.0+0.5G記憶體+1CPU

Web伺服器配置

PHP 5.4.16 + Nginx 1.6.3+MariaDB 5.5.44

在上面跑了一個shadowsocks和一個wordpress,資料庫設定檔使用my-small.cnf,但是MariaDB經常掛掉,所以求一個好的配置。

資料庫掛掉後,重啟MariaDb

啟動

systemctl start mariadb

結果

Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.

Run

systemctl status mariadb.service

 mariadb.service - MariaDB database server   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)   Active: failed (Result: exit-code) since 三 2015-11-11 00:42:58 EST; 14s ago  Process: 10969 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)  Process: 10968 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)  Process: 10941 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 10968 (code=exited, status=0/SUCCESS)11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.

Run

journalctl -xn

 -- Logs begin at 日 2015-11-08 06:23:57 EST, end at 三 2015-11-11 00:42:58 EST. --11月 11 00:27:21 jack sshd[10936]: Failed password for invalid user pi from 104.233.81.149 port 53083 ssh211月 11 00:27:21 jack sshd[10936]: Received disconnect from 104.233.81.149: 11: Bye Bye [preauth]11月 11 00:40:43 jack kernel: Ack 2451881106 before 2451884026:245189862611月 11 00:42:57 jack systemd[1]: Starting MariaDB database server...-- Subject: Unit mariadb.service has begun with start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has begun starting up.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Logging to '/var/lib/mysql/jack.err'.11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql11月 11 00:42:57 jack mysqld_safe[10968]: 151111 00:42:57 mysqld_safe mysqld from pid file /var/lib/mysql/jack.pid ended11月 11 00:42:58 jack systemd[1]: mariadb.service: control process exited, code=exited status=111月 11 00:42:58 jack systemd[1]: Failed to start MariaDB database server.-- Subject: Unit mariadb.service has failed-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel-- Unit mariadb.service has failed.-- The result is failed.11月 11 00:42:58 jack systemd[1]: Unit mariadb.service entered failed state.
  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.