12.1 LNMP架構介紹12.2 MySQL安裝12.3/12.4 PHP安裝12.5 Nginx

來源:互聯網
上載者:User

標籤:12.1 LNMP架構介紹12.2 My

12.1 LNMP架構介紹

13.12.2 MySQL安裝

[[email protected] ~]# service mysql stop
Redirecting to /bin/systemctl stop mysql.service
[[email protected] ~]# ps -aux |grep mysql
root 1064 0.0 0.0 112676 956 pts/0 S+ 23:07 0:00 grep --color=auto mysql
[[email protected] ~]# rm -rf /usr/local/mysql
[[email protected] ~]# rm -rf /etc/init.d/mysqld
[[email protected] mysql]# cp support-files/my-default.cnf /etc/my.cnf
[[email protected] mysql]# cp support-files/mysql.server /etc/init.d/mysqld
[[email protected] mysql]# vi /etc/init.d/mysqld

[[email protected] mysql]# /etc/init.d/mysqld start
Starting MySQL... SUCCESS!
[[email protected] mysql]# ps -aux | grep mysql
root 1193 0.0 0.1 113264 1560 pts/0 S 23:26 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysql --pid-file=/data/mysql/martin001.pid
mysql 1302 0.9 44.9 973056 449444 pts/0 Sl 23:26 0:01 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/data/mysql/martin001.err --pid-file=/data/mysql/martin001.pid
root 1377 0.0 0.0 112676 956 pts/0 S+ 23:29 0:00 grep --color=auto mysql

[[email protected] mysql]# chkconfig --add mysqld
[[email protected] mysql]# chkconfig mysqld on
[[email protected] mysql]# service mysqld stop
Shutting down MySQL.. SUCCESS!
[[email protected] mysql]# service mysqld start
Starting MySQL.. SUCCESS!

14.12.3/12.4 PHP安裝

[[email protected] php-5.6.30]# ls /usr/local/php-fpm
bin etc include lib php sbin var
[[email protected] php-5.6.30]# ls /usr/local/php
bin etc include lib php
[[email protected] php-5.6.30]# ls /usr/local/php7
bin etc include lib php var
[[email protected] php-5.6.30]# useradd php-fpm
[[email protected] php-5.6.30]# cp php.ini-production /usr/local/php-fpm/etc/php.ini

[[email protected] init.d]# chmod 755 /etc/init.d/php-fpm
[[email protected] init.d]# chkconfig --add php-fpm
[[email protected] init.d]# chkconfig php-fpm on
[[email protected] init.d]# service php-fpm start
Starting php-fpm done
[[email protected] init.d]# ps -aux |grep php-fpm
root 117430 0.1 0.4 123612 4912 ? Ss 00:50 0:00 php-fpm: master process (/usr/local/php-fpm/etc/php-fpm.conf)
php-fpm 117431 0.0 0.4 123612 4700 ? S 00:50 0:00 php-fpm: pool www
php-fpm 117432 0.0 0.4 123612 4700 ? S 00:50 0:00 php-fpm: pool www
php-fpm 117433 0.0 0.4 123612 4700 ? S 00:50 0:00 php-fpm: pool www
php-fpm 117434 0.0 0.4 123612 4700 ? S 00:50 0:00 php-fpm: pool www

15.12.5 Nginx介紹

12.1 LNMP架構介紹12.2 MySQL安裝12.3/12.4 PHP安裝12.5 Nginx

聯繫我們

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