First login to your server using ssh
A. ssh email@example.com
B. Enter proper password
Then switch back to the root and use this command.
Benefit of “-f” option is as you hit your php page in browser terminal will auto refresh errors and you can see most recent errors.
tail -f /var/log/apache2/phpmind.com-error.log
Your Path may be diffrent! I have different sub domains parked in my server. So this is my error log path in LAMP.
Hope it will work for you.
Shell scripts are short programs that are written in a shell programming language and interpreted by a shell process. They are extremely useful for automating tasks on Linux and other Unix-like operating systems.
1. Here is very short tutorials to make a very basic shell scripting.
. open vi or any other advance editor like vim
echo "Hello phpmind, world."
2. Save this script and give a name for example “phpmind.txt”
3. phpmind will be your command.
4. To run your command type ./phpmind
5. If its says Permission denied then use chmod 755 phpmind
6. Now the script is ready to run by typing the following, again while in the same directory, and then pressing the ENTER key:
How It Works
The first of the three lines tells the operating system what shell to use to interpret the script and the location (i.e., absolute pathname) of the shell. The shell is bash, which is located in the /bin directory (as are all shells); thus the line contains /bin/bash. This instruction is always preceded by a pound sign and an exclamation mark in order to inform the operating system that it is providing the name and location of the shell (or other scripting language).
The second line tells the shell to issue the clear command. pwd (which shows the current directory),
The third line tells the shell to write the phrase Good morning, world. on the screen. It uses the echo command, which instructs the shell to repeat whatever follows it.
PhpMind Linux Practice Command line.
LAMP is growing very fast from small business to Enterprise level.
Every one is looking for LAMP developers. Most of them are very good in PHP and MYSQL but in Interview Interviewer stat asking about Apache and Linux questions they keep mum!!
This is for php beginners those who want to learn Linux and don’t have command line facility to practice. Its easy like 1 2 3 !!
1. Open this link – Linux Practice for beginners.
2. Open terminal –
3. Start working.
cp -R Blog/ Newblog/
Using this command you can copy an entire directory, its subdirectories, and files. Blog is existing directory and Newblog is destination directory.
How to find out which Linux version you are running?
# cat /proc/version
Output – Linux version 2.6.27-6_1.intel.BHsmp (firstname.lastname@example.org) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Thu Nov 13 15:27:29 MST 2008
how do I show all installed packages in Linux?
# rpm -qa | less
This workes in Red Hat/Fedora Core/CentOS Linux