Category Archives: Linux

It Works!

After installing apache on the system for the first time, there will be an index.html file in your /var/www folder (Debian systems). The file is also located somewhere such as /usr/share/apache2/default-site/index.html. When displayed the content looks like this: It works! This is the default web page for this server. The web server software is running but no content has been added, yet. The content for the file is as follows: <html><body><h1>It works!</h1> <p>This is the default web page for this server.</p> <p>The web server software is running but no content has been added, yet.</p> </body></html>

Posted in Linux, Server Admin, Tech Tips, Web Development | Tagged , , | 1 Comment

List of PHP Frameworks

Here’s a list of recent and popular PHP frameworks as of 2012: Kohana: The Swift PHP Framework Laravel – A Clean & Classy PHP Framework Getting Started with the Fuel PHP Framework | Nettuts+ FUEL — A simple, flexible, community driven PHP5.3 framework. › A simple, flexible, community driven PHP5.3 framework.  Underscore.php

Posted in Linux, Web Development | Tagged , | 1 Comment

AWS Marketplace Launches

The other day I was looking at the Bitnami stacks and was thinking how incredible it is that you can create an amazon AMI image and share, deploy, and instantly launch a web server. This has interesting repercussions for software and copyright holders, imagine installing a licensed operating system like Redhat or Microsoft Windows and then giving hundreds of thousands of others the ability to instantly clone it. Oops. Amazon Web Services is pleased to announce AWS Marketplace, an online store where customers can find, buy, and quickly deploy software that runs on AWS. AWS Marketplace includes pay-as-you-go products, free software (AWS infrastructure fees still apply), and hosted software with varied pricing models. CA Canonical Couchbase Check Point IBM Microsoft SUSE Red Hat SAP Many widely used open source offerings, including WordPress Drupal MediaWiki This certainly will make software as a service companies and providers – I’m thinking cheap web hosting for wordpress, for example, have to take another look at their product / services model and pricing tiers. You’ll be charged for what you use, by the hour or month, and software charges will appear on the same bill as your other AWS services. When you find the software you’d like to purchase, you can use AWS Marketplace’s 1-Click deployment to quickly launch pre-configured server images, or deploy with familiar tools like the AWS Console.

Posted in Linux, Marketing, Server Admin, Server Administration, Software, Tech Opinion | Tagged , , , , | Leave a comment

Install WordPress on Linux in 5 Seconds

