Site Administration Page 2 - How to Install XAMPP on Ubuntu Linux |
By default, if you are using Linux, you are not the root unless you log in as root. This can be difficult when editing, saving and writing files to /opt/ directory (where XAMPP has been installed). This is because the owner of that is still not you; it is the root. You need to configure a change of ownership so that you will own your files that will be saved in the HTDOCS directory (the directory where you will save your PHP files for testing in the web browser). To do this, go through the steps below in order. 1. In terminal, log in as root and then go to the /opt/lampp directory: Actual command: root@codex-m-desktop:/home/codex-m# cd /opt/lampp 2.) Enter ls -l Actual command (last is Letter L): root@codex-m-desktop:/opt/lampp# ls -l Linux will list the owners of the file and directories. Note that htdocs is owned by nobody - root 3. To change the owner from nobody -- root to your own Linux Ubuntu username: chown -R yourlinuxusername:yourlinuxusername htdocs My Linux username is: codex-m, so for me, the actual command is: root@codex-m-desktop:/opt/lampp# chown -R codex-m:codex-m htdocs 4. You also need to associate ownership of your Linux username with the Apache configuration. In this case type cd etc in the terminal: Actual command: root@codex-m-desktop:/opt/lampp# cd etc 5. Now you are in the etc directory. Type pico httpd.conf. This will show the Linux text editor in the terminal: Actual command: root@codex-m-desktop:/opt/lampp/etc# pico httpd.conf Be careful when editing; a single mistake can make the Apache web server inoperable. So find the line: User nobody Group nogroup </IfModule> </IfModule> Change this to: User codex-m Group nogroup </IfModule> </IfModule> Of course, you need to replace my Linux username (codex-m) with your own username. If you are done editing, press Control - O, to save. And when it displays: File name to write: httpd.conf Press the Enter key and it's done. Press Control - X to exit the editor.
blog comments powered by Disqus |
|
|
|
|
|
|
|