新聞中心

創(chuàng)新互聯(lián)建站-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比廣饒網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式廣饒網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋廣饒地區(qū)。費用合理售后完善,十多年實體公司更值得信賴。
解壓縮一鍵安裝包
我們把 LNMP 一鍵安裝包保存在 /usr/local/src/ 目錄下,第一步仍然是解壓縮一鍵安裝包。命令如下:
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# tar -zxvf lnmp1.0-full.tar.gz
執(zhí)行安裝腳本安裝 LNMP 一鍵安裝包
既然是腳本安裝包,那就不需要我們一個一個手工安裝了,只要執(zhí)行安裝腳本 centos.sh 即可自動安裝(Debian 中執(zhí)行腳本為 debian.sh,Ubuntu 中執(zhí)行腳本為 ubuntu.sh)。命令如下:
[root@localhost src]# cd lnmp1.0-full
[root@localhost lnmp1.0-full]#./centos.sh
回車之后安裝就會繼續(xù),會看到如下界面:
==========================================================
LUMP V1.0 for CentOS/RadHat Linux VPS Written by Licess
==========================================================
A tool to auto-compile & install Nginx+MySQL+PHP on Linux
For more information please visit http://www.lnmp.org/
==========================================================
Please input the root password of mysql:
(Default password: root) : 123 #設(shè)定MySQL 的密碼,這里設(shè)為 123
==========================================================
Do you want to install the InnoDB Storage Engine?
(Default no,if you want please input: y , if not please press the enter button):y
#是否需要安裝MySQL InnoDB,如果需要安裝則輸入y
Install PHP 5.3.17,Please input y
Install PHP 5.2.17,Please input n or press Enter
(Please input y or n) :y
#選擇安裝PHP的版本,輸入y安裝的是5.3.17
Install MySQL 5.5.27,Please input y
Install MySQL 5.1.60,Please input n or press Enter
(Please input y or n) :y
#選擇安裝MySQL的版本,輸入y安裝的是5.5.27
Press any key to start. . .or Press Ctrl+c to cancel #按任意鍵開始安裝
如果在安裝過程中輸入錯誤,則可以按“Ctrl+Backspace”組合鍵來進行刪除。這個安裝過程完全是依賴 centos.sh 腳本自動執(zhí)行的,所以比 LAMP 的手工安裝過程簡單得多,我們只要指定一些基本的選項,就可以完成安裝了。
具體的安裝時間要視 Linux 服務(wù)器的性能而定,可能會等待幾十分鐘。如果大家有興趣,則可以查看一下 centos.sh 這個安裝腳本,看看它是如何實現(xiàn)自動安裝的。如果看到以下界面,則證明安裝成功。
=========================================================
Manager for LNMP VI.0 , Written by Licess
=========================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================
Nginx is runing!
php-fpm is runing!
MySQL running (12489) [確定]
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:53575 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::57454 :::* LISTEN
tcp 0 0 :::111 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
tcp 0 0 ::1:25 :::* LISTEN
LNMP一鍵安裝包安裝的軟件及具體位置
既然是一鍵安裝,那么默認(rèn)安裝的軟件和軟件的安裝位置都是事先設(shè)定好的,在安裝過程中不能更改。具體安裝了哪些軟件及其位置如表 1 所示。
| 默認(rèn)安裝軟件 | 軟件安裝位置 | 軟件相關(guān)配置文件名 | 配置文件安裝位置 |
|---|---|---|---|
| Nginx | /usr/local/nginx/ | Nginx 配置文件 | /usr/local/nginx/conf/nginx.conf |
| 默認(rèn)網(wǎng)站目錄 | /home/wwwroot/delault | ||
| 曰志文件 | /home/wwwlogs/ | ||
| MySQL | /usr/local/mysql/ | MySQL 配置文件 | /etc/my.cnf |
| 數(shù)據(jù)所在位置 | /usr/local/mysql/var/ | ||
| PHP | /usr/local/php/ | PHP 配置文件 | /usr/local/php/etc/php.ini |
| php-fpm配置文件 | /usr/local/php/clc/php-rpm.conf | ||
| phpMyAdmin | /homc/wwwroot/dcfault/phpmyadmin/ | 無 | 無 |
| Zend Optimizer | /usr/local/zend/ | 無 | 無 |
也就是說,LNMP 一鍵安裝只安裝了基本的 Nginx、MySQL、PHP、phpMyAdmin 和 Zend Optimizer。
本文題目:LNMP一鍵安裝過程詳解
網(wǎng)址分享:http://www.dlmjj.cn/article/cdciseo.html


咨詢
建站咨詢
