avatar

iSCSI server with OpenSuse

August 7, 2017 in Web Server

iSCSI server with OpenSuse.

 

In this tutorial i will try to demonstrate how you can create an iSCSI target and then mount it on another machine.

For that i will use the latest available OpenSuse at this time which is the Leap 42.3. I guess that this can be followed by other versions also.

login to OpenSuse, open a terminal and type:

sudo zypper update
sudo zypper install yast2-iscsi-lio-server

 

Once this is over then you need to open yast and then find and open the "iSCSI LIO Target".

On the first tab "Service" under the section:

"Service start"

Choose if you want the server to run automatically on startup of O.S. or manually.

"Firewall settings for SuSEfirewall2″

click the checkbox "Open port Firewall" if you want to let the system do it for you, otherwise you can also do that manually later on.

 


After that click on the next tab "Global" and the Discovery credentials. You can let that free by clicking the "No discovery Authentication’ 

 

On the last tab "Targets" we are going to define the Targets, but before we do so we need to prepare the partition. On this example i use  a secondary disk that it is attached to the computer as raw and has nothing on it. Go to yast again and open "Partitioner". A warning will come up and you can click yes. On the Partitioner click on the left "Hard Disks" and then select the disk that you wanna use. In my case it is the "/dev/sdb". Click on the "Add Partition", select "Primary Partition" and click "Next".  On the next window select "Maximum Size" in order to use the entire disk and then click "Next". If you asked about the role of this partition then select "Operating System" and "Next".

In the last step it is important to select "Do not format partition" and "Do not mount partition" and then click "Finish". 

Ok so now we can go back to "iSCSI LIO Target" and click on the last tab "Targets" and then click "Add". Now most of the textboxes are filled by the system and you can modify them if needed but i will let them to default for now. This should look like the following picture but with different Target name, Identifier, and IP address.

Click in "Add" so we can add our first and only in that case LUN. If you wish to add more just repeat the following process. The LUN number in the following window should be already there and if this is your first LUN then it should be "0″. Now the Path needs to be the path to partition that we created before. In my case it is /dev/sdb1/. you can also add a name but if you let it empty the system will create one for you. Click "OK" and "Next" on the next window.

Now you should be on the following window.

 

 

Click the "Add" and provide the Initiator name that are going to connect to that target. Only the initiators with the identical name will be able to connect. We will use this name later on when we will try to connect that from another machine. This name has a specific syntax and it has to be like that:

iqn:yyyy-mm.reversed.domain.name[:identifier]  or something like that: eui:yyyy-mm.reversed.domain.name[:identifier] I ll use the following but you can modify that as you wish "iqn.2017-04.eu.allaboutlinux:my.first.iscsi"

click "OK"

 

Now you should be able to see the target in the target list ans you can click Finish. The export is created and the server is running!

 

Mount the target into another computer in the same network.

lets try now to connect this to another computer. I ll use again another OpenSuse computer and after opening yast this time i will select "iSCSI Initiator". The first tab "Service" appears and you can select if that will run automatic on system boot or manually under the "Service Start" section. Then you need to specify the "Initiator Name" that we defined before. 

 

Now you need to go to the 2nd tab "Connected Targets" and click on "Add". On the upcoming screen you need to type the IP address of the iSCSI target and click next.

Now you should be able to see the target and you have to click on connect.

On the upcoming window under the "Startup" select "automatic" and the initiator will connect to the target automatically when the server is coming up. Click next and you will be able to see that the target is now connected. Click on "Next" and "Finish". Now you you should be able to see the disk under the list of your disks in the "Partitioner". Go to yast once again and click on "Partitioner".

The disk is not yet formatted nor mounted so lets to that. Right click on the disk and select "Add Partition" --> "Primary Partition" --> "Maximum Size" so we can use the whole disk. --> "Operating System" --> select the file system you wish to use and the mount point.

 

 

 

avatar

DNS Server in Ubuntu / Debian

December 4, 2015 in Services

Local DNS Server in Ubuntu Debian

What is a DNS

DNS stands for Domain Name System and its a service that associates domain names with ip addresses. Let me try to explain this a bit more.Since you are reading this article it means that you have typed my domain name (www.allaboutlinux.eu) or you found that link on another website. but when you are typing www.allaboutlinux.eu, your computer is not really able to know where this website is hosted and of course  computers are only good with numbers. So your computer will ask the DNS server about a domain name and the DNS server will reply with an ip address. Then your computer will contact that ip and hopefully the server behind that ip will reply. Enough with that lets start with the setup of the DNS server.

