In this article we would make a script to start XAMPP automatically in Ubuntu.
In last article we installed XAMPP in Ubuntu. But we need to execute following command to start it every time.
sudo /opt/lampp/lampp start
For a web developer XAMPP is the primary application. To start it every time whenever you login is vey tedious task.
But we can make a script which will automatically start it on login.
Open terminal and run following command.
sudo gedit /etc/init.d/lampp
paste following code in open file
#!/bin/bash /opt/lampp/lampp start
save and close the file
run following command to make this script executable
sudo chmod +x /etc/init.d/lampp
run following command to install init scripts to all runlevel
sudo update-rc.d lampp defaults
restart the system
xampp would be start automatically. You can check it by opening http://localhost in browser
you can also verify it by opening http://localhost/phpmyadmin
S.G.Godwin Dinesh.MCA
Sr.System Administrator
No comments:
Post a Comment