You are hereBlogs / Blogs
Blogs
How to disable amavis and clamav
Edit: /etc/postfix/main.cf
#content_filter = amavis:[127.0.0.1]:10024
#receive_override_options = no_address_mappings
Edit: /etc/postfix/master.cf
#amavis unix - - - - 2 smtp
# -o smtp_data_done_timeout=1200
# -o smtp_send_xforward_command=yes
#127.0.0.1:10025 inet n - - - - smtpd
# -o content_filter=
# -o local_recipient_maps=
# -o relay_recipient_maps=
# -o smtpd_restriction_classes=
# -o smtpd_client_restrictions=
# -o smtpd_helo_restrictions=
# -o smtpd_sender_restrictions=
# -o smtpd_recipient_restrictions=permit_mynetworks,rej ect
# -o mynetworks=127.0.0.0/8
How to disable amavis and clamav
Edit: /etc/postfix/main.cf
#content_filter = amavis:[127.0.0.1]:10024
#receive_override_options = no_address_mappings
Edit: /etc/postfix/master.cf
#amavis unix - - - - 2 smtp
# -o smtp_data_done_timeout=1200
# -o smtp_send_xforward_command=yes
#127.0.0.1:10025 inet n - - - - smtpd
# -o content_filter=
# -o local_recipient_maps=
# -o relay_recipient_maps=
# -o smtpd_restriction_classes=
# -o smtpd_client_restrictions=
# -o smtpd_helo_restrictions=
# -o smtpd_sender_restrictions=
# -o smtpd_recipient_restrictions=permit_mynetworks,rej ect
# -o mynetworks=127.0.0.0/8
Setup SNMPTT in Ubuntu 8.10 for traps to go to MySQL
Download from here:
http://sourceforge.net/projects/snmptt/files/
Basic installing from here (with exceptions below):
http://snmptt.sourceforge.net/docs/snmptt.shtml#Installation-Unix
Found some of the paths not right for Ubuntu such as:
cp snmptt.init.d to /etc/rc.d/init.d/snmptt
should be
cp snmptt.init.d to /etc/init.d/snmptt
9.4. I see following error: Can't locate Config/IniFiles.pm in @INC ...What should I do?
LAMP Memory Tuning
Running a VPS? Going over your oomguarpages limit?
Well this should help
http://onlamp.com/pub/a/onlamp/2004/02/05/lamp_tuning.html
In particular check out the section about MaxRequestsPerChild and you can use this command ps axu --sort:rss to see how much RAM you are using.
Where is PHP.ini installed in Ubuntu 8.10?
1) PHP Web server
To find this one create a file with <?php phpinfo(); ?> and run it on your web server.
/etc/php5/apache2/php.ini
2) PHP Client
To find this run this command.
$ php -r "phpinfo();" | grep php.ini
/etc/php5/cli/php.ini
How to get fopen to work with crontab
Basically you need to understand three things to understand how this works:
1) Which user is the php file running as?
- When you run "crontab -e" the user you are running it as will be the user the php file runs as.
2) What are the permissions on the log file?
- Check the permissions, owner and group using "ls -al"
3) What are the permissions on the php file?
If you run the php file with a directive #!/bin/php at the top of the file then you need to set executable permissions on the file. If you specify php /path/to/phpfile.php then you don't need to do this.
How to set up Internet Tethering with the BlueMan Applet
I found there was a bit of stuffing around to get this Internet tethering going, so here is my quick guide to how it worked for me. So my setup is I'm running Ubuntu 8.10, have BlueMan installed and have an iPhone 3GS 32GB.
So here are the steps.
1) Open Bluetooth BlueMan applet on laptop (enable bluetooth if not enabled)
2) Open Bluetooth settings in iPhone (enable bluetooth if not enabled)
3) The device name (your-laptop-name) should be showing on the iPhone. Press the name with your finger to connect (!! not the arrow as I kept doing !!)
iPhone Internet Tethering settings
iPhone Internet Tethering settings.
For newer iPhones it should there already under: Settings->General->Network->Internet Tethering.
If it's not there then go to this link: http://help.benm.at/help.php (on your iphone).
Select on mobileconfigs which goes to here: http://help.benm.at/tethering.php
Select Australia (or whatever country you are in) which goes here: http://help.benm.at/au.php
Pick your provider.
Installing SSL on a VPN
This link might be handy (posters seem to think so). I'll expand on this blog entry once I've tried it.
Extracted from link below:
++++++++++++++++++++++++++++++
A Mini-Howto for apache2: :)
apt-get install apache2
apache2-ssl-certificate
(and answer the questions)
Now, enable ssl:
a2enmod ssl
configure ssl:
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
"/etc/apache2/sites-enabled/ssl" should look like this:
NameVirtualHost *:443
Creating Virtual Hosts on your VPS
The article (link below re: debian-administration) was pretty good, except the bit that said to create a file called virtual.conf. This pretty much didn't seem to work (maybe I did it wrong), but it just caused apache2 to throw the following error on restart:
[warn] NameVirtualHost *:80 has no VirtualHosts
By removing this file and specifying *:80 in each of the VirtualHosts sections instead of just using * fixed this problem. I also found the official documentation about virtual hosts enlightening.
References:
http://www.debian-administration.org/articles/412