xampp搭建开源项目iwebshop后,服务器重启后再启动xampp显示组件都启动ok,但是实际启动失败解决办法
最近用xampp搭建了开源商城项目iwebshop,刚搭建完没问题,可是周一来因为服务器重启了,我再启动xampp,显示组件都启动ok了,但是用linux命令查看相关组件的进程时,发现实际没启动起来,在网上找了好久解决办法,按照下列步骤终于解决了。(因为xampp已经安装,所以忽略1-3条)
以下内容来源:http://www.cnblogs.com/stay-sober/p/4159614.html
安装xampp
1./opt目录下放xampp-Linux-1.8.3-3-installer.run、bugfree.zip
2.[root@centos1 opt]# chmod 775 xampp-linux-1.8.3-3-installer.run #赋权
3.[root@centos1 opt]# sudo ./xampp-linux-1.8.3-3-installer.run #安装xampp
4.启动xampp
[root@centos1 /]# sudo ./opt/lampp/lampp start
Starting XAMPP for Linux 1.8.3-3...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
[root@centos1 /]#
配置mysql服务
[root@centos1 ~]# find / -name mysql.server
/opt/lampp/share/mysql/mysql.server
/opt/lampp/bin/mysql.server ##mysql启动文件
[root@centos1 ~]# ln -s /opt/lampp/bin/mysql.server /etc/rc.d/init.d/mysql ##软连接(理解为快捷键)
[root@centos1 ~]# vi /etc/rc.d/init.d/mysql ##大概看了一眼
[root@centos1 ~]# chkconfig --add mysql ##增加mysql的系统服务
[root@centos1 ~]# chkconfig --list mysql ##列出mysql服务的设置情况
mysql 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@centos1 ~]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!
[root@centos1 ~]# service mysql status
SUCCESS! MySQL running (3237)
[root@centos1 init.d]# ps -aux|grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 3318 0.0 0.2 3044 1340 pts/0 S 12:17 0:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/mysql/centos1.pid
mysql 3679 0.0 19.0 330620 97344 pts/0 Sl 12:17 0:01 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin-dir=/opt/lampp/lib/mysql/plugin/ --user=mysql --log-error=/opt/lampp/var/mysql/centos1.err --pid-file=/opt/lampp/var/mysql/centos1.pid --socket=/opt/lampp/var/mysql/mysql.sock --port=3306
root 4217 0.0 0.1 5980 756 pts/0 S+ 12:41 0:00 grep mysql
如果使用过程中提示
[root@centos1 var]# mysql -uroot -p
-bash: mysql: command not found
解决:[root@centos1 bin]# ln -s /opt/lampp/bin/mysql /usr/bin
就可以了
配置apache服务
[root@centos1 ~]# find / -name apachectl
/opt/lampp/bin/apachectl
[root@centos1 ~]# ln -s /opt/lampp/bin/apachectl /etc/rc.d/init.d/apache
[root@centos1 ~]# vi /etc/rc.d/init.d/apache ##加入#chkconfig:2345 85 15
#说明:2345表示在2345这四种启动级别里面加载这个服务,85表示启动(开机时)顺序号,15表示关闭(关机时)顺序号.
[root@centos1 init.d]# chkconfig --add apache
[root@centos1 init.d]# chkconfig --list apache
apache 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@centos1 ~]# service apache status
/etc/init.d/apache: line 96: lynx: command not found[root@centos1 ~]# yum install lynx
[root@centos1 ~]# service apache restart
httpd not running, trying to start
[root@centos1 init.d]# ps -aux|grep httpd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 4203 1.0 3.5 58252 18016 ? Ss 12:35 0:00 /opt/lampp/bin/httpd -k restart
daemon 4204 0.0 2.7 55552 13932 ? S 12:35 0:00 /opt/lampp/bin/httpd -k restart
daemon 4205 0.0 3.0 58252 15720 ? S 12:35 0:00 /opt/lampp/bin/httpd -k restart
daemon 4206 0.2 3.0 58252 15720 ? S 12:35 0:00 /opt/lampp/bin/httpd -k restart
daemon 4207 0.0 3.0 58252 15720 ? S 12:35 0:00 /opt/lampp/bin/httpd -k restart
daemon 4208 0.0 3.0 58252 15720 ? S 12:35 0:00 /opt/lampp/bin/httpd -k restart
daemon 4209 0.2 3.0 58252 15720 ? S 12:35 0:00 /opt/lampp/bin/httpd -k restart
root 4211 0.0 0.1 5980 752 pts/0 S+ 12:35 0:00 grep httpd
[root@centos1 init.d]#
[root@centos1 init.d]# ll
总用量 148
lrwxrwxrwx 1 root root 24 12月 12 11:29 apache -> /opt/lampp/bin/apachectl
-rwxr-xr-x. 1 root root 3378 6月 22 2012 auditd
-r-xr-xr-x. 1 root root 1340 2月 22 2013 blk-availability
-rwxr-xr-x. 1 root root 2793 7月 19 2011 crond
-rw-r--r--. 1 root root 18216 1月 9 2013 functions
-rwxr-xr-x. 1 root root 5829 1月 9 2013 halt
-rwxr-xr-x 1 root root 2001 10月 16 22:46 htcacheclean
-rwxr-xr-x 1 root root 3371 10月 16 22:46 httpd
-rwxr-xr-x. 1 root root 9515 2月 22 2013 ip6tables
-rwxr-xr-x. 1 root root 9409 2月 22 2013 iptables
-rwxr-xr-x. 1 root root 652 1月 9 2013 killall
-r-xr-xr-x. 1 root root 2134 2月 22 2013 lvm2-lvmetad
-r-xr-xr-x. 1 root root 2665 2月 22 2013 lvm2-monitor
-rwxr-xr-x. 1 root root 2200 9月 14 2012 messagebus
lrwxrwxrwx 1 root root 27 12月 12 11:43 mysql -> /opt/lampp/bin/mysql.server[root@centos1 tmp]# ps -aux|grep httpd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 5320 0.1 4.2 62536 21544 ? Ss 07:46 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
daemon 5353 0.0 2.9 61080 15316 ? S 07:48 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
daemon 5354 0.0 3.3 62536 16916 ? S 07:48 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
daemon 5355 0.0 3.3 62536 16928 ? S 07:48 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
daemon 5356 0.0 3.3 62536 16916 ? S 07:48 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
daemon 5357 0.0 3.3 62536 16916 ? S 07:48 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
daemon 5358 0.0 3.3 62536 16916 ? S 07:48 0:00 /opt/lampp/bin/httpd -k start -E /opt/lampp/logs/error_log -DSSL -DPHP
root 5362 0.0 0.1 5976 740 pts/0 S+ 07:49 0:00 grep httpd
[root@centos1 init.d]# find / -name apachectl
/usr/sbin/apachectl
/opt/lampp/bin/apachectl
[root@centos1 init.d]# /opt/lampp/bin/apachectl -k start
httpd (pid 5468) already running
[root@centos1 init.d]# /opt/lampp/bin/apachectl -k stop
[root@centos1 init.d]# /opt/lampp/bin/apachectl -k start
[root@centos1 init.d]# service apache start
[root@centos1 init.d]# netstat -anp|grep :80
tcp 0 0 :::80 :::* LISTEN 5959/httpd
xampp搭建开源项目iwebshop后,服务器重启后再启动xampp显示组件都启动ok,但是实际启动失败解决办法的更多相关文章
- PHPWAMP自启异常,服务器重启后Apache等服务不会自动重启的原因分析
在使用“PHPWAMP自动任务”时,不少学生遇到如下问题: “phpwamp绿色集成环境重启动电脑(服务器)后,不会自动启动网站服务” (如果是其他环境或是自己搭建时遇到此问题,也是可以用此法解决) ...
- Linux服务器重启后eureka报错
在Linux服务器重启后,首次启动应用时查看eureka注册中心,报错 EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP W ...
- 服务器重启后如何开启由docker部署的redmine
1. 服务器重启后,需要重新开启docker服务 systemctl start docker 2. 查看全部container,包括exited的容器,找出redmine所对应的NAMES标签名称 ...
- 服务器断电后 redis重启后启动不起来
服务器断电后 redis 重启后启动不起来 原因:db持久化失败 1. 先查询redis的进程 ps -ef|grep redis 2. 查询redis的缓存文件在哪 whereis dump.rdb ...
- Linux服务器重启后启动Oracle服务
目录 1. 启动Oracle服务 2. 启动Oracle监听服务 © 版权声明:本文为博主原创文章,转载请注明出处 1. 启动Oracle服务 重启Linux服务器后,Oracle服务还需要手动启动. ...
- rsyslog 服务器重启后 发现不能接受到外部日志 只能接受本地日志 关闭防火墙即可
rsyslog 服务器重启后 发现不能接受到外部日志 只能接受本地日志 关闭防火墙即可 1 关闭防火墙: # systemctl stop firewalld 2 将SELINUX设置为disabl ...
- .NET平台开源项目速览(5)深入使用与扩展SharpConfig组件
上个月在文章:这些.NET开源项目你知道吗?让.NET开源来得更加猛烈些吧 和 .NET平台开源项目速览(1)SharpConfig配置文件读写组件 中都提到了SharpConfig组件,简单轻量级 ...
- .NET平台开源项目速览(2)Compare .NET Objects对象比较组件
.NET平台开源项目速览今天介绍一款小巧强大的对象比较组件.可以更详细的获取2个对象的差别,并记录具体差别,比较过程和要求可以灵活配置. .NET开源目录:[目录]本博客其他.NET开源项目文章目录 ...
- 服务器重启后SQL Server Agent由于"The EventLog service has not been started" 启动失败
案例环境: 操作系统 : Microsoft Windows Server 2003 Standard Edtion SP2 数据库版本 : SQL Server 2005 Standard Ed ...
随机推荐
- 不下软件,照样可以完美正确格式化树莓派SD卡!(恢复U盘/SD卡到满容量)
树莓派作用千千万,系统崩溃的理由也数不胜数(不要问我为啥知道),所以系统的重装和sd卡的格式化也在所难免.顺便给大家看一下我今天的成果,我不就是不小心摔了一下我的树莓派...我和sd卡一定是冤家! 捡 ...
- 后缀数组&manachar总结
洛谷题单 后缀数组 前置芝士 后缀数组 1 后缀数组 2 后缀数组 3 例题略解 P2463 [SDOI2008]Sandy的卡片 板子题... 然而我还是不会. 大概做法就是先把所有的串差分后拼成一 ...
- [Docker核心之容器、数据库文件的导入导出、容器镜像的导入导出]
[Docker核心之容器.数据库文件的导入导出] 使用 Docker 容器 在 Docker 中,真正对外提供服务的还是容器,容器是对外提供服务的实例,容器的本质是进程. 运行一个容器 docker ...
- 如何在Vue的项目里对element的表单验证进行封装
介绍需求 熟悉并优化公司项目的第五天,领导说能不能把表单验证封装一下,我打开代码一看 由于是后台管理系统,无数个需要验证的输入框,由于截图长度受限,只能展示部分,类似于这种页面还有无数个!代码重复率非 ...
- mysql主节点down机后如何恢复操作
1 停机维护 (1) 先停止上层应用 (2) 检查backup和slave的中继日志是否已经完成了回放及gtid_executed保持一致 mysql> show slave status\G; ...
- 4.13、nfs挂载优化及优缺点
1.硬盘:sas/ssd磁盘,买多块,硬件raid5/raid0,网卡吞吐量要大,至少千兆(多网卡bond0) 2.nfs客户端挂载说明: 文件系统有自己的权限,挂载是建立在文件系统之上的,然后更改挂 ...
- CentOS 8 按tab键不能自动补全问题解决方案
CentOS中按tab键不能自动补全问题解决办法 检查一下系统有没有安装bash-completion包 [root@Sonarqube ~]# rpm -lq bash-completion yum ...
- SonarQube 概述与安装
SonarQube 概述 是一种自动代码审查工具,用于检测代码中的错误.漏洞和代码异味.它可以与您现有的工作流程集成,以支持跨项目分支和拉取请求的持续代码检查. 在一个典型的开发过程中 开发人员在 I ...
- linux修改 ls 命令的时间显示格式
一直不习惯 ll 命令将时间日期格式显示为 周名和月名,想要纯粹的 数字格式,找了好久,终于想到一个办法--alias. [root@localhost ~]# alias #显示当前已存在的alia ...
- 合并N个长度为M的有序数组为一个N*M的有序数组
题目:合并N个有序数组,每个数组的长度为M,合并为N*M的有序数组.时间复杂度要求最低 解法:N个数组进行两两合并,合并后的数组再继续执行合并过程,最后合成N*M的有序数组.可以认为合并这个递归过程发 ...