What you will need:

bind9 will be used in this tutorial and this one is the most widely used DNS in the world. BIND stands for Berkeley Internet Name Domain and was initially a project of 4 graduate students at the Computer Research Group at the University of California, Berkeley. Lets say now now that i have my DNS server (the one that we create now) at 172.16.10.1, my sql server at "172.16.10.12″, my Apache server at "172.16.10.15″, my file server at "172.16.10.17″, my router at "172.16.10.254″ and my computer at 172.16.0.101 all of them are at /24. so my network is working but i have to remember all the ips in order to connect to each server. and as my company growth i will have more servers and more workstations and that is making things more complicated. it would be easier if I had a way to connect to my sql server by just providing the name and not the ip and that is exactly what we will do here. Open a terminal and type the following commands.

sudo apt-get update

sudo apt-get install bind9

Now we need to define a name for our local zone. I will name this one "allaboutlinux.local" but you can choose whatever you want. more zones are also possible. All files that you will need to configure are in "/etc/bind/". lets define the new zone. Open the /etc/bind/named.conf.default-zones

sudo gedit /etc/bind/named.conf.default-zones

and add the following lines at the end of the document:

avatar

Install Ubuntu in VMware the easy way

October 12, 2015 in Install Ubuntu desktop edition 11.04, O.S.

Install Ubuntu 15.04 in VMware the easy way

Go to official website of Ubuntu and download the dvd http://www.ubuntu.com/download/desktop

Then if you don’t have already installed VMware go to the official site and download it:  https://my.vmware.com/web/vmware/downloads

NOTE!!! VMware workstation Player is free for home use but not for commercial use!!! Please check the EULA of VMware for more information!

Now we can start the installation:

Open VMware workstation player and click on "Create a New Virtual Machine"

Vmware_create_new_VM

Chose the installation media. if you have burned Ubuntu in a DVD you can insert that to your DVD drive and choose the first option or if you have it as an "iso" file then choose the second option and locate the iso file.

Vmware_Installation_Media

avatar

Install Google Chrome in Debian 8

October 10, 2015 in software

Install Google Chrome in Linux Debian

chromeGo to official website of Google Chrome and click on the "Download now" button.
Select the "64 bit .deb (For Debian/Ubuntu)", read the agreement and if you agree click on "Accept and Install" to download the installation package. Save the file to the default location ~/Downloads/.
the filename should look like that: "google-chrome-stable_current_amd64.deb"
after that open a terminal go to Downloads directory and try to install the package.

cd ~/Downloads/

sudo dpkg -i google-chrome-stable_current_amd64.deb

if you get an error like: "dpkg: dependency problems prevent configuration of google-chrome-stable:" it is because some dependancies are missing. To fix that enter the following command:

sudo apt-get -f install

Then you should be able to run the installation without problems:

sudo dpkg -i google-chrome-stable_current_amd64.deb

To run Google Chrome type in terminal "google-chrome" or click the icon in the menu.

avatar

Install Skype in Debian

October 10, 2015 in software

Install Skype in Linux Debian

