Monthly Archives: March 2011

Setting up my new wordpress server with gory detail

I got a new desktop in the fall and my old desktop was going to get used for a media center PC. But I have been getting a lot of errors on my 10+ year old desktop that I call a server so it was time for a server upgrade.

download bit torrent

download ubuntu 10.10 amd64 iso.torrent

use windows cd image burner to make ubuntu boot cd

reboot computer and hit f10, switch raid from stripe to mirror

install ubuntu

detect keyboard layout
select detroit time zone
select the raid drive and create empty partition/ automatically partition with swap drive
installs base system
Select a good hostname in case I need a second server
don’t pick any prepared software (apt-get later)

And linux is setup… login…

install a text editor
sudo apt-get nano
sudo nano /etc/network/interfaces
#set static ip by changing the file and adding this to the end
iface eth0 inet static

sudo /etc/init.d/networking restart

sudo apt-get install mysql-server
->set passowrd
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get openssh-server

sudo groupadd sftponly
sudo useradd -d /home/testuser -m testuser
sudo passwd testuser
sudo adduser testuser sftponly

—->edit the ssh config
sudo nano /etc/ssh/sshd_config

Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp

—–>Some users can only use sftp, but not other OpenSSH features like remote login. Let’s create a rule for that group of users (we’ll create the group afterwards). Add the following section to the bottom of /etc/ssh/sshd_config:
Match group sftponly
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

—>Pass ownership of test users directory you want to be sftp accessible to the superuser:
sudo chown root.root /home/testuser
sudo usermod -d / testuser

sudo apt-get phpmyadmin
sudo apt-get wordpress

—>create a database and a user that has full privileges to that db

—->create a pointer for the wordpress www dir to the actual dir
sudo ln -s /usr/share/wordpress /var/www/wordpress

move config sample to wp-config.php and change these
define(‘DB_NAME’, ‘wordpress’);
define(‘DB_USER’, ‘wordpress’);
define(‘DB_PASSWORD’, ‘wordpresspassword’);
define(‘DB_HOST’, ‘localhost’);

—>>OK the new blog works now, lets pull the ole switcheroo

download the old blog wordpress directory
create a sql backup file using “Export” in the old wordpress phpmyadmin

create a new sql database on the new server for wordpress
create a user

use the import and select the sql file

copy the wp-config-sample.php to wp-config.php and locally edit with the new db values

setup a sftp user with write access, chown some directories
upload the new files and create a virtual mapping in the /var/www/ folder

skipped: switch the old blogs wordpress URL inthe options table

sudo apt-get install webalizer
/etc/apache2/apache2.conf: Change
HostnameLookups Off
HostnameLookups On

/etc/webalizer/webalizer.conf: Change
LogFile /var/log/apache/access.log.1
LogFile /var/log/apache2/access.log

run it once: sudo webalizer then setup a cron job:
sudo crontab -e
and add the line:
0 * * * * webalizer

To get wordpress permalinks working
Change AllowOverRide None in /etc/apache/sites-available/default to AllowOverRide All

sudo a2enmod rewrite

sudo /etc/init.d/apache2 restart

since the word press url came over in the new database the last step is a direct cutover, log into the router and switch the port forwarding of 80 to the new server


Leave a comment

Posted by on March 29, 2011 in Network Admin


BIG B vs little b

Bytes or bits. There is an 800% difference so you better get it right. Networking speeds or even your broadband speed is, for now, measured in bits. If you have “6meg” internet that would be 6Mb or 6 Megabits of download bandwidth. A 10/100 router/switch is 10Mb or 100 Megabits. A 10/100 router can generally transfer your pictures across your LAN at 10MB. Even though its 100Mb of speed its only 10MB of throughput. 100 megabit = 100,000 bits and divide that by 8 to get bytes 12,500 bytes or 12.5MB

The data transfer math works out this way because there are 8 bits in a byte. But you can only really get 10-11MB of throughput because there are usually 2bits of overhead of the TCP/IP or network layer. It’s all the wrapper data in each packet to let the data know where to go and to make sure it got there. Jumbo packets and some other tweaks available in 2003 and by default in server 2008 can alleviate some of this overhead.

Space or file sizes are usually in Bytes. That 3MB mp3 you just downloaded is 3 Megabytes not bits. The 1TB drive is a Terabyte and should have the BIG B notation. A GB has 1024 MB however a Gb only has 1000 Mb, confused yet? Check out this site which also has a handy calculator.

Now it gets rather tricky when you talk about disk throughput to a SAN. Because you tend to converge the networking bits measurements with the storage bytes measurements. It’s a “bit” of a pet peev of mine we engineers refer to these metrics as just “meg” or “gig”. Now, hopefully we can all be sure of what we’re talking about and speak with some BYTES conviction.

One of the best descriptions of bits and bytes

Leave a comment

Posted by on March 28, 2011 in Uncategorized


ISP Rant

I’ve had a load of ISPs and every year they seem to get more expensive. Most technology makes vast improvements but the cost stays relatively flat. A good dot matrix printer cost $150 dollars in the early 90s and twenty years later you can get a good laser for $150. Cable internet is a vast improvement over dialup but far more costly.

