Login
Password

Forgot your password?

Getting Going With LAMP

By 0 0

A common job skill for a web developer to have is LAMP development. LAMP stands for Linux, Apache, MySQL, and PHP; these skills all go hand in hand! Today I would like to take you through the installation of a LAMP stack and then walk you through the installation of a WordPress website.

Before we begin you need at least one thing, an installation of Ubuntu, a simple google search fpr
"How to install Ubuntu" should get you going. I have already installed Ubuntu 12.04 (Precise Pangolin):

Fesh Ubuntu 12.04 Install Screenshot
Credit: Benjamin Knox Screenshot

The first part of the LAMP installation is the Apache 2.4, Apache is a HTTP web server. An alternative is nginx and if you are working with Java for your server side code you might be using Tomcat. To get your Apache web server running launch your terminal and type in this command:

# sudo apt-get install apache2

Install Apache2 Command
Credit: Benjamin Knox Screenshot

Run through the prompts and let the command finish until you see the cursor, it should should not take too long. Now if you were to open up firefox and typed in http://localhost you should see "It Works!", indicating a successful installation.

After a successful installation of the Apache web server, we need to move on to the MySQL installation. MySQL is an open source relational database that is very commonly used on the web, it allows website application developers to solve problems very dynamically and creatively. To move forward with installation of our MySQL database server, run this command and run through the prompts:

# sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

When the server asks you for a password, set your root password.

I will put in tutorials for my password.

 

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
MySQL Password Prompt
Credit: Benjamin Knox Screenshot

After the installation is finished run these two commands:

# sudo mysql_install_db

# sudo /usr/bin/mysql_secure_installation

When the secure installation prompts you for configuration read the suggestions and do what you think is best! 

To finish up our LAMP installation we need to install PHP still, PHP is the server side scripting language. It is the essential tool of the LAMP stack. Run the command below to install PHP:

# sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

 

Install PHP5
Credit: Benjamin Knox Screenshot

There you have it! A full fledged LAMP development environment, now to test it lets do something functional. In your terminal type this command to create a new WordPress install:

#cd /var/www;sudo wget https://wordpress.org/latest.zip;sudo unzip latest.zip;sudo rm latest.zip 

And then change ownership (replacing "tutorials" with your username) and the working directory to the new wordpress directory:

# sudo chown -R tutorials:tutorials; cd wordpress

Now open firefox and type in http://localhost/wordpress/ and you should see a WordPress install screen. Before we get started there lets create the database that we need for the WordPress installation, type in this command to open the MySQL server:

#mysql -uroot -p

Once the MySQL server is open, run this query:

#CREATE DATABASE wordpress;

Now go back to your WordPress installation and run through the installation wizard until you have to enter in the Database information. Here we will use the wordpress database we just created, using root for the user name and (in my case) tutorials for the password. Everything else should be ok!

In my case the wp-config.php file would not automatically install, so I just created a file in the /var/www/wordpress directory.

There you have it! A fresh LAMP install, you are one step closer to becoming a LAMP developer. A LAMP developer learns to utilize all of these tools effectively in order to do his job and keep up with business demands.

Advertisement
Advertisement

Comments

Add a new comment - No HTML
You must be logged in and verified to post a comment. Please log in or sign up to comment.

Explore InfoBarrel

Auto Business & Money Entertainment Environment Health History Home & Garden InfoBarrel University Lifestyle Sports Technology Travel & Places
© Copyright 2008 - 2016 by Hinzie Media Inc. Terms of Service Privacy Policy XML Sitemap

Follow IB Technology