ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Setting up static blog (based on movable type) / vm / local development system

(1/3) > >>

justice:
I'm in the process of setting up a static blog, where all blogging takes place on a local development server running Movable Type, with the resulting static site being pushed to my shared hosting. This has all the benefits of a static blogging system (security, speed,), plus the benefits of Movable Type (robust, easier to theme than wordpress from my initial impresions, power of complete CMS, open source version available / pro version free for individuals).

I'm choosing to do this on a ubuntu 11.10 virtual machine running on VMware player. I thought it would be interesting to document the process and instructions so that it will be useful to others, and you can follow along / correct / improve this guide. Apart from a working static blogging system you will end up with a complete LAMP local development system for other web projects.

Feedback is welcome.

justice:
INSTALLING UBUNTU

You will need:
Vmware player (http://www.vmware.com/products/player/ or if you don't want to register: http://filehippo.com/search?q=vmware+player)
Ubuntu (http://www.ubuntu.com/download/ubuntu/download)
A Notetaker - I use Evernote - http://www.evernote.com/)

Install VMware player (VMP). Restart the pc if necessary.

I'm installing the virtual machine on my USB harddisk, this way I can take my whole development with me on the go (home/work) - this is great because you only have to set all this up once, instead of on every machine you plan to use it on.

Start VMP and "Create a New Virtual Machine" and browse to the downloaded .iso. As part of the Easy Install Information write down the login:

username:
password:

Store the VM on your removable drive.

On the Specify Disk Capacity screen you will want to go higher than the recommended disk size, I chose double (40GB). Make sure you have enough free space available, check this before continueing. I went for double the recommended amount as I want to avoid to repartition later. Accept the other defaults and Ubuntu will start. Keep waiting as Easy Install is installing Ubuntu on your behalf.

If you are a chmod 777 user (jackpot settings), this is a great time to read up on file system permissions by reading the article series starting with "Linux File Permission Concepts" (click next in the summary, there are 5 articles in total):
http://articles.slicehost.com/2010/7/17/linux-file-permission-concepts

After a restart the login screen appear and after a successful login you will see the desktop. Because we are going to install a bunch of software let's make sure everything we already have is up to date. Start the update manager > Settings > Ubuntu Software > Other > Select Best Server. This will speed up downloads. Check again and install updates.

Time to read some more, btw have you created a new tag for all these bookmarks yet?
When you are finished reading the above articles, here are some really good resources to read later:

http://articles.slicehost.com/sitemap
http://library.linode.com/
http://askubuntu.com/questions?sort=votes

You should now have a running Ubuntu system.

justice:
CONFIGURING THE SYSTEM A BIT

You will need the following software:
Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/)

I noticed the clock was set incorrectly, so I searched for Time and opened the Time & Date settings, and selected the correct location.

Open a terminal. We will make a backup folder in your home directory where we will copy configuration files to before we edit them:

--- ---mkdir ~/backup

You will want to change the hostname  of the VM to something nicer, I choose 'devvy'

--- ---echo "devvy" | sudo tee /etc/hostname

You will also need to run the following command and change the hostname on the second line from ubuntu to your name.

--- ---cp /etc/hosts  ~/backup
sudo nano /etc/hosts

Apply the changes with the following command (you will see the change next time you open a terminal)

--- ---sudo hostname -F /etc/hostname

Now that is out of the way, we can setup openssh in order to connect via ssh from your windows pc.

--- ---sudo apt-get install openssh-server fail2ban byobu

Fail2ban bans people when they are trying to guess your logins, and does not need to be configured.
Byobu is a very helpful way to display system stats such as your ip in your terminal, and also improves on screen by allowing you to resume previous sessions.

The default setup of openssh is not as secure as we would like however:


--- ---cp /etc/ssh/sshd_config ~/backup
sudo nano /etc/ssh/sshd_config

It's good practice to change the port number (line 5) to something higher like 2222 as this twarts some automated attacks, in case your VM is ever connected directly to the internet. Also we dont want the root user to login remotely:

Search (ctrl-w) for PermitRootLogin and set this to no:

--- ---PermitRootLogin no

We will revisit this file at a later date to setup passwordless login using ssh keys, but for now Restart ssh with:

--- ---sudo service ssh restart

Start Byobu and note your ip address (type exit to end it):

--- ---byobu

Press F9 and choose "Byobu currently launches at login (toggle on)" to enable this handy program for your remote connections. Press escape to exit.

Back in windows, start putty, type in that ip address and change the port to whatever you decided above. Under Connection > Data  you can enter the auto login username so you will only have to type the password. Navigate back to Session and type your hostname in the Saved Sessions box and press Save to save this session for reuse. Then click Open and login.
You will see your session again in byobu! Note that when you type in the putty session the characters show up on your ubuntu desktop.

That will do for now, next time we will setup apache, configure it for a multi-site setup, and setup other web software required for many websites.

Well done!
Setting up static blog (based on movable type) / vm / local development system

rgdot:
+1 very very useful, thanks

TaoPhoenix:
"I'm in the process of setting up a static blog, where all blogging takes place on a local development (machine), with the resulting static site being pushed to my shared hosting."

Although my backbone is much different, I am doing something like this too. Last I knew there were fewer points of attack against simple web pages. I also like having local control of my data.

Navigation

[0] Message Index

[#] Next page

Go to full version