[Ubuntu] XAMPP 리눅스 부팅시 자동실행 > Linux/Tech

본문 바로가기
사이트 내 전체검색

Linux/Tech

[Ubuntu] XAMPP 리눅스 부팅시 자동실행

페이지 정보

작성자 sbLAB 댓글 0건 조회 235회 작성일 21-04-18 11:18

본문


After starting using XAMPP in Ubuntu, there's a common error appeared to the users. That is considered as the failure of starting of Apache web server. We have to stop it and restart it. 

Stop Code - sudo /etc/init.d/apache2 stop
Start Code - sudo /opt/lampp/lampp start 

And the other problem is we have to start the server using a terminal command, whenever we want to use it. Here I'm going to explain a way to get rid of these two problems. If you can make XAMPP to start automatically when you reboot the machine, there you find  the  solution. This is the way to to it. 

[Start below]

1. First, open a terminal and type this command to edit the lampp file located in etc folder. 

       sudo gedit /etc/init.d/lampp

2. A text file will be  opened and type the following commands to add the script to make XAMPP to       be started automatically.

#!/bin/bash
### BEGIN INIT INFO
# Provides: lampp
# Required-Start:    $local_fs $syslog $remote_fs dbus
# Required-Stop:     $local_fs $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start lampp
### END INIT INFO
/opt/lampp/lampp start

3. Save this file and close the file. If terminal is still running, press ctrl + c to terminate it.
    Then type this command.

    sudo chmod +x /etc/init.d/lampp

4. Finally type this command also to update the relevant file.

    sudo update-rc.d lampp defaults

5. Now restart the machine!

Open the XAMPP GUI or type sudo /opt/lampp/lampp start on a  terminal to check whether XAMPP is running or not. There you will see all 3 services are running in the system. That's all....!

Enjoy the power of XAMPP!

댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
35
어제
72
최대
114
전체
27,841

그누보드5
Copyright © sebom.com All rights reserved.