Presentation is loading. Please wait.

Presentation is loading. Please wait.

INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT

Similar presentations


Presentation on theme: "INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT"— Presentation transcript:

1 INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
(a user guide)

2 PROVISION/ CREATE 2 VIRTUAL MACHINES WITHIN MICROSOFT AZURE:
Windows 2012 R2 server (setup as a Domain Controller). a Linux Ubuntu Server (for installing and setting up apache2 server).

3 CREATING A LINUX UBUNTU SERVER (CONSIDERING YOU ALREADY HAVE KNOWLEDGE AND HAVE SET UP YOUR WINDOWS 2012 R2 SERVER, FOR YOUR DOMAIN CONTROLLER*): Click “new”, as indicated by the arrow below. Click “from gallery”, as indicated by the arrow below.

4 VIRTUAL MACHINE (VM) CREATION: (A QUICK WALK THROUGH GUIDE)
Select the ubuntu server vm: Add the following vm name, user name, and password.

5 VIRTUAL MACHINE (VM) CREATION: (A QUICK WALK THROUGH GUIDE CONTINUED*)
Only change the cloud service, in this section. Select your domain controller (the other fields will population automatically*):

6 VIRTUAL MACHINE (VM) CREATION: (A QUICK WALK THROUGH GUIDE CONTINUED*)
Finish the VM creation process: in the future, start your machine after the DC is active.

7 IMPORTANT: ENSURE YOU HAVE YOUR DOMAIN CONTROLLER RUNNING, BEFORE YOU START YOUR UBUNTU SERVER (OTHERWISE, YOU WILL GET AN ERROR, SIMILAR TO THE FOLLOWING SLIDE):

8 YOU WILL GET “FAILED TO START” ERROR, IF YOU ATTEMPT TO START THE LINUX UBUNTU SERVER BEFORE THE DOMAIN CONTROLLER:

9 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (DOWNLOAD THE SSH PROGRAM “PUTTY” FROM A SITE LIKE FROM THIS LINK): It should bring you to this site, download and run the exe, after saving the program. Enter your VM name (for instance, cardc01.cloudapp.net)

10 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (CONTINUED)
you may get a prompt like the following; simply click Yes to continue. Log in with username (the password will not show, as you enter it).

11 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (INSTALLING AN UPDATE AND INSTALLING APACHE2): Enter the command “sudo apt-get update”. look at the end of the list, to ensure some packages were “fetched”.

12 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (INSTALLING AN UPDATE AND INSTALLING APACHE2 CONTINUED): run the command “sudo apt-get install apache2”, to install apache2: Select “y” for yes to download the required packages:

13 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (INSTALLING AN UPDATE AND INSTALLING APACHE2 CONTINUED): Carry on with new installed packages: run the command cd /etc, then run a ‘ls’.

14 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (INSTALLING AN UPDATE AND INSTALLING APACHE2 CONTINUED): We are about to edit the files “hostname & hosts”. Run the command Sudo nano /etc/hostname (it should be blank, as shown).

15 CONFIGURE NETWORKING AND TEST CONNECTIVITY WITH OTHER COMPUTERS ON THE NETWORK:
Edit the text file with the following IPv4 information. you can edit the name with your “machine name”; as indicate by the arrow.

16 INSTALL THE APACHE2 WEB SERVER ADMINISTRATION SOFTWARE: (INSTALLING AN UPDATE AND INSTALLING APACHE2 CONTINUED): We are about to edit the file “ hosts” (sometimes this file has auto updated from your hostname changes*). Run the command Sudo nano /etc/hosts (it should be blank, as shown).

17 CONFIGURE NETWORKING AND TEST CONNECTIVITY WITH OTHER COMPUTERS ON THE NETWORK:
Edit the text file with the following IPv4 information. again, edit the name to whatever is suitable for your setup; as indicate by the arrow.

