tc, short for traffic control, can do all kinds of things like hook and manage bufferbloat issues, set bandwidth limits and lots of other stuff. Here’s the setup I use for controlling bufferbloat across a couple bridge interfaces. This will give you a transparent bridge that will “automagically” manage package contention using fq_codel. Later, we’ll […]
Author: unclecameron
Apache
apache is called apache2 in debian/ubuntu and httpd in Centos/Fedora, it lives in /etc/apache2/ Tutorials basic tutorial here more advanced one here securing apache here Install apt-get install apache2 libapache2-mod-php5 mysql-server php5-mysql php5 openssl ssl-certapt-get install apache2 libapache2-mod-php5 mysql-server php5-mysql php5 openssl ssl-cert you normally create some kind of “Virtual Host” that points to where […]
Debian
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
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
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
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
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
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
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
command what it does awk ‘!/virus=””/’ > sometextfile pipes notification of nasties to a text file called sometextfile cat /proc/meminfo shows your memory stuff (or just type “free”) cat /proc/version shows what version of Linux you’re running</td chmod -R 777 * changes ownership of all the files below where you are to read-write-executable…not normally […]