After xampp builds the open source project iwebshop, the server restarts and then starts the xampp display components are all started ok, but the actual startup fails

install xampp

1. Put xampp-Linux-1.8.3-3-installer.run , bugfree.zip in the / opt directory

2.[root@centos1 opt]# chmod 775 xampp-linux-1.8.3-3-installer.run #empowerment 
3.[root@centos1 opt]# sudo ./xampp-linux-1.8.3-3-installer .run #install xampp

4. Start 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 /]#

 

configure mysql service

[root@centos1 ~]# find / -name  mysql.server 
/opt/lampp/share/mysql/mysql.server 
/opt/lampp/bin/mysql.server    ##mysql startup file

[root@centos1 ~]# ln -s /opt/lampp/bin/mysql.server /etc/rc.d/init.d/mysql ##Soft connection (understood as shortcut key) 
[root@centos1 ~]# vi /etc/rc.d/init.d/mysql ##About a glance

[root@centos1 ~]# chkconfig --add mysql ##Add mysql system service 
[root@centos1 ~]# chkconfig --list mysql ##List the settings of mysql service 
mysql 0: close 1: close 2: enable 3: enabled 4: enabled 5: enabled 6: disabled

[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


 

If prompted during use 

[root@centos1 var]# mysql -uroot -p
-bash: mysql: command not found

Solution: [root@centos1 bin]# ln -s /opt/lampp/bin/mysql /usr/bin

just fine

configure apache service   

[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 ##Add #chkconfig:2345 85 15

#Description: 2345 indicates that the service is loaded in the four startup levels of 2345, 85 indicates the startup (on startup) sequence number, and 15 indicates the shutdown (shutdown) sequence number. 

image

[root@centos1 init.d]# chkconfig --add apache 
[root@centos1 init.d]# chkconfig --list apache 
apache 0:disable 1:disable 2:enable 3:enable 4:enable 5:enable 6:disable

[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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326173644&siteId=291194637