It isn’t really the cost that makes me so frustrated but more the lock on the market and lack of choice. Right now if I want cable I have to get Comcast. If I want DSL I have to get AT&T. I’ve been seriously pissed off by both of those companies at one time or another but have to choose to get acceptable service. I could hop back and forth between companies taking advantage of 1yr deals and introductory pricing but I have not. I don’t because switching is time consuming and there are outages and costs related to switching. I’ve switched before and can never seem to get one setup on the same day the other is turned off so I either pay two ISPs or have no internet for a period of time.

If I switch back and forth I could get something close to $40 a month for 6Mb of bandwidth. Its been about three years since I have switched so now I am paying $70/mo and have some crappy 6 channels or so for basic cable because it was cheaper to get the combo. I really only want internet but they don’t offer any deals on the stand alone service.

I watched AT&T put up the fiber lines for UVerse and really thought about switching. But they really pissed me off when I had DSL. The service was ok for a while but then went to crap, disconnecting constantly and download speeds were way below what they promised. I tried to get out of my contract but they wouldn’t let me. Their tech support would constantly blame me for all of the slowness and never offer any real solutions to the problem. I never paid another bill to them after that and canceled my service. It put a ding in my credit but was worth it.

So now I am stuck with Comcast who really pissed me off last week. Here is what happened in order:

Net down power cycled everything, no dice, bypass router and power cycled everything, no dice. This usually fixes the problem that happens once or twice a month.
Called support
They walked me almost the exact same steps I just did. Support says they can send a tech two days from now or I can go pickup a new modem
Next day I picked up a new modem
Install, activate fails
Support unlocks modem
Activate fails again
Support unlocks modem and changes something on their end which gets me back online
Reconnect router and it works for the afternoon but fails that night
call support again, either wait 5 days or pickup new modem
Next day picked new modem which activated smoothly

Support fairly quickly blamed the modem and scheduled a tech. The earliest a tech could get out was always more that two days which pissed me off the most. So instead each time I drove the 15minutes and picked up a new modem on my lunch break.

They assured me I won’t pay for the downtime, however I would gladly pay the few extra dollars to never have to talk to them. Personally I think $70 a month should get me somewhere in the 5 9’s neighborhood.

### update ### Tuesday night the internet went down again and Wednesday morning I called support again. A tech came onsite Wednesday and found water in the lines outside. There was a splice near the eaves trough and other signs of bad cable work just outside the house. My DS power level went from -10.5 to 0.0 – 0.5 which is perfect.

Comcast modem signal after new lines

Leave a comment

Posted by on March 27, 2011 in Uncategorized


Where to put IS RS AS

I’ve been struggling with this for a bit but I think we’ve finally settled in. We’ve moved a data warehouse away from virtualization because of the lack cores and the blade architeture not having enough HBAs. We went with an Active Active Passive cluster and got the database engine installed. All users were very delighted with the massive upgrade in hardware.

The dw had not been taking off as quickly as its users would have liked because of the performance constraints on the VM. Integration services had always been installed on the same server using the default instance msdb. IS was the first challenge because we couldn’t have default instances in a cluster. IS also is not a cluster aware service so we have it installed on all three cluster nodes. To connect to IS the virtual IP for production is used so in the event of a fail-over users will just have to reconnect. The tricky part comes with the package storage. We chose filesystem and are using a mesh topology DFS replication to make sure all three nodes have their packages folders in sync.

Reporting services is also not cluster-aware. To maintain high availability we chose a VM and have targeted the cluster instance to store the RS database. This would be a standard server deployment according to BOL Using a DNS pointer instead of a server name will give us the ability to scale out with a load balancer if we need to later without having to change any URLs on people. With SharePoint also making headway we may not need this instance of RS as much.

Analysis services is cluster aware. That was a pleasant surprise after getting RS all figured out. The AS databases are stored on the same LUNs as the data source databases.

If I run into any major roadblocks in this architecture i’ll strikeout the stupidity.

Leave a comment

Posted by on March 11, 2011 in SQL Admin


IRL: Installation Revocation List

In the server admin world we often run through a single software install that hundreds of users will access. Increasing the user base is the best way to flush out bugs out of every nook and cranny of code. Sure there are advanced unit testing scripts and all kinds of UAT but not until it has been production battle tested can the developer sleep soundly. Even still the first few months of use can be a bit hectic for any iteration.

SAND, DEV, TEST, USER, QA, PROD might be familiar lingo to server admins who have been asked to build multiple environments for very important software. If you need to install vendor software, the server admin downloads and starts in SAND and that same install works its way up the ladder. Problem is the version iteration might be two months or more old by the time it reaches production.

So the day after a big prod release you find yourself on the phone troubleshooting an error with the vendor. One of the responses that gets under my skin is, “that is a known issue”.

Instead of getting angry, I decided to get creative. So I came up with the idea of a IRL. Just like a SSL certificate revocation list, the IRL is a list of bad releases that the vendor maintains. When the server admin launches the install, this list is checked and a message should come up… maybe something like, “This version has known issues discovered after it was available for download, please visit our competitor’s website for some better code.”

Leave a comment

Posted by on March 10, 2011 in Network Admin