7 things every web developer should know about Linux administration
Web programming is not only about how you develop your applications, its also about how you deploy your application or website.Although control panels are being provided by almost every shared hosting company using which we can easily deploy our applications but as soon as application grows in terms of size or scalability we need to put that on virtual dedicated or dedicated or in a cloud server like amazon EC2 .
Linux system administration is specialized field in itself but if as a programmer you also know how to handle some common tasks you can get good turn around as well as can optimize your application for performance. Easy and efficient deployment process can also save your debugging and testing time. In this post I am going to list 7 Linux administration tasks which a programmer should know to be with ease while deploying or planning deployment of applications.
1. SSH connections
This is first and foremost requirement of Linux administration, you need to be able to login to remote system to do any kind of task on it. On windows putty or similar software can be used. On Linux or Mac OS machines you can directly use ssh command to do this. Telnet was once used for this purpose but nowadays it is outdated due to security issues. You can also make password less connection to your servers from your machines to automate many tasks. Read more about how to setup password less connections.
2. File Operations
You must be able to create,copy and move files and directories around your file system. Many people who are used to work on windows CMD prompt or Mac and Linux’s terminal will not face any problem in this. You just need to careful about using commands while doing operations which impacts files or directory life. Like using rm with rf option with a small spelling mistake can erase your whole data without confirming.
3. Apache or your web server configuration
You must be aware of your web server’s functioning and its common configurations. Like on Apache you must be aware of virtual host settings and .htaccess file handling. You must be able to differentiate between ‘Dos’ and ‘Donts’. I can give you a point to ponder about. How using .htaccess file can slow down your overall file serving or execution via Apache and how you can overcome this? Try to found out information about it.You can also guide Linux Administrator about disabling modules which are not needed in your application to minimize memory foot print of the web server to boost overall performance.
You must be able to see how your server is performing and how you can fine tune simple things like allocating more memory to your web or application server. If running PHP you must be able to handle common configuration of it as all configuration variables are not configurable through ini_set function or .htaccess file. Optimizing your database configuration can also be one of the useful thing to do.
This is Swiss army knife for syncing your data between different servers. It only copy changed files and compression can also be used on the fly. You can start playing with it on your local machine and when you think that you can handle it, you will be surprised to see the impact it will make on your deployment process.
6. Using SVN, Git from command line.
You must be able to handle common operations related to SVN or Git through command line. This will help you to integrate your deployment process to your version system.
7. Using Cron Jobs
You must be able to set the schedules of your cron jobs. Using cronjobs you can handle routine work like clearing garbage or regenerating cache of specific portion of application.
I have tried to enlist some common tasks groups which you need to know to be better at linux administration as web developer. Some very common tasks like creating or editing files in ssh shell are also necessary in some cases.