Chitika

Wednesday, June 1, 2016

How To Install Exchange Server 2016 on Windows Server 2012 R2-Part-2

In Previous post we have installed Microsoft Exchange Server 2016 on Windows Server 2012 R2.

In this How-TO we have to complete post Installation Tasks for Exchange Server 2016.

Use the EAC to enter the product key





  • Open the EAC by Browsing the URL of Mailbox server and Enter you username and password. https://mymail.mydomain.local/ECP
  • Go to Servers > Servers. Select the server you want to license, and then click Enter Product Key.



    • Enter You Product Key and Click Save




    Configure Mail Flow and Client Access


    Create a Send connector
    • Open the EAC by Browsing the URL of Mailbox server and Enter you username and password. https://mymail.mydomain.local/ECP


    • Go to Mail flow > Send connectors. On the Send connectors page, click New Add icon

    • In the New send connector wizard, specify a name for the Send connector and then select Internet. Click Next.

    • Verify that MX record associated with recipient domain is selected. Click Next.

    • Under Address space, click Add Add icon. In the Add domain window, make sure SMTP is selected in the Type field. In the Fully Qualified Domain Name (FQDN) field, enter *. Click Save.

    • Make sure Scoped send connector isn't selected and then click Next.
    • Under Source server, click Add Add icon. In the Select a Server window, select a Mailbox server. After you've selected the server, click Add and then click OK.

    • Click Finish.

    Add additional accepted domains
    • Go to Mail flow > Accepted domains. On the Accepted domains page, You will some thing like  

    • If you want to add more domain click New Add icon.
    • In the New accepted domain wizard, specify a name for the accepted domain.
    • In the Accepted domain field, specify the SMTP recipient domain you want to add. For example, contoso.com.
    • Select Authoritative domain and then click Save.

    Offline Address Book

    • Go to Server > Database and Click Edit

    • Click Client Settings > Click Browse >  Click OK 

    • Click Save



    Testing Your Server

    As we are using Exchange server 2016 in a LAB environment. We are not going check email Send/Receive for external Organization users. Lets Create Two new users in our Domain and create their email addresses for testing. I have Created Two users in Active Directory As Test1 and Test2

    Create Mailbox for users

    • Open the EAC by Browsing the URL of Mailbox server and Enter you username and password. https://mymail.mydomain.local/ECP
    • In recipients Click + button and Click User mailbox


    • Set The Alias for New User i.e test1 and Click Browse for existing Users Select Test Click Ok and Click Save


    • Add Test2 user as we did for Test1
    • You will see like Following. You can see Outlook Web is Enabled

    • Open Web Browser on Client Machine and Open https://mymail.mydomain.local/owa and login with MYDOMAIN\Test1




    • Click on New and Create a New Email. Send a Test Email to Test 2


    • Open https://mymail.mydomain.local/owa for Test2 User and check email You will see a New email from Test1

    • Reply this email back to Test1. 
    • Check Test1 mailbox and you will see replied email by Test2

    You see Our email server is working fine. Testing is complete. You can configure more for production environment as required. 

    Cheers -:) 

    How To Install Exchange Server 2016 on Windows Server 2012 R2-Part-1

    We are going to install Microsoft Exchange Server 2016 on Windows Server 2012 R2 Standard in Lab Environment. Before Installing MS-Exchange we need to install some prerequisite.


    1. Make Sure your Domain Controller's functional level of forest is at least Windows Server 2008 and the schema master running is Windows Server 2008 or later.  
    2. The full installation option of Windows Server 2012 and Windows Server 2012 R2 must be used for all servers running Exchange 2016 server roles or management tools.
    3. You must first join the computer to the appropriate internal Active Directory forest and domain.
    4. Install the latest Windows updates on your computer.

    After Joining the Exchange Server 2016 Computer to the Domain we have to do the following.

    Install Pre-Req for Exchange Server 2016
    • login as Domain Admin Open PowerShell as Administrator
    • Run Following Command
    Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation





    • Restart the Server after setup completes 
    Active Directory Preparation 

    The computer you want to use to prepare Active Directory for Exchange 2016 has specific prerequisites that must be met.
    1. Logon with Domain Administrator account, Open PowerShell and Install the Remote Tools Administration Pack using the following command
    Install-WindowsFeature RSAT-ADDS



    A schema Update is required before installing Exchange Server 2016

    In PowerShell run the following to check the schema version


    "Exchange Schema Version = " + ([ADSI]("LDAP://CN=ms-Exch-Schema-Version-Pt," + ([ADSI]"LDAP://RootDSE").schemaNamingContext)).rangeUpper




    Now Copy Exchange server 2016 Setup files on your Exhchange Server PC and Run the following command from elevated Command prompt. This will only update the schema.

    Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms



    Run the Version Check Command Again and you will see following



    To prepare Active Directory run one of the following commands. Note this will also apply the schema update if you did not perform that step already. You cannnot change the Organization name later so chose wisely. 
    Setup.exe /PrepareAD /OrganizationName:"Mylab" /IAcceptExchangeServerLicenseTerms
    
    
    
    
    Installing Exchange server 2016 Mailbox Server Role

    Navigate to the location of Exchange Server 2016 Installation Files
    Right Click setup.exe and select Run As Administrator


    Click Next to Continue

    Accept the License agreement and click Next


    Use Recommended settings on Next screen and click next

    Select Mailbox Role and Automatically install Windows Server Roles and features that are required to install Exchange Server, Click Next



    Click Next


    Leave the Malware Protections settings Enabled and Click Next


    Click Install




    After Setup Completes Restart the Server to configure Exchange Server 2016

    In next post we will complete post installation tasks for configuring Exchange Server 2016.

    Thursday, January 7, 2016

    How to Install Oracle Database 11g R2 on Oracle Linux 7 with ASM

    In this demo we are going to install oracle database 11gR2 with ASM (Automatic Storage Management) on Oracle Linux 7 virtual machine which we have created in previous post.

    First we have shutdown the Oracle Linux 7 VM to create virtual disks for ASM disk groups. we are going to create three virtual hard disks with following names.

    1. CRSDISK1 ( 2GB) – for CRSVOL1 disk where Cluster Ready Services (CRS) files will be stored. CRS provides many system management services and interacts with the vendor clusterware to coordinate cluster membership information.
    2. DATADISK1 (10 GB) – disk for DATAVOL1 disk. Here database will keep all datafiles, control files, log files
    3. FRADISK1 (10 GB) – disk for FRAVOL1 disk for database Fast Recovery Area (FRA) files. For example: database backup files, copy of database control files.
    Open Virtual machine Settings and create new virtual hard disks.




    After creating new virtual hard disks lets power on the virtual machine,
    Now we have to create recommended groups and user for Grid infrastructure. It is recommended to use a separate user from an oracle user.

    [root@OEL7 ~]# groupadd -g 1200 asmdba
    [root@OEL7 ~]# groupadd -g 1201 asmadmin
    [root@OEL7 ~]# groupadd -g 1202 asmoper

    [root@OEL7~]# useradd -m -u 1100 -g oinstall -G asmdba,asmadmin,asmoper,dba -d /home/grid -s /bin/bash grid
    [root@OEL7 ~]# id grid

    To set the password for user grid.
    [root@OEL7 ~]# passwd grid 

    To Create directories for grid home
    [root@OEL7 ~]# mkdir -p /u01/app/grid
    [root@OEL7 ~]# mkdir -p/u01/app/11.2.0/grid
    [root@OEL7 ~]# chown -R grid:oinstall /u01














    Create directories for oracle database installation.













    We have to assign oracle user to asmdba group in order to all oracle user to discover ASM disks during database creation.  oper group will be used by oracle software. 














    Now create login script for oracle and grid user

    Login Script for oracle user:

    [root@OEL7 ~]# su - oracle
    [oracle@OEL7 ~]$ echo > .bash_profile
    [oracle@OEL7 ~]$ vi .bash_profile

    Copy and paste following and save the .bash_profile. You may skip lines in red color

    #---------------------------------------------------------------------------------------------------------
    # .bash_profile
    # ---------------------------------------------------
    # OS User: oracle
    # Application: Oracle Database Software Owner
    # Version: Oracle 11g Release 2.4
    # ---------------------------------------------------
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    ORACLE_SID=DB11G; export ORACLE_SID

    ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME

    JAVA_HOME=/usr/local/java; export JAVA_HOME

    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

    ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
    export ORACLE_HOME

    ORACLE_TERM=xterm; export ORACLE_TERM

    NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
    export NLS_DATE_FORMAT

    TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

    ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

    PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
    PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
    PATH=${PATH}:/u01/app/common/oracle/bin
    export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
    export LD_LIBRARY_PATH

    CLASSPATH=$ORACLE_HOME/JRE
    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
    export CLASSPATH

    THREADS_FLAG=native; export THREADS_FLAG

    export TEMP=/tmp
    export TMPDIR=/tmp

    umask 022
    #-----------------------------------------------------------------------------------------------------------------

    Login Script for grid user: # ---------------------------------------------------

    [oracle@OEL7 ~]$ su - grid
    Password: 
    [grid@OEL7 ~]$ echo > .bash_profile

    [grid@OEL7 ~]$ vi .bash_profile

    Copy and paste following and save the .bash_profile. You may skip lines in red color

    #.bash_profile
    # ---------------------------------------------------
    # OS User: grid
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    ORACLE_SID=+ASM; export ORACLE_SID
    JAVA_HOME=/usr/local/java; export JAVA_HOME
    ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
    ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME
    ORACLE_TERM=xterm; export ORACLE_TERM
    NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
    TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
    ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

    PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
    PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
    PATH=${PATH}:/u01/app/common/oracle/bin
    export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
    export LD_LIBRARY_PATH

    CLASSPATH=$ORACLE_HOME/JRE
    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
    export CLASSPATH
    THREADS_FLAG=native; export THREADS_FLAG
    export TEMP=/tmp
    export TMPDIR=/tmp
    umask 022
    #----------------------------------------------------------------------------------------------------------

    Set resource limits for Oracle software installation
    To improve the performance of the software on Linux systems, you must increase the following resource limits for the Oracle software owner users ( grid).
    For oracle user it has been automatically setup by the oracle-validated tool.
    To make these changes, run the following as root:
    Add the following lines to the /etc/security/limits.conf file 
    [root@OEL7 ~]# vi /etc/security/limits.conf
    Enter following line at the end of file. 
     grid soft nproc 2047                                                                                                              grid hard nproc 16384                                                                                                                grid soft nofile 1024                                                                                                              grid hard nofile 65536
    Add or edit the following line in the /etc/pam.d/login file, if it does not exist:

    [root@OEL7 ~]# cat >> /etc/pam.d/login <<EOF
    > session required pam_limits.so
    > EOF

    Add the following lines to the /etc/profile file by running the following command:

    [root@OEL7 ~]# cat >> /etc/profile <<EOF

    > if [ \$USER = "oracle" ] || [ \$USER = "grid"] ; then

    > if [ \$SHELL = "/bin/ksh" ]; then

    > ulimit -p 16384

    > ulimit -n 65536

    > else
    > ulimit -u 16384 -n 65536
    > fi
    > umask 022
    > fi
    > EOF

    Install oracle ASM package and create ASM disk groups:

    Check if oracleasm-support package is installed or not by running following command
    rpm -qa | grep oracleasm
    If installed then go with Next step to install oracleasmlib, otherwise install it



    One more package we need to install is oracleasmlib-2.0.12-1.el7.x86_64.rpm. Download it from this link and install


    Configure and load ASM kernel module as root user


    The script completes the following: 
    Creates the /etc/sysconfig/oracleasm configuration file
    Creates the /dev/oracleasm mount point

    Enter Following lines to load the Oracle ASM kernel module

    [root@oel7 ~]# /usr/sbin/oracleasm init

    This will load the oracleasm module


    Now Create Oracle ASM Disk Volumes, Check the available disks


    We have three disks available for ASM. Now we have to create partitions to be able to use those partitions as ASM disks.






    Reboot the system to apply the changes. To List ASM disk run following. 


    Test disk discovery


    Now we have to install Oracle Grid Infrastructure, login as grid user browse the path up-to grid extracted folder and run the installer.


    Before Running Root scripts we need to install Opath 18370031. If you have support account download the patch and install as grid_home Owner which is grid user.

    ORACLE_HOME is grid users ORACLE_HOME and /home/Downloads is the directory where we extracted the patch 18370031



    Open a new terminal window change the user to root and run the scripts.

    Click OK after running Root Scripts and you will see.


    At this moment we have Oracle ASM instance and related services up and running:



    To verify the installation execute the following as user grid



    Check sqlplus



    Create ASM disk group for Oracle Database Installation (+FRA and +DATA)
    As a grid user run asmca (ASM Configuration Assistant)













    Now we have to install the Oracle database 11gR2. Logout and login with user root and change the password for user oracle as we didn't set the password for user oracle:

    To set the password run following command
    [root@oel7 ~] passwd oracle

    Login with user oracle and extract the database archives. and you will see a folder database





    You may face error like following.

    Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk'.
    Following is the work around for above error.

    In /u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk
    Look for the line $(MK_EMAGENT_NMECTL)

    Change it to $(MK_EMAGENT_NMECTL) -lnnz11

    Click Retry and Setup will continue. 











    Oracle Database 11gR2 software has been installed successfully.  Now we have to create the database using dbca with user oracle. 

    [oracle@oel7 ~]$ dbca &



     



















    Database has been created successfully. Now we can use sqlplus to connect to database or Enterprise Manager Database Control from a browser. 

    Lets Check sqlplus and unlock Sample Schema. 


    Open Browser to check Enterprise Manager Database control.


    That's all. We have successfully installed oracle database 11gR2 11.2.0.4 with ASM on a Stand alone Oracle Linux 7.1

    Cheers:-)