20 linux commands that will make you light weight linux administrator

Most of the PHP servers are Linux servers as it suits best in open source enviroment. So any PHP developer will have to deal with it, command or GUI at some point of time in their life.  So there is no harm in keeping handy few basic linux commands so that next time you encounter any linux server you know what you are doing.

pwd(present working directory)
fedora:~# pwd
/root

cd (Change Directory)

fedora:~# cd /home (go to to home directory)
fedora:/home# cd .. (to go to previous directory)

ls (List contents in the directory)

fedora:/home# ls -la
total 60
drwxr-xr-x 13 root         root    4096 2009-03-02 16:39 .
drwxr-xr-x 27 root         root    4096 2009-05-07 10:45 ..
drwx------  3 design       design  4096 2008-05-08 16:26 design
drwx------  4 jimish       jimish  4096 2009-03-02 14:11 jimish

mkdir (make directory)

fedora:/home# mkdir bigwebdevelopment
fedora:/home# ls -la
total 64
drwxr-xr-x 14 root         root    4096 2009-06-25 21:56 .
drwxr-xr-x 27 root         root    4096 2009-05-07 10:45 ..
drwx------  3 design       design  4096 2008-05-08 16:26 design
drwx------  4 jimish       jimish  4096 2009-03-02 14:11 jimish

rm (remove)

fedora:/home# rm -Rf bigwebdevelopment/
fedora:/home# ls -la
total 60
drwxr-xr-x 13 root         root    4096 2009-06-25 21:59 .
drwx------  3 design       design  4096 2008-05-08 16:26 design
drwx------  4 jimish       jimish  4096 2009-03-02 14:11 jimish

chmod (change mode, change right of files and folders, 777 give read write execute right to everyone)

I use this tool to calculate my chmod rights.

fedora:/home# chmod -R 777 jimish/
fedora:/home# ls -la
total 60
drwxr-xr-x 13 root         root    4096 2009-06-25 21:59 .
drwxr-xr-x 27 root         root    4096 2009-05-07 10:45 ..
drwx------  3 design       design  4096 2008-05-08 16:26 design
drwxrwxrwx  4 jimish       jimish  4096 2009-03-02 14:11 jimish

touch (create blank file, change timestamp of the file)

fedora:/home# mkdir test
fedora:/home# cd test
fedora:/home/test# touch abc.txt
fedora:/home/test# ls -la
total 12
drwxr-xr-x  2 root root 4096 2009-06-25 22:09 .
drwxr-xr-x 14 root root 4096 2009-06-25 22:09 ..
-rw-r--r--  1 root root    0 2009-06-25 22:09 abc.txt

nano (opens file in editor)

mv (move files and folders, can also used in place of rename)

How to: Apache virtual host ssl configuration

Just thought of quickly putting this code on how to setup Apache virtual host ssl as when I initially setuped SSL certificate, it took me a while to setup. Hope this will help some one like me to quickly configure ssl on apache.

  #SSL works on port 443
SSLEngine on   #Start SSL engine
SSLCertificateFile /etc/httpd/ssl/server.crt    #path to your SSL certificate file
SSLCertificateKeyFile /etc/httpd/ssl/server.key #path to you SSL certificate key
 
ServerName example.com  #Your server name
ServerAlias example.com   #Your server name
 
DocumentRoot /var/www/example    #path to your website root folder
 
AllowOverride All
Options All
Order deny,allow
Allow from all

Once this is setupped correctly you will be able to use your URL by adding https in the beginning.

Note: You will need mod_ssl enabled in your PHP configuration

Leave your comments below if you need further help for apache virtual host ssl configuration and I will reply.

5 resources that will make you advanced PHP(LAMP) Web Developer

PHP is the most commonly used language in web. Being opensource PHP developers enjoy lots of unofficial tutorials and support. But following are the resources that will really turn you into an advanced PHP developer. Its doesnt matter at what level of php you are working on right now. Wether you are beginner or advanced you will certainly benefit from some great tips in these resources.

