Показаны сообщения с ярлыком Gentoo. Показать все сообщения
Показаны сообщения с ярлыком Gentoo. Показать все сообщения

пятница, 18 мая 2012 г.

Enable Apache mod_status in Gentoo

Params:
OS: Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
Apache-2.2

Problem:
I need enable apache module mod_status.


Solution:
Edit apache conf file: "/etc/conf.d/apache2"
Add option "-D STATUS" to the directive "APACHE2_OPTS"
Example string:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -D STATUS"

Restart apache and follow here "http://localhost/server-status"

четверг, 23 февраля 2012 г.

Gentoo install libgtk-x11-2.0.so.0

Params:
OS: Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

Problem:
I trying to run LDOCE5 and have this error:
Error while loading shared libraries: libgtk-x11-2.0.so.0
32bit applications need 32bit libraries, but I have 64bit system.

Solution: 
Many 32bit libraries on 64bit gentoo you can install with package app-emulation/emul-linux-x86-gtklibs. Also this package has needed libgtk-x11-2.0.so.0
> emerge app-emulation/emul-linux-x86-gtklibs  -av

суббота, 18 февраля 2012 г.

Enable MySQL query cache, in Gentoo

Params:

   - OS: Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
   - MySQL: mysql  Ver 14.14 Distrib 5.1.61, for pc-linux-gnu (x86_64) using readline 5.1

Problem:
No problem :) I need to enable query cache in mysql for testing my site with high load.

Solution:
Edit mysql config file "/etc/mysql/my.cnf".
Add those options to the "[mysqld]" section:
query-cache-type = 1
query-cache-size = 10M

Restart mysql daemon:
/etc/init.d/mysql restart

To check cache enabled or not, run this query:
show variables like '%query_cache%';
And you will see that (and other options):
have_query_cache YES
query_cache_type ON

воскресенье, 15 января 2012 г.

UT2004 game no sound

Params:
Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

Problem:
No sound in game Unreal Tournament 2004.

Solution:
UT2004 uses openal lib. So you must have this lib in system.
If you run the game by this binary "Games/ut2004/System/ut2004-bin" (32bit system), 
you must have /usr/lib32/openal.so.
Or if you use binary"Games/ut2004/System/ut2004-bin-linux-amd64" (64bit system),
you must have /usr/lib64/openal.so.
On my Gentoo amd64 it wasn't installed (case second). So just type in console:
> emerge media-libs/openal -av

Gentoo error: not found libstdc++.so.5

Params:
- Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
- gcc (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) 4.5.3

Problem:
When I run applicaton it give me this error:
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory


Solution:
> emerge app-emulation/emul-linux-x86-compat -av
It will install also sys-libs/libstdc++-v3
Also, may be you need to create a symbolic link in your application to this shared library.

четверг, 15 декабря 2011 г.

Gentoo emerge: "A file is not listed in the Manifest ..."

Params:

Linux moon 2.6.39-gentoo-r3 #4 SMP Wed Aug 31 17:44:51 EEST 2011 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux

Problem:
When I do emerge <some_package> or upgrade my gentoo, emerge give me bulk of messages like this:
!!! A file is not listed in the Manifest '<package_ebuild>'
also have this warning:
Digest verification failed ...

Solution:
1) Download latest-portage snapshot from some gentoo mirrors:
    > cd /
    > wget ftp://gentoo.kiev.ua/snapshots/portage-20111214.tar.xz
2) Move /usr/portage directory for backup purposes:
     > mkdir /root/temp
     > mv /usr/portage /root/temp/
3) Extracting the portage snapshot:
    > tar xvjf /portage-20111214.tar.xz -C /usr
    > rm /portage-20111214.tar.xz
4) Sync new portage:
    > emerge --sync

That's all now you can update the system or .....
I don't know if this is correct solution, but it working for me.

пятница, 25 ноября 2011 г.

Gentoo emerge: "Digest verification failed"

Params:
Linux moon 2.6.39-gentoo-r3 #4 SMP Wed Aug 31 17:44:51 EEST 2011 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux


Problem:
I have this error when trying emerge some applications

Calculating dependencies |  * Digest verification failed:
 * /usr/portage/dev-python/pygobject/pygobject-2.28.6.ebuild
 * Reason: Filesize does not match recorded size
 * Got: 3824
 * Expected: 3826
