CentOS Install Apache

I downloaded the DVD torrent for CentOS 5.4. It’s large. 3.72GB large. It’s the i386 version.

I needed it for testing as it’s closer to RHEL than Debian is. 🙂

So I selected install – generic install – but ONLY install the server portion. I don’t need that crazy GUI. Or do I?

After installation I ran the usual:
yum update
yum -y install httpd php mysql mysql-server php-mysql
/sbin/chkconfig httpd on
/sbin/chkconfig --add mysqld
/sbin/chkconfig mysqld on

Then I started the services:
/sbin/service httpd start
/sbin/service mysqld start

Opened up my browser to the IP of the new server. Page not found. Damn.

OK, let’s see if the server can access itself:
lynx http://127.0.0.1
Command not found

Damn. Install lynx:
yum install lynx
lynx http://127.0.0.1
Default CentOS page! Yay!

Well, by default, CentOS installs SELinux. I don’t care for MAC security as this is a pure test dev machine, so I’ll remove that:
nano /etc/selinux/config
SELINUX = disabled
Save, Reboot.

Page not found. Argh, must be the default firewall crap that is on by default. I shall remove that as well:
/sbin/service iptables save
/sbin/service iptables stop
/sbin/chkconfig iptables off
I rebooted once again by accident as I hit the power button on the wrong virtual machine. Oh well.

Default CentOS Page! Yay!

Comments

I’m not a big fan of Captcha use – sometimes it’s just a pain in the buttock. But I am even more of a not-big-fan of SPAM comments. They actually serve no purpose whatsoever. About 70% of the SPAM is for a site that doesn’t exist. 10% is for sites that exist and run just fine. The other 20% is for a site that does exist, but isn’t actually in the comments section – it’s in the SPAM bot’s website. A lot of good those do, right? That means 10% of all those comments (over 400 just this year) actually work. Now it’s obvious that I have been moderating them so no one else can see, but 360 comments this year have been utter BS.

So, starting today, I finally implemented the Captcha service for signing up for new users/making comments on the site. But I also made it so that all new comments are posted without delay (hopefully), so no more moderation (also hopefully).

***EDIT***

I’ve noticed that bots are still getting through. So I made the Captcha difficulty Medium instead of Easy. I have also added XSS JAVA based blocking protocols to the site, so hopefully that curbs the SPAM a little more. I guess I’ll always have to moderate it at least a little.

Install NTP Debian or Ubuntu

I wanted a network time protocol server running on my Ubuntu server – so I could point various other computer-related items to that instead of hitting the internet.

Login as root on your Ubuntu server
apt-get remove ntpdate
apt-get install ntp
nano /etc/ntp.conf

I have the following servers in my list:

server ntp.ubuntu.com
server us.pool.ntp.org
server 10.1.0.14 (a MS domain controller)

Then under the restrict for users (at the bottom of the config file):
restrict 10.4.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.1.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.2.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.3.0.0 mask 255.255.255.0 nomodify notrap

Ctrl + X
Y
/etc/init.d/ntp restart

You can see what servers are giving you data with this:
ntpq -np

You can always run ntpdate ip_of_server to update on the client side:
ntpdate 10.4.0.253

Exchange 2007 GAL/OAB

Adding a new user to exchange? Notice that the new user doesn’t show up in Outlook?

Open up the power shell on your Exchange server (or connect remotely to it), and run the following command:

Update-OfflineAddressBook "Name of Address Book"

Or

Get-OfflineAddressBook | Update-OfflineAddressBook

Then, if you’re in cached mode (most are), you can go to Tools, Send/Receive, and then select Download Address Book
Uncheck Download changes since last Send/Receive and hit OK
Now you should have the new user in your address book!

Asus O!Play Audio Is Unsupported

OK, before I get too far into things, here’s my setup:
4.5TB NAS on Gig Ethernet
Asus O!Play on Gig Ethernet

The NAS is running FreeNAS 0.7 x64 and runs at a balmy 45MB/sec usually. I’d love to upgrade to hardware RAID, but the budget constraints…
The Asus O!Play is model HDP-R1, and it’s been fully updated to the newest firmware (I think 1.22a or something along those lines – if it matters post and I’ll fix it)

I rip all of my DVDs to the NAS for instant retrieval later. I also have a bunch of my music on there also, but that doesn’t matter nearly as much (and the O!Play isn’t very good at music playing anyway). Playing DVD’s as ISOs is a very awesome feature that I use at least once a week at home. But, unfortunately, there isn’t much – if any – upscaling to DVDs on the O!Play. WYSIWYG.

But then I started to rip my Bluray collection. Let me put it this way:
DVD’s ripped: 4GB Average File Size
BD’s ripped: 22GB Average File Size

My 4050GB worth of usable space on the NAS:
DVD’s ripped: 1012.5 total movies
BD’s ripped: 184.1 total movies

You can see my $1200 NAS system will be overrun shortly if I rip too many BDs!

Oh, onto the meat of the problem. I ripped my first two BD’s and attempted to play them on the computer. ISO was not cooperating with WMplayer or VLCplayer. I could, however, select the .m2ts file (DriveLetter:\BDMV\STREAM\sometime.m2ts) and play that using VLC. So I figured I’d try to play it on the O!Play.

Playback of the ISO was simple – just select the movie per usual and it starts playing. But it will not play the true high def audio. 5.1 will play, but not truehd. Unfortunately the first movie only had English in truehd audio format. Booo.

Basically you need to take that fully awesome audio and convert it to 99% fully awesome audio. The way to do this for free:

Download TSMuxer
Unpack TSMuxer
Run tsMuxerGUI.exe
Add the .m2ts file
Under output, click the M2TS muxing radio button
Browse for location and filename to save
Click start muxing

This took roughly 15 minutes on my machine to complete.
I’m going to test either tonight or tomorrow and verify that it works, but the file was slightly smaller so maybe it did.

Edit Permissions Exchange 2003 2007 Calendar

I remember at my last job I had to upgrade from Exchange 2003 to Exchange 2007. It wasn’t that huge of a deal actually. Then I had a customer who wanted to upgrade to 2007. That was a much larger problem as the customer did not have an abundance of hardware/time/patience. In place installations/upgrades are almost always more tedious than a fresh install. Oh well, live and learn.

Anyway, after upgrading my third client to 2007 Exchange, I remember that I had a tool to help with permissions of all/some of the mailboxes. Namely the HR manager required permission to view all of the calendars of every employee. OK, I can do that.

Grab a file from Microsoft called PFDAVAdmin. This stands for Public Folders DAV-based Administration Tool.

Now, I had another problem after installing said program (it’s just an extraction, so don’t worry about it screwing anything up):
Could not expand https://servername/mailboxstore/Username/L...20Folders/: Name cannot begin with the '0' character, hexadecimal value 0x30. Line 1, position 402."

Argh. Someone mentioned to me that I should remove the SSL requirement on the public folders area. Lot of good that does, as the problem was expanding the folders for individual mailboxes. As it turns out, you need .net 1.1 installed. I was trying to run this from the Exchange 2007 Server directly. Runs great from the old Exchange 2003 server.

So, open this program up. Then click File, Connect.
If you can’t figure out what to put under Exchange Server or Global Catalog, then you should find a file called ADChecker (it’s in the Downloads Section)
If you just want to edit permissions of the public folders, keep the radio on Public Folders. I needed to alter the rights for a single mailbox user remotely. So I chose All Mailboxes.
After a brief query time, you should see Mailboxes with a plus sign. Drill down to your user, then Top of Information Store, Then Calendar.
Right-click and select folder permissions.

Next you can click Add and then add a user after searching.
The permission layout is the same as standard public folders for Exchange.

I may or may not clean this up and add more screen shots.

NTBackup

Customer has an Exchange 2007 box that they wanted backed up, but didn’t want to pay for any extra software. Yay.
Set the NTBackup to the First Information Store of the exchange server, did a test backup, and away I went.

Fast forward 2 weeks and now it’s no longer backing up anything worth while. No error from the script either, so I had to dig through the event viewer logs and NTBackup logs (eventvwr, and C:\Documents and Settings\Username\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data)

“Registry Writer” has reported an error 0x800423f4. This is part of System State. The backup cannot continue.

Awesome.

I had previously selected System State AND Exchange’s store to be backed up. As restoring the system state has never yielded me great results (almost a waste of time. almost.) I decided to just uncheck the system state box and only backup Exchange’s Store.

Ran the backup again – this time success.

Ramblings Of An IT Person