Tag: LAMP

LAMP stands for: Linux Apache MySQL PHP. It is a popular way to get a professional style web hosting setup on one’s own computer. It’s quite simple to install and provides the major components of what is necessary to design and implement as simple or as complicated a website as one can imagine, just like having your own web hosting right on your own computer to experiment with!

The steps involved to getting a fully operational LAMP setup in Linux Mint 13 Maya are outlined below, complete with clickable screenshots.

Once again my system is as follows:

Intel Core 2 Duo 2.67GHz box with 2 GB of DDR2 RAM, Nvidia 8400GS card, running Linux Mint 13 Maya Xfce 64-bit.

STEP 1 – open a terminal and type sudo apt-get install lamp-server^
(note the carat “^” after server)

Press “Enter”

STEP 2 – Configuring mysql server – It’s always a good idea to change the default password whenever possible, make up a good one and don’t forget it!

…back to installing…

STEP 3 – Done with the terminal install for now

STEP 4 – Test the APACHE installation, open a browser window and type in the address: http://localhost/

Now test the PHP installation, for this we require a test PHP file in /var/www/ called test.php We can use a text editor as root, or as so often is the case we can type a command in the terminal: echo “<?php phpinfo(); ?>” | sudo tee /var/www/test.php

Once you do that, a restart of the Apache web server is required. That can be done by issuing this command: sudo service apache2 restart

After that is done, go back to the web browser and enter this address: http://localhost/test.php/ and you should see a page like this one describing your PHP installation:

STEP 5 – Fixing the Apache server qualified domain name error you may have seen in the terminal is easy enough at this point as well. Enter the following command in the terminal:

echo “ServerName localhost” | sudo tee /etc/apache2/conf.d/fqdn

Then restart the Apache server: sudo service apache2 reload

STEP 6 – Configure MySQL

It’s important to bind MySQL to your localhost IP address. Typically that IP address is 127.0.0.1, but we can verify that by issuing the following command:

cat /etc/hosts | grep localhost

In my case I saw this:

 

Next, verify you have the correct BIND address:

cat /etc/mysql/my.cnf | grep bind-address

In my case I have the proper 127.0.0.1:

STEP 7 – Installing PHPMyAdmin

The most convenient way to administer MySQL is by using this handy tool. As we’ve discovered so far, the process involved is quite easy. Back to the terminal we go, this time type: sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

It will go through the familiar downloading process, then a screen will pop up asking which webserver to choose to be automatically configured to run PHPMyAdmin – Please choose Apache2 by pressing the space bar:

 

The next screen to pop up asks if you would like to use dbconfig-common to facilitate the use of PHPMyAdmin – as the screen shows, you should choose “Yes” unless you are an expert administrator.

 

Next, enter the MySQL password you entered earlier

Now, enter a password for PHPMyAdmin to register to the database server, then confirm on the next screen

STEP 8 – Testing PHPMyAdmin

Let’s make sure it’s working, type this address in your browser:

http://localhost/phpmyadmin

You should see this:

Now let’s login with root and the password we created earlier:

 Success! Congratulations, you have successfully installed Apache web server, MySQL, and PHP on your Linux Mint 13 machine. Hopefully the steps involved were straightforward and will reward you with years of fulfilling web development on your own computer.

 

Tags: , , , , , ,

Linux Vs Windows Web Hosting

By George Szifo

Linux web hosting (often referred to as LAMP – Linux, Apache, MySQL & PHP) solutions are suitable for webmasters who use Linux hosting features, such as Perl programming, PHP programming and MySQL database.

Windows Web Hosting gives a company the capability of designing web sites using the ever-popular Windows Operating System. This allows development using technologies such as Active Server Pages (ASP), COM, and the newer.NET infrastructure.

Advantages of using Linux based server compared to Windows based web server:-

1.Stable:-

Linux operating system is very stable and robust. A website hosted on a Linux operating system will have very high up-time.

2. Low cost of ownership:-

Linux OS comes free of cost. Also, it has fully fledged server, and desk top applications that come free with the OS. These server applications (such as FTP, Web Server, DNS Server, File Server etc.) are also very stable.

3. Easy to move between hosts:

A website designed to host on a Linux server can be hosted on a Windows server easily, where as the reverse is not always true.

4. Most widely used: Linux/Unix based web hosting is most widely used compared to Windows web hosting.

5. Scalability: A web site designed for compatibility with a Linux/Unix based web server meets the scalability requirement easily without making any site wide design changes.

Disadvantage:-

Linux based web server is not fully compatible with Microsoft technologies. If you are using any specialized applications or VB for development of your web site, it is preferable to host with a Windows based web server.

Both these web server are used by users for different purposes and the selection of the web hosting depends upon the nature of the website or business. Linux server administration and Linux server management has been more effective for complex websites, where as Windows servers are used for sites which needs different configuration.

 

Tags: , , , , ,

How to Install PHP and MySQL on the Linux Operating System

By Reddy Sharath

For beginners who start developing web applications on PHP, it is a common thing to find them in trouble while installing PHP and MySQL on the Linux operating system. However, there are a few simple steps which need to be followed in order to install PHP and MySQL on the Linux system. The first step is to ensure that the Linux operating system has been installed properly on the system. There are some specific distributions which are extremely developer-friendly like CentOS, Ubuntu and Suse Linux.