... done!


Solution:
> emerge --sync
> ebuild /usr/portage/dev-python/pygobject/pygobject-2.28.6.ebuild digest
> emerge --sync


But if you have a bulk of this warning, or you have also this warning:
A file is not listed in the Manifest '<package_ebuild>'
Then read this solution http://uommo.blogspot.com/2011/12/gentoo-emerge-file-is-not-listed-in.html

понедельник, 14 ноября 2011 г.

LDOCE5 no sound solution.

Params:
Linux solar 2.6.38-gentoo-r6 #21 SMP Wed Nov 9 21:29:55 EET 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
You must had installed and configured 'alsa-oss'

Problem:
No sound in LDOCE5 application.

Solution:
Add 'aoss' to exec ldoce5 command.
Desktop link:
Edit desktop file ldoce5.desktop. Add 'aoss' in the command on Exec line
Exec=aoss '/<path_to_ldoce5_install_dir>/ldoce5//ldoce5'


Also you can create command in user '~/.bashrc' file. Add this line in your .bashrc file
alias ldoce5="aoss /<path_to_ldoce5_install_dir>/ldoce5/ldoce5"
And after reboot you can use 'ldoce5' command to execute application with fixed sound.

May be you have "aoss32" instead "aoss", it also working, trying.

воскресенье, 18 сентября 2011 г.

Gentoo installation (x86)

> passwd (new password for root)
> /etc/init.d/sshd start
> ifconfig eth0 192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0 up
> route add default gw 192.168.0.1
> nano -w /etc/resolv.conf
            nameserver 109.86.2.2
            nameserver 109.86.2.21
> ping google.com (check net)

> ssh root@192.168.0.4 (On another host)
> fdisk /dev/hda (check file system)
> mke2fs -j /dev/hda1
> mkreiserfs /dev/hda5
> mkswap /dev/hda2
> swapon /dev/hda2
> mount /dev/hda5 /mnt/gentoo

> mkdir /mnt/gentoo/boot
> mount /dev/hda1 /mnt/gentoo/boot
> date (check current date)
> date --set "28 Aug 2011 12:03"
> cd /mnt/gentoo
> wget http://gentoo.inode.at/releases/x86/current-stage3/stage3-i686-20110809.tar.bz2
> tar xvjpf stage3-i686-20110809.tar.bz2
> wget http://gentoo.inode.at/snapshots/portage-latest.tar.bz2
> tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
> nano -w /mnt/gentoo/etc/make.conf (Configure compilation parameters and set gentoo mirrors)
> cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
> mount -t proc none /mnt/gentoo/proc
> mount -o bind /dev /mnt/gentoo/dev
> chroot /mnt/gentoo /bin/bash
> env-update
> source /etc/profile
> export PS1="(chroot) $PS1"
> emerge --sync
> ls -FGg /etc/make.profile
> ls /usr/portage/profiles/default/linux/x86/10.0/
> less /usr/portage/profiles/use.desc
> nano -w /etc/make.conf (set USE flags)
> nano -w /etc/locale.gen (set localization parameters)
           ru_UA.UTF-8 UTF-8                                                                                       
           en_US.UTF-8 UTF-8
> locale-gen
> ls /usr/share/zoneinfo/ (find your time zone)
> cp /usr/share/zoneinfo/Europe/Kiev  /etc/localtime
> USE="-doc symlink" emerge gentoo-sources
> ls -l /usr/src/linux (check kernel symlink)
> emerge pciutils -av
> cd /usr/src/linux
> make menuconfig (configure kernel)
> make && make modules_install
> cp arch/i386/boot/bzImage /boot/linux-2.6.39-gentoo-r3_1
> nano -w /etc/fstab (configure partitions)
> nano -w /etc/conf.d/hostname
> nano -w /etc/conf.d/net
> cd /etc/init.d
> ln -s net.lo net.eth1
> rc-update add net.eth1 default
> nano -w /etc/hosts
> passwd
> nano -w /etc/rc.conf
> nano -w /etc/conf.d/keymaps
> nano -w /etc/conf.d/clock
> emerge syslog-ng
> rc-update add syslog-ng default
> emerge vixie-cron
> rc-update add vixie-cron default
> emerge sys-apps/mlocate
> emerge reiserfsprogs (you must setup programms to maintenance)
> emerge dhcpcd
> emerge grub
> grub
      grub> root (hd0,0)
      grub> setup (hd0)
      grub> quit
