CentOS 6.4, OpenVZ & OpenVZ Web Panel

How to install OpenVZ in CentOS 6.4

I’ve used the CentOS-6.4-x86_64-minimal.iso image to install the OS.

A pretty good installation guide is located on the OpenVZ webpage.

The minimal installation does not have “wget” installed – so I’ve installed it first.

After that you can follow the original instruction or use this shortcut

Reboot

This part was pretty easy, some troubles caused the installation of the web panel.

Install the OpenVZ Web Panel

https://code.google.com/p/ovz-web-panel/

..and here comes the first problem:

The used gem source is unavailable. Let’s add a new one:

The sources list is in a file in your home directory – I suggest to remove the not-working one

After that let’s start the script again.

This time it worked but all connection to the port 3000 are blocked, so we need to add an IPTABLES rule

Right now the web panel should be available

Hints:

1)If any errors appear while adding new hosts about missing net/ssh or net/sftp simply install them:

2) The first time when I was testing OpenVZ using a netinst image I’ve unnecessarily updated the gem system resulting in this:

The solution was to downgrade it:

Tail in Windows

As an Unix administrator you easily get used to some standard tools that are available in most of the distributions.

One of them is “tail” mostly used with the “-f” option. The “-f” allows you to follow the data as it’s being appended to a file – most commonly used to view log files.

Unfortunately when you type “type -f” in the default Windows command interpretor (cmd.exe) you won’t come far…

Fortunately there’s a way to do it using PowerShell.

This will show you the whole content of the file and display any new data that is being appended to the file.

 

SSH escape sequences

Ever found yourself in a situation where your SSH connection simply froze and you were not able to do anything.
A possible solution for this kind of problem are the SSH escape sequences.
To execute them you have to enter to a new line (so simply press “enter” on your keyboard), hit shift, press the back tick (`) to get the tilde (~) character and follow with the keys as described below.

So to wrap it up:
press “enter” ~. to close the ssh connection

Determining script execution time in PowerShell

How to determinate the total execution time of your script:

Put a new line at the beginning of your script which will start the counter:

To see how much time passed by since the start you can simply use:

Unlocking the Local Security Policy on a Computer

Source:
http://blogs.msdn.com/b/muaddib/archive/2006/11/04/unlocking-a-local-security-policy-on-a-computer.aspx

There are times when you are doing troubleshooting or testing when you need to work on a production computerin a lab environment. In these cases you capture an image of the computer in question and restore it on lab hardware. Many timesthe local security policy has been set by a GPO and cannot be modified by using the Local Security Settings MMC.When the computer is removed from the network (and domain)the local security policy remains unchanged. The procedure below will enable you to modify the local security policy on a computer where this has occurred.

  1. Log onto thecomputer with an Administrator account.
  2. Start the Local Security Settings MMC (SECPOL.MSC)
  3. Export the current security settings toan INF file by right clicking the top node in the MMC and selecting Export from the context menu. (for Windows XP see additional information below) and name the file “current.inf” (name is not important)
  4. Open a blank MMC (Start > Run MMC)
  5. Add the SecurityConfiguration and Analysis snap-in.
  6. Right-click the top node inSecurityConfiguration and Analysis and select “New Database” and then save the database.
  7. When prompted to import a security template use the one exported in step 3 above (current.inf)
  8. Now right click SecurityConfiguration and Analysis and select “Analyze Computer Now”.
  9. Now browse to the setting you want to modify. You will notice the database setting and computer settings are the same in all cases. Double-click the setting and make changes. Repeat for each setting you want to modify.
  10. When you are finished making changes, right-click top node and select “Configure Computer Now” and you changes will be applied.

In Windows XP the SECPOL.MSC does not support the exporting of the security configuration to a template. The SECEDIT.EXE command-line utility does not support exporting the configuration either. There is an updated version of SECEDIT.EXE available from Microsoft as described int he KB article below that does enable you to export the security configuration to an inf file.

You cannot use the Secedit.exe command-line tool to export the local security policy settings on a stand-alone workstation that is running Microsoft Windows XP
http://support.microsoft.com/default.aspx/kb/897327/

Go to Top