Need to get a list of packages that exist on your Debian based system? If you're running Ubuntu, Debian, etc. try the following.
user@machine~> dpkg --list
These are the daily tidbits from two technical guys serving small businesses. We do everything from Linux to Windows, web hosting, website design the list of languages is long (and boring).
Need to get a list of packages that exist on your Debian based system? If you're running Ubuntu, Debian, etc. try the following.
user@machine~> dpkg --list
Posted by
Joseph
at
8:18 PM
0
comments
Labels: linux command
If now is one of those times you just want to Get 'Er Done and not have a long drawn out process for doing something, welcome.
Step 1: Install OpenSSL
user@machine ~> sudo apt-get install openssl
Step 2: Create Self Signed Certificate [Answer questions in a way that makes you feel good ;)]
user@machine ~> sudo openssl req -new -x509 -days 365 -nodes -out /root/nginx.cert -keyout /root/nginx.key
Step 3: Add SSL options to nginx.conf [/etc/nginx/nginx.conf maybe?]
server {
listen 443;
server_name smallbiztechguy.blogspot.com;
error_page 403 404 500 502 503 504 /nginx-errors/error.htm;
ssl on;
ssl_certificate /root/nginx.cert;
ssl_certificate_key /root/nginx.key;
location / {
charset utf-8;
root /var/www;
index index.htm;
}
}
Step 4: Restart nginx
user@machine ~> ps aux | grep -i nginx
user@machine ~> kill -HUP [id from ps command above]
Posted by
Joseph
at
9:34 PM
0
comments

If you've ever had a need for running Internet Explorer, in this case IE6, on Linux there is a simple solution. First question might be why in the world would you want to? In some cases you need to test a website on IE to be sure it renders properly and in some cases you might be accessing Microsoft software that is a little picky about the browser that is accessing it.
The solution exists in IEs4Linux, a creation of Sérgio Luís Lopes Júnior. He has done a great job of allowing IE5, IE5.5, IE6 and now a beta of IE7 to be installed and run on Linux. The installation is fairly straightforward for all but IE7 and even that isn't too difficult by Linux standards. The performance isn't quite a snappy as I'd like to see but considering the price, $free, I can't complain too much.
Posted by
Joseph
at
10:12 PM
0
comments
Today I had a situation that has occurred once before. When attempting to print certain pdfs to a wireless printer the printer would present an error screen after a few seconds that required a hard restart. When attempting to update Acrobat Reader 7 through the update link inside of reader it generated an error saying it could not perform the update. Downloaded Acrobat Reader 8 through their website and the problem went away.
Posted by
Joseph
at
3:33 PM
0
comments
Labels: windows
If you need to create backups of DVDs there are a multitude of ways people recommend doing them on the web. The easiest I found can be accomplished in a single command and creates an ISO file that can be mounted later if necessary. Even tried it with an old, uncopyrighted DVD movie and it worked well.
user@machine ~> dd if=/dev/dvd0 of=~/dvdcopy.iso bs=2048
The reason is that often burnt cds/dvds have a number of null sectors
appended to the actual iso on the disc. If you simply use dd without a block
count the resulting iso will not be identical to the iso from which the dvd
was produced. The same remarks apply to the use of cat /dev/dvd > your.iso.
Not to say that the result won't work, it might. But if you do `md5sum
your.iso` the sum will not match that of the original iso if the there are
any blocks of padding copied up.
source
user@machine ~> mkdir /media/dvdcopy
user@machine ~> mount -t iso9660 -o loop ~/dvdcopy.iso /media/dvdcopy
Posted by
Joseph
at
9:53 PM
0
comments
Labels: linux, linux command
Being a more recent Ubuntu user I can never remember which version I installed, it was much easier in the Debain days but adapt, improvise and overcome is the motto I try to live by. There are two options which I've included below, if someoone knows of more please pass them along.
Option 1:user@machine~> cat /etc/issue
Ubuntu 7.04 \n \l
Option 2:user@machine~> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty
Posted by
Joseph
at
9:26 PM
0
comments
Labels: linux command
For a couple of years now I've been performing offsite backups using the following process.
1. If not already loaded, boot into my Windows XP partition on my laptop
2. Copy all important files to a directory inside of the My Documents folder
3. Zip everything up using 7zip
4. Encrypt the zip file created in step 3 using AxCrypt
5. Copy the file to my backup server in another state using scp
The process didn't usually bother me too much because I'd kick off the zipping and copying processes before heading to bed so they'd just run at night. The problem with that process is obvious, it requires me manually initiating the process. As I've become painfully aware of most of us IT guys neglect our backups until it is too late. In my situation I've got a mixed home network running Debian, Ubuntu, Windows XP, uNSLUng and another distro or two when the urge strikes me. Well it came time to pony up and get with the program so I figured out a solution that once set up would give me secure offsite backups but also eliminate the time of doing the copying and zipping manually.
The solution involves using encfs to encrypt the data before copying it to the offsite machines using a mount created with sshfs. Below is the bash function I created that does the action for me, I'll be updating to use a key later but for now it just runs through cron and prompts me for the password.
In Part II I'll be investigating if this same process can be followed with the Windows boxes using cygwin or some other alternative but for now this should get the Linux junkies started.
function offsiteBackup
{
## set variables
DIRBASE=$HOME/Backup
DIRENC=$DIRBASE/encrypt
DIRDEC=$DIRBASE/decrypt
## remove encryption/decryption directories to make sure everything is gone
echo "Cleaning up from previous backups"
rm -rf $DIRBASE
mkdir -p "$DIRENC"
mkdir -p "$DIRDEC"
## mount the encryption and decryption directories
echo "Directories mounted"
encfs $DIRENC $DIRDEC
## copy all files that will be backed up
## NOTE: since the remote machines were mounted using sshfs only
## the cp command is necessary.
echo "Copying files backup files from remote locations"
cp /media/remote1/settings.xml $DIRDEC
cp /media/remote1/mystuff $DIRDEC
echo "Files copied to the backup unencrypted directory"
## umount the decrypted directory
fusermount -u $DIRDEC
## create the zipped archive backup file
tar -czvf backup.tar.gz $DIRENC
## remove encryption/decryption directories to make sure everything is gone
echo "Removing backup directories"
rm -rf $DIRBASE
}
Posted by
Joseph
at
8:51 PM
0
comments
Labels: linux