Managing Mail Transfer Agent (MTA)
------------------------------------
[root@erptest ~]# echo "email from maple" | mail -s "maple.kmlg.com" mansoor.khan@kmlg.com
cat ~oracle/.bash_profile|mailx -s "mainserver-LE" mansoor.khan@kmlg.com
OR
cat mbox|mailx -s "mainserver.kmlg.com" mansoor.khan@kmlg.com
tail -f /var/log/maillog
$ df -h | mail -s "Available size on erptest.kmlg.com" mansoor.khan@kmlg.com --commands output
$ mail -s "attachement" < file.txt mansoor.khan@kmlg.com --send file contents
$ mail -s "attachement" mansoor.khan@kmlg.com < file.txt --just changed file location
http://www.thegeekstuff.com/2009/12/how-to-send-an-email-with-attachment-and-body-from-linux/
rpm –qa sharutil*
http://unix.stackexchange.com/questions/16277/how-do-i-get-uuencode-to-work
http://pkgs.org/centos-5/centos-x86_64/sharutils-4.6.1-2.x86_64.rpm.html --downloaded from this site
zip file.zip /home/oracle/file.txt
echo "your message here" | mail -s "title" -a /home/masoud/YOURFILE.txt RECEIVE@mail.com
[gawad@centos Desktop]$ mail -s "pine" -a /home/gawad/Desktop/pine-4.64-3.el5.rf.x86_64.rpm.gz root@localhost *press enter and add the mail body*
this is the pine software you asked for
. *press enter*
EOT
[gawad@centos Desktop]$
Oracle Recovery Manager has a LOG command that you can pass in
with your backup script. This details every step of the backup as it
runs. This shell script example logs the output of your RMAN backup on Linux/UNIX:
#/usr/bin/ksh
# Environment Settings
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
export ORACLE_SID=dev11g
export BAK_DATE=`date ‘+%d%b%Y_%H_%M’`
export PATH=$ORACLE_HOME/bin:$PATH
# Run Backup
rman target / cmdfile=full_hot_backup.rmn
log=full_hot_backup_${ORACLE_SID}_${BAK_DATE}.log
# Check Error Code
Export ECODE=$?
if [ $ECODE -gt 0 ]; then
mailx –s “RMAN BACKUP FAILED!” dba@perptech.com
else echo “RMAN BACKUP SUCCESSFUL”
fi
Managing SAMBA server
--------------------------
Example
--------
[root]# rpm –q samba*
[root]# setup -> System services (portmap, xinetd, smb)
now create /data directory and grant it full permission:
[root]# mkdir /source/img
[root]# chmod -R 755 img
[root]# chgrp -R groupname /img
[root]# vi /etc/samba/smb.conf
[global]
workgroup=workgroup_name --This should match workgroup name on Windows client
server string=hostname
host allow = 127. 192.168.64. --localhost and 192.168.64.
--At last line
[img]
comment = appserver10g img directory for images
path=/source/img
public=yes
writable=yes
security=no
guest ok=yes --if guest ok is yes then read only should be yes
read only=yes
[root]# smbpasswd -a oracle
[root]# testparm
root# chkconfig smb on
[root]# service smb restart
Example
--------
Configure samba server to become a Primary Domain Controllder (PDC):
[root]# vi /etc/samba/smb.conf
workgroup=kmlg.com|kmlg --domain name goes here
security=user
# domains
domain logons=yes
domain master=yes --if its not PDC then domain master must be NO
local master=yes
preferred master=yes --this is the Primary DC
logon path = \\%N\%U\profile
logon drive=H:
logon home=\\%N\%U
#SAMR RPC pipe
add machine scrip=/usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
#Remove comments from all [homes] and [netlogon] and [profiles] and [printers] sections
[homes]
...
...
[netlogon]
....
....
[profiles]
....
....
[printers]
....
....
#save file
[root]# groupadd -g 201 machines
[root]# mkdir -m 0775 /home/netlogon
[root]# mkdir /home/samba /home/samba/profiles
[root]# chmod 1757 /home/samba/profiles
[root]# useradd -m oracle
[root]# passwd oracle
[root]# smbpasswd -a oracle
# adding root is optional
[root]# smbpasswd -a root
#now reboot samba server
#on windows machine make it member of the above domain, restart and login as oracle --or any other user
References:
1. Preferences -> More Preferences -> Mail Transfer Agent Switcher
2. http://www.oracle-base.com/articles/linux/linux-mta-configuration.php
3. https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-email-mta.html
http://rudd-o.com/linux-and-free-software/setting-up-a-mail-server-using-postfix-in-5-minutes
http://postfix.state-of-mind.de/patrick.koetter/smtpauth/postfix_configuration.html
https://www.linux.com/learn/tutorials/308917-install-and-configure-a-postfix-mail-server
http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://www.redhat.com/support/resources/howto/RH-postfix-HOWTO/c108.html
http://ostechnix.wordpress.com/2013/02/08/setup-mail-server-using-postfixdovecotsquirrelmail-in-centosrhelscientific-linux-6-3-step-by-step/
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-email-mta.html
http://www.postfix.org/documentation.html
http://www.fredshack.com/docs/postfix.html
Managing and configuring Web server
-----------------------------------
http://computernetworkingnotes.com/network-administrations/web-server.html
http://oracle-base.com/articles/linux/linux-http-server-configuration.php(Linux HTTP Server Configuration)
http://oracle-base.com/articles/linux/linux-http-and-ftp-server-configuration.php#ftp
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/
Managing SAMBA:
http://gurkulindia.com/main/2012/10/linux-samba-server-integration-with-windows-active-directory-part-1/#
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/System_Administrators_Guide/ch-File_and_Print_Servers.html
http://debian-handbook.info/browse/stable/sect.windows-file-server-with-samba.html
http://www.linuxjournal.com/node/1005985
http://www.linuxuser.co.uk/tutorials/build-a-samba-file-server
http://www.stuartellis.eu/articles/linux-with-active-directory/
http://www.aboutdebian.com/lan.htm
http://www.techradar.com/news/networking/samba-4-share-filesystems-between-linux-and-windows-1154705
http://linuxnunixhelp.blogspot.com/2012/02/samba-server-configuration-in-rhel5.html(Tested)
http://www.cfcecorp.com/blog/2010/05/how-to-configure-samba-on-a-linux-server/
http://oreilly.com/openbook/samba/book/ch06_01.html
http://www.linuxuser.co.uk/tutorials/build-a-file-server-with-the-raspberry-pi
http://computernetworkingnotes.com/network-administrations/samba-server.html(not tested)
http://www.onlamp.com/pub/a/onlamp/2008/04/01/step-by-step-using-samba-to-join-a-windows-domain.html
http://linuxhomeserverguide.com/server-config/Samba.php
http://www.howtoforge.com/fedora-17-samba-standalone-server-with-tdbsam-backend
http://www.howtoforge.com/setting-up-a-linux-file-server-using-samba
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-samba-domain-member.html
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-samba.html
http://oracle-base.com/articles/linux/linux-samba-configuration.php
http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
http://www.samba.org/samba/docs/Samba-Guide.pdf(Reading)
------------------------------------
[root@erptest ~]# echo "email from maple" | mail -s "maple.kmlg.com" mansoor.khan@kmlg.com
cat ~oracle/.bash_profile|mailx -s "mainserver-LE" mansoor.khan@kmlg.com
OR
cat mbox|mailx -s "mainserver.kmlg.com" mansoor.khan@kmlg.com
tail -f /var/log/maillog
$ df -h | mail -s "Available size on erptest.kmlg.com" mansoor.khan@kmlg.com --commands output
$ mail -s "attachement" < file.txt mansoor.khan@kmlg.com --send file contents
$ mail -s "attachement" mansoor.khan@kmlg.com < file.txt --just changed file location
http://www.thegeekstuff.com/2009/12/how-to-send-an-email-with-attachment-and-body-from-linux/
rpm –qa sharutil*
http://unix.stackexchange.com/questions/16277/how-do-i-get-uuencode-to-work
http://pkgs.org/centos-5/centos-x86_64/sharutils-4.6.1-2.x86_64.rpm.html --downloaded from this site
zip file.zip /home/oracle/file.txt
echo "your message here" | mail -s "title" -a /home/masoud/YOURFILE.txt RECEIVE@mail.com
[gawad@centos Desktop]$ mail -s "pine" -a /home/gawad/Desktop/pine-4.64-3.el5.rf.x86_64.rpm.gz root@localhost *press enter and add the mail body*
this is the pine software you asked for
. *press enter*
EOT
[gawad@centos Desktop]$
Oracle Recovery Manager has a LOG command that you can pass in
with your backup script. This details every step of the backup as it
runs. This shell script example logs the output of your RMAN backup on Linux/UNIX:
#/usr/bin/ksh
# Environment Settings
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
export ORACLE_SID=dev11g
export BAK_DATE=`date ‘+%d%b%Y_%H_%M’`
export PATH=$ORACLE_HOME/bin:$PATH
# Run Backup
rman target / cmdfile=full_hot_backup.rmn
log=full_hot_backup_${ORACLE_SID}_${BAK_DATE}.log
# Check Error Code
Export ECODE=$?
if [ $ECODE -gt 0 ]; then
mailx –s “RMAN BACKUP FAILED!” dba@perptech.com
else echo “RMAN BACKUP SUCCESSFUL”
fi
Managing SAMBA server
--------------------------
Example
--------
[root]# rpm –q samba*
[root]# setup -> System services (portmap, xinetd, smb)
now create /data directory and grant it full permission:
[root]# mkdir /source/img
[root]# chmod -R 755 img
[root]# chgrp -R groupname /img
[root]# vi /etc/samba/smb.conf
[global]
workgroup=workgroup_name --This should match workgroup name on Windows client
server string=hostname
host allow = 127. 192.168.64. --localhost and 192.168.64.
--At last line
[img]
comment = appserver10g img directory for images
path=/source/img
public=yes
writable=yes
security=no
guest ok=yes --if guest ok is yes then read only should be yes
read only=yes
[root]# smbpasswd -a oracle
[root]# testparm
root# chkconfig smb on
[root]# service smb restart
Example
--------
Configure samba server to become a Primary Domain Controllder (PDC):
[root]# vi /etc/samba/smb.conf
workgroup=kmlg.com|kmlg --domain name goes here
security=user
# domains
domain logons=yes
domain master=yes --if its not PDC then domain master must be NO
local master=yes
preferred master=yes --this is the Primary DC
logon path = \\%N\%U\profile
logon drive=H:
logon home=\\%N\%U
#SAMR RPC pipe
add machine scrip=/usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
#Remove comments from all [homes] and [netlogon] and [profiles] and [printers] sections
[homes]
...
...
[netlogon]
....
....
[profiles]
....
....
[printers]
....
....
#save file
[root]# groupadd -g 201 machines
[root]# mkdir -m 0775 /home/netlogon
[root]# mkdir /home/samba /home/samba/profiles
[root]# chmod 1757 /home/samba/profiles
[root]# useradd -m oracle
[root]# passwd oracle
[root]# smbpasswd -a oracle
# adding root is optional
[root]# smbpasswd -a root
#now reboot samba server
#on windows machine make it member of the above domain, restart and login as oracle --or any other user
References:
1. Preferences -> More Preferences -> Mail Transfer Agent Switcher
2. http://www.oracle-base.com/articles/linux/linux-mta-configuration.php
3. https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-email-mta.html
http://rudd-o.com/linux-and-free-software/setting-up-a-mail-server-using-postfix-in-5-minutes
http://postfix.state-of-mind.de/patrick.koetter/smtpauth/postfix_configuration.html
https://www.linux.com/learn/tutorials/308917-install-and-configure-a-postfix-mail-server
http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://www.redhat.com/support/resources/howto/RH-postfix-HOWTO/c108.html
http://ostechnix.wordpress.com/2013/02/08/setup-mail-server-using-postfixdovecotsquirrelmail-in-centosrhelscientific-linux-6-3-step-by-step/
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-email-mta.html
http://www.postfix.org/documentation.html
http://www.fredshack.com/docs/postfix.html
Managing and configuring Web server
-----------------------------------
http://computernetworkingnotes.com/network-administrations/web-server.html
http://oracle-base.com/articles/linux/linux-http-server-configuration.php(Linux HTTP Server Configuration)
http://oracle-base.com/articles/linux/linux-http-and-ftp-server-configuration.php#ftp
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/
Managing SAMBA:
http://gurkulindia.com/main/2012/10/linux-samba-server-integration-with-windows-active-directory-part-1/#
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/System_Administrators_Guide/ch-File_and_Print_Servers.html
http://debian-handbook.info/browse/stable/sect.windows-file-server-with-samba.html
http://www.linuxjournal.com/node/1005985
http://www.linuxuser.co.uk/tutorials/build-a-samba-file-server
http://www.stuartellis.eu/articles/linux-with-active-directory/
http://www.aboutdebian.com/lan.htm
http://www.techradar.com/news/networking/samba-4-share-filesystems-between-linux-and-windows-1154705
http://linuxnunixhelp.blogspot.com/2012/02/samba-server-configuration-in-rhel5.html(Tested)
http://www.cfcecorp.com/blog/2010/05/how-to-configure-samba-on-a-linux-server/
http://oreilly.com/openbook/samba/book/ch06_01.html
http://www.linuxuser.co.uk/tutorials/build-a-file-server-with-the-raspberry-pi
http://computernetworkingnotes.com/network-administrations/samba-server.html(not tested)
http://www.onlamp.com/pub/a/onlamp/2008/04/01/step-by-step-using-samba-to-join-a-windows-domain.html
http://linuxhomeserverguide.com/server-config/Samba.php
http://www.howtoforge.com/fedora-17-samba-standalone-server-with-tdbsam-backend
http://www.howtoforge.com/setting-up-a-linux-file-server-using-samba
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-samba-domain-member.html
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-samba.html
http://oracle-base.com/articles/linux/linux-samba-configuration.php
http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
http://www.samba.org/samba/docs/Samba-Guide.pdf(Reading)
No comments:
Post a Comment