WordPress is available on WordPress.org in two formats, .zip and .tar.gz: I wanted an option to download and extract WordPress as easily as possible. I had looked for a way to do this with the zip format but apparently Archives read from standard input are not yet supported, except with funzip (and then only the first member of the archive can be extracted). (source So, my solution was to use WordPress’ latest.tar.gz file and pipe it (stdin/stdout). Running the following command will create a wordpress folder in your current working directory with all files: wget -O – http://wordpress.org/latest.tar.gz | gzip -c -d | tar -x Notes: wget -O – //send output to stdout, use – before the URL gzip -c -d //read from stdin, decompress tar -x // extract, could probably also use -v to verify

Posted in Linux, Tech Tips, Web Development | Tagged , , , , , , , , , , | Leave a comment

LookupException in API_Linux.cpp:98: Could not lookup username “wwwrun”

In order to get suPHP to run you’ll need to edit the config file, which is by default stored in /etc/suphp/suphp.conf If you’re getting the error LookupException in API_Linux.cpp:98: Could not lookup username “wwwrun” it means specifically that you probably have not uncommented the line webserver_user in that config file. If you’re on an Ubuntu server you will probably set that line to www-data but on other systems it perhaps needs to be set to apache or nobody. You can view your list of users by using the command cat /etc/passwd, which will give you several lines in this format: www-data:x:33:33:www-data:/var/www:/bin/sh If you’re on Ubuntu you should see the line above, which shows the entry for the user www-data which has a user id and group id of 33 (the first two numbers). If you see that then you should probably change your suphp.conf file to have the webserver_user set to www-data and also you should change the Minimum UID and Minimum GID to the matching numbers, probably 33 and 33… webserver_user=www-data ; Minimum UID min_uid=33 ; Minimum GID min_gid=33 A decent guide for setting up suPHP on Ubuntu 11 can be found at http://websoftserbia.com/en/ubuntu/66-install-suphp-on-ubuntu-11-04.html I would recommend walking through that guide first, so you know what you’re doing, but I’ll also give you an example of a configured suphp.conf file: [global] ;Path to logfile logfile=/var/log/suphp.log ;Loglevel loglevel=info ;User Apache is running as webserver_user=www-data ;Path all scripts have to be in ;docroot=/var/www:${HOME}/public_html ;Security options allow_file_group_writeable=true allow_file_others_writeable=false allow_directory_group_writeable=true allow_directory_others_writeable=false ;Check wheter … Continue reading

Posted in Linux, Server Admin, Server Administration, Web Development | Tagged , , , , | Leave a comment

ec2 server create syntax (man page)

This is the knife create syntax page. I was trying to launch an instance of Chef with the “knife create” command that chef’s knife provides. The documentation page gives this example for how to launch a web server on Amazon’s EC2 server, but without much explanation of the terms: knife ec2 server create -r “role[webserver]” -I ami-2d4aa444 –flavor m1.small -G www,default -x ubuntu -N server01 After doing some searching I just ended up digging into the code and found this information quite helpful, and so I am sharing it: -f FLAVOR ( or –flavor FLAVOR ) The flavor of server (m1.small, m1.medium, etc) default: m1.small -I IMAGE ( or –image IMAGE ) The AMI for the server -G X,Y,Z ( or –groups X,Y,Z ) The security groups for this server default: “default” -Z ZONE ( or –availability-zone ZONE ) The Availability Zone default: us-east-1b -N NAME ( or –node-name NAME ) The Chef node name for your new node -S KEY ( or –ssh-key KEY ) The AWS SSH key id -x USERNAME ( or –ssh-user USERNAME ) The ssh username default: root -P PASSWORD ( or –ssh-password PASSWORD ) The ssh password -i IDENTITY_FILE ( or –identity-file IDENTITY_FILE ) The SSH identity file used for authentication –prerelease Install the pre-release chef gems –bootstrap-version VERSION The version of Chef to install -d DISTRO ( or –distro DISTRO ) Bootstrap a distro using a template default: ubuntu10.04-gems –template-file TEMPLATE Full path to location of template to use –ebs-size SIZE The size of … Continue reading

Posted in Linux, Server Admin, Server Administration, Tech Tips, Web Development | Tagged , , , , , , | Leave a comment

How to Monitor Canon Printers with SNMP

I’m working to set up monitoring of Canon printers with SNMP, and I’m having a hard time finding resources around the internet on how to go about doing this, so this article will be collecting the resources I’ve found and putting them in once place. Commands for Monitoring Canon Printers with SNMP One of the problems that I had to look into was monitoring of CANON printers, and properly modifying Nagios config files for that: Once you understand a little how NAGIOS works you will understand what I am trying to show you here in example: in /usr/local/nagios/etc/objects/commands.cfg I added a command: define command{ command_name check_snmp_canon command_line $USER1$/check_snmp -H $HOSTADDRESS$ -l STATUS -C public $ARG1$ $ARG2$ } then in: /usr/local/nagios/etc/objects/printer.cfg you define host and service like this: define host{ use generic-printer host_name SOMECANONPRINTER alias SOMECANONPRINTER Alias address “IP of the printer goes here” hostgroups network-printers } define service{ use generic-service host_name SOMECANONPRINTER service_description Printer Status check_command check_snmp_canon!-o hrDeviceStatus.1 -r “2|3” normal_check_interval 10 retry_check_interval 1 } via http://mariuszgal.com/blog/?p=93 Some of the commands I’ve tried to execute directly from the command line use something like this: /usr/lib/nagios/plugins/check_snmp -H 192.168.0.105 -C public -o hrDeviceStatus.1 snmpwalk -v <snmp version, typically ‘2c’> -c <community string> <agent address, e.g. ‘192.168.3.141’> 1.3.6.1 snmpwalk -v 2c -c public 192.168.0.104 What is SNMP Simple Network Management Protocol (SNMP) is a set of standards for managing network devices, network devices are monitored by a SNMP manager which connects to an SNMP agent on network devices. Data which the SNMP agent … Continue reading

Posted in Linux, Server Administration, Tech Tips | Tagged , , , , , , , , , | 8 Comments