Cauwenbergh.be weblog

Linux

« Previous Entries

Mysql Master Master Replication on CentOS 5

dinsdag, juni 22nd, 2010

This tutorial describes how to set up a MySQL master-master replication. This is usefull is one of the servers drops down, the other can take over without any data loss, it will also be used as slave for the live one.
Step 1:
Install mysql on master 1 (slave 2) and slave 1 (master2).
#yum install mysql-server mysql
Master [...]

Install postfix mailserver only for forwarding

dinsdag, juni 1st, 2010

For some reasons i only had to install a mailserver for forwarding mails to other mailaddresses. So on Centos here you have it:
#yum install postfix smtpd
edit /etc/postfix/main.cf
myhostname = your.domain.tld
virtual_alias_domains = redirectdomain1.tld, redirectdomain2.tld
virtual_alias_maps = hash:/etc/postfix/virtual
edit /etc/postfix/virtual
address@redirectdomain1.tld   addresto@domainto.tld
@redirectdomain2.tld  addresstocatchall@domaintoxx.tld
After this run the following commands:
# postalias /etc/aliases
# postmap /etc/postfix/access
# postmap /etc/postfix/virtual
# postmap /etc/postfix/transport
# cp /etc/aliases /etc/postfix/
# newaliases
# postfix [...]

Remove domain tomcat problem

dinsdag, september 8th, 2009

To remove a domain that generate a tomcat error during delete, copy an existing xml file from the following dir:
/usr/share/tomcat5/psa-users/
to {domain}.xml where {domain} is the full domain name to be removed.

Process op shared server bepalen van eigenaar

maandag, januari 5th, 2009

# ls /proc/<pidnr>/cwd/ -al
pidnr vervangen door de nr van het process

Plesk SQL Injection vulnerability

woensdag, september 26th, 2007

Today we have solved this bug on our productionserver. You can read how to solve this on:
http://kb.swsoft.com/en/2169

Disable ping on linux

donderdag, juli 19th, 2007

Almost all people starting with linux want to know after a while how to stop ping to prevent floods, well here is the solutions:
echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
Only one thing left to do, you also want to get this after a reboot, so put in /etc/sysctl.conf.:
net.ipv4.conf.icmp_echo_ignore_all = 1

Fedora Core 2 repository

zondag, juli 8th, 2007

Today i found that the mirrors in usa not working for some reason on a fedora core 2 system of a customer, so i searched and found a newone and placed in /etc/yum.conf:

[base]
name=Fedora Core $releasever – $basearch – Base
baseurl=ftp://alviss.et.tudelft.nl/pub/fedora/core/$releasever/$basearch/os
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
[updates-released]
name=Fedora Core $releasever – $basearch – Released Updates
baseurl=ftp://alviss.et.tudelft.nl/pub/fedora/core/updates/$releasever/$basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
Hopefull someone could use this!

Backup mysql with many tables >1000

zaterdag, juli 7th, 2007

When your mysql has many tables you could get an error of LOCK TABLES to solve this you can try two things:
1) use the option –skip-lock-tables in mysqldump
2) edit /etc/my.cfg and add following line under category [mysqld]: open_files_limit=16384
After 2 restart mysql!

Could not bind 0.0.0.0:443

donderdag, juli 5th, 2007

login su in server
#fuser 443/tcp
443/tcp: xxxx yyyy zzzz <- proceses using 443
#kill -9 xxxx yyyy xxxx
#service httpd start

Final: backupserver is running!

vrijdag, juni 29th, 2007

The beginning was not so good, 3-ware card was not recognized by CentOS 5 neither 4! So after searching a couple of hours and found the right device drivers we could start the install! So far so good, we have a system with 6 x SATA 320GB in raid 5 so we have 1,45TB [...]

« Previous Entries