Apple / Mac

Saturday, September 05, 2015

How to mount VMware Shares on Turnkey Linux (Debian) and use it as Apache2 Document Root

Hello everyone again. After struggling to find a perfect LAMP environment for WebDev and tried so many different things I decided to give a try on the Turnkey Linux because of its small footprint and easy deployability (just invented that I word guess).

That been said and not considering myself a Linux expert at all. I was able to successful deploy TurnKey Linux LAMP 13.0 box on a VMware workstation 11. Upgrade the Webmin to the latest version at this time (v1.760). Install the latest VMware Tools available and finally mount shared folders. I will try to post later a tut on how I got everything working. But on this post I will  focus on the topic. How to mount shared folders on the guest system AND use it as Apache2 Document Root.

I will assume the following considerations;

  1. You have install VMware workstation or Player 10, 11 or 12
  2. You have already installed VMware tools and it's tested to be working
  3. and you already have configured at least one shared folder in your VM settings.
Our Goal is to share C:\www on Windows 7 host and mount it at bot time under /mnt/www on our guest Turnkey Linux.

Let's start!   We will edit the following file with nano...

...and add the following line to mount ALL shared folders under /mnt on our guest at boot time;

SAVE, EXIT and RESTART VM Tools  ->  service open-vm-tools restart
RESTART Apache -> service apache2 restart

And at this point you should be able to list the folder and files under /mnt.

You still won't be able to browse to your website yet! We will have to now do the changes to make our folder available for Apache so we can navigate to it...

Lest's copy the default contents of /var/www to our new /mnt/www;
cp -R /var/www/* /mnt/www

We need to edit the following file and change anything from /var/www to our new document root /mnt/www

Now we edit the php5.conf file and make the following changes to it;

Note: The files above can also be edited through Webmin interface as follows;

At this point you should be able to go to http:/// and you should see;

Note: Also any website under the root should work like http:///website1

That's it! From now on, every time you restart your box the shared folders will be mounted under /mnt.

Have fun! :-)

If you have any question please don't hesitate to drop a msg.


I am back!

Hello everyone! I am back! It has been a while and with so many great tutorials out there (Google) now a days I feel that writing repetitive stuff is not worth it. So I took a break from this blog. I has some other stuff going on.
Lately I've been on the IT world dealing with different challenges on a daily basis and sometimes you cannot find the right solution.
Finding a solution is like a puzzle. I take bits and peaces of different places and put them together and find a solution.
And this is what I will be doing on this blog from now on. I will not post stuff regularly but rather sporadically when I really feel like I can't find a solution for something nowhere else.

If any of you out there need help with whatever on the IT world I will be glad to try to help with my expertise's. Don't hesitate to drop a msg.

Soon I will be changing the look and feel of this blog to a more modern look.

Stay tune! ;-)

Thursday, November 13, 2014

How To: Create a Collection Based on an Advertisement Status

How To: Create a Collection Based on an Advertisement Status

You may encounter a time when you want to target systems that reported a failure message for an advertisement, or reported a specific failure exit code. This is an example of how to create a query-based collection of all systems that reported a failure for AdvertisementID LAB20089.

SELECT sys.ResourceID,sys.ResourceType,sys.Name,sys.SMSUniqueIdentifier,sys.ResourceDomainORWorkgroup,sys.Client FROM sms_r_system as sys inner join SMS_ClientAdvertisementStatus as offer on sys.ResourceID=offer.ResourceID
WHERE AdvertisementID = 'LAB20089' and LastStateName = "Failed"
Replace the AdvertisementID = 'LAB20089' with the ID you wish to create the collection based upon.
You should be able to paste this WQL directly into a new query-based membership rule, and modify the AdvertisementID for your environment.
Back To Top
Copyright © 2014 Unrevealing Box .