Dovecot Problems
We use dovecot on our servers to process email. However, with IMAP it keep freezings so here are possible solutions.
# vi /etc/dovecot.conf
change and/or uncomment :
A web and systems development journal (from a–too busy–web developer who does a lot of various IT work.)
We use dovecot on our servers to process email. However, with IMAP it keep freezings so here are possible solutions.
# vi /etc/dovecot.conf
change and/or uncomment :
I installed a new printer and Quickbooks Pro 2008 just would not print anything--it seemed like after you hit print, the print-job would just disappear (not even get submited)...
-Add all your ips in directadmin under "IP management"
(and assign 2 ips to admin)
http://xx.xxx.xxx.xxx:2222/CMD_IP_MANAGER
-Register nameserver at registrar
(namecheap.com is my fav; networksolution.com is the worst for this... it's not longer an option you can click on the website, you have to send an email request for this)
-Add nameservers to server:
1. go to user level, and add the new domain you registered (leave default settings, and tweak them after)
2. go back to reseller level, and click "nameserver" and select 2 ips you want to use and click "create" then set the 2 new nameservers for "Set the Nameservers that will be assigned to new users" (it should be added by default)
-Share nameserver ips (so you're able to add other domains to them):
1. IP
/etc/sysconfig/network-scripts/ifcfg-eth0
2. DNS
/etc/resolv.conf
/etc/hosts
3. Router
/etc/sysconfig/network
4. Restart the network
/etc/rc.d/init.d/network restart
Plesk will overwrite any httpd.conf settings unless you include them in...
/home/httpd/vhosts/DOMAIN/conf/vhost.conf
cd /usr/local/src
wget http://internap.dl.sourceforge.net/sourceforge/iperf/iperf-2.0.4.tar.gz
tar xvfz iperf-2.0.4.tar.gz
cd iperf-2.0.4
cd /usr/local/src
yum search ImageMagick-devel
This actually was the only thing that worked exactly like i wanted.
vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
I seen where a lot of server management companies are charging big bucks for this, so this might save you some time and money.
First
exim conf update: http://help.directadmin.com/item.php?id=51
http://help.directadmin.com/item.php?id=15
/usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9999 -nodes
Install/Update eaccelerator:
cd /ea
rm -rf ./eaccelerator*
rm -rf /usr/local/lib/php/extensions/no-debug-non-zts-*
wget http://downloads.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator...
tar xvfj eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install
cd /tmp
rm -fr /tmp/eaccelerator
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
vi /usr/local/lib/php.ini
Add/Edit right after "Windows Extensions":
zend_extension="/ea/eaccelerator-0.9.5.3/modules/eaccelerator.so"
eaccelerator.shm_size="32"
Here's how we do it on RHEL:
Logged in as root:
* Create file at /etc/cron.hourly/clockset
* with these two lines only:
rdate -s time-a.nist.gov > /dev/null
hwclock --systohc > /dev/null
search: ([A-Za-z0-9\s-=";/0]*)
replace: $1whateveryouwant
The () mark takes place of $1
e.g.
this is wrong: <td><img src="img/D0204</td>
# ifconfig eth1Â 192.168.10.12 netmask 255.255.255.0
# cd /etc/sysconfig/network-scripts
Edit the NETMASK lines in the ifcfg-eth0* and in the ifcfg-eth1* files as required.
# vi /etc/modprobe.confadd to the bottom of file:
alias ipv6 off alias net-pf-10 off
# reboot
or before you reboot, also check out:
source:
http://www.directadmin.com/forum/showthread.php?s=3e3a0ea93b3c3ec055b39158dc50a1e3&threadid=14669
Current mails in queue:
exim -bp
Rest of the funny commands you can find @
http://ccfaq.valar.co.uk/modules.php?name=News&file=article&sid=158
# vi /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and # sysctl.conf(5) for more details. # Disables packet forwarding net.ipv4.ip_forward=0 # Disables IP source routing net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.lo.accept_source_route = 0 net.ipv4.conf.eth0.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 # Enable IP spoofing protection, turn on source route verification net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.lo.rp_filter = 1 net.ipv4.conf.eth0.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 # Disable ICMP Redirect Acceptance net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.lo.accept_redirects = 0 net.ipv4.conf.eth0.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 # Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets net.ipv4.conf.all.log_martians = 0 net.ipv4.conf.lo.log_martians = 0 net.ipv4.conf.eth0.log_martians = 0 # Disables IP source routing net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.lo.accept_source_route = 0 net.ipv4.conf.eth0.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 # Enable IP spoofing protection, turn on source route verification net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.lo.rp_filter = 1 net.ipv4.conf.eth0.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 # Disable ICMP Redirect Acceptance net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.lo.accept_redirects = 0 net.ipv4.conf.eth0.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 # Disables the magic-sysrq key kernel.sysrq = 0 # Decrease the time default value for tcp_fin_timeout connection net.ipv4.tcp_fin_timeout = 15 # Decrease the time default value for tcp_keepalive_time connection net.ipv4.tcp_keepalive_time = 1800 # Turn off the tcp_window_scaling net.ipv4.tcp_window_scaling = 0 # Turn off the tcp_sack net.ipv4.tcp_sack = 0 # Turn off the tcp_timestamps net.ipv4.tcp_timestamps = 0 # Enable TCP SYN Cookie Protection net.ipv4.tcp_syncookies = 1 # Enable ignoring broadcasts request net.ipv4.icmp_echo_ignore_broadcasts = 1 # Enable bad error message Protection net.ipv4.icmp_ignore_bogus_error_responses = 1 # Log Spoofed Packets, Source Routed Packets, Redirect Packets net.ipv4.conf.all.log_martians = 1 # Increases the size of the socket queue (effectively, q0). net.ipv4.tcp_max_syn_backlog = 1024 # Increase the tcp-time-wait buckets pool size net.ipv4.tcp_max_tw_buckets = 1440000 # Allowed local port range net.ipv4.ip_local_port_range = 16384 65536
For changes to take affect right away
# vi /etc/my.cnf
#opteron 852 4GB RAM [mysqld] safe-show-database max_connections = 500 key_buffer = 150M myisam_sort_buffer_size = 64M join_buffer_size = 1M read_buffer_size = 1M sort_buffer_size = 1M table_cache = 1024 thread_cache_size = 100 wait_timeout = 300 connect_timeout = 10 max_allowed_packet = 16M max_connect_errors = 10 query_cache_limit = 1M query_cache_size = 32M query_cache_type = 1 skip-innodb thread_concurrency=4 [mysqld_safe] open_files_limit = 8192 [mysqldump] quick max_allowed_packet = 16M [myisamchk] key_buffer = 64M sort_buffer = 64M read_buffer = 16M write_buffer = 16M[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-locking #skip-networking safe-show-database query_cache_limit=1M query_cache_size=128M ## 32MB for every 1GB of RAM query_cache_type=1 max_user_connections=200 max_connections=500 interactive_timeout=10 wait_timeout=20 connect_timeout=20 thread_cache_size=128 key_buffer=256M ## 64MB for every 1GB of RAM join_buffer=1M max_connect_errors=20 max_allowed_packet=16M table_cache=1024 record_buffer=1M sort_buffer_size=4M ## 1MB for every 1GB of RAM read_buffer_size=4M ## 1MB for every 1GB of RAM read_rnd_buffer_size=4M ## 1MB for every 1GB of RAM thread_concurrency=4 ## Number of CPUs x 2 myisam_sort_buffer_size=64M server-id=1 log_slow_queries=/var/log/mysql-slow-queries.log long_query_time=2 collation-server=latin1_general_ci old-passwords [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/lib/mysql/mysql.pid open_files_limit=8192 [mysqldump] quick max_allowed_packet=16M [mysql] no-auto-rehash #safe-updates [isamchk] key_buffer=32M sort_buffer=32M read_buffer=16M write_buffer=16M [myisamchk] key_buffer=32M sort_buffer=32M read_buffer=16M write_buffer=16M [mysqlhotcopy] interactive-timeout
If email is not being received, but you're able to log in, it may be a permission's problem
(This may occur when restoring backup accounts)
# /usr/local/directadmin/scripts/set_permissions.sh email
If you're unable to su to root, even if inputing the correct password
SSL Location:
SSH to the old server and go to /usr/share/ssl/certs/, here you find the www.domain.com.crt (SSL Certificate) and the www.domain.com.cabundle (Cabundle), You will find the key www.domain.com.key at /usr/share/ssl/private/ path.