When starting the httpd process you may receive the following error : Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName You might get this error when restarting Apache. To resolve the issue add the following to your httpd.conf file : ServerName 127.0.0.1
RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. The RRDtool homepage can be found here Below shows you how to install RRDtool 1.3.1 on Redhat Enterprise Linux. Update your system [root@localhost /]# yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel make -y Download and … Read more
Below shows you how to display line numbers within vi. Enable While in VI and not in `Insert Mode`type the following to display the line numbers : :set number Disable To disable line numbers enter the following : :set nonumber
Issue When trying to add a image to your CGI script you recieve the following error and the image isnt displayed. [root@localhost cgi-bin]# cat /var/log/httpd/error_log [Fri Jul 10 20:51:39 2009] [error] [client 10.2.2.5] Premature end of script headers: picture2.jpg, referer: [Fri Jul 10 20:57:57 2009] [error] [client 10.2.2.5] (8)Exec format error: exec of ‘/var/www/cgi-bin/picture2.jpg’ failed, … Read more
Issue You receive the following error when trying to run an application (such as rrdtool), No fonts found; this probably means that the fontconfiglibrary is not correctly configured. You may need toedit the fonts.conf configuration file. More informationabout fontconfig can be found in …. Solution Run yum install deja* If you receive the following, –> … Read more
The alias command allows you to create command shortcuts within your shell. Below shows you how, move to your home directory, [root@localhost ~]# cd ~ add the alias of os which will show the output of ‘uname -a’ [root@localhost ~]# cat >> .bash_profile [root@localhost ~]# alias os=’uname -a’ Reload you environment variables for your new … Read more
The command below with present you with a random fact, lynx -dump randomfunfacts.com | grep -A4 “\[3\]”| tail -n1 You can place it into your ~/.bash_profile file so that you receive a random fact everytime you log in.
The following command will retrieve your current IP city location, lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|sed -nr s/’^.*My IP address city: (.+)$/\1/p’
Issue After creating a new user account you may find that on login you recieve the following error, -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied Solution /dev/null is a character special device which should have read+write permissions for everybody.Run the following to confirm the current permissions for /dev/null, ls -l … Read more
Remove the columns $4 $5 $12 and $13. awk ‘BEGIN{FS=OFS=” “}{$4=$5=$12=$13=””}{print}’ file.txt Break down each line and numbers each field. awk ‘{print NR”: “$0; for(i=1;i<=NF;++i)print “\t”i”: “$i}’ Add list of numbers within a file. awk ‘{total+=$0}END{print total}’ file
This short guide will show you how to set the default session timeout. We will set the TMOUT variable, of which is supported by both shells, Bash and Korn. To check your current timeout setting, enter the following, [root@localhost ~]# env | grep TMOUT To change this setting globally edit the /etc/bashrc. To change this … Read more
FFmpeg allows you to record, convert and stream digital audio and video in various formats. The installation guide can be found here Commands ffmpeg -i [source].flv -vn acodec copy [dest].mp3 Copy the sound of a video to an mp3 ffmpeg -i [source].avi -s 320×240 -b 1000k -vcodec wmv2 -ar 44100 -ab 56000 -ac 2 -y … Read more
How do I create a new Logical Volume / Partition ? We will be creating a new logical volume named DATA and mounting this on a new directory called DATA. First of we will create the logical volume, then we will create a file system on the Logical Volume. Once complete we will create a … Read more
What is LVM ? LVM (Logical Volume Manager) for the Linux Kernel is a method of allocating hard drive space into logical volumes, this also allows for the easy creation, resizing, or removal of new or existing partitions. There are 4 main terms with LVM ….. physical volumes – These are your physical disks, or … Read more
In order to configure an interface in Ubuntu you will need to edit the following file /etc/network/interfacesBelow is an example, auto [INTERFACE]iface [INTERFACE] inet staticaddress [IP ADDRESS]netmask [NETMASK]network [NETWORK]gateway [GATEWAY] Once you have made the change to the interfaces file, run the following command /etc/init.d/networking restart
General Shortcuts dd delete a line x delete a character a append after cursor A append after line Useful for script editing :![command] allows you to run a command while still in VI :!! repeats previous command :! [command] % allows you to run a command, with % = current file name Motion h Move … Read more
1. The following 2 types of syntax are both ways to execute a script. Using these methods a second shell will be opened and once the script has finished the variables will not persist. chmod +x [script] sh [script] 2. Below shows you a way in which you can run your script using the current … Read more
& run command in the background * wildcard ? single wildcard < input redirect > input redirect | pipe outpt to one command from another # remark symbol, ignores characters after It is best to avoid using these special characters when naming files. To pass these charaters to another program, you will need to prefix … Read more
In order to mount your ISO you will need to add the ISO to your box, create the directory then mount the file, root@host:~$ mkdir /mnt/iso root@host:~$ mount -o loop -t iso9660 MYCD.iso /mnt/iso use the following command to confirm that you have mounted it correctly, root@host:~$ df -kh You should see, Filesystem Size Used … Read more
In order to configure your interface you will need to edit the following file, /etc/network/interfacesBelow is an example of this file, this would set eth0 an IP (172.16.11.1) and eth1 and eth2 to promisc mode. # This file describes the network interfaces available on your system# and how to activate them. For more information, see … Read more
Below is a short guide to set up a VNC server within Linux. INSTALL Install the package by running the following commands, Ubuntu/Debian – apt-get install vnc4server xinetd Fedora/Redhat – yum install vnc-server PASSWORD Set the password for vnc by running the command vncpasswd START VNC Start the vnc server by running the command vncserver.You … Read more
When trying to use the cp command you receive the error message, cp: omitting directory This can be overcome by using the -r option, cp -r [source file] [destination file]
This will simply print your text in red. echo -e ‘\E[31mThis prints in red.’; tput sgr0 If you need any further information or want to know how to add bold, underlining, or background colours to your text click here.
Below outlines the issue and resoultion when trying to send email using Postfix. Issue When trying to send an email on my linux platform I get the following error message in my mail.log ?? The IP you’re using to send mail is not authorized 550-5.7.1 to send email directly to our servers. Please use the … Read more
The Ultimate Linux Command Reference Guide Note: This was produced with Ubuntu. Tip: Theres quite a few in this list so I suggest that if your looking for something spefic use the search function (ctrl+F)…. a2p – Awk to Perl translatoraconnect – ALSA sequencer connection manageracpi – Shows battery status informationacpi_listen – ACPI event listeneraddr2line … Read more
Edit the/root/.vnc/xstartup file so it reads, xrdb $HOME/.Xresources xsetroot -solid grey x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” & gnome-session & After doing this kill the vnc processes and restart. Note : You may need to change the last line if you are using KDE.
First of all run the command to enter the default gateway, route add default gw 10.10.10.100 Then to make sure it survives a reboot, edit the file ‘/etc/sysconfig/network‘ and add the line below. Of course changing the IP address to your default gateway – GATEWAY=10.10.10.100
Issue I cannot install via apt-get as I get the message, E: Package ssh has no installation candidate When running apt-get install [package name] you get, root@ubuntu:~$ sudo apt-get install sshReading package lists… DoneBuilding dependency treeReading state information… DonePackage ssh is not available, but is referred to by another package.This may mean that the package … Read more
Below should the configuration steps for adding a default gateway to Debian. root@host:~$ route add default gw [ip address] Note : Remember to add it (to survive a reboot) to your ‘/etc/network/interfaces’.Add the following entry to required interface within the interface file – gateway [ip address] Below is an example : auto eth0iface eth0 inet … Read more