November 10, 2009 | Posted by
admin | Category: Linux Administration
How to view core.xx files in Linux?
The core.xxx files are created on Linux servers and holds the current state of a process working memory when a process is crashed. To view the core.xx files in Linux, execute the command:
root@host [~]# strings core.xxx
It will list different state of a process on each line.
Comments Off on How to read core.xxx files in linux
November 9, 2009 | Posted by
admin | Category: Linux Administration
How to make a .vcf file down loadable?
Problem: If you link a .vcf file on a page, it shows as a text file instead of asking for a download.
Solution: In order to make the .vcf file download-able, you need to add the AddTye directive in the .htaccess file as follows:
AddType text/x-vcard .vcf
Save the file and that’s it.
November 6, 2009 | Posted by
admin | Category: Linux Administration
How to secure /tmp and /dev/shm partitions?
It is highly recommended to mount /tmp and /dev/shm partitions in noexec,nosuid mode in order to prevent files been executed under those partitions. To mount /tmp and /dev/shm in noexec,nosuid more, edit the /etc/fstab file and
search for the word
"defaults"
in front of the 2 partitions and replace them with
rw,noexec,nosuid
The entry should look like the following:
tmpfs /dev/shm tmpfs rw,noexec,nosuid 0 0
and same for /tmp partition as well.
Save the /etc/fstab file. You now need to remount the partitions for the changes to take effect. Execute the following remount commands:
root@host [~]# mount -o remount /tmp
root@host [~]# mount -o remount /dev/shm
You can now check the mounted partitions using the command:
root@host [~]# mount
Related Links:
How to secure /tmp on a VPS?
Comments Off on Howto: Secure /tmp and /dev/shm partitions
November 4, 2009 | Posted by
admin | Category: Linux Administration
How to check the Linux Server Uptime?
There are different ways to check the uptime of the Linux server like using the “top” OR the “uptime” OR the “w” command. Following are some of them:
root@host [~]# top c
top – 15:50:20 up 2 days, 11:32, 1 user, load average: 0.00, 0.00, 0.00
root@host [~]# uptime
15:51:01 up 2 days, 11:33, 1 user, load average: 0.00, 0.00, 0.00
root@host [~]# w
15:51:07 up 2 days, 11:33, 1 user, load average: 0.00, 0.00, 0.00
Comments Off on Linux Server Uptime
October 31, 2009 | Posted by
admin | Category: Mysql & PostGres SQL
How to enable “log-queries-not-using-indexes” in Mysql?
Edit /etc/my.cnf and place the following line under the [mysqld] section:
log-queries-not-using-indexes
Save the file and restart the mysql service:
# /etc/init.d/mysql restart
To verify if it is set to ON, use the following command:
# mysqladmin variables |grep log_queries_not_using_indexes
Comments Off on how to enable log-queries-not-using-indexes