ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Emad R
    3. Posts
    • Profile
    • Following 3
    • Followers 3
    • Topics 171
    • Posts 1,332
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: CentOS rsync between servers using keyfile to pass credentials

      Hi,

      I see scott gave you some answers, but I will try to break it down easier otherwise I missunderstood the question.

      So in server A and B
      run this

      ssh-keygen -t rsa

      And press enter to accept the defaults

      Now in both servers under the user account you will see hidden folder called .ssh which can be found

      /home/USERNAME/.ssh
      or
      /root/.ssh

      And inside this folder you will find :
      id_rsa.pub

      Copy the contents of this file in both servers A and B into a new file called and name it authorized_keys and place it in the same directory, for example server A will have key 123 server B will have key 456 in this authorized_keys it should have both entries.

      And bam thats it , this is SSH pasword less login, not sure if its the same thing but seems easier and better.

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: FreeNAS 10 Has Been Recalled

      @scottalanmiller

      True, adding the whole virtualization aspect and container support might caused this. I genuine when testing it out didnt like the new theme or steering me away from being storage server into something else.

      posted in News
      Emad RE
      Emad R
    • RE: Chosing an Enterprise Linux Server Distro

      +1 for primary application platform on Ubuntu.

      If you mean what I think you mean, I use Centos for General server stuff, basically a server that can handle anything or can be more than 1 thing, however for Ubuntu and cause of the snaps, I use Ubuntu for specific roles like :

      File server
      Or
      RockChat server

      For specific purpose roles.

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: Cars I Spot on the Road

      @scottalanmiller

      Peugeot 506 ?

      posted in Water Closet
      Emad RE
      Emad R
    • RE: How to deflate/shrink .qcow2 KVM virtual disk image ?

      @msff-amman-Itofficer @stacksofplates

      Got more usefull info, it seems it is cause of my -c switch:

      https://docs.fedoraproject.org/en-US/Fedora/18/html/Virtualization_Administration_Guide/sect-Virtualization-Tips_and_tricks-Using_qemu_img.html

      Convert

      The convert option is used to convert one recognized image format to another image format.
      Command format:

      qemu-img convert [-c] [-f format] [-o options] [-O output_format] filename output_filename

      Convert the disk image filename to disk image output_filename using format output_format. The disk image can be optionally compressed with the -c option, or encrypted with the -o option by setting -o encryption. Note that the options available with the -o parameter differ with the selected format.

      Only the qcow2 format supports encryption or compression. qcow2 encryption uses the AES format with secure 128-bit keys. qcow2 compression is read-only, so if a compressed sector is converted from qcow2 format, it is written to the new format as uncompressed data.

      Image conversion is also useful to get a smaller image when using a format which can grow, such as qcow or cow. The empty sectors are detected and suppressed from the destination image.

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: How to deflate/shrink .qcow2 KVM virtual disk image ?

      @stacksofplates said in How to deflate/shrink .qcow2 KVM virtual disk image ?:

      Never tried to do this. You should be able to set the MAC as the same if you clone it.

      True, but only after you remove the original VM.

      I found solution btw, I used

      qemu-image clone -c -f qcow input.qcow2 -O qcow output.qcow2

      However it produced 6 GB qco2w image, Working 100% like the original, but the original is occupying 13 GB of disk space, perhaps it also did compressing, however when you clone you will get 13 GB new VM, which is correct.

      My scenario is the following my base windows 7 VM used space is 12-13 GB

      I download big files worth of 5 GB then delete them, thus space is counted in the Hypervisor but not in the VM cause I delete the big files as soon as the download finishes (I am simulating ESXi stuff in KVM)

      So you can say I got my answer but I wonder if compressing the images affected the performance.

      posted in IT Discussion
      Emad RE
      Emad R
    • How to deflate/shrink .qcow2 KVM virtual disk image ?

      Hi,

      What is the equivalent of this in KVM Centos world:

      wipe free space from inside the guest os prior:

      Windows --> SDelete –z 😄
      Linux --> cat /dev/zero > zero;sync;sleep 1;rm -r -f zero

      then

      vmkfstools -K /vmfs/volumes/2nd_Disk_1TB_Purple/Win7_x64_SP1_Client.vmdk

      Which is punching zeros of an thin VM to get back the space in ESXi

      in Centos KVM world, the only thing I got close to working is cloning the whole VM, but that changes some details like MAC address, I tried

      virt-sparsify --in-place Windows_7x64.qcow2

      But that didn't work

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: Ubuntu News: Mark Shuttleworth Rumoured to be Returning to CEO Position

      Why so he f**k up Canonical more, all those failed plans where of his era:

      1. Ubuntu fail phone
      2. Ubuntu fail interface
      3. Ubuntu snap apps or packages and moving away far away from Debian unstable repo.

      The reason why Fedora/Centos works is cause of up-streaming, and Ubuntu long ago forgot about that and now they are swimming alone reinventing the wheel.

      posted in News
      Emad RE
      Emad R
    • RE: Substitutes for Active Directory and Windows Server

      @coliver

      Hi,

      Can Samba4 be used to push .msi packages to AD clients ? like I do on my Windows Group Policy management?

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: OS for display TV

      @hobbit666

      Windows 7 Embedded

      Its hard to find, cause its targeted at specific usage, but this is what I use in my house.

      It plays with everything nice, and I have AMD Mini ITX AM1 APU platform, and its great for drivers and running any other kind of software I need, and good drivers for GPU.

      I have used the thin client option, which gives me like Windows 7 32-bit without 3.5 frame work and the installation size is 2GB instead of 13 GB of normal windows 7. And much lighter on RAM as well.

      Using Linux OS watching Youtube videos are choppy not Linux fault, but AMD windows drivers are better.

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: New StarWind Virtual SAN Free - All restrictions removed!

      @DustinB3403

      Hopefully soon someone can make us guide about this, I am interested especially if we can pair it with KVM

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: Installing Frappe ERPNext on CentOS 7

      Hi,

      I think the guide needs additional steps:

      before :
      python install.py --develop --user frappe

      perhaps add:
      systemctl start mariadb
      systemctl enable mariadb
      mysql_secure_installation

      So we can use the root password of mysql when we run the installation script

      Also the below needs to be run from the user frappe, so you will need to exit if you are logged in as root, then login as frappe. (you can change the password for this user using passwd frappe)

      cd /home/frappe/frappe-bench
      bench new-site mysite
      bench get-app erpnext https://github.com/frappe/erpnext
      bench --site mysite install-app erpnext
      bench start &

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: Fresher/ beginner in Linux

      @scottalanmiller

      Sometimes that might scare people, and having GUI allows you to have web-browser on the same machine, thus you can easily open this site and copy and paste commands and learn.

      Some fresh users wont be able to virtualize and enable bidrectional copy/paste, but you do have a point that its useless GUI stuff will never come in servers.

      But it all depends on the user experience and what he means by fresh/new starter.

      posted in IT Careers
      Emad RE
      Emad R
    • RE: Fresher/ beginner in Linux

      @jimmynelson

      Sure thing.

      posted in IT Careers
      Emad RE
      Emad R
    • RE: Fresher/ beginner in Linux

      Hey,

      My advice is to install a couple of Linux Machines in virtual-box and make them all bridged and play with that.

      Dont go head on with Linux no gui approach if your fresh.

      Stuff like Ubuntu or Lunbuntu or Fedora, and play with installing packages and use the terminal as well for packages installation and moving between directories.

      If you want to fast forward your Linux learning, install it as dualboot or as the primary operating system in your machine, I did that while I studying university, it was Ubuntu 8.04 and 8.10 was so gorgeous back the in the day with the hole brown African theme.

      posted in IT Careers
      Emad RE
      Emad R
    • RE: Backup plan using Robocopy + 7-zip command line (7za.exe)

      @iroal
      Great minds think alike !

      Thanks for the addition, I'm researching right now and blat.exe seems very worthy looking and simple with good reviews on its Sourceforge page:
      https://sourceforge.net/projects/blat/

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: Best CA for SSL Certificates

      @scottalanmiller

      but how for the life of me I am unable to get valid SSL certficate on webserver running centos 6.8 with apache.

      The issue is that this server does not have domain, people access it using it is private IP:
      192.168.1.139

      How can I create an SSL for IP internal server, some users fail to click Advanced then proceed to this website in Google Chrome.

      And this internal server will remain internal and their is no need for it to be on WAN or the internet currently or the near future, what are my options ? even adding the certificate on users machines in Windows Trusted root certificate does not work for some reason, and is there any other option besides adding the certificates manually, can I use Wild Card SSL cert for this scenario ?

      posted in IT Discussion
      Emad RE
      Emad R
    • Backup plan using Robocopy + 7-zip command line (7za.exe)

      Hi,

      I know the community outgrew the Windows stuff, and favors Linux (Centos especially), but after being a reader in this community I wanted to share something, hopefully it might help someone and it is very Keep It Simple approach for backups for Windows environments and requires a Windows machine, preferably virtual machine, so here goes:

      1)Download 7za.exe from:
      http://www.7-zip.org/download.html

      Either (old stable) Download 7-Zip 9.20 (2010-11-18) for Windows:
      32-bit 7-Zip Command Line Version

      Or (latest stable) Download 7-Zip 16.04 (2016-10-04) for Windows:
      7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager

      2)Extract 7za.exe from those archives to the root of your 😄 drive (preferably the 32-bit version for broader compatibility).

      3)Now to create backup files you will need to use the following plan at the backup location (NAS) create 2 folders:

      · Archives
      · Mirror

      0_1491308731355_1.png

      Archives will have multiple versions of archives of the files you select to backup, while Mirror will always have latest sync of the backup, this is intended so we don’t archive the real source files, and instead we archive the Mirror folder.

      4)Now on the server that have access to the source files and backup location, create the following .cmd file (Supply_Unit_Backup.cmd) on the Desktop for example, in a folder called Scripts (optional).

      robocopy.exe /MIR "source folder" "backup Mirror folder"

      C:\7za.exe a –ttar "backup Archives folder\date and time in a windows batch script.tar" "backup Mirror folder"

      Real life example of the above:

      robocopy.exe /MIR "\192.168.1.200\Public\Supply Unit" "Z:\Supply_Unit_Backup\Mirror"

      C:\7za.exe a -ttar "Z:\Supply_Unit_Backup\Archives%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%__%TIME:~-11,2%hour.tar"
      "Z:\Supply_Unit_Backup\Mirror"

      Do note Robocopy command will do the sync or mirroring of the files, from the source folder to the Mirror folder, and it can support many useful argument, for example if you wish to grab/backup only excel files you can do the following:

      robocopy.exe /MIR "source folder" "backup Mirror folder" .xls .xlsx

      Also if you want to backup only specific files using robocopy, you will need to run this command instead:

      robocopy.exe /MIR "source folder" "backup Mirror folder" uCalendar.ini

      And as seen above basically anything that will be placed in the Mirror we will take archive snapshot of it on regular intervals, and robocopy is good with network shares and incremental backup runs.
      The 7za a –ttar is recommended (TAR format), but you can choose any other archiving/compression format, I think it makes sense to use 7z format, but the added bonus with .tar is that you can open it in Linux natively, and when you compare archiving file types with each other, there is no real performance winner. However if you want to compress files I highly recommend using 7z format, which can be done by this command:

      C:\7za.exe a "backup Archives folder\date and time in a windows batch script.7z" "backup Mirror folder"

      And this way you can compress and reduce your backup files sizes, However using tar archive (or 7z with zero compression) a.k.a archiving have its benefits against compression, it is much faster performed and you can test the archives easier, and theoretically reduces corrupt the chance of file corruption; cause it takes less time dealing with the file than with compression.

      Now create task with Windows task scheduler to execute the cmd by pointing Windows Task Scheduler to run the script inside the scripts folder at different intervals, depending on your work nature and selected files this can vary from weekly backups to 3 times a day backup.

      And you will have similar output like the below:

      0_1491308722433_2.png

      The fact that we used 24 hour naming scheme will make your life a lot easier recognizing those files, I guess the only limitations we have is with this script that it you can’t run it each 1-59 minutes otherwise it will keep overwriting the same file over and over, for example if you ran the script 2 times at 11:01 and 11:20, you will get only 1 backup file, however if you ran it at 11:01 and 12:01 (hourly based) you will get 2 backup files.
      For me this is not issue, cause I never handled situation where backups needed to be done on minutes bases, and I reckon that will be very interfering with the work, notice in the above screenshot I backup every 8PM + 1PM + 8AM, which translates in this company as after working hours when everybody leaves + break time + before working hours.

      4)Retention policy:

      Now that the backups are getting created you will notice that they can be populated quite easily, so you can create another cmd file (Purge_Backup.cmd) with the following command:

      forfiles -p "backup Archives folder" -s -m . -d -8 -c "cmd /c del @file"

      And have it run ok weekly basis, starting from the first working day of the week of the company, and what this will do is keep a week worth of backups always.
      A real life example of this will be:

      forfiles -p "Z:\Supply_Unit_Backup\Archives" -s -m . -d -8 -c "cmd /c del @path"

      You can list files without deletion by:

      forfiles -p "backup Archives folder" -s -m . -d -8 -c "cmd /c echo @file"

      *note: UNC paths (\machine\share) are not supported, you will need to MAP them to a drive letter.

      5)You can then test the backups manually (tar files) by selecting them all and right clicking them on the backup destination -> 7-zip -> test archive (you will need to have 7zip installed for the context menu to appear), or test from command line and schedule it, but I didn’t need to do this cause once you use archiving with zero compression format, everything just works. Especially since we move the files to another location first then we backup. This seems like a good method to backup but may not be appealing if you many large files.

      You can test backups using

      7za.exe t "backup Archives folder *.tar" >backup_log.txt

      Then open the txt file and ensure the backup test result is = "Everything is Ok".

      Extra Stuff:

      You can use 7za to capture many folders and generate 1 file using windows system variables and produce log and have notepad open it for end users, for example:

      7za.exe a -ttar "Backup%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%__%TIME:~-11,2%hour.tar" "%USERPROFILE%\Desktop" "%USERPROFILE%\Documents" "%USERPROFILE%\Contacts" "%USERPROFILE%\Music" "%USERPROFILE%\Pictures" "%USERPROFILE%\Videos"

      Will create backup folder, wherever you run this script and will take the following folders:

      Desktop Music Documents Pictures Contacts Videos

      And create singe tar archive out of them. Then using this command:

      7za.exe t "Backup*.tar" >backup_log.txt

      msg * Notepad will open shortly. Please ensure the backup test result is "Everything is Ok".

      notepad.exe backup_log.txt

      You can instruct users on how to verify that their backups are complete. This can work as no software approach for users to backup manually, you will be surprised with 7za engine and how fast it can capture data and create the archive, especially since there is no GUI involved. Also with a bit of tinkering and closing programs like Outlook automatically by the script you can actually make it work. I also use with the above script that is more targeted for users with a program called everything which search using indexing of NTFS volumes and I can pass it:
      Everything.exe -admin -s "*.pst | *.ost" which will show the user the location of their Outlook files, so they can add it in the backup folder, and tell them to only launch the script from inside of their N.A.S secure share on weekly/monthly basis.

      posted in IT Discussion 7za 7zip poor man backup robocopy backup
      Emad RE
      Emad R
    • RE: Installing Frappe ERPNext on CentOS 7

      @stacksofplates said in Installing Frappe ERPNext on CentOS 7:

      Did they remove their install script? If I remember right it used to handle the NGINX setup. You just had to pass whatever the production option was.

      +1 thanks for this, will play with it tonight.

      whats is the point of putting an NGinx proxy infont of this app in prod ? for load-balancing perhaps ?

      cause I usually run my web apps naked, as they are ...

      posted in IT Discussion
      Emad RE
      Emad R
    • RE: Linux File Server. Which One Would You Pick?

      Ubuntu Server :

      • Automated Security updates are easy to implement.

      • ufw is pleasure to work with.

      posted in IT Discussion
      Emad RE
      Emad R
    • 1 / 1