> exit
> cd
> umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
> reboot

Midnight Commander file association and execution

Set KDE file association in mc for all users.
Edit config file "/etc/mc/mc.ext"

For example we set association for video files:
**************************************************
### Video ###
........

include/video                                                                                                      
<------>Open=(kfmclient exec %f >/dev/null 2>&1 &)
**************************************************
Use this string for other application if need.

Examples for other ENV:
# for XFCE
Open=(exo-open %f >/dev/null 2>&1 &)
#for Gnome
Open=(gnome-open %f >/dev/null 2>&1 &)

среда, 7 сентября 2011 г.

Sound in Gentoo, ALSA + nVidia HDA

> lspci
00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
Codec: Realtek ALC861-VD


backend Gstreamer or Xine

In home directory create file ".asoundrc"

After that in some applications may be very quiet sound.
Check PCM channel in mixer (alsamixer).

Usefull links:
http://ru.gentoo-wiki.com/wiki/HOWTO_Alsa_И_Многопоточный_Звук
http://alsa.opensrc.org/FAQ026


воскресенье, 28 августа 2011 г.

Gentoo installation (x86)

> passwd (new password for root)
> /etc/init.d/sshd start
> ifconfig eth0 192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0 up
> route add default gw 192.168.0.1
> nano -w /etc/resolv.conf
            nameserver 109.86.2.2
            nameserver 109.86.2.21
> ping google.com (check net)

> ssh root@192.168.0.4 (On another host)
> fdisk /dev/hda (check file system)
> mke2fs -j /dev/hda1
> mkreiserfs /dev/hda5
> mkswap /dev/hda2
> swapon /dev/hda2
> mount /dev/hda5 /mnt/gentoo

> mkdir /mnt/gentoo/boot
> mount /dev/hda1 /mnt/gentoo/boot
> date (check current date)
> date --set "28 Aug 2011 12:03"
> cd /mnt/gentoo
> wget http://gentoo.inode.at/releases/x86/current-stage3/stage3-i686-20110809.tar.bz2
> tar xvjpf stage3-i686-20110809.tar.bz2
> wget http://gentoo.inode.at/snapshots/portage-latest.tar.bz2
> tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
> nano -w /mnt/gentoo/etc/make.conf (Configure compilation parameters and set gentoo mirrors)
> cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
> mount -t proc none /mnt/gentoo/proc
> mount -o bind /dev /mnt/gentoo/dev
> chroot /mnt/gentoo /bin/bash
> env-update
> source /etc/profile
> export PS1="(chroot) $PS1"
> emerge --sync
> ls -FGg /etc/make.profile
> ls /usr/portage/profiles/default/linux/x86/10.0/
> less /usr/portage/profiles/use.desc
> nano -w /etc/make.conf (set USE flags)
> nano -w /etc/locale.gen (set localization parameters)
           ru_UA.UTF-8 UTF-8                                                                                       
           en_US.UTF-8 UTF-8
> locale-gen
> ls /usr/share/zoneinfo/ (find your time zone)
> cp /usr/share/zoneinfo/Europe/Kiev  /etc/localtime
> USE="-doc symlink" emerge gentoo-sources
> ls -l /usr/src/linux (check kernel symlink)
> emerge pciutils -av
> cd /usr/src/linux
> make menuconfig (configure kernel)
> make && make modules_install
> cp arch/i386/boot/bzImage /boot/linux-2.6.39-gentoo-r3_1
> nano -w /etc/fstab (configure partitions)
> nano -w /etc/conf.d/hostname
> nano -w /etc/conf.d/net
> cd /etc/init.d
> ln -s net.lo net.eth1
> rc-update add net.eth1 default
> nano -w /etc/hosts
> passwd
> nano -w /etc/rc.conf
> nano -w /etc/conf.d/keymaps
> nano -w /etc/conf.d/clock
> emerge syslog-ng
> rc-update add syslog-ng default
> emerge vixie-cron
> rc-update add vixie-cron default
> emerge sys-apps/mlocate
> emerge reiserfsprogs (you must setup programms to maintenance)
> emerge dhcpcd
> emerge grub
> grub
      grub> root (hd0,0)
      grub> setup (hd0)
      grub> quit