1. w3schools.com

w3schools.com_02

If you are a beginner than PHP and SQL tutorial sections will give you good insight about the basic functions involved to start yourself as web developer. If you have read both this section you are all set to start building your first webapplication using PHP and MYSQL. Its CSS and HTML sections are also worth reading but as I am talking here about LAMP(Linux, Apache, MYSQL, PHP) I will stick to PHP and MYSQL only.

2. Zend PHP5 Certification study guide by Davey Shafik

0973862149.gif

This is a great book to read once you have some basic knowlege of PHP. This book will cover all the topics that you would have read in w3schools and some more advanced also. Its chapter 6 of object oriented programming in PHP and chapter 10 of Security will give you good insight about object oriented programing and common security measures that you should take care of being PHP developer. You will also have an oppurtunity to go for Zend Certified Engineer(ZCE) certification exam after finishing this book.

3. Practical Web 2.0 Applications with PHP by Quentin Zervaas

1590599063500yq8

Though PHP is very easy and efficient language to work on, it is always better to use a framework so that you dont have to reinvent the wheel everytime. It will save you from most of the donkey work and enable you to concentrate on your code. This book is a great Zend Framework tutorial, which covers everything including installation and building your personal blog right from the scratch.

4. High Performance MYSQL By Baron Schwatrz, Peter Zaitsev, Vadim Tkachenko, Jeremy Zawodny, Arjen Lentz & Derek Balling

high_performance_mysql_second_edition_cover

This book will be really helpful when your websites grow and database load increases. This book gives good insights about MYSQL. It would be worth reading chapter 4 Query performace optimization so that you keep few tips in mind for writing optimized queries.

5 .Search Engine Optimization(SEO) Bible by Jerri Ledford

41y9vpHbq9L

As the name suggest this book gives good explaination about search engine optimization. This is the book worth keeping in your collection as websites are made to attract traffic and search engines are the best sources to attract traffic free of charge.

Have I left any of your favorite resources? please leave your comments.

5 tools that made me an efficient web developer

There are many tools are available that makes web developer's life easy. But below are the tools that has really made me an efficient web developer.

1. Zend Framework

zend_framework_logo

Zend framework is an open source MVC (Model View Controller) framework made in PHP. It has only been for few years now but have already attracted millions of web developer's interest. Zend framework gives you power and flexibility and can help you build reusable independent code very quickly. You can choose what objects you want to use, and it’s very easy to integrate Zend into other frameworks.

2. 960 CSS Framework

960

960 CSS Framwork is 3-4kb size CSS file that helps build complex layouts quickly. It is consitent in most of the browsers which saves lot of time tweeking for ie6. It is a clean grid structure and rapidly speed up the development time.

3. SVN (Subversion)

subversion_logo-384x332

Subversion also known as SVN, it is an opensource software which provides revision control of the source codes, this helps to keep track on all current and past versions on each file, with note about who edited them and what they did. If some of the changes go wrong restoring to the previous running version is just few clicks away. It can also be used in place of FTP to upload files to live server, so that everytime you make some changes to you local copy, you dont have to remember the changed files to be uploaded. Simple SVN update command would do that job for you.

4. Wordpress

wordpress

Wordpress is one of the favourite blogging and CMS (content management system) engine. It is easy to use and have lots of plugin that can suit any normal websites requirement. It is backed with very huge community supporter. If you know PHP, building bespoke plugins will not be too hard in wordpress.

5. Artisteer

ExtensoftArtisteer_logo

As I am more of a developer than a designer, this simple tool can be more useful to people like me. All you have to do is just click few buttons and you have a decent web design ready. This website's design was also done in in artisteer in just 10 minutes. All the designs made in artisteer can be easily exported to HTML/CSS or it can also be exported as wordpress, drupal or joomla themes.

Thanks for dropping by and I hope you enjoyed this post:).  Please be kind as this is my first post and English is not my first language.

Any other tools which have made you a better web developer please leave your comments.