Logicalwebhost Cheatsheet

Linux & Open Source Cheatsheets & Howto's

Skip to: Content | Sidebar | Footer

Month: January, 2011

Debian

28 January, 2011 (09:09) | debian | By: unclecameron

hacks and tips and tricks what it is what it does .bashrc export PS1=’\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: ‘ ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up brings interface eth0 up with ip of 192.168.1.10 and netmask of 255.255.255.0, you may still have to add a route if you run route and you don’t see a last entry like “default […]

ssh

26 January, 2011 (17:21) | linux commands | By: unclecameron

an encrypted login to a server running openssh-server install (debian variants) apt-get install openssh-serverapt-get install openssh-server configure to login from your laptop without being prompted for passwords, using dsa encrypted keys you generate on your laptop and then transfer to the server so it knows who you are by matching the key when you login. […]

htaccess

15 January, 2011 (00:10) | commands | By: unclecameron

install .htaccess apt-get install htpasswdapt-get install htpasswd add user cd /where/your/secret/.htpasswd/file/will/be/created htpasswd -c .htpasswd usertocreate htpasswd .htpasswd anotherusercd /where/your/secret/.htpasswd/file/will/be/created htpasswd -c .htpasswd usertocreate htpasswd .htpasswd anotheruser create .htaccess file in the directory you want to control access, create a new file like vi .htaccess AuthUserFile /pathtowhereyouwantthepasswordfile/.htpasswd AuthName "Authorization Required" AuthType Basic require valid-user chown www-data.www-data […]

Approx local Debian apt .deb cache

14 January, 2011 (23:40) | debian | By: unclecameron

This will make your other local machines download packages faster because it creates a cache of packages stored on the machine we’re going to make, then lets all your clients download from that machine, instead of going to the internet every time for each client. It seems like it’s tricky and will break things badly, […]

Python basics

13 January, 2011 (16:23) | python | By: unclecameron

Examples run at the command line after typing “python” then getting the >>> prompt lists make a list and then do stuff with the data in it [codesyntax lang=”python”] >>> a = [66.25, 333, 333, 1, 1234.5] >>> print a.count(333), a.count(66.25), a.count(‘x’) 2 1 0 >>> a.insert(2, -1) >>> a.append(333) >>> a [66.25, 333, -1, […]

Nagios sytem monitoring Howto

13 January, 2011 (11:56) | nagios | By: unclecameron

Nagios monitors systems and then e-mails you if there’s an outage, it does a lot more, but that’s the usual use. this is a down and dirty cut/paste howto, if you need background on what we’re doing here there are plenty of resouces, this is a cliff notes. If you comment I MAY have time […]

mysql

8 January, 2011 (02:40) | mysql commands | By: unclecameron

First install the server. It will prompt you to enter a root password. apt-get install mysql-server mysql-clientapt-get install mysql-server mysql-client If you want a web-based “gui” manager for your server too, do: apt-get install phpmyadminapt-get install phpmyadmin what it is what it does create database somedatabasename;create database somedatabasename; creates a new database create table bikes […]

linux commands

8 January, 2011 (01:40) | linux commands | By: unclecameron

command what it does awk ‘!/virus=””/’ > sometextfile pipes notification of nasties to a text file called sometextfile cat /proc/cpuinfo shows what CPU is installed &1 | dialog –gauge “Running dd command (cloning), please wait…” 10 70 0 copies the WHOLE drive of /dev/sda to /dev/sdb. Not just a partition, but a bit-for-bit thing. The […]

Cheatsheet Master Index

6 January, 2011 (21:14) | home | By: unclecameron

This used to be in a wiki format, so I’ll give it a shot in blog style code blocks: commands linux mysql .htaccess ssl command line e-mail