Kategoria - Linux - liczba wpisów 197
Debian, Ubuntu, Fedora

Brak eth0 po przywróceniu systemu z obrazu Kategoria: Linux | Tagi: eth, ubuntu, udev | Autor: Bartłomiej Gałęzia

rm /etc/udev/rules.d/70-persistent-nte.rules && reboot

w logach jest komunikat:

ERROR *** AGENT = Failed to send Prolog HTTP Status Code #500

 

Problem jest z konfiugracją do bazy mysql w apache2:

vim /etc/apache2/conf.d/z-ocsinventory-server.conf
PerlSetEnv OCS_DB_NAME ocsbaza
PerlSetEnv OCS_DB_LOCAL ocsbaza
PerlSetEnv OCS_DB_USER ocsuser
PerlSetVar OCS_DB_PWD ocspass

Nodimm Ubuntu - LXDE Kategoria: Linux | Tagi: gsettings, nodimm, ubuntu | Autor: Bartłomiej Gałęzia

gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
gsettings set org.gnome.settings-daemon.plugins.power active false



Ubuntu allow root ssh login Kategoria: Linux | Tagi: ssh | Autor: Bartłomiej Gałęzia

vim /etc/ssh/sshd_config

PermitRootLogin yes

service ssh restart

Debian Ethetape autostart Kategoria: Linux | Tagi: debian, etherape | Autor: Bartłomiej Gałęzia

touch ~/.config/autostart

vim ~/.config/autostart

[Desktop Entry]
Type=Application
Exec=sudo /usr/bin/etherape
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_GB]=etherape
Name=etherape
Comment[en_GB]=etherape
Comment=etherape

gnome-session-properties

Add

nazwa_polecenia

Nodimm debian - GNOME Kategoria: Linux | Tagi: debian, gnome | Autor: Bartłomiej Gałęzia

dconf-editor

lub

gsettings set

 

gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 0
gsettings set org.gnome.desktop.session idle-delay 0

SSHFS - montowanie folderów po ssh Kategoria: Linux | Autor: Bartłomiej Gałęzia

sshfs user@host:/home/user/folder /mnt/share -o allow_other
-p port


odmontowuje

fusermount -u /mnt/share

OCS Inventory server installation Kategoria: Linux | Tagi: debian, OCS | Autor: Bartłomiej Gałęzia

http://wiki.ocsinventory-ng.org/index.php/Documentation:Server/pl

Wymagania:

  • Apache wersja 1.3.33 lub wyższa / Apache wersja 2.0.46 lub wyższa.
    • Mod_perl wersja 1.29 lub wyższa.
    • Mod_php wersja 4.3.2 lub wyższa.
  • PHP 4.3.2 lub wyższa, z ZIP i wsparciem GD.
  • PERL 5.6 lub wyższa.
    • Perl module XML::Simple wersja 2.12 lub wyższa.
    • Perl module Compress::Zlib wersja 1.33 lub wyższa.
    • Perl module DBI wersja 1.40 lub wyższa.
    • Perl module DBD::Mysql wersja 2.9004 lub wyższa.
    • Perl module Apache::DBI wersja 0.93 lub wyższa.
    • Perl module Net::IP wersja 1.21 lub wyższa.
    • Perl module SOAP::Lite wersja 0.66 lub wyższa (opcjonalnie)
  • MySQL wersja 4.1.0 lub wyższa z aktywowanym mechanizmem składowania InnoDB.
  • narzędzie Make takie jak GNU make.=

 

Zobacz całość

OCS Agent install Linux Kategoria: Linux | Tagi: OCS | Autor: Bartłomiej Gałęzia

http://www.ocsinventory-ng.org/en/download/register-download-ocs-inventory-ng-agent-for-unix.html
http://wiki.ocsinventory-ng.org/index.php/Documentation:UnixAgent/pl

apt-get install dmidecode libxml-simple-perl libio-compress-perl libnet-ip-perl libwww-perl libdigest-md5-perl libnet-ssleay-perl
wget Ocsinventory-Unix-Agent-2.1.1.tar.gz
tar -xf Ocsinventory-Unix-Agent-2.1.1.tar.gz

cd Ocsinventory-Unix-Agent-2.1.1
perl Makefile.pl
make
make install

Debian Locale problem Kategoria: Linux | Tagi: debian | Autor: Bartłomiej Gałęzia

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB:en",
        LC_ALL = (unset),
        LC_TIME = "pl_PL.UTF-8",
        LC_MONETARY = "pl_PL.UTF-8",
        LC_ADDRESS = "pl_PL.UTF-8",
        LC_TELEPHONE = "pl_PL.UTF-8",
        LC_NAME = "pl_PL.UTF-8",
        LC_MEASUREMENT = "pl_PL.UTF-8",
        LC_IDENTIFICATION = "pl_PL.UTF-8",
        LC_NUMERIC = "pl_PL.UTF-8",
        LC_PAPER = "pl_PL.UTF-8",
