Posts

Showing posts from October, 2010

Ubuntu Server : Update server software from command line

You can update your Ubuntu server from remote ssh login by following simple command. sudo apt-get update sudo apt-get dist-upgrade Cheers!

Wrong Command : May Loss all

Alas! Today I loss almost all the data in /var/. I wanted to move a folder from /var/www/cron-script  to /var/ Unintentionally I gave the command rm instead of mv . Then I lost all of my webserver content in a second.   Fortunately I had a backup of 10 days ago. That save me to loss all. So friends be careful! Now I need to reinstall the OS(I use Ubuntu) again. Just 3 days before Ubuntu relese a new version 10.10 on the Binary day 10.10.10. So now I am downloading that version. Thanks Abser

Install Ioncube Loader while SELinux Enabled

When you install free ioncube loader under CentOS 5.x, which has SELinux enabled by default, you will see following error message: “cannot restore segment prot after reloc: Permission denied” You have a few options here. You can disable SELinux, edit /etc/selinux/config, look for” SELINUX=”, put “disabled” to the right of “=”, it reads like this “SELINUX=disabled”, when you restart the machine, SELinux will be totally disabled. But when you want to enable SELinux lately, the system will relabel all the files at the boot time, it will take very long time to finish the relabeling process, so disable SELinux is not recommended. Then you can put “permissive” in place of “disabled”, or run “ setenforce 0 ” on command line(“ setenforce 1 ” re-enable it),  you will see warning messages but SELinux won’t do anything to stop unauthorized access. If you are serious about security, probably you won’t feel comfortable when SELinux is not ...

20 Linux System Monitoring Tools Every SysAdmin Should Know

Image
Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed below are some of the most basic commands when it comes to system analysis and debugging server issues such as: Finding out bottlenecks. Disk (storage) bottlenecks. CPU and memory bottlenecks. Network bottlenecks. #1: top - Process Activity Command The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds. Fig.01: Linux top command Commonly Used Hot Keys The top command provides several useful hot keys: Hot Key Usage t Displays summary information off and on....

How To: Disable Firewall on RHEL / CentOS / RedHat Linux

iptables is administration tool / command for IPv4 packet filtering and NAT. You need to use the following tools: [a] service is a command to run a System V init script. It is use to save / stop / start firewall service. [b] chkconfig command is used to update and queries runlevel information for system service. It is a system tool for maintaining the /etc/rc*.d hierarchy. Use this tool to disable firewall service at boot time. How Do I Disable Firewall? First login as the root user. Next enter the following three commands to disable firewall. # service iptables save # service iptables stop # chkconfig iptables off If you are using IPv6 firewall, enter: # service ip6tables save # service ip6tables stop # chkconfig ip6tables off

See file content

There are various way to see the file content in linux. 1. cat Symbol: cat fileName will show the content of file in shell. 2. head head will show the content from the top of the file. In head you can specify number of line you want to see. Symbol: head -20 fileName will show the first 20 lines from the file. 3. tail tail will show the content from the bottom of the file. like head you can specify the number of line you want to see Symbol: tail -100 fileName will show last 100 line from the file. *** I f you want to see content from a log file which is continuously written by system/other application use tail as follows. tail -20f fileName. This will continously show the last written 20 line from the file.