Archive

Posts Tagged ‘Server Admin’

Windows 2003 – Login Screen is Black Except for Logo – Part 2

April 14th, 2010

Here are the default registry settings for the instructions mention in the MS KB http://support.microsoft.com/kb/906510.

Windows Registry Editor Version 5.00
[HKEY_USERS\.DEFAULT\Control Panel\Colors]
“ActiveBorder”=”212 208 200″
“ActiveTitle”=”10 36 106″
“AppWorkSpace”=”128 128 128″
“Background”=”102 111 116″
“ButtonAlternateFace”=”181 181 181″
“ButtonDkShadow”=”64 64 64″
“ButtonFace”=”212 208 200″
“ButtonHilight”=”255 255 255″
“ButtonLight”=”212 208 200″
“ButtonShadow”=”128 128 128″
“ButtonText”=”0 0 0″
“GradientActiveTitle”=”166 202 240″
“GradientInactiveTitle”=”192 192 192″
“GrayText”=”128 128 128″
“Hilight”=”10 36 106″
“HilightText”=”255 255 255″
“HotTrackingColor”=”0 0 128″
“InactiveBorder”=”212 208 200″
“InactiveTitle”=”128 128 128″
“InactiveTitleText”=”212 208 200″
“InfoText”=”0 0 0″
“InfoWindow”=”255 255 225″
“Menu”=”212 208 200″
“MenuText”=”0 0 0″
“Scrollbar”=”212 208 200″
“TitleText”=”255 255 255″
“Window”=”255 255 255″
“WindowFrame”=”0 0 0″
“WindowText”=”0 0 0″

Andrew Hosting , , , , ,

Configure Apache with a Server Alias

March 10th, 2010

Notes on setting up apache for multiple web sites:

In the /etc/apache2 directory you have two directories:
- sites-available
- sites-enabled

The sites-available directory contains configuration files for each website.
The sites-available contains links to the configuration file in the sites-available directory.  It does not contain the file itself.

The mistake that is made at times is that *all* configs are placed in one file – default.

So, for a domain name like domain.com you would create a file called domain.com in the sites-available directory with the following:

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/domain
ServerName www.domain.com
Server Alias domain.com
</VirtualHost>

you would do:  /ln -s /etc/apache2/sites-available/domain.com /etc/apache2/sites-enabled/domain.com

OR

a2ensite domain.com (from within the sites-available) directory.

finally:  /etc/init.d/apache2 reload

So, in a nutshell — create a file per domain name — use ServerAlias to cover www.domain.com and domain.com.

Andrew Hosting , , , , , ,

Setting up MySQL to use less memory

January 20th, 2010

So, you’re on a VPS with 128MB of RAM or doing development on your Linux workstation and you don’t want MySQL to hog all of the memory — here is what you do:

sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.backup
sudo cp /usr/share/doc/mysql-server-5.1/examples/my-small.cnf /etc/mysql/my.cnf
sudo /etc/init.d/mysql restart

** verify the version # on the second command line.

Andrew Development , , , , , , ,

Instructions for Installing WordPress on Ubuntu 9.10 (Karmic Koala)

January 19th, 2010

Instructions for Installing WordPress
——————————————————————————————————

# Setup Sources (some VPS vendors block sources)
vi /etc/apt/sources.list

