最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】给Linode中CentOS安装LNMP

CentOS crifan 3925浏览 0评论

在:

【记录】购买Linode的Atlanta服务器并部署CentOS镜像

之后,去尝试登录Lincode的Atalanta的CentOS,去安装LNMP

参考:

Linode VPS 新手使用教程 超详细! | 料网 | 外贸前线_分享外贸实战经验和网络营销知识

安装 – LNMP一键安装包

Linode VPS折腾笔记-安装LNMP – KOKWIND

[root@crifan ~]# pwd
/root
[root@crifan ~]# ll
total 4
-rw——- 1 root root 1340 Feb  7  2017 anaconda-ks.cfg
[root@crifan ~]# screen -S lnmp
-bash: screen: command not found
[root@crifan ~]# yum install screen
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies

<div–<> Running transaction check

<div–<-> Package screen.x86_64 0:4.1.0-0.23.20120314git3c2946.el7_2 will be installed

<div–<> Finished Dependency Resolution

Dependencies Resolved
============================================================================================================================================
Package                   Arch                      Version                                                  Repository               Size
============================================================================================================================================
Installing:
screen                    x86_64                    4.1.0-0.23.20120314git3c2946.el7_2                       base                    552 k
Transaction Summary
============================================================================================================================================
Install  1 Package
Total download size: 552 k
Installed size: 914 k
Is this ok [y/d/N]: y
Downloading packages:
screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64.rpm                                                                 | 552 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64                                                                         1/1
  Verifying  : screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64                                                                         1/1
Installed:
  screen.x86_64 0:4.1.0-0.23.20120314git3c2946.el7_2                                                                                        
Complete!
[root@crifan ~]#

然后继续

[root@crifan ~]# wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4
-bash: wget: command not found
[root@crifan ~]# yum -y install wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies

<div–<> Running transaction check

<div–<-> Package wget.x86_64 0:1.14-13.el7 will be installed

<div–<> Finished Dependency Resolution

Dependencies Resolved
============================================================================================================================================
Package                        Arch                             Version                               Repository                      Size
============================================================================================================================================
Installing:
wget                           x86_64                           1.14-13.el7                           base                           546 k
Transaction Summary
============================================================================================================================================
Install  1 Package
Total download size: 546 k
Installed size: 2.0 M
Downloading packages:
wget-1.14-13.el7.x86_64.rpm                                                                                          | 546 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wget-1.14-13.el7.x86_64                                                                                                  1/1
  Verifying  : wget-1.14-13.el7.x86_64                                                                                                  1/1
Installed:
  wget.x86_64 0:1.14-13.el7                                                                                                                 
Complete!
[root@crifan ~]#

接着重试:

[root@crifan ~]# wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4

<div–<2017-09-04 21:21:06–  http://soft.vpser.net/lnmp/lnmp1.4.tar.gz

Resolving soft.vpser.net (soft.vpser.net)… 2600:3c01::f03c:91ff:fe92:1a06, 50.93.201.152
Connecting to soft.vpser.net (soft.vpser.net)|2600:3c01::f03c:91ff:fe92:1a06|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 136882 (134K) [application/octet-stream]
Saving to: nmp1.4.tar.gz
100%[==================================================================================================>] 136,882      809KB/s   in 0.2s   
2017-09-04 21:21:07 (809 KB/s) – nmp1.4.tar.gzsaved [136882/136882]
[root@crifan lnmp1.4]#

然后去看看:

[root@crifan lnmp1.4]# ll -lha
total 100K
drwxr-xr-x  7 root root 4.0K Aug  2 10:19 .
dr-xr-x—. 3 root root 4.0K Sep  4 21:21 ..
-rwxr-xr-x  1 root root 8.5K Jun  1 14:06 addons.sh
-rw-r–r–  1 root root  12K Jun  1 14:06 ChangeLog
drwxr-xr-x  3 root root 4.0K Aug 23 21:47 conf
drwxr-xr-x  2 root root 4.0K Aug 19 11:28 include
drwxr-xr-x  2 root root 4.0K May 29 08:43 init.d
-rwxr-xr-x  1 root root 5.7K Aug  1 22:12 install.sh
-rw-r–r–  1 root root  209 Jul  3  2016 License
-rwxr-xr-x  1 root root  313 Jun  1 14:06 lnmp.conf
-rwxr-xr-x  1 root root 4.7K Jun  1 14:06 pureftpd.sh
-rw-r–r–  1 root root 6.0K Jun  1 14:08 README
drwxr-xr-x  3 root root 4.0K Jul  9  2015 src
drwxr-xr-x  2 root root 4.0K Apr  1 09:49 tools
-rwxr-xr-x  1 root root 6.4K Jun  1 14:06 uninstall.sh
-rwxr-xr-x  1 root root 2.6K Jun 12 21:27 upgrade1.x-1.4.sh
-rwxr-xr-x  1 root root 2.8K Jun  1 14:06 upgrade.sh

