TurnKey Linux Virtual Appliance Library

Turnkey WordPress Modifying

Hi,

Just doing some research and I came across Turnkey WordPress solution, seems like it allows me to run a VM locally, however here my following questions hopefully someone or the dev can answer;

1. Testing, I've noticed that the VM on a cloud setups a domain@example.com email address then send the username/password for wordpress to that email. Is there a way to configure this in the actual vm image??

2. Also, in WordPress the Title is "Turnkey Linux", is there a place when editing the VM image that you can customize this?

Just those, I'm little confused why hosting this on a VPS.net for example, would set the email autmoatically to domain@example.com, thats a big one, can I set it to something personal when I test VPS.net clouds ?

Thank you,

Ajer

Jeremy's picture

Some answers...

Short answer:

  1. Passwords are set for default accounts on first boot in TKL v11.x Email address is configurable by logging into WordPress.
  2. Configurable in WordPress.

Long answer:

TKL is based on Ubuntu so the system is fully and completely customisable, even to the point of it being unrecognisable as TKL (although why would you bother).

The v11.x images (currently v11.1) are based on Ubuntu Lucid/10.04 and have a 'first boot' setup which allows customisation prior to initial use (available in the ISO and VM images). AWS images can be preconfigured via the Hub. During the 'first boot' you can set passwords for the Linux root account and the app (eg WordPress) admin password amoung other things (depending on the appliance). Worst case scenario the 'first boot' config can be manually triggered via the commandline to reset passwords etc (Although you need to log in as root to run it).

Most settings relevant to the individual app (eg WordPress) which aren't applied at first boot can be adjusted from the admin area (most server side apps have settings and preference pages in their WebUI - for things such as admin email, etc). Many other functions of the underlaying OS and underlaying application settings can be configured via Webmin (a Linux OS sysadmin WebUI) and pretty much everything can be done via the commandline (either Webshell via your browser, via SSH or at the local terminal).

There are a lot of resources here on TKL forums and docs to help you out. Otherwise Ubuntu documentation is still mostly relevant (which there is copious amounts of online). Also most of the software included with TKL has its own support forums, mailing lists and/or wikis.

Hope that has answered your questions. :)

Hi, Thanks for the answer.

Hi,

Thanks for the answer. However which file and area of it would I need to touch to change the WordPress default setup like the blog title and address or password, etc.. not from within WordPress but before the VM is launched or ran first time. I'd like to create a custom one that doesn't show Turnkey in WordPress as the start up blog title.

Let me know how I can achieve it or anyone else :) destination, files and some instructions how to open an image of turnkey would be great, unless I have to first install a VM, run it, make changes, then save it for other usage with other VM creations.

 

Thank you,

Jeremy's picture

To acheive that you will need to customise a VM

So start with a TKL VM (I suggest just download the TKL VM image although install from ISO should be fine too) then do all your generic customisations and repackage. To make sure the 'first boot' config (which sets admin password etc) runs on first boot of your custom VM you will need to reset the 'first boot' flag in TKL. I don't recall the details of the config file OTTOMH but it's here somewhere, perhaps in the docs or in an announcement blog post.

There is a blog post that explains how to repackage a VM as an ISO if you want to do that too (although instructions are for previous version hopefully it'd still work).

OTOH as with most things Linux there are probably many other ways to acheive your ends. There may be specific WordPress conf files and/or database entries that could be adjusted rather than having to do it manually although you'll need to do some research to discover those because I have no idea. And it depends on your programing skills, if you're up for it you could probably even create a first boot script to set admin email address. If you do anything cool like that, please be a good open source citizen and share. :)

Hi Jeremy, Thank you for

Hi Jeremy,

Thank you for the insight once again. Yeah, I wish I was as savy as a php developer or linux developer. :) I do understand and can configure some areas but looking at all this and not being able to find the first boot file but rather find all other firstboot files it is kind of over my head at this point. I do see what you mean and I think these steps are very good to take and its something that from what I understand pretty much would help. Just need someone with the knowledge.

Anyone ? able to help out with the above Jeremy directions or shed some more light on the locations of firstboot files for WordPress config, etc... ?

Thank you Jeremy once again and thank you to anyone in advance.

Hi all, Seems reading and

Hi all,

Seems reading and rearching around I found out that the inithooks is what I should be looking for when it comes to configuration of WordPress info at the firstboot of TKL.

Now looking into a boot VM of TLK + WordPress, under this path; /usr/lib/inithooks I don't find anything that it should have for WordPress like;

40wordpress             APP_PASS, APP_EMAIL

Can anyone help??

I need my inithooks to set a default WordPress blog title other then TKL as it does right now and also need inithooks to change the default email address in Webmin, to something I can tell it, since domain@example.com won't work. I keep having the welcome password email in my mail queue. Also, whatever password is in that email for WordPress admin login, doesn't work so I either have to have inithooks to set a random one or one I specify.

 

Can anyone help with coding these up ?

Jeremy's picture

Yep inithooks it is!

The binaries that actually do the work are in the bin folder. And they are named fairly obviously eg the script that (re)sets the root MySQL password is called mysqlconf.py
So I would guess that it should be a script named something like wordpress.py or similar to set the password. The email is not set at boot so you will either need to change it in your generic VM or manually set it up after first boot. Only other option is to write (or pay someone else to write) a script for you and add it to inithooks.

But anyway all you need to do is set the flag in the intihooks conf file to run first boot.

Jeremy, Willing to pay

Jeremy,

Willing to pay someone to get this right and maybe add an extra few things to run on first run or every startup.

How do you repackage a VM image? or save it ?? so that when booter for first time ti runs everything again, or what is the flag in the inithooks to run firstboot ?

Anyone out here ? :)

Jeremy's picture

Sorry for delayed response

I've been pretty busy and have missed quite a few posts.

Anyway the init hooks documentation should help you out with getting your VM to set/reset passwords on first boot. You can find it here. FYI it was the only result when I searched documentation for 'inithooks' (using the site search box in the top right corner).

Also on reading it seems that the default email should be set at first boot:

40wordpress             APP_PASS, APP_EMAIL

To repackage your VM it's simply a case of 'exporting' it (in VirtualBox it's File>Export Appliance). Or as I said in a previous if you do a search you should find Alon's blog post on converting a VM to ISO.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)