18 CONFIGURE NETWORKING AND TEST CONNECTIVITY WITH OTHER COMPUTERS ON THE NETWORK (CONTINUED):
Save and exit (press the ‘Ctrl’ key, and then the “x” key, and press enter). Restart Ubuntu, to ensure the changes are applied.

19 CONFIGURE NETWORKING AND TEST CONNECTIVITY WITH OTHER COMPUTERS ON THE NETWORK (CONTINUED):
After the machine has restarted, simply log back into the terminal, via PuTTY.

20 Confirm the setup is functioning, by running a ‘nslookup 127.0.0.1’
CONFIGURE NETWORKING AND TEST CONNECTIVITY WITH OTHER COMPUTERS ON THE NETWORK (CONTINUED): Confirm the setup is functioning, by running a ‘nslookup ’

21 CONFIGURE APACHE2 USING PUTTY, AND CREATE A NEW VIRTUAL HOST: (ENSURE YOU CAN HOST A SIMPLE WEB PAGE AND ACCESS IT FROM YOUR WINDOWS WORKSTATION/ THE DC). Run the following commands: It will look like the following, within your terminal:

22 We modify our permissions, run the command sudo chmod -R 755 /var/www
CONFIGURE APACHE2 USING PUTTY, AND CREATE A NEW VIRTUAL HOST: (ENSURE YOU CAN HOST A SIMPLE WEB PAGE AND ACCESS IT FROM YOUR WINDOWS WORKSTATION/ THE DC). We modify our permissions, run the command sudo chmod -R 755 /var/www

23 CREATING A DEMO WEBSITE PAGE:
Run the command nano /var/www/epru.com/public_html/index.html (this will be the web page you will later see in you dc*). enter the following html script, within your ”index.html” text file.

24 CREATING A DEMO WEBSITE PAGE (CONTINUED) & SETTING UP THE CONFIGURATION FILE (.CONF):
Press “Ctrl + x” to save & exit. Run the command sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/epru.com.conf

25 CREATING A DEMO WEBSITE PAGE (CONTINUED) & SETTING UP THE CONFIGURATION FILE (.CONF):
run the command Sudo nano /etc/apache2/sites-available/epru.com.conf Edit the serverName and the DocumentRoot with your details.

26 CONCLUSION: ENSURING THAT YOU CAN ACCESS YOUR LINUX SERVER USING AN SFTP CLIENT ON YOUR WORKSTATION:
Enter into your Domain Controller (DC). Enter: Machine name\username & password.

27 CONCLUSION: ENSURING THAT YOU CAN ACCESS YOUR LINUX SERVER USING AN SFTP CLIENT ON YOUR WORKSTATION:
Click yes. open the server Manager/local server, Tools, then DNS to open the DNS Manager. once the popup appears, click on New Zone; form the forward lookup zones folder.

28 CONCLUSION: ENSURING THAT YOU CAN ACCESS YOUR LINUX SERVER USING AN SFTP CLIENT ON YOUR WORKSTATION:
Enter the appropriate details and at the end; select “allow both non secure and secure dynamic updates”. enter into your forward lookup zone new folder created; after the wizard has finished (select New Host ):

29 CONCLUSION: ENSURING THAT YOU CAN ACCESS YOUR LINUX SERVER USING AN SFTP CLIENT ON YOUR WORKSTATION:
Enter the appropriate details and click “add host”. Finally, we simply need to open a browser and enter the address details (for instance, I entered and in another tab, to ensure both were setup and functioning correctly*).

30 CONCLUSION (SUMMARY):
What we have achieved: Created a new Linux Ubuntu server virtual machine . Updated packages for the Linux server. Installed apache2 Linux server on ubuntu. Created and edited hosts and configuration files as per setup requirements. Created html web page and saved the script (ready to view via a browser in the domain controller*). Finally, confirmed the Linux ubuntu/ apache2 server web page was accessible and viable, via another workstation (the Windows 2012 R2 server DC).


Download ppt "INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT"

Similar presentations


Ads by Google