(remove all # in front of all sources)
To save in vi: :qw
To exit without saving: :q!

# Do updates, upgrades, and install essentials
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install build-essential
apt-get install linux-headers-$(uname -r)

# Install a friendly editor if you are not familiar with VI
apt-get install jed

# Now for some security (iptables will probably be installed, running command doesn’t hurt and verifies that it is)
# The config below allows for FTP, SMTP, POP, IMAP, HTTP, HTTPS and SSH
# Adjust according to your needs

apt-get install iptables
iptables -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp –icmp-type any -j ACCEPT
iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 25 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 110 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 143 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 443 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 993 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 995 -j ACCEPT
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 10000 -j ACCEPT
iptables -A INPUT -j REJECT –reject-with icmp-host-prohibited
iptables -A FORWARD -j REJECT –reject-with icmp-host-prohibited

iptables-save > /etc/network/iptables
printf ‘#!/bin/sh\niptables-restore < /etc/network/iptables\n’ > /etc/network/if-pre-up.d/iptables
chmod 754 /etc/network/if-pre-up.d/iptables

# Deny Hosts is a nifty little program that tracks people who try to brute force your root account
apt-get install denyhosts

#Location of config files:
#config: /etc/denyhosts.conf
#datafile: /etc/hosts.deny

# This installs the lamp stack
tasksel install lamp-server

# And now for Wordpress
cd ~/
mkdir downloads
cd downloads
wget http://wordpress.org/latest.tar.gz
mkdir /var/www/wordpress
cd /var/www/
chown -R www-data:www-data wordpress
chmod -R -v 755 wordpress
tar -zxvf ~/downloads/latest.tar.gz –directory=/var/www
cd /var/www
mv wordpress myblog
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.org
jed /etc/apache2/sites-available/default

#add the following section to the top
#-START——————————————
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/myblog
ServerName www.myblog.com
</VirtualHost>
#-END——————————————–
/etc/init.d/apache2 restart

#Setup a database for WordPress
#Change command below according to your needs

mysqladmin -u root -p create wordpress-myblog
mysql -u root -p
CREATE USER ‘wp-myblog’@'localhost’ IDENTIFIED BY ‘NiftyPasswordGoesHere’;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO ‘wp-myblog’@'localhost’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
USE wordpress-myblog;

#Finally point your domain DNS records to your IP address and complete setup.

Andrew Hosting, How-to , , , , , , ,

WordPress Permissions and Problems – now a solution!

May 6th, 2009

So you’ve installed WordPress and it’s just not working out.   Maybe you’re getting one of these error messages:

“You need to make this file writable before you can save your changes. See the Codex for more information.”

“The uploaded file could not be moved to…”

“Sorry, I can’t write to the directory. You’ll have to either change the permissions on your WordPress directory or create your wp-config.php manually.”

What to do?  Why not toss the entire kitchen sink at it?  After all, that’s what 90% of solutions I found online suggested.

Just chmod 777 the directory and it will work!

Why not just set your password to the name of your blog?

I’m not a person who uses Linux every day of the week, but I do appreciate it and see it’s use in meeting some business goals.  So, I got a bit  frustrated.  I’d fix one problem, discover another, fix that, discover another.  So, I stopped and thought about the situation – I even phoned a friend (thanks Ron!).

There were two facts I had to deal with before moving forward:

1. Not everyone has these problem.

2. The solution is related to permissions, but the way I was fixing them wasn’t the right way.

Then it hit me.  After I uncompressed the download and moved it into the www directory, I did not change the owner of the folder and all child folders/files.

A bit of background, I’m running WordPress on a Ubuntu LAMP Server.  So, I realize the configuration may differ, but if you’re having the same problems, regardless of distro, the solution is the same.

First, figure out what user and group the folder needs.  For my server, it was www-data for both.  So, I used the following command:

chown -R www-data:www-data wordpress

or

chown -R www-data:www-data www

(depending on where you moved the wordpress directory)

Also, you’ll need to set permissions:

chmod -R -v 755 wordpress

or

chmod -R -v 755 www

(again, depending on where you moved the directory)

After completing this step, then go to http://webserver/wordpress (or whatever URL you’re using) and you won’t have the errors listed above.



Andrew Troubleshooting , , , , , ,

Hyper-V: Virtual Server failed to change state

April 30th, 2009

toolsOver night, the Hyper-V host servers rebooted after install some Microsoft patches.  One host brought up all of the VMs without issue.  The other host (which happens to run only one server at this time) did not.

When I attempted to start the server and received the following messages:

An error occurred while attempting to change the state of virtual machine %VirtualServerName%

%VirtualServerName% failed to change state

At first, the GUID appeared instead of the server name.  I checked the iSCSI connection and it was ok.  I rebooted the server, gave it time to reconnect everything and the server name appeared.  However, when I tried starting the virtual server, I recieved the same messages.

So, I tried creating a new virtual server and pointing it to the existing disks.  However, I was unable to create a new directory.  When I tried to create the directory under Windows Explorer, I received an error message that the disk was read only.

The solution was:

  1. Run diskpart.exe
  2. Enter:  select disk #  (the number can be found in computer management)
  3. Enter: attributes disk clear readonly

For more information about dispart.exe check here.

After doing so, I tried creating a directory with Windows Explorer, but recieved some weird behavior.  It wasn’t until I rebooted that everything worked fine.

Andrew Technology News , , ,

Where is that again? Group policy change isn't working!

April 13th, 2009

question mark
Well, thanks to our DBA working all hours of the night, it seems that a change to the group policy for Remote Desktop didn’t take place.

So, it seems that there is a neat little utility called gpupdate.exe  that will force the group policy change.

To execute, open a command prompt and simply type gpupdate.

Andrew Where is that again? , , ,

Windows 2008, SQL 2005, Reporting Services – unable to connect to remote server

April 8th, 2009

Thanks to Dastrup Tech Logs for a solution to activating SQL 2005 Reporting Services on a Windows 2008 server.

After installing SQL 2005 Reporting Services on a Windows 2008 64-bit server, I was getting an error “unable to connect to remote server” when browsing to http://localhost/Reports. I verified that I had followed all the steps outlined in http://support.microsoft.com/kb/934164 but it still didn’t work. Granted, that KB article is for Vista, but the steps were fairly accurate. After a little more research, I figured out I also had to do the following: In IIS 7 Manager, highlight the ReportServer application, go to Handler Mappings, click Edit Feature Permissions in the Actions Pane, and enable Script and Execute.

The blog can be found here.

Andrew Troubleshooting , , ,

Where is that again? – AD Terminal Sever Session Limits

April 1st, 2009

searchI’m starting a new category for the hard to find, seldom used, or not so obvious things I have to look up now and again.  Now, you’re not going to find hidden Jedi secrets, if that is what you’re expecting.  But what you’ll find is stuff that I had to look up that I’d rather not have to look up again – and if I do, I know exactly where to find it.

So, now for the location in Active Directory policies where the TS Session limits are located:

Computer > Administrative Templates > Windows Components > Terminal Services> Sessions

Andrew Where is that again? , , , ,

Neat Utility to Manage Remote Desktop Connections

March 25th, 2009

An interior shot of a computer data center (in blue tone)If you’re like me, people are always amazed at the number of applications I have running at one time.  A brief and candid survey would reveal  that at this moment I have over 30 items open.  Of course, minimalists would cough up a “that’s nonsense” response.  Uber-geeks would scoff at such a low number and wonder when I’ll eventually get to work.

One cause for the number of open items in my task bar is that I’m always working on at least 5 to 10 servers on a given day.  While I’m old school, I’m not such that I *have* to be in the server room to work effectively.  So, I simply use Remote Desktop.  However, there is nothing more frustrating than trying to flip through 30 screens or scroll through taskbar to find the right server.

Out of frustration, I googled for as solution to help corral the multiple RDP sessions and came across this interesting utility – Remote Desktop Manager.

I’ve been using the utility for several days now and I have to admit that I’m hooked.  There are a few things that bug me, but they are minor.  When you minimize the utility it collapses into the notification (tray icon) area of the task bar.  There is no option to allow it to minimize to the task bar – very minor issue.  Also, the program just runs, so there is no installation program.  Just make sure you put it in a working directory when you first execute it.  Otherwise, you’ll be running out of a temp directory and you might lose all your settings.

The standard version is free and they also have an enterprise edition.

Andrew Reviews ,