Posts

Showing posts from June, 2012

Install Postfix and Dovecot on Redhat

Image
Download and Install: Check if both Postfix and Dovecot is not yet installed in your system. # rpm –q postfix # rpm –q dovecot # yum install postfix # yum install dovecot Check if it is installed # rpm –q system-switch-mail If not installed, install it # yum install system-switch-mail And run system-switch-mail # system-switch-mail And select Postfix as your default MTA. # rpm –e --nodeps sendmail Setting up Postfix Enough for the intro; let’s do now Postfix setup. 1. Go to /etc/postfix directory # cd /etc/postfix 2. Copy the original main.cf to another file # cp main.cf main.cf-bak-orig 3. Clear the existing main.cf file # cat /dev/null > main.cf This command will quickly clear the content of you main.cf file. 4. Edit and add the following lines to main.cf myhostname = mail.example.com mydomain = example.com myorigin = $mydomain mydestination = $myhostname localhost.$mydomain localhost $mydomain relay_domains = home_mailbox

mysql replication

Create Replication User   REPLICATION SLAVE privilege:  #mysql -uroot -p #CREATE USER 'user_vishal'@'localhost' IDENTIFIED BY 'pass_123'; #GRANT REPLICATION SLAVE ON *.* TO 'user_vishal'@'Slave Ip Addd' IDENTIFIED BY 'pass_123'; #mysql>FLUSH PRIVILEGES; #show master status\G; In master server:- vim /etc/my.cnf log-bin=mysql-bin server-id=1 innodb_flush_log_at_trx_commit=1 sync_binlog=1 Restart MySQl On Slave Server:- vim /etc/my.cnf server-id=2 master_host=(master ip) master_user=vyas master_password=123 Restart MySQl #mysql -uroot -p CHANGE MASTER TO MASTER_HOST='Master Host', MASTER_HOST=’X.X.X.X’, MASTER_USER=’user’, MASTER_PASSWORD=’password’, MASTER_PORT=3306, MASTER_LOG_FILE=’mysql-bin.000001?, MASTER_LOG_POS=98, MASTER_CONNECT_RETRY=10; START SLAVE; SHOW SLAVE STATUS\G ; Thanks, Vishal Vyas

Install Subversion [SVN] on Linux Server

how to install SVN (Subversion) server on Fedora , Red Hat (RHEL) . Install Packages:- # yum install mod_dav_svn subversion   Modify Subversion config file /etc/httpd/conf.d/subversion.conf Add following config to   /etc/httpd/conf.d/subversion.conf   file:- LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so <Location /svn> DAV svn SVNParentPath /var/www/svn AuthType Basic AuthName "Subversion repositories" AuthUserFile /etc/svn-auth-users Require valid-user </Location> How to Add SVN  users:- Use  command: ## Create user vishal ## htpasswd -cm /etc/svn-auth-users vishal New password: Re-type new password: Adding password for user vishal ## Create testuser2 ## htpasswd -m /etc/svn-auth-users vyas New password: Re-type new password: Adding password for user vyas   How to Create and configure SVN repository:- mkdir /var/www/svn cd /var/www/svn sv