Set up Linux LAMP server with WordPress

As a web developer it’s handy to have a personal web server that you can have full control over for hosting your PHP code. Alternatively, if you are looking to learn about Linux for the first time, I recommend setting up your first couple servers on a virtualbox installation. This article is a list of steps to help your set up a Linux Apache MySQL and PHP (LAMP) server quickly.

The target audience of this article is post-secondary web development students and new web developers who have need of a custom server for prototyping or hosting web sites and applications on or offline.

Steps

Download a Debian Linux installer from Debian.org. It’s important that you get the right image. The easiest of these to use are the CD or usb stick netinstall images. Ensure that you select the right image for your processor (i86 if you’re using virtualbox).

Install to your server or virtualbox. Mount the iso you downloaded from debian.org into virtualbox or burn it to a disc and boot your server from it. Keep it light, and try to avoid installing too many things you don’t need.

Screen Shot 2016-02-29 at 12.12.48 PMScreen Shot 2016-02-29 at 12.14.33 PM

Follow the Debian installer:

  • Select your language (English for me)
  • Select your country (Canada for me)
  • Select your keymap (American English for me)
  • set up your root user and your new user. I reccomend writing down these passwords.
  • select your timezone
  • Set up your disk. (use entire disk for me, then enter and yes for all options until the base system starts to install.)
  • Select your Debian mirror (Canada and ftp.debian.ca for me)
  • When it comes to package selection, the following options are what I select for a basic webserver with an ssh server and standard system utilities
  • Screen Shot 2016-02-29 at 12.28.30 PMInstall grub to root of dev/sda
  • remove the disc or unmount the iso
  • boot into your new debian server and login with the user info you wrote down.

When your linux is ready, install sudo via the apt installer tool:

Edit sudoers file, adding your username & permissions then reboot

Log back into your system’s command line

Download wordpress from wordpress.org

Unzip the zip file

Copy the files to your webroot at /var/www/html

Set up a new user with a database in your mysql installation:

If you are using a hosting provider, you may already have a WordPress database set up for you, or there may be an automated setup solution to do so. Check your hosting provider’s support pages or your control panel for clues about whether or not you’ll need to create one manually.

If you determine that you’ll need to create one manually, follow the instructions for accessing phpMyAdmin on various servers, or follow the instructions for Using Plesk, Using cPanel or Using phpMyAdmin below.

If you are installing WordPress on your own web server, follow the Using phpMyAdmin or Using the MySQL Client instructions below to create your WordPress username and database.

If you have only one database and it is already in use, you can install WordPress in it – just make sure to have a distinctive prefix for your tables to avoid over-writing any existing database tables.

https://codex.wordpress.org/Installing_WordPress

get the ip of your virtual server

Type the IP of your virtualbox installation into your browser on your PC or Mac to start the WordPress installer

Complete the WordPress installer, and voila your server is running wordpress.

There’s a lot more your Linux server can do, you just need to do some research and bam you can have fantastic results.

Date
Categories
Tags
Permalink
Status

Published:February 29, 2016

Uncategorized

Bookmark the permalink

Post a comment or leave a trackback: Trackback URL


Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*
*


Notice: Use of undefined constant WP_PB_URL_AUTHOR - assumed 'WP_PB_URL_AUTHOR' in /app/wp-content/plugins/adsense-box/includes/widget.php on line 164

Notice: Use of undefined constant WP_PB_URL_AUTHOR - assumed 'WP_PB_URL_AUTHOR' in /app/wp-content/plugins/adsense-box/includes/widget.php on line 164

Notice: Use of undefined constant WP_PB_URL_AUTHOR - assumed 'WP_PB_URL_AUTHOR' in /app/wp-content/plugins/adsense-box/includes/widget.php on line 164
Please wait...

Subscribe

Want to be notified when a new article is published? Enter your email address and name below to be the first to know.