Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 LINUX/UNIX


  Understand diff in Unix

diff is an important tool program in Unix. It is used to compare differences of two files, it is the foundation for code version control. If you type :$ diff <file_before_change> <file_after_change>diff will tell you what's the difference between these two files. The result may not be so easy to understand, so now I will show you how to understand diff.1. 3 formats of diffdiff has 3 formats due to historic reasons.normal diffcontext diffunified diff2. Demo filesFor easy demonstration, we create 2 demo files.The first one is f1, it has 7 lines of a in it.aaaaaaaThe second file is f2...

12,220 0       UNIX DIFF VERSION CONTROL GIT


  Some measures for improving Linux server security

The hackers often exploit server weakness to gain access control to some servers. With a scanner, aimlessly looking undefended host, backdoor, control, and sold to people in need.Some basic security measures can be taken on Linux servers to avoid being attacked by hackers.Disable root remote loginAs the default administrative account, root is the account which is most likely to be attacked.Disabling ssh remote login is necessary.Method:Edit / etc / ssh / sshd_configPermitRootLogin no At the same time, create a personal account for administrator, and assign it to sudoers user group (default is%...

2,182 0       LINUX SERVER SERVER SECURITY


  My frequently used Linux commands

In our day to day work. We may have many chances working on Linux/Unix systems. There are many things we may need to do, checking logs, navigating in directories, creating file or installing software. We may use many commands to complete the work, such as ls, mkdir, cd etc.Below are my frequently used Linux commands or programs recently:pwd : print working directory, sometimes I need to check which working directory I am in in order to know where to go next.ls : List current directory files, before I can operate on a directory, I need to know what are in the directory so that I may not delete ...

4,880 0       PROGRAM LINUX COMMAND


  Configure a PHP web server on CentOS

Are you used to use cPanel or Plesk on VPS for your PHP website management? If for some reason you don't want to use them? What can you do? How do you maintain your website? How do you access Emails, use FTP to upload files or use phpMyAdmin to manage your databases? You may need to configure all these services yourself on a VPS without cPanel or Plesk or other similar apps.But to configure all these services on a Linux server is not an easy job. You may spend many nights but still fail to get satisfactory results. Here I share with you some useful links which can help you to configure a worki...

5,562 0       EMAIL MYSQL CRON LINUX FTP CENTOS


  Create cron job on CentOS

These two days, I am building a website and deploying it on a VPS server which uses CentOS 5. I don't have cPanel or Plesk for my account, so I need to install and configure everything myself including Apache, PHP, MySQL and FTP server, also today's topic cron job. Since my website has a ranking algorithm to calculate the rankings of each link and update the ranking on database and I need to calculate the rankings every 5 minutes, so I think to use cron jobs. Here are what I have done which may help you.First we need to understand the crontab commands, it can have different options with this c...

93,421 0       PHP LINUX EXAMPLE CRON JOB CRONTAB CENTOS


  Unix Philosophy

First, let me tell two stories.The first one is one Japan soap factory had a problem that they sometimes shipped empty boxes to the customer without soap inside. So they spend much time and money to invent a X-ray machine to check whether the soap box is empty.The same thing happens in a small factory which doesn't have too much money. The solution of them to solve this problem is they use a desk fan to blow the empty boxes out of the belt and into a bin.The second story is NASA finds that in space with 0 gravity, astronauts cannot use pen to write. So they spend much money on developing a pen...

17,263 6       RULES SIMPLE UNIX PHILOSOPHY


  Install LAMP in two easy steps

You might have seen my earlier post related to installing PHP, Apache and MySQL on UBUNTU 11.10. That process contains number of steps and some lengthy commands which we can not remember easily.After good comments from Gaurav and Coward I have managed to get that lengthy process in just 2 steps. So I thought its great to share with all readers to they can get benefit as well.Before starting make sure that you have root user’s access to perform the sudo action. So now let...

4,170 0       PHP TUTORIAL LAMP STEPS


  Beginners guide to Linux directory structure

Have you ever looked in your / directory, you’ll see a lot of directories. Here we are presenting beginners guide to linux directory structure explaining what they mean and what are the contents of these directories.Screenshot of contents of root directory: /This is called root partition. All files and directories start with root partition. Write privileges under this directory are avaible with root user only. Not to confuse it with root user’s home directory, know the difference, “/” is root partition while root user’s home directory is “/rootâ€...

4,977 0       LINUX FILE SYSTEM STRUCTURE