08/19/1108/19/11

Install LAMP Server CentOS Five 64-Bit Edition

Finally got my server up & walking for me to make use of. Regrettably for me, I was already sleeping & I had work today so I wasn't able to actually play with it until tonight. like other VPS & dedicated servers out there, the server is usually bare boned with no program except the operating method. for me I decided to make use of CentOS five 64-bit edition to get my web server up & walking. my web had Apache two pre-installed on my VPS for me but that was much about it. So I had to scramble around & search for an simple way to put in Mysql & PHP to go with my Linux Apache server.

After some searching, I realized that it is really easy because Linux CentOS Five comes pre-bundled with Yum. Yum is a feature that allows you to download and install software automatically. it will determine all of the dependencies and take care of the rest. I determined which packages I needed and sent off my command:

yum install php php-mysql mysql-server php-gd postgres ImageMagick ImageMagick-devel

This determined all of the dependencies and installed PHP and Mysql on my CentOS Linux server it was so easy I just needed to give Apache a reboot and php was pretty much up and running. to give it a test, I just wrote a simple line of code in /var/www/html/test.php.

Then visit yourhost/test.php If your php server is setup correctly, this should output all of the information about your php install and the different components that were installed with it. it will give you a list of all your configurations and plugins that are enabled.

The next step was getting mysql up and running. after the yum install, the daemon is not automatically started so you will need to start it yourself. you can start the mysql daemon but running the following command:

If everything goes well, the service ought to start without a hitch and it will give you a list of directions for first time users. of the most important things to do now is to set a password for the root user in mysql. again like everything else it is a simple one liner to alter the mysql password:

/usr/bin/mysqladmin -u root password ‘mynewpassword’

Thats it after only a few simple commands in Linux, I was one time able to receive a bare-boned CentOS five method up and walking with a full LAMP install. this method will take a max of five minutes to complete. But for me.. I was one time busy googling it took me about 30 minutes to an hour.. so hopefully this will help you.

Compiling After Install LAMP Server

For a stable & robust web-server, LAMP is the best combination feasible. the LAMP technique comprises of: Linux, Apache, MySQL & PHP; Linux is the base or the Operating technique program on which the others will run; Apache is the actual web-server software, MySQL is the Structured Query Language or the database software, PHP is the Hypertext Preprocessor for dynamic web-pages.

All the above program products are open-source. Meaning, you are free to make use of them without having to worry about copyright infringement. the only restriction is you are not allowed to change the source code of the program. A word about the hardware requirements for the LAMP; people have been known to run LAMP successfully on 128MB of ram on a 800MHz CPU, using a 4GB Hard Disk. Such low configurations may not be commercially obtainable any more, so they can safely say use anything obtainable as long as it is robust, since it is the life of a server what they are putting in danger.

The first step will involve installing the OS or the Operating Software. This is as easy as sticking the live-CD/DVD of the OS into the drive and booting up the PC. you will see the OS running from the CD/DVD and asking you if you want to install on the HD or the hard disk. say yes, and the wish is fulfilled. well, if you need to do something special like partitioning your HD, etc., you may need to explore first.

Before we start installing and setting up the others, we need to set up the OS properly. Since we are going to make changes to the basic OS, we need to assume the status of the Super-user; in other words, ‘login as root’, and remain so until all the installation is done. if you do not have access to the hardware from a keyboard, or you are doing a remote login, use Secure Shell, and not telnet; not to compromise the security of the server. Depending on the Linux distro you are using, these names may differ somewhat.

Again, depending on the Linux distro you are using, you may decide to install the standard versions of Apache, PHP and MySQL, in which case, there is no need to uninstall anything. on the other hand, if you are very particular or need to tweak the software to extract maximum performance, you may decide to install after compiling the source code, in which case, you will need to uninstall the standard versions which are given with the OS, download the correct source code versions suitable to your OS, and begin compiling. Whatever course you choose, you will need the C++ compiler. Check for and install if necessary, gcc and gcc-c++.

The next step is to check and if necessary, download the Apache, PHP and MySQL from the repository of your distro and install. In case you are going to install after compiling, get the source code for Apache, PHP and MySQL, unpack and use the standard ‘configure’ and ‘make’ compiling procedures, to install. execute the install procedure sequentially, starting with MySQL, then Apache and finish with PHP.