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介绍
原文地址:http://blog.51cto.com/12058686/2085848