If you want to install *.rpm files under Debian you could use alien.
1 2 |
apt-get install alien alien -i package.rpm |
In this article I wrote about the Linux-Kernel and the GNU-Project, together they are called GNU/Linux.It is an Unix like Operating system and in the most cases POSIX-compliant and open source.The Kernel was firs released in the year 1991 from Linus Torvalds.
GNU/Linux is often used for Servers, there are a lot of open source software for work, a very powerful Shell and you have always Perl on the System.And the System needs not as much resources as Microsoft Systems.
I regularly use Debian or Mint,Debian is more stable, more for Servers and you could make a minimal installation with or without an GUI.Mint is more for Desktop users with a good looking Desktop.
For more take a look in the GNU/Linux Bash – Category
This is an collection of problems and bugs I had with Backtrack 5 R2 (Linux based Distribution).
To download Backtrack look at http://www.backtrack-linux.org/downloads/
Ubuntu software centre and update manager
For more Software, I installed the ubuntu software centre with this command:
1 |
sudo apt-get install software-center |
then run a update:
1 |
sudo apt-get update && apt-get dist-upgrade |
now you could choose your software sources at:
System > Administration > Software Sources
If you want the Update manager, run this:
1 |
sudo apt-get install update-manager |
Or you could add the ubuntu repository to your system, just open the “/etc/apt/sources.list” file and generate a list from http://repogen.simplylinux.ch/generate.php, now you could add what you want.
NVIDIA or ATI/AMD driver
NVIDIA: http://www.nvidia.de/Download/indexsg.aspx?lang=de
just run it from your download folder.
ATI/AMD: http://support.amd.com/us/gpudownload/Pages/index.aspx
Code:
1 2 3 |
sudo sh amd-driver.run --buildpkg Ubuntu/lucid sudo dpkg -i fglrx*.deb sudo aticonfig --initial -f |
After a reboot you could check your driver status with:
1 |
fglrxinfo |
Network
If you need more features at your network just install what you need:
network-manager-openvpn – network management framework (OpenVPN plugin core)
network-manager-openvpn-gnome – Network Management framework (OpenVPN plugin GNOME GUI)
network-manager-pptp – network management framework (PPTP plugin)
network-manager-pptp-gnome – network management framework (PPTP plugin)
network-manager-vpnc – network management framework (VPNC plugin core)
network-manager-vpnc-gnome – network management framework (VPNC plugin GNOME GUI)
network-manager – network management framework daemon
network-manager-dev – network management framework (development files)
network-manager-gnome – network management framework (GNOME frontend)
1 2 3 4 5 6 7 8 9 |
sudo apt-get install network-manager-openvpn sudo apt-get install network-manager-openvpn-gnome sudo apt-get install network-manager-pptp sudo apt-get install network-manager-pptp-gnome sudo apt-get install network-manager-vpnc sudo apt-get install network-manager-vpnc-gnome sudo apt-get install network-manager sudo apt-get install network-manager-dev sudo apt-get install network-manager-gnome |
Add the Network icon to the panel:
1 2 3 4 |
echo auto lo > /etc/network/interfaces echo iface lo inet loopback >> /etc/network/interfaces service network-manager start nm-applet & |
network is blocked
To solved this run this:
1 |
sudo rfkill unblock all |
Disable bell in terminal
open the file “/etc/inputrc” and add this:
1 |
set bell-style none |
Mint backup
run this:
1 2 |
sudo add-apt-repository ppa:webupd8team/mintbackup && sudo apt-get update sudo apt-get install mintbackup |
BUG : wait for sound system to respond
System > Preferences > Startup Applications add this:
1 |
/usr/bin/pulseaudio |
BUG : Couldn’t execute command: xscreensaver-command -lock
run this command:
1 |
apt-get install xlockmore gconf-editor |
System > Preferences > Keyboard Shortcuts
Lock Screen disable.
Add new “Ctrl+Alt+L” with “xlock” ,apply done!
BUG : Chrome wont start as root
Menue>Internet>Chrome>Properties>Comand and add this:
1 |
/usr/bin/chromium-browser %U --user-data-dir www.google.at |
BUG : run a *.deb
1 |
sudo dpkg -i name.deb |
BUG : E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf)
Solution A:
open “/etc/apt/apt.conf.d/70debconf” and add this:
1 |
APT::Cache-Limit "100000000"; |
then run this:
1 |
sudo apt-get clean && sudo apt-get update --fix-missing |
Solution B:
open “/etc/apt/apt.conf.d/90user” and add this:
1 |
APT::Cache-Limit "100000000"; |
BUG : GRUB2 error: out of disk
1 2 |
sudo mount /dev/sda1 /mnt sudo grub-install --root-directory=/mnt /dev/sda |
BUG : VLC is not supposed to be run as root. Sorry.
1 2 |
sudo apt-get install ghex ghex2 /usr/bin/vlc |
In line 7F8, replace “geteuid” with “getppid”.
I searched a long time for the right NAS, because it should need some things that important for me :
And I choosed the ds415+ for 513€ because it seems the best solution for me.Because its have a very fast XOR(for RAID5) and AES(for encryption) performance, is based on Linux Kernel and seems one of the best NAS Systems on the market.After some days I got it and here it is:
Hardware
Overview
RAM
Then I upgraded the RAM with a “Kingston 8GB DDR3 1600MHz Non-ECC CL11 SODIMM” for 70€, that is not really necessary but I need a big cache for my database.This is the ram usage just with some apps running:
Hard disk
I created a RAID5 with 4 WD40EFRX.One of them cost about 170€ that’s not cheap but for 4TB at this good quality it is okay.I chose the RAID5 over RAID10 because so i get the size of 3 disks and not only 2, the performance is more than the network can handle.
Here we see that volume1 has a size about 10.8T that’s very much space.
1 2 3 4 5 6 7 |
SNAS> df -h Filesystem Size Used Available Use% Mounted on /dev/md0 2.3G 727.5M 1.5G 32% / /tmp 3.9G 236.0K 3.9G 0% /tmp /run 3.9G 1.7M 3.9G 0% /run /dev/shm 3.9G 0 3.9G 0% /dev/shm /dev/md2 10.8T 1.2T 9.6T 11% /volume1 |
Here we get a little Benchmark about the Hard disk, we see reading is more than enough, and the most of the time i read from the disk.
1 2 3 4 5 |
SNAS> hdparm -Tt /dev/md2 /dev/md2: Timing cached reads: 2962 MB in 2.00 seconds = 1481.56 MB/sec Timing buffered disk reads: 1018 MB in 3.01 seconds = 338.72 MB/sec |
For more Information about Benchmarks see Benchmark Your System.
This is the Writing, we could see the network is the bottle neck, I use only one LAN Port because my main board cant handle more.here I moved a file via FTP to my NAS its only writing:
Its about 75MB/s what’s a good value is for a RAID5.
Webserver
I have the problem that every connect to my homepage lets my HDDs spin up, so I tried to mount a USB into the File system to host my Page and MySQL on it.
At first we need a USB stick and change the File system, make 2 Partitions.One of them for the database one for the Web page, I choose 1/3 to 2/3 of the Stick size.And its better if the USB supports USB 3.0, now we connect to our NAS via SSH and look what’s the name of our Stick:
1 2 3 |
df -h /dev/sdq1 7.4G 144.8M 6.8G 2% /volumeUSB1/usbshare1-1 /dev/sdq2 21.6G 171.9M 20.3G 1% /volumeUSB1/usbshare1-2 |
Before we make some changes shut down your word press, phpmyadmin and database !
Okay now we copy our web and mysql folder to our USB stick.Importand is to only move the mysql database and not the postgress because the postgress is needed in the start-up and your NAS would crash.
1 2 |
cp -r -p ./web/ /volumeUSB1/usbshare1-2/web cp -r -p ./@database/mysql /volumeUSB1/usbshare1-1/@database/mysql |
Now we make a copy about our Directory’s, if it crash we could move it back.
1 2 |
mv web web_BACKUP mv @database/mysql @database/mysql_BACKUP |
Okay now we need a folder to mount our new files from the stick.
1 2 |
mkdir web mkdir @database/mysql |
Now we could mount the Stick, its important to mount it after every reboot.
1 2 |
mount -o bind /volumeUSB1/usbshare1-2/web/ /volume1/web mount -o bind /volumeUSB1/usbshare1-1/@database/mysql /volume1/@database/mysql |
Now we could turn on our web services.If you use phpmyadmin and MariaDB it could be useful to take a look at phpMyAdmin and Mysql Cache tuning.
Noise
If you have it in a room where you work its no problem, if its completely silent you can hear it a little bit.I turned it on silent mode.
Power
The Power usage is between 12W and 40W.
working | 30-50W |
start up | 38W |
waiting | 32W |
sleeping | 20W |
Conclusion
All together its a very good NAS and I would buy it again.But if you look at a cheap solution for backup and web space look at Silent PC for 260€ it also need less power.
If you want to limit your bandwidth in Linux you could use trickle or wondershaper, to limit a process use this:
1 |
trickle -u 100 -d 500 wget http://example.com |
trickle -u[up] -d [down] [program]
for a global limit use:
1 |
wondershaper eth0 500 100 |
wondershaper [interface] [down] [up]
for remove :
wondershaper clear [interface]
For creating a ram disk in Linux use this:
1 2 |
mkdir /media/myramdisk mount -t ramfs ramfs /media/myramdisk |
its not possible to set a size, so watch out of your system memory!
to ad a alias in Linux, edit this config:
1 |
nano /etc/bash.bashrc |
as example:
1 |
home='cd ~' |
to reload the config use:
1 |
bash |
To get some infos about your GNU/Linux OS run this:
1 |
lsb_release -a |
Result looks like:
1 2 3 4 5 |
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.8 (wheezy) Release: 7.8 Codename: wheezy |
to avoid rootkits in Linux install rkhunter an chkrootkit:
1 |
apt-get install rkhunter chkrootkit |
to run rkhunter use this :
1 |
rkhunter --check |
and for chkrootkit this :
1 |
chkrootkit |
to add a name server in Linux use this :
1 |
echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/head |