> exit
> cd
> umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
> reboot

пятница, 12 августа 2011 г.

LDOCE5 on linux arch x86_64

Longman Dictionary of Contemporary English 5 on linux arch x86_64
> uname -a
Linux solar 2.6.38-gentoo-r6 #13 SMP Mon Jul 11 00:10:55 EEST 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

1) Mount the iso (or cdrom):
> mount -o loop -t iso9660 /<path_to_iso>/ldoce5.iso /mnt/cdrom
2) Enter to cdrom folder:
> cd /mnt/cdrom
3) Execute the command:
> linux32 ./linux/setup.sh

You will see instalation window. Install, and use it! :)
Otherwise google search in help... :(

воскресенье, 10 июля 2011 г.

Webcam SVEN IC-960 WEB on Gentoo

>lsusb
  ...
  Bus 001 Device 005: ID 0c45:62f1 Microdia 

0c45 <- Vendor ID
62f1 <- Product ID

> dmesg
  ...
  [  113.897438] usb 1-4.2: Manufacturer: Sonix Technology Co., Ltd.
  ...

For more info about driver, installation, dpendencies, ... read kernel documentation
> less /usr/src/linux/Documentation/video4linux/sn9c102.txt

Drivers SN9C1* - not for my camera
Kernel configuration by this tutorial http://en.gentoo-wiki.com/wiki/Webcam
But without support of GSPCA drivers.
My driver is "USB Video Class (UVC)" (uvcdriver)
Also enable all v4l and v4l2 support in kernel
And no other devices can't be pluged to the same bus with webcamera (there is some driver bug, I hope developers fix that)

пятница, 8 июля 2011 г.

Gentoo, configure Samba

Gentoo: 2.6.38-gentoo-r6
Samba: 3.4.12

1) Install samba
> emerge net-fs/samba
2)Edit cfg file - /etc/samba/smb.cfg
Just add new share at the end of config file by example.
Nothing to do additional.
3)Add guest user to the system
> useradd -m guest
4)Set password for guest in system
> passwd guest
5)Set password for guest in samba users db
> smbpasswd guest
6)Create share directory in guest home directory (under guest account! must have access!)
> mkdir /home/guest/share
7)Set executable permision to share directory
> chmod +x /home/guest/share

Thats all!

If you need another location of directory, play with access permision and user accounts.

Samba in Krusader, os Gentoo

Install kdebase-kioslaves with use flag samba, than KDE application will support samba.
emerge kdebase-kioslaves

среда, 2 марта 2011 г.

Rename Network Interface using udev