The first thing that needs to be installed in the system is the server. Generally, the Apache web server is preferred on a Linux system with PHP and MySQL completing the popular LAMP architecture (L – Linux, A – Apache, M – MySQL and P – PHP). On a CentOS linux system, the web server can be installed by opening the terminal and typing “yum install httpd”. Then the set of instructions needs to be followed for successful installation of the Apache web server.

After the server is installed, one can start with the installation of the PHP module on the server. Again, on a CentOS machine, you have to type in “yum install php” and the same process of following the on-screen instructions is to be followed. Once PHP is installed, the last thing left to do is to install mySQL.

Similarly, typing “yum install mysql-server mysql” and following the subsequent instructions would lead to the installation of the MySQL server. After the database server is installed, one needs to start the Apache server through the command “service httpd start”.

A notification would be sent on the screen if the web server service has successfully started. The next task is to start the mySQL server and this can be done by typing “service mysqld start” in the terminal window. When both the servers have been started, one can go to the “localhost” page and verify if the welcome page of CentOS is shown on the browser. This page confirms that the installation is correctly done.

The status of the PHP module can be checked by creating a same PHP page which prints the phpinfo() method. A purple PHP information page indicates that the PHP is working properly and is actively running on the server right now. Now, PHP and MySQL can be used to create web applications. The steps are easy to execute when followed in the order mentioned and when all the dependencies are present in the system.

To know about database management in greater details, you may visit Techyv.com – a website full of free online resources like articles, blogs, tips and tricks, questions and solutions to all things related to IT.

Tags: , , ,
Tags: , ,

Linux Web Hosting

Linux Web Hosting

By Jeremiah Collins

Today our lives are intermingled with the Internet. We turn to the Internet for pleasure, work, information, banking and what not. We watch web-sites and web-pages with no second thought. It is very similar to reading a printed matter; without any concern for who printed it; or how it was printed; or how it was bound and published; how many copies were printed, etc. For a web-page, we care nothing about how it reached our computer screen; how it was made; or for that matter, who made it. Same as for the printed matter, we are more interested in the contents. However, the people involved with the publication of the web-pages and those who have to maintain the web-sites, must have an in-depth knowledge about Web Hosting.

The main ingredients necessary for web-hosting are, a rugged computer with memory and hard disk, running a server OS, a web-server package, a database package and a package to handle web-pages. The LAMP-server setup matches this requirement very well. LAMP stands for the combination of Linux, Apache, MySQL and PHP. Here Linux is the Operating System; Apache the web-server; MySQL is the database; PHP handles the web-pages. This combination is attractive for the simple reason that it fulfills all the requirements that a web-host requires, at the same time providing the necessary Stability, Security and Scalability.

Linux stability is well documented. The up-time of a Linux server is nearly 99.9%, meaning there is only 1 chance in 10,000 that a Linux-server will stall on account of OS failure. Most non-availability of a Linux-server are the result of a disrupted Internet connection or a hardware failure. However, there are some more links in the chain between the Linux-server and the ultimate viewer of the web-page, which govern the availability of the web-page. DNS servers are one such link.

Next in line is security. A web-host needs protection from virii, trojans, rootkits and the like, which threaten to disrupt the whole show. Any breach in security could lead to deliberate misinformation being sent out, ruining the credibility of the organization whose web-page gets affected. As a system, security measures are taken to periodically look for breaches and plugging them. One feature which helps system administrators in securing their Web-hosts, is that all the softwares used in LAMP are open-source. Open-source softwares enjoy the backing of a large community of developers, who pitch in en-mass at the slightest hint of any problem. Security issues or holes as they are known, get plugged in no time at all, further improving the system.

Scalability is another feature LAMP-servers can boast of. One of the major advantages is you can start small and progressively add accounts as you build-up your business. Since LAMP-server components are all Open-Source, you need not worry about copyright infringement. Also, initial expenditure is only a little more than the hardware cost. LAMP-server can either be dedicated or shared, or even virtual, allowing you to add users at will, at the same time, providing each user the full use of all resources. Linux being a multitasking OS, handles such simultaneous tasks with simple ease. Linux is also capable of parallel computing, which helps in further scalability.

Ripple Web can help you get started with enterprise-grade LAMP servers that will fit your budget.

Tags: , , , , , ,

LAMP Server Setup CentOS 5 64-Bit

By Nate Boot

So at about 1am this morning, Burst.Net finally got my server up and running for me to use. Unfortunately for me, I was already sleeping and I had work today so I wasn’t able to actually play with it until tonight. Like other VPS’s and dedicated servers out there, the server is usually bare boned with no software except the operating system. For me I decided to use CentOS 5 64-bit edition to get my web server up and running. Burst.NET had Apache 2 pre-installed on my VPS for me but that was pretty much about it. So I had to scramble around and search for an easy way to install Mysql and PHP to go with my Linux Apache server.

After some searching, I realized that it is really easy because Linux CentOS 5 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.

phpinfo();

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:

service mysqld start

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

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

Thats it! After only a few simple commands in Linux, I was able to get a bare-boned CentOS 5 system up and running with a full LAMP install. This process will take a max of 5 minutes to complete. But for me.. I was busy googling it took me about 30 minutes to an hour.. so hopefully this will help you.

For more information about PHP and WordPress check out http://www.websitejourney.com/

Visit WebsiteJourney for other great tips: http://www.websitejourney.com/

Tags: , ,
Back to top