September 13, 2009 | Posted by
admin | Category: Linux Administration
You may come across the following error while restarting Apache:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
The reason is, some Apache processes are still running though the service is stopped and the port 80 is still binded to some processes.
In this case, you need to search out for the running Apache processes and have to kill them in order to start the service properly. To search the processes, execute:
fuser -n tcp 80
this will list all the PIDs of the running processes that are binded to port 80. To kill them, execute:
kill -9 PID
where, PID are the ones you retrieved from the previous command. Once you kill the PIDs, you can start the Apache service safely. The same is applied for port 443.
Comments Off on make_sock: could not bind to address 0.0.0.0:80
September 13, 2009 | Posted by
admin | Category: Linux Administration
Why do server not showing up 4GB of RAM? By default a server supports up to a 4GB of RAM i.e. on a non-PAE kernel. If you wish to add 4GB RAM or more, you will have to install kernel-PAE package which addresses upto 64GB of RAM. Once you install the kernel with the PAE module, the server will show you the correct amount of installed RAM.
Use yum to install the module:
yum install kernel-PAE
Once the module is installed, you will have to edit the grub configuration file to make sure the new kernel is picked up on reboot. Edit the file using your favrioute editor:
pico /etc/grub/grub.conf
and change the line
default = 1
to
default = 0
Save and Exit the file. Once done, reboot the server for the changes to take effect.
Comments Off on PAE-Kernel extenstion: 4GB of RAM not showing
September 13, 2009 | Posted by
admin | Category: Linux Administration
/tmp partition full… How to increase /tmp partition in Linux?
You can create a Virtual partition on Linux in case your server isn’t built with a /tmp partition OR you need to increase the size of the partition for some reason, and then you can mount the virtual partition as /tmp.
The following steps will guide you to create a virtual partition:
1) To create a virtual partition of 2GB, use the below dd command:
# dd if=/dev/zero of=/home/tmp-dir bs=1024M count=2
2) Once the partition is created, you need to create the file system on it using the mke2fs command
# mke2fs -j /home/tmp-dir
3) Now, the partition is ready to be used but you need to mount it on /tmp directory.
# mount -t ext3 -o loop /home/tmp-dir /tmp
Here, we have used ‘loop’ while mounting /home/tmp-dir partition because we are not mounting an actual block device but to make a file accessible as a block device.
4) To verify the partition, execute
# mount
5) To make sure this partition is mounted automatically after every reboot, edit the /etc/fstab file and replace the /tmp line with the following one:
/home/tmp-dir /tmp ext3 defaults,loop 0 0
Hope, this helps.
September 11, 2009 | Posted by
admin | Category: Linux Administration
How to add multiple IPs on an Ethernet network interface card i.e. eth0? OR
How to add additional IPs on a Linux server?
People find it rather hard to add the IPs manually on a Plain server. Following are the steps you can follow to add a range of IPs on a CentOS server:
1 ) Change directory to /etc/sysconfig/network-scripts/ using the ‘cd’ command:
cd /etc/sysconfig/network-scripts/ (this directory contains Interface configuration files)
2) Create a file ifcfg-eth0-range0 using your favorite text editor like ‘pico’
pico ifcfg-eth0-range0
3) Add the following lines to the file:
IPADDR_START=1.1.1.10
IPADDR_END=1.1.1.20
CLONENUM_START=1
where,
IPADDR_START is the first IP in the range.
IPADDR_END is the last IP in the range.
CLONENUM_START=1, where 1 will start adding IPs from eth0:1
4) Save and exit the file.
5) You now need to execute “ifup-aliases” script for the range of IPs to take affect. Execute the following command:
./ifup-aliases eth0
This will add the IPs on eth0 and will bring all the virtual interfaces up. You can view all the interfaces using the “ifconfig” command.
Comments Off on HowTo: Add Additional IPs