If you want rename a network interface's device name when using udev. This can be practical to do since the automatically assigned device name may actually change around a bit due to random variation in the initialisation process of them.
For instance, eth0 can on one bootup refer to network interface A and eth1 to network interface B, but on another bootup can interface A be assigned eth1 and interface B be assigned eth0, which can cause problems if only one of them has a network cable attached and is configured to obtain an address over DHCP — the interface without the cable attached will then attempt to do that instead!
udev Overview
Unlike the traditional Linux system, where the device nodes in the /dev directory have been a static set of files, udev dynamically provides only the nodes for the devices actually present on a system. Although devfs provided a similar functionality, advocates for udev cited a number of reasons for preferring its implementation over devfs.
udev supports persistent device naming, which does not depend on, for example, the order in which the devices are plugged into the system. The default udev setup provides persistent names for storage devices. Any hard disk is recognized by its unique filesystem id, the name of the disk and the physical location on the hardware it is connected to.
udev executes entirely in user space, as opposed to devfs' kernel space. One consequence is that udev moved the naming policy out of the kernel and can run arbitrary programs to compose a name for the device from the device's properties, before the node is created.
udev operation
Udev is a generic kernel device manager. It runs as a daemon on a Linux system and listens to events the kernel sends out if a new device is initialized or a device is removed from the system. The system provides a set of rules that match against exported values of the event and properties of the discovered device. A matching rule will possibly name and create a device node and run configured programs to set-up and configure the device. Udev rules can match on properties like the kernel subsystem, the kernel device name, the physical location of the device, or properties like the device's serial number. Rules can also request information from external programs to name a device or specify a custom name that will always be the same, regardless of the order devices are discovered by the system.
udev FAQ
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ
Comparison between udev and devfs
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs
Obtaining the MAC addresses from your Debian machine
If you want to obtain MAC address of any linux machine you need to run the following command
#ifconfig
This will give you all the existing network interfaces in your machine
example:-
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:AB:CD:12:34:56
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:3
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:180 (180.0 b)
Interrupt:185 Base address:0xc000
In the above example HWaddr is your MAC address 00:AB:CD:12:34:56
Using udev
Create a new file in the udev rules directory, e.g. /etc/udev/rules.d/010_netinterfaces.rules
In it specify the renaming in the following way for each interface on its own line
KERNEL="oldnameprefix*", SYSFS{address}=="MACaddress", NAME="newname"
where the oldnameprefix is typically eth. Note that in the MAC address, the hexadecimal digits should be in lowercase, otherwise udev fails to match them properly with the network interface.
You have quite a bit of freedom in choosing the new name, We recommend to keep it short and without any spaces or weird characters though. You can e.g. specify a fixed eth0, eth1, eth2 for specific MAC addresses, or you can name them after their use, or anything really. Remember that some applications that poke on a low level may dislike them not being called in the normal fashion of eth0, eth1..etc
Examples using udev
Example: Three network interfaces being present on a computer, setting a fixed eth0, eth1 and eth2 as their names.
KERNEL=="eth*", SYSFS{address}=="00:12:34:fe:dc:ba", NAME="eth0"
KERNEL=="eth*", SYSFS{address}=="00:56:78:98:76:54", NAME="eth1"
KERNEL=="eth*", SYSFS{address}=="00:90:ab:32:10:fe", NAME="eth2"Example: Three network interfaces (one Intel, one NVIDIA, and one 3Com) being present on a computer, naming them after the manufacturer of the interfaces.
KERNEL=="eth*", SYSFS{address}=="00:12:34:fe:dc:ba", NAME="eth-intel"
KERNEL=="eth*", SYSFS{address}=="00:56:78:98:76:54", NAME="eth-nv"
KERNEL=="eth*", SYSFS{address}=="00:90:ab:32:10:fe", NAME="eth-3com"
Updating network configuration
If you named the interfaces in a different fashion as they were named before, the network configuration needs to be updated for the new interface device names to be used.
Edit the /etc/network/interfaces file, and change all instances of the old names to the new names.
E.g. if you previously used eth0 and have renamed it newname, you'd replace all instances of eth0 in that file with newname
But if you just put a fixed eth0, eth1, ... as their names, you just need to make sure the one you want to have as the primary network interface is set to the one you want in the file.
Example
Having renamed the existing eth0, eth1, and eth2 to eth-intel, eth-nv and eth-3com, choosing to use the eth-intel one as the primary interface
The /etc/network/interfaces file before changes
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Currently unused network interfaces
iface eth1 inet dhcp
iface eth2 inet dhcpThe file after changes:
# The primary network interface
auto eth-intel
iface eth-intel inet dhcp
# Currently unused network interfaces
iface eth-nv inet dhcp
iface eth-3com inet dhcp
Reboot and verify your configuration
Reboot the computer and verify that the new network interface names are in use with e.g. ifconfig
#ifconfig newname
Where newname is the new interface name you specified. Repeat procedure for each one you renamed.
*** In GENTOO udev, network configuration file is /etc/udev/rules.d/70-persistent-net.rules ***

среда, 9 февраля 2011 г.

Apache segmentation fault on local server

Problem in PHP while init session in script.
Solution:
  1. Change configs: /etc/php5/apache2/conf.d/suhosin.ini /etc/php5/conf.d/suhosin.ini
  2. Uncomment and edit line: suhosin.session.encrypt = off
  3. Restart apache: /etc/init.d/apache2 restart
URL:
Working for me!

Also solution update your apache server to newer version! Realy helps! :)

среда, 8 декабря 2010 г.

Qt style in GTK applications

For my lovly Gentoo...
> emerge x11-themes/qtcurve-qt4 -av
create file ~/.gtkrc-2.0 with content:
include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"
style "user-font"
{
font_name="Sans 11"
}
widget_class "*" style "user-font"
gtk-theme-name="QtCurve"
gtk-font-name="Sans 11"
There some helpfull links:
Have fun!