Skype is a simply way to make voice or video calls or chat with your friends with IM (instant messages). Go to official site of skype (http://www.skype.com/en/) and click on "Download skype". Select Debian from the dropdown menu of distribution selection. Save the file in your Downloads directory. the file should be something like skype-debian_4.3.0.37-1_i386.deb where the "4.3.0.37-1_i386″ is the version of skype.

before we proceed with the installation if you are running a 64bit Debian we need to add 32bit compatibility in case that you dont have already.
open a terminal and type:

sudo dpkg --add-architecture i386

sudo apt-get update

sudo apt-get install lib32z1 lib32ncurses5

sudo apt-get update

Now move to Downloads and try to install the downloaded skype package:

cd ~/Downloads/

sudo dpkg -i skype-debian_4.3.0.37-1_i386.deb

At that point most likely the installation will fail due to some missing dependancies. to fix that issue the following command:

sudo apt-get -f install

Once that is finished then type again

sudo dpkg -i skype-debian_4.3.0.37-1_i386.deb

Now that all dependancies are there the installation will be able to finish normally.
In order to start skype either type in terminal "skype" or by clicking the skype icon in menu.

avatar

install latest Darktable in Debian 8

September 17, 2015 in software, Web Server

install Darktable in Debian 8

There is an easy way to install darktable in Debian by issuing the command "sudo apt-get install Darktable" but this one will install an old version of Darktable.
If you need the latest stable one then you need to follow those steps:
open a terminal and type:

sudo apt-get update

sudo apt-get build-dep darktable

sudo apt-get install libglew-dev libcanberra-gtk-module mesa-opencl-icd mesa-utils-extra

Now go to the official website http://www.darktable.org/ and download Darktable. you should get a file with a name like darktable-x.x.x.tar.xz where x is the version of Darktable.

go to Downloads directory and extract that file.

cd ~/Downloads/

tar xvf darktable-1.6.8.tar.xz

now go into darktable directory and start the build process by typing:

cd darktable

./build.sh

Then issue the following command to install it.

avatar

Install vmware player in Debian 8

September 17, 2015 in Web Server

Install vmware player in Debian 8

 

Download the installation files from vmware official site https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/ .

Now you should have a file like VMware-Player-12.0.0-2985596.x86_64.bundle.

open a terminal and execute it:

cd ~/Downloads/

chmod +x VMware-Player-12.0.0-2985596.x86_64.bundle

sudo ./VMware-Player-12.0.0-2985596.x86_64.bundle

This will bring up the installation dialog



You need to accept the agreement in order to continue. Take a look before you accept it.

avatar

Install Thunderbird in Debian 8

September 17, 2015 in software, Web Server

Install Thunderbird in Debian 8

Lets begin by downloading Thunderbird.

Visit the official Thunderbird site https://www.mozilla.org/thunderbird/ and click on Download button.

This will download a file like thunderbird-xx.x.x.tar.bz2 where "x" is the current version of Thunderbird.

Lets move that file in /usr directory.

sudo mv ~/Downloads/thunderbird-xx.x.x.tar.bz2 /usr/

Go to /usr and decompress Thunderbird:

cd /usr

sudo tar xvf thunderbird-xx.x.x.tar.bz2

Remove the compressed file:

sudo rm thunderbird-xx.x.x.tar.bz2

lets create the launcher. Press the "Super Key" (this one is located on your keyboard between "ctrl" and "alt". In windows world is also called "Windows Key")

then type "main menu"

main_menu

avatar

Install Filezilla in Debian 8

September 16, 2015 in Web Server

Install Filezilla in Debian 8

Lets begin by downloading Filezilla.

Visit the official Filezilla site https://filezilla-project.org/download.php?type=client and click on Download button.

This will download a file like FileZilla_x.xx.x_x86_64-linux-gnu.tar.bz2 where "x" is the current version of Filezilla.

Lets move that file in /usr directory.

sudo mv ~/Downloads/FileZilla_x.xx.x_x86_64-linux-gnu.tar.bz2 /usr

Go to /usr and decompress filezilla:

cd /usr

sudo tar xvf FileZilla_x.xx.x_x86_64-linux-gnu.tar.bz2

Remove the compressed file:

sudo rm FileZilla_x.xx.x_x86_64-linux-gnu.tar.bz2

lets create the launcher. Press the "Super Key" (this one is located on your keyboard between "ctrl" and "alt". In windows world is also called "Windows Key")

then type "main menu"

main_menu

avatar

install Firefox in Debian 8

September 16, 2015 in software

Install Firefox in Debian 8

Lets begin by downloading Firefox.

Visit the official Firefox site https://www.mozilla.org/en-US/firefox/ and click on Download button.

This will download a file like firefox-xx.x.x.tar.bz2 where "x" is the current version of Firefox.

Lets move that file in /usr directory.

sudo mv ~/Downloads/firefox-xx.x.x.tar.bz2 /usr

Go to /usr and decompress firefox:

cd /usr

sudo tar xvf firefox-xx.x.x.tar.bz2

remove the compressed file:

sudo rm firefox-xx.x.x.tar.bz2

lets create the launcher. Press the "Super Key" (this one is located on your keyboard between "ctrl" and "alt". In windows world is also called "Windows Key")

then type "main menu"

main_menu