& nbsp;       LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory

 

Rozwiązanie:

dpkg-reconfigure locales

Debian 10

sudo dpkg-reconfigure locales

Mod_perl apache install Kategoria: Linux | Tagi: perl | Autor: Bartłomiej Gałęzia

https://www.debian-administration.org/article/635/A_brief_introduction_to_mod_perl_-_Part_1

apt-get install libapache2-mod-perl2
a2enmod perl
/etc/init.d/apache2 restart

 

http://www.livejournal.com/doc/server/lj.install.perl_setup.modules.html

https://packages.debian.org/squeeze/libapache-dbi-perl

aptitude install libapache-dbi-perl
aptitude install libio-compress-perl
aptitude install libxml-simple-perl
aptitude install libnet-ip-perl
aptitude install libsoap-lite-perl
cpan> install Apache2::SOAP
/usr/bin/perl -mApache2::SOAP

http://wiki.ocsinventory-ng.org/index.php/Howtos:Install_OCS_on_debian

Remote shutdown linux - linux Kategoria: Linux | Autor: Bartłomiej Gałęzia

ssh-keygen
ssh-copy-id -i /root/.ssh/id_rsa.pub 10.12.13.14
ssh root@10.12.13.14 "poweroff"

Naprawa grub 2.0 po instalacji win7 Kategoria: Linux | Tagi: grub | Autor: Bartłomiej Gałęzia

https://help.ubuntu.com/community/Boot-Repair

1st option : get a CD including Boot-Repair

The easiest way to use Boot-Repair is to burn one of the following disks and boot on it.

Remark : you can also install the ISO on a live-USB (eg via UnetBootin or LiliUSB or Universal USB Installer).

2nd option : install Boot-Repair in Ubuntu

- either from an Ubuntu live-session (boot your computer on a Ubuntu live-CD or live-USB then choose „Try Ubuntu”) or from your installed Ubuntu session (if you can access it)

- connect to the Internet

- open a new Terminal, then type the following commands (press Enter after each line):

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)
boot-repair

Alternatywne rozwiązanie

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

sudo fdisk -l
sudo 
mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sda
grub-install --recheck /dev/sdX
update-grub
exit && sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt
reboot

Jak nie zadziała to spróbujcie to : http://askubuntu.com/questions/145241/how-do-i-run-update-grub-from-a-livecd

PGadmin install ubuntu Kategoria: Linux | Tagi: pgadmin | Autor: Bartłomiej Gałęzia

Phpmyadmin root password reset Kategoria: Linux | Tagi: phpmyadmin | Autor: Bartłomiej Gałęzia

sudo service mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('MYSECRET') WHERE User='root'; FLUSH PRIVILEGES; exit;
sudo pkill mysqld
sudo service mysql start

http://askubuntu.com/questions/321903/resetting-forgotten-phpmyadmin-password

Samba - NT_STATUS_BAD_NETWORK_NAME Kategoria: Linux | Tagi: samba | Autor: Bartłomiej Gałęzia

błędne uprawnienia, muszą być 755

chmod 755 /home/directory

service smbd restart

Proftpd + MySQL Kategoria: Linux | Tagi: do poprawki, ftp, mysql, proftpd | Autor: Bartłomiej Gałęzia

== instalujemy serwer mysql i proftpd z mod_mysql

apt-get install mysql-server
apt-get install proftpd proftpd-mod-mysql

Zobacz całość

Bitcoin miner on linux Kategoria: Linux | Tagi: bitcoin | Autor: Bartłomiej Gałęzia

Ubuntu:

add-apt-repository ppa:unit3/bfgminer
apt-get update
apt-get install bfgminer

Debian:

2: Run „apt-get update”

3: Run „apt-get install git autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev libncurses5-dev”

4: Run „git clone git://github.com/luke-jr/bfgminer.git”

5: Enter the bfgminer directory

6: Run „./autogen.sh”

7: Run „./configure” (if you do not want to use GPUs on the machine, add –disable-opencl)

8: Run „make”

9: After make completes, you can run bfgminer directly (may require sudo), or create a shell script that includes your arguments.

Running BFGMiner:

./bfgminer -o 
stratum+tcp://stratum.btcguild.com:3333 -u username_workername -p 123 -S all –icarus-options 115200:1:1 –icarus-timing 3.0=100

Komendy linux Kategoria: Linux | Autor: Bartłomiej Gałęzia

lsof – wyświetla otwarte pliki

sudo pdbedit -L -v - pokazuje pełne info o użytkownikach

file -s /dev/sda - pokazuje pełne info o urządzeniu