VPS侦探论坛

 找回密码
 注册
查看: 3712|回复: 4

XEN VPS Centos 6.X 安装LNMP 重启VPS后无法访问

[复制链接]
发表于 2016-9-18 10:40:19 | 显示全部楼层 |阅读模式

每次重启VPS后都无法访问,重装两次了  还是一样。论坛的各种方法都试了 还是无解
重启后无法访问是因为 LNMP 服务没启动,需要 SSH 命令 lnmp restart 后就正常了。
搞两天了,搞的心理发毛。。新手能力有限 只好 来请教军哥
[root@MyServer524 ~]# iptables -F
[root@MyServer524 ~]#  /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2016-9-18 10:57:39 | 显示全部楼层


这是重启VPS后打不开 IP访问不了探针 等问题的情况下  执行 lnmp
restart 后可以打开 IP 探针等情况下的服务器状态。
如果需要打不开的 信息,请回复 我怎么操作 谢谢
[root@MyServer524 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr CE:A6E:FB:7F:09
          inet addr:104.223.183.80  Bcast:104.223.183.127  Mask:255.255.255.192
          inet6 addr: fe80::cca6:deff:fefb:7f09/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:84540 errors:0 dropped:0 overruns:0 frame:0
          TX packets:636 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4013628 (3.8 MiB)  TX bytes:195304 (190.7 KiB)
          Interrupt:23

lo        Link encapocal Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@MyServer524 ~]# sudo netstat -ap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             Stat                       e       PID/Program name
tcp        0      0 *:mysql                     *:*                         LIST                       EN      4813/mysqld
tcp        0      0 *:http                      *:*                         LIST                       EN      4313/nginx
tcp        0      0 *:ftp                       *:*                         LIST                       EN      1514/pure-ftpd (SER
tcp        0      0 *:ssh                       *:*                         LIST                       EN      967/sshd
tcp        0      0 localhost:ipp               *:*                         LIST                       EN      919/cupsd
tcp        0     52 104.223.183.80:ssh          142-6-32-55.static:datalens ESTA                       BLISHED 1570/sshd
tcp        0      0 104.223.183.80:http         222.243.210.:unbind-cluster ESTABLISH                  ED 4318/nginx
tcp        0      0 *:ftp                       *:*                         LISTEN                        1514/pure-ftpd (SER
tcp        0      0 *:ssh                       *:*                         LISTEN                        967/sshd
tcp        0      0 localhost:ipp               *:*                         LISTEN                        919/cupsd
udp        0      0 *:ipp                       *:*                                                       919/cupsd
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     13012  4813/mysqld         /tmp/mys                  ql.sock
unix  2      [ ACC ]     STREAM     LISTENING     13036  4836/php-fpm        /tmp/php                  -cgi.sock
unix  4      [ ]         DGRAM                    7965   801/rsyslogd        /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     6790   1/init              @/com/ub                  untu/upstart
unix  2      [ ]         DGRAM                    6934   335/udevd           @/org/ke                  rnel/udev/udevd
unix  2      [ ACC ]     STREAM     LISTENING     8045   850/dbus-daemon     /var/run                  /dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     8156   919/cupsd           /var/run                  /cups/cups.sock
unix  2      [ ]         DGRAM                    13978  5112/sudo
unix  3      [ ]         STREAM     CONNECTED     13035  4836/php-fpm
unix  3      [ ]         STREAM     CONNECTED     13034  4836/php-fpm
unix  3      [ ]         STREAM     CONNECTED     12664  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12663  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12662  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12661  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12660  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12659  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12658  4313/nginx
unix  3      [ ]         STREAM     CONNECTED     12657  4313/nginx
unix  2      [ ]         DGRAM                    9579   1570/sshd
unix  2      [ ]         DGRAM                    8994   1514/pure-ftpd (SER
unix  3      [ ]         STREAM     CONNECTED     8069   850/dbus-daemon     /var/run                  /dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     8068   1/init
unix  3      [ ]         STREAM     CONNECTED     8057   850/dbus-daemon
unix  3      [ ]         STREAM     CONNECTED     8056   850/dbus-daemon
unix  3      [ ]         DGRAM                    6951   335/udevd
unix  3      [ ]         DGRAM                    6950   335/udevd
[root@MyServer524 ~]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2016-9-18 13:37:27 | 显示全部楼层

可能再重新
chkconfig --add nginx
chkconfig nginx on
chkconfig --add mysql
chkconfig mysql on
chkconfig --add php-fpm
chkconfig php-fpm on
加一下启动项重启看看试试
不行的话,编辑/etc/rc.d/rc.local
加上 /bin/lnmp restart 重启试试
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2016-9-18 14:57:08 | 显示全部楼层

回复 3# 的帖子




军哥你好,通过添加重启后 启动 lnmp 命令行解决了 我上面的问题。

新的问题是 安装 FTP 后,通过 IP/ftp 访问时404 卸载 重启  访问 还是一样,卸载了 重装 还是一样。

opy configure files...
Add pureftpd service at system startup...
iptables: Index of insertion too big.
iptables: Index of insertion too big.
iptables: Index of insertion too big.
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
Starting pureftpd...
Starting Pure-FTPd...  done
+----------------------------------------------------------------------+
| Install Pure-FTPd completed,enjoy it!
| =>use command: lnmp ftp {add|list|del} to manage FTP users.
+----------------------------------------------------------------------+
| For more information please visit http://www.lnmp.org
+----------------------------------------------------------------------+
[root@MyServer524 lnmp1.3-full]#


这是成功的吧?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2016-9-18 21:50:55 | 显示全部楼层

回复 4# 的帖子


1.3本来就没web管理,安装教程和更新日志都有说明,上面安装完的提示上也有说明

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 23:39 , Processed in 0.026099 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表