This is the ldap structure i am going to add to the configurations.You can change the this structure if you want.
1. Install the Centos7 Server Version and Configure the Server
For creating virtual machine for Centos7 64bit version first select “Crete virtual machine” selection from the home screen of VMware workstation 12. Then Select “Typical” selection and go for next step.
Select “I will install the operating system later” for create only the virtual machine without installing the operating system and keep that process for later.
Once you successfully complete the above task must decide what kind of an operating system this virtual machine for. As per the requirement of this Assignment select Linux. Then give the proper name for the virtual machine.
This screen is for select physical disk size of the virtual machine by default it is 40 GB. But it is changeable for the requirement of the user and the way of saving the virtual machine files selection also here from that.
Using customize hardware option must change the RAM size to four GB or more because we are planning to install mail server.
Select the ISO image file to
install the centos7
1.1.2 Installing the Operating System
Select the language and date and time to install the operating system
Select the base environment as “infrastructure Server” because we are planning to install the server without GUI. Also install the addons below mention.
• Debugging Tools
• Compatibility Libraries
• Development Tools
• Security Tools
• Debugging Tools
• Compatibility Libraries
• Development Tools
• Security Tools
Set the host name of the PC “centos7-server.csa.lk” Also set
the root password in password section. You can set user in the user section. In
this scenario create “csa” user and give the password and set this user as an
administrator.
1.2 Create the Virtual Network Adapter
Create the VMnet3 and set the IP address given below. We are creating a network inside the virtual machine to connect server and virtual machines. That is the purpose of create VMnet 3 connection.
Subnet IP: 10.0.2.0
Subnet mask: 255.255.255.0
In the virtual machine create the separate network adapter
for network address translation method (NAT) because for the installation
process want to connect to the internet.
Network Adapter: Custom (Vmnet 3)
Network Adapter 2: NAT
1.3 Setup the Network Using Network Manager
In the centos 7 server support NMTUI and NMCLI In this Figure shows how to configure network connections using GUI method.
Select the “Edit a connection” then press OK. Then select
the adapter “eno16777736” and give this configuration.
- Profile name: Local
- IPV4 configuration: manual
- Address: 10.0.2.2/24
- Gateway: 10.0.2.1
And select the “Automatically connect” Because we want to
connect this connection activate automatically when the server Boot up.
After select the other adapter “eno33554984” and set the
IPV4 configuration as “Automatic”
We can deactivate and activate connections using “Activate a
connection” option using.
1.4.1 Install the DHCP Server
First login as a root user and give below command to install
the DHCP package.
# yum install dhcp
1.4.2 Edit the DHCPD file and DHCPD.CONF file
First, we must configure which interface we want to install the dhcp service. To do that we have to add entry to dhcpd file. Go to this path “vi /etc/sysconfig/dhcpd” then enter the following command
DHCPDARGS=eno16777736
To edit the dhcp.conf file we must get example file to give his command to get the copy of the file
#cp /usr/share/doc/dhcp-4.2.5 /dhcpd.conf.example /etc/dhcp/dhcpd.conf
It will ask to overwrite the file then give YES to overwrite the file.
Edit the dhcpd.conf file give this command
# vim /etc/dhcp/dhcpd.conf
Then edit the following entries to the dhcpd.conf file.
option domain-name "csa.lk";
authoritative;
subnet 10.0.2.0
netmask 255.255.255.0
routers 10.0.2.1;
option broadcast-address 10.0.2.255;
Then comment the other unwonted entries as in the figures.
1.4.3 Start and View the Status of the DHCP Service
View the dhcp service status give this command “systemctl status dhcpd”
Start the dhcpd service give this command “systemctl start dhcpd”
1.5 Change the Host File
Host file is the file map hostname to the IP addresses. Go to the following path and add your server hostname and server IP address.
#vi /etc/hosts
Then give type this statement
#10.0.2.5 centos7-server.csa.lk
1.6 Setup the Domain Name System (DNS)
DNS is the named service to map the domain names to ip
address. DNS is hierarchical implementation. DNS have forward and reverse
lookup zones reverse lookup zones used to check correct IPs. This mechanism
used in Internet service providers (ISP).
1.6.1 Install the Package
To install the DNS server on centos7 we must download the packages.to do that give this command. Then it will download the necessary package. Download the package need valid internet connection so you must enable the NAT connection using NMTUI command.
#yum install -y bind*
1.6.2 Edit Forward and Reverse File
For the DNS need the zone files to look the domain named and IP addresses so you must create the forward and reverse zone files. The zone file must create in the named directory.
# cd/var/named/
#vim forward.csa.lk
#vim reverse.csa.lk
forward and revers zone file entries shown in the figures
$ORIGIN csa.lk.
$TTL 86400
@ IN SOA centos7-server.csa.lk root.csa.lk. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ) ;Minimum TTL
@ IN NS centos7-server.csa.lk.
@ IN A 10.0.2.5
centos7-server IN A 10.0.2.5
fedora28-client1 IN A 10.0.2.10
centos7-server IN MX 10 10.0.2.5
NS -- NAME SERVER
$TTL 86400 -- Time
to live
$TTL 86400
@ IN SOA centos7-server.csa.lk. root.csa.lk. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
60480 ;Expire
86400 ) ;Minimum TTL
@ IN NS centos7-server.csa.lk.
@ IN PTR csa.lk.
centos7-server IN A 10.0.2.5
fedora28-client1 IN A 10.0.2.10
5 IN PTR centos7-server.csa.lk.
10 IN PTR fedora28-client1.csa.lk.
1.6.3 Edit the Name.conf File
To edit the configuration file of the named service you must go to the named directory and edit the “named.conf” file. In the named.conf file have defined forward and reverse zone files.
# listen-on port 53 {127.0.0.1; 10.0.2.5 ; };
# allow-query { localhost; 10.0.2.0/24 ; };
##forward
zone "csa.lk" IN{
type master;
file "forward.csa.lk";
allow-update{none;};
};
##reverse
zone "1.0.10.in-addr.arpa"IN{
type master;
file "reverse.csa.lk";
allow-update{none;};
};
1.6.4 Add the Ports to the Firewall
We must add the port the server listens on. otherwise firewall will block the port.
#Firewall-cmd --permanent --add-port=53/udp
Then restart or reload the firewall
#Firewall-cmd –reload1.6.5 verify the Named.conf, Forward and Reverse File Statements
Before starting the named service, we must check the configuration errors in named.conf file, forward and reverse file.to do that give this command it will give if you have any errors otherwise it will prompt to next line.
#named-checkconf /etc/named.conf
#named-checkzone csa.lk /var/named/forward.csa.lk
#named-checkzone csa.lk /var/named/reverse.csa.lk
1.6.6 Start and View the Status of the DNS Service
After configuring DNS we have to start the service to do
that give this command.
#systemctl start named
OR
#service named start
To view to status of the DNS service give this command
#systemctl status named
OR
#service named status
1.6.7 View the DNS Server Information Using Dig Command
To view the named server information, give this command if there is any errors you can find using this command.
1.7 Install the Graphical User Interface (GUI)
We are planning to install Zimbra mail server, so we must install the GUI to the server or you must SSH to the server or log to the mail using client PC or host PC.
To install the GUI
# yum install “GNOME DESKTOP” “Graphical Administration Tools”
#yum install “server with GUI”
Then follow the below figures.
You can give the server host name
No comments:
Post a Comment