Академический Документы
Профессиональный Документы
Культура Документы
labs
2012 PALOSANTO SOLUTIONS All rights reserved. This documentation is confidential and its intellectual property belongs to PaloSanto Solutions. Any unauthorized use, reproduction, preparation of derivative works, performance, or display of this document, or software represented by this document, without the express written permission of PaloSanto Solutions is strictly prohibited. PaloSanto Solutions, Elastix and Elastix logo design, trademarks and/or service marks belongs to MEGATELCON S.A. all other trademarks, service marks, and trade names are owned by their respective companies.
ELASTIX CERTIFICATION
Lab-2
Put the IP Address of your Elastix at Host Name (or IP address). After that click open. We must login as root user. Use the password you set at your Elastix installation.
labs
ELASTIX CERTIFICATION
Once you log in, you are ready to work on the console of your Elastix.
Lab-2
Instructions: This lab must be performed on a Linux command line console. Basic commands used in day-by-day Elastix management will be mentioned. All the text in blue must be written on the console for every example. When possible, a sample image will be shown to help you compare results. Listing files and directories
labs
List the contents of the /etc directory with additional information ls -l /etc
ELASTIX CERTIFICATION
Lab-2
List the contents of the /etc directory and show files and directories containing the word asterisk ls -l /etc/ | grep asterisk
Use the pwd command to see what directory you are currently in pwd
labs
From the directory /tmp/test go to the directory /tmp in absolute and relative form. cd ..
ELASTIX CERTIFICATION
Lab-2
At tmp/test create a file named test.txt. You can perform this in two ways:
File edition: Edit and save test.txt with the text editor application: vim. vim test.txt Once in vim, press INSERT key (the letter i is also an alternative) to enable edit mode, then write your name.
To save and exit press ESC key and write: wq. If you want to continue working on the file and save it without exit write just w.
labs
View the contents of test.txt (Enter the test directory first if you are not there) cat test.txt
ELASTIX CERTIFICATION
man ls
Lab-2
To return to the console line just press q Try it now with man yum man scp
or
Creating and managing Users At this point you should be at the directory tmp, go to the directoty root (/) with cd ..
labs
Note: This command ends the current session and starts a new one. If you are on an SSH client, your window will close, and start up the client again, where you can now login with another user. chmod: change mode command, change the file system modes of files and directories
ELASTIX CERTIFICATION
Lab-2
Create the directory /home/elx1/private which can only be read by elx1 mkdir /home/elx1/private Make the private directory readable only to user elx1 chmod 700 /home/elx1/private
Login as user elx2 and try to enter /home/elx1/private (You should not be able to get in). cd /home/elx1/private
cp: command used to copy a file; mv: command used to move a file
Copy the file test.txt in the same directory and change its name to test2.txt To perform this action it is necessary to indicate the current location of the file and the new location of the file. If the new location is the same, it is necessary to change the name of the file; otherwise Linux will ask if you want to overwrite the file. In this example we place the file in the same directory however you can copy the file and place it on another location. After you copy the file, execute ls l to enlist all the files available in the directory. cp /tmp/test/test.txt /tmp/test/test2.txt ls l /tmp/test
labs
Note: This exercise is important to make backup of files; you will find this useful when you configure your telephony hardware on Elastix and other stuff as well.
ELASTIX CERTIFICATION
Lab-2
Move a file to another location. Create the directory /tmp/test2. Once you have created the directory, move the file test2.txt from the directory /tmp/test to /tmp/test2. After you move the file, execute ls l to enlist all the files available in the directory /tmp/test2 mkdir /tmp/test2 mv /tmp/test/test2.txt /tmp/test2/test2.txt ls l /tmp/test2
The command move allows you to change the name of the file in the process; you just need to write the new name on the new location. Try moving the file test.txt located at /tmp/test to /tmp/test2 and changing its name to test3.txt mv /tmp/test/test.txt /tmp/test2/test3.txt
Remove the file test3.txt from its current location and execute ls to confirm the deletion of the file. rm /tmp/test2/test3.txt ls l /tmp/test2
Copy of a file from one remote location using a ssh port tunnel. This process allows you to send a file from one location to another, basically from one server to another.
labs
In the following example we will send the file install.log, from the IP address 192.168.1.65 to the IP Address 192.168.1.66. It is necessary to have the root password of the receiving server. scp install.log root@192.168.1.66:/opt
ELASTIX CERTIFICATION
Lab-2
Send the file /tmp/test2/test2.txt from your server to the /tmp/test directory of another attendee. Remember to ask the root password. scp /tmp/test2/test2.txt root@IP_address:/tmp/test Note: This process has the same logic of the copy and moving of files. If you want to change the name of the file (e.g. test4.txt) then the complete sentence should be scp /tmp/test2/test2.txt root@IP_address:/tmp/test/test4.txt Installation of Packages Login as root user
Install and uninstall the screen package Installation: yum install screen
You will be asked to confirm some actions, like download of packages, just put yes (y) and enter.
labs
ELASTIX CERTIFICATION
Lab-2
Uninstallation: yum remove screen You will be asked to confirm this action, just put yes (y) and enter.
labs
ELASTIX CERTIFICATION
Lab-2
Once you complete the download proceed to install the package: rkhunter-1.2.9-1.el5.rf.noarch.rpm rpm -ivh rkhunter-1.2.9-1.el5.rf.noarch.rpm
Network Configurations There are several ways to configure the IP Address and network configuration on your server. We will use a graphic functionality for this course. You can also setup your network configuration at the Elastix Web Admin Interface.
labs
ELASTIX CERTIFICATION
In this example we can see that our network device is eth0 and the IP Address assigned.
Lab-2
You will get the following window. Go to Network configuration and press enter (use the arrow keys)
labs
We select the right device and press enter. eth0 (eth0) - (This may vary according to your hardware).
ELASTIX CERTIFICATION
Lab-2
Fill your configuration details according to your network and uncheck Use DHCP (use the spacebar to check or uncheck). Press Ok when done.
labs
Here we can configure the Hostname and the DNSs. Press Ok when done.
ELASTIX CERTIFICATION
Lab-2
If we modified any network parameter, it is required to restart the service to apply the changes. service network restart
labs