see http://www.tech-problems.com/install-tomcat-7-on-fedoracentos/
…hmmm…had updates this post will some config files and must not have hit Update…will fix tomorrow when I can grab the files again…
30 Monday Jul 2012
Posted Apache Tomcat, Application Servers, Linux / UNIX, Networking, Operating Systems
in≈ Comments Off on Running Tomcat as a service on CentOS
see http://www.tech-problems.com/install-tomcat-7-on-fedoracentos/
…hmmm…had updates this post will some config files and must not have hit Update…will fix tomorrow when I can grab the files again…
30 Monday Jul 2012
Posted Apache Tomcat, Apache Web Server, Application Servers, Linux / UNIX, Networking, Operating Systems
in≈ Comments Off on Configure Apache Tomcat to use Apache httpd web server
see this: http://fijiaaron.wordpress.com/2008/07/30/configuring-an-apache-virtualhost-to-use-tomcat/
and here’s a sample from my /etc/httpd/conf/vhosts/a-vhost-config.conf:
ProxyRequests Off AddDefaultCharset Off Order deny,allow Allow from all ProxyPass / ajp://localhost:8019/ ProxyPassReverse / ajp://localhost:8019/
Created /etc/httpd/conf/workers.properties:
# Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8019
29 Sunday Jul 2012
Posted Linux / UNIX, Networking, Operating Systems
in≈ Comments Off on Networking fails moving VirtualBox Linux guest to another host
Tags
(because the mac changed)
https://forums.virtualbox.org/viewtopic.php?f=2&t=27220
…and the mac address in the eth0 config file at /etc/sysconfig/network-scripts/ifconfig-eth0 needs to match the mac address in the rules file at /etc/udev/rules.d/70-persistent-net.rules…
The gist is…
You can edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot.
Or bypass the whole issue and use the same mac address as the original vm…which shouldn’t be a problem behind different NAT firewalls(?)
27 Friday Jul 2012
Posted Linux / UNIX, Operating Systems
in≈ Comments Off on Linux commands I always forget
27 Friday Jul 2012
Tags
I found a backup of a defunct Drupal project, and now it’s time to see if I can take these file system zip files (of the entire Drupal directory structure in (I don’t remember what directory they were in)) and database backup files made with the backup module or something and see if I can recreate enough stuff to look at one of the sites from that server…
To that end, here are some links that I’m reviewing…more to come as I work through this…
a quick drupal install refresher for me… http://idolinux.blogspot.com/2009/01/quick-install-of-drupal-6.html
http://www.webologist.co.uk/blog/how-to-backup-and-restore-drupal
since the backup and migrate module was used…http://drupal.org/node/547560#comment-1935846
Create the MySQL user…and create the database…and try to import the GIANT SQL file
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
CREATE DATABASE db_name;
mysql -u USERNAME -p DATABASENAME < FILE.SQL
and now I can get to the default site…just need to get the vhosts set up and working and Bob should then be your uncle…
…sites are up and running, but need to work on the URL rewriting…http://drupal.org/node/228462
27 Friday Jul 2012
Posted Linux / UNIX
in≈ Comments Off on CentOS activate eth0 and get dhcp working
Tags
During an install from the minimal CentOS iso, I forgot to set eth0 to connect automatically. Since the default setting on CentOS is for eth0 to be disabled, this resulted in having to remember how to use vi to edit /etc/sysconfig/network-scripts/ifcfg-eth0 to update the configuration.
Update the following:
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=no
…and restart the network. NM_CONTROLLED turned out to be a big deal, because until I updated that from yes to no, I wasn’t getting an IPv4 address. And IPv6 wasn’t getting any name resolution. Don’t know if that was due to my host (this was a VirtualBox instance that I’m setting up as a demo for a friend, and I don’t know what the IPv6-ability of my old sitting around on the couch laptop is) or an issue with my 1st gen Time Capsule with integrated olde-school Air Port…
26 Thursday Jul 2012
Posted CMS, Code Samples, WordPress
in≈ Comments Off on ..hacking core (WP)
Tags
Due to a quirk of my Windows shared hosting provider that is impacting one WordPress blog and not another…I hacked functions.php. Now, as with hacking Drupal core, I’m not proud of this, but despite the fact that both sites claim to be reading the same php.ini file, one has the open_basedir restriction in effect, and the other does not. So here’s my hack to get around image uploads blowing up because IIS is putting them in temp and php can’t get there…
// /wp-includes/functions.php // ~ line 1716 function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { $proper_filename = false; // Do basic extension validation and MIME mapping $wp_filetype = wp_check_filetype( $filename, $mimes ); extract( $wp_filetype ); // hack return compact( 'ext', 'type', 'proper_filename' ); // We can't do any further validation without a file to work with if ( ! file_exists( $file ) ) return compact( 'ext', 'type', 'proper_filename' );
In case there’s any question, dropping a custom php.ini into the web root didn’t work. Neither did one in each folder, or in the cgi folder or anywhere else I could think to stuff a php.ini…
25 Wednesday Jul 2012
Posted Apache Tomcat, Apache Web Server, Linux / UNIX, Operating Systems
in≈ Comments Off on Linux link dump for current project (to be sorted later)
SELinux again on AJP connection: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/
19 Thursday Jul 2012
Posted C#, Code Samples
inI thought it would be nice to provide some configuration options, such as font family and size, in a desktop application I’ve been working on recently. I also wanted to provide a default option, and have that configured in the app.config file instead of having to recompile the application if I decide to (or get told to) change the font size, bold/un-bold, font family, etc. I couldn’t, however, just set a value in the app settings and add keys with the name and size. I needed to actually define a font setting. But I’d never bothered to do that before. So here’s what I did.
Right-click the project and select Properties, then navigate to the Settings tab and add a new System.Drawing.Font value:
I chose a nice big, bold Arial so it could be seen on a monitor stuck to the wall from across the room.
The value will look something like this in your app.config:
<applicationSettings> <MyApplication.Properties.Settings> <setting name="DisplayFont" serializeAs="String"> <value>Arial, 15.75pt, style=Bold</value> </setting> </MyApplication.Properties.Settings> </applicationSettings>
Finally, I added a little something like this to the form’s load method to grab the default font…at first:
private void Form1_Load(object sender, EventArgs e) { // set the font dg1.DefaultCellStyle.Font = Properties.Settings.Default.DisplayFont;
And that uses the default font of my choice, as set in the app.config, every time the application launches. That way I could change the font setting in app.config any time I wanted and not have to recompile the application. That was step one.
In the end, what I ended up doing was using the application level default value in Settings, and adding a user scope font setting also. If the user scoped font value is null or it equals the default application scope font, I use the default font. If the user scope font is different — read by saying something like
System.Drawing.Font a = Settings.Properties.User.MyFontValue;
anyway, if font a is different from font b (from Settings.Properties.Default.DisplayFont), dg1.DefaultCellStyle.Font = a;
And then I provided a font dialog that’s opened up from an option dropdown button and when you pick a font, Settings.Properties.User.MyFontValue is updated…
FontDialog Fdiag = new FontDialog(); if(Fdiag.ShowDialog() != DialogResult.Cancel ) { Settings.Properties.User.MyFontValue=FDiag.Font }
Or something like that. Pretty basic stuff, really, but I haven’t done a whole lot of desktop applications where I actually needed to provide…or save…options for the user…
18 Wednesday Jul 2012
Tags
Got this error trying to update a WordPress site, and I didn’t want to lose all the content. What error?
Unable to locate WordPress root directory
Given that I use a Windows host (don’t start on me, I’ve used them since, like, 2001), it’s obviously permissions. The site in question (not this one, so don’t go playin’) had WP installed in a sub-folder, so I brute forced the permissions there and the upgrade worked. Now I just need to tighten up security back to what it SHOULD be 😦