去把配置中的:

Download_Mirror=’https://soft.vpser.net’;
Nginx_Modules_Options=”
PHP_Modules_Options=”
##MySQL/MariaDB database directory##
MySQL_Data_Dir=’/usr/local/mysql/var’
MariaDB_Data_Dir=’/usr/local/mariadb/var’
##Default website home directory##
Default_Website_Dir=’/home/wwwroot/default’
Enable_Nginx_Openssl=‘y’

改为:

[root@crifan lnmp1.4]# cat lnmp.conf
Download_Mirror=’https://soft.vpser.net’;
Nginx_Modules_Options=”
PHP_Modules_Options=”
##MySQL/MariaDB database directory##
MySQL_Data_Dir=’/usr/local/mysql/var’
MariaDB_Data_Dir=’/usr/local/mariadb/var’
##Default website home directory##
Default_Website_Dir=’/home/wwwroot/crifan’
Enable_Nginx_Openssl=’y’

安装之前先去看看现在自己网上的配置:

https://www.crifan.com/p.php

PHP探针

for LNMP一键安装包 LNMP支持论坛

服务器参数
服务器域名/IP地址
服务器标识
Linux eml-131.southerlybirthday.com 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64
服务器操作系统
Linux  内核版本:2.6.32-504.23.4.el6.x86_64
服务器解译引擎
nginx/1.12.0
服务器语言
zh-cn
服务器端口
443
服务器主机名
绝对路径
/home/wwwroot/www.crifan.com
管理员邮箱
探针路径
/home/wwwroot/www.crifan.com/p.php
服务器实时数据
服务器当前时间
2017-9-4 21:22:30
服务器已运行时间
34天5小时28分钟
总空间
74.79 GB
36.541 GB
CPU型号 [4核]
QEMU Virtual CPU version (cpu64-rhel6) | 频率:2393.998 | 二级缓存:4096 KB | Bogomips:4787.99 ×4
内存使用状况
物理内存:共 3.741 GB , 已用 3.635 GB , 空闲 0.106 GB , 使用率 97.18
 
Cache化内存为 2.31 GB , 使用率 61.74 % | Buffers缓冲为  0.14 GB
 
真实内存使用 1.186 GB , 真实内存空闲 2.555 GB , 使用率 31.7 %
 
SWAP区:共 4 GB , 已使用 0.065 GB , 空闲 3.935 GB , 使用率 1.63 %
 
系统平均负载
0.87 0.69 0.62 3/196
网络使用状况
lo : 
已接收 : 5.56556 GB
已发送 : 5.56556 GB
eth0 : 
已接收 : 17.02402 GB
已发送 : 309.90196 GB
PHP已编译模块检测
Core  date  ereg  libxml  openssl  pcre  sqlite3  zlib  bcmath  ctype  curl  dom  filter  
ftp  gd  gettext  hash  iconv  intl  json  mbstring  mcrypt  SPL  session  standard  pcntl  
mysqlnd  PDO  pdo_mysql  pdo_sqlite  Phar  posix  Reflection  mysqli  shmop  SimpleXML  soap  sockets  mysql  
sysvsem  tokenizer  xml  xmlreader  xmlrpc  xmlwriter  xsl  zip  cgi-fcgi  redis  mhash  Zend Guard Loader  Zend OPcache  
PHP相关参数
PHP信息(phpinfo):
PHP版本(php_version):
5.6.30
PHP运行方式:
FPM-FCGI
脚本占用最大内存(memory_limit):
128M
PHP安全模式(safe_mode):
×
POST方法提交最大限制(post_max_size):
50M
上传文件最大限制(upload_max_filesize):
50M
浮点型数据显示的有效位数(precision):
14
脚本超时时间(max_execution_time):
300秒
socket超时时间(default_socket_timeout):
60秒
PHP页面根目录(doc_root):
×
用户根目录(user_dir):
×
dl()函数(enable_dl):
×
指定包含文件目录(include_path):
×
显示错误信息(display_errors):
×
自定义全局变量(register_globals):
×
数据反斜杠转义(magic_quotes_gpc):
×
"<?…?>"短标签(short_open_tag):
"<% %>"ASP风格标记(asp_tags):
×
忽略重复错误信息(ignore_repeated_errors):
×
忽略重复的错误源(ignore_repeated_source):
×
报告内存泄漏(report_memleaks):
自动字符串转义(magic_quotes_gpc):
×
外部字符串自动转义(magic_quotes_runtime):
×
打开远程文件(allow_url_fopen):
声明argv和argc变量(register_argc_argv):
×
Cookie 支持:
拼写检查(ASpell Library):
×
高精度数学运算(BCMath):
PREL相容语法(PCRE):
PDF文档支持:
×
SNMP网络管理协议:
×
VMailMgr邮件处理:
×
Curl支持:
SMTP支持:
SMTP地址:
localhost
默认支持函数(enable_functions):
被禁用的函数(disable_functions):
passthru  exec  system  chroot  chgrp  
chown  shell_exec  proc_open  proc_get_status  popen  
ini_alter  ini_restore  dl  openlog  syslog  
readlink  symlink  popepassthru  stream_socket_server  
组件支持
FTP支持:
XML解析支持:
Session支持:
Socket支持:
Calendar支持
×
允许URL打开文件:
GD库支持:
bundled (2.1.0 compatible)
压缩文件支持(Zlib):
IMAP电子邮件系统函数库:
×
历法运算函数库:
×
正则表达式函数库:
WDDX支持:
×
Iconv编码转换:
mbstring:
高精度数学运算:
LDAP目录协议:
×
MCrypt加密处理:
哈稀计算:
第三方组件
Zend版本
2.6.0
ZendGuardLoader[启用]
eAccelerator
×
ioncube
×
XCache
×
APC
×
数据库支持
MySQL 数据库:
ODBC 数据库:
×
Oracle 数据库:
×
SQL Server 数据库:
×
dBASE 数据库:
×
mSQL 数据库:
×
SQLite 数据库:
 SQLite3 Ver 3.8.10.2
Hyperwave 数据库:
×
Postgre SQL 数据库:
×
Informix 数据库:
×
DBA 数据库:
×
DBM 数据库:
×
FilePro 数据库:
×
SyBase 数据库:
×
MySQL数据库连接检测
地址: 端口: 用户名: 密码:
函数检测
请输入您要检测的函数: 
邮件发送检测
请输入您要检测的邮件地址: 

© 2012 LNMP一键安装包

This Prober was based on Yahei Prober.

Processed in 0.0022 seconds. 0.3MB memory usage.

https://www.crifan.com/info.php

其中mysql竟然是:

mysqlnd 5.0.11-dev – 20120503 – $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $ 

然后PHP是:

PHP Version 5.6.30

所以此处去:

./install.sh lnmp

选择3:

3: Install MySQL 5.6.36

+————————————————————————+
|          LNMP V1.4 for CentOS Linux Server, Written by Licess          |
+————————————————————————+
|        A tool to auto-compile & install LNMP/LNMPA/LAMP on Linux       |
+————————————————————————+
|           For more information please visit https://lnmp.org           |
+————————————————————————+
You have 5 options for your DataBase install.
1: Install MySQL 5.1.73
2: Install MySQL 5.5.56 (Default)
3: Install MySQL 5.6.36
4: Install MySQL 5.7.18
5: Install MariaDB 5.5.56
6: Install MariaDB 10.0.30
7: Install MariaDB 10.1.23
0: DO NOT Install MySQL/MariaDB
Enter your choice (1, 2, 3, 4, 5, 6, 7 or 0): 3
You will Install MySQL 5.6.36
===========================
Please setup root password of MySQL.(Default password: root)
Please enter: xxx
MySQL root password: xxx
===========================
Do you want to enable or disable the InnoDB Storage Engine?
Default enable,Enter your choice [Y/n]: y
Default enable,Enter your choice [Y/n]: y
You will enable the InnoDB Storage Engine
===========================
You have 6 options for your PHP install.
1: Install PHP 5.2.17
2: Install PHP 5.3.29
3: Install PHP 5.4.45
4: Install PHP 5.5.38 (Default)
5: Install PHP 5.6.31
6: Install PHP 7.0.21
7: Install PHP 7.1.7
Enter your choice (1, 2, 3, 4, 5, 6 or 7): 5

其他配置,参考:

Linode VPS 新手使用教程 超详细! | 料网 | 外贸前线_分享外贸实战经验和网络营销知识

然后就是一堆刷屏,去安装了:

【未解决】screen -r lnmp失败:There is no screen to be resumed matching lnmp

要的确找不到lnpm:

[root@crifan lnmp1.4]# which lnmp
/usr/bin/which: no lnmp in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

看来只能抽空再去重新安装lnmp了。。

先去:

【记录】卸载lnmp

之后再去:

【记录】重新给Linode中CentOS安装LNMP

转载请注明:在路上 » 【记录】给Linode中CentOS安装LNMP

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.191 seconds, using 22.21MB memory