It is currently Sun Dec 22, 2024 5:00 am

News News of Linux specific

Site map of Linux specific » Forum : Linux specific

Linux specific questions/information are gathered here. The main thrust of topics are applied to Centos/RedHat(RH)/Debian/Ubuntu/Gentoo distributives
Forum rules
All information is given AS IS

Remove disk from /dev/mapper control

Members of dmraid arrays (block and software RAID devices) contain metadata signatures which are used to discover/assemble target RAID sets.

To remove them and release undelying block devices one should erase metadata signatures.

Discover all software RAID devices supported on your system, eg:
# dmraid -r
/dev/dm-46: hpt45x, "hpt45x_chidjhaiaa-0", striped, ok, 320172928 sectors, data@ 0
/dev/dm-50: hpt45x, "hpt45x_chidjhaiaa-0", striped, ok, 320172928 sectors, data@ 0
/dev/dm-54: hpt45x, "hpt45x_chidjhaiaa-1", striped, ok, 320172928 sectors, data@ 0
/dev/dm-58: hpt45x, ...
Read more : Remove disk from /dev/mapper control | Views : 35775 | Replies : 1


Reinstall all installed packages with yum

To list all currently installed packages in the system the following command might be useful:
Code: Select all
yum list installed

To reinstall all of them easily one should:
Code: Select all
mkdir emptydirectory
cd emptydirectory
yum reinstall *

Note, that empty directory is required for a successful command execution.
More elegant solution, without empty directory, is:
Code: Select all
yum reinstall \*
Read more : Reinstall all installed packages with yum | Views : 34818 | Replies : 0


PCI & USB ID Lists update

Download new version of the PCI ID list:
Code: Select all
update-pciids

update-pciids fetches the current version of the pci.ids file from the primary distribution site and installs it.
This utility requires curl, wget or lynx to be installed. If gzip or bzip2 are available, it automatically downloads the compressed version of the list.
New list will be saved to /usr/share/misc/pci.ids.

Download new version of the USB ID list:
Code: Select all
update-usbids

New list will be saved to /usr/share/misc/usb.ids
Read more : PCI & USB ID Lists update | Views : 2922 | Replies : 0


Automatic Updates for MaxMind GeoIP Databases

Automatic Updates for MaxMind GeoIP free Databases (GeoIP Legacy Databases):

1. Use official MaxMind GeoIP Update program. GeoIP updates require an active GeoIP subscription.
Can find more information at http://dev.maxmind.com/geoip/geoipupdate/

2. Manual download of free (*lite* in terms of MaxMind) databases:
geoipupdate.sh:
#!/bin/sh

GEOIP_MIRROR="https://mailfud.org/geoip-legacy"
GEOIPDIR=/usr/share/GeoIP
TMPDIR=

DATABASES="GeoIP GeoIPv6 GeoIPCity GeoIPCityv6 GeoIPASNum GeoIPASNumv6 GeoIPISP GeoIPOrg"

if [ "${1}" = -f ] || [ "${1}" = --force ]; then
force=true
fi

if [ -d "${GEOIPDIR}" ]; then ...
Read more : Automatic Updates for MaxMind GeoIP Databases | Views : 5002 | Replies : 0


Extract file(s) from an RPM package

Sometimes, only one or several files from an .rpm package are required and there is no need to install it on the system.
Let`s find where file(s) will be put after .rpm package install:
Code: Select all
# rpm -qlp nagios-plugins-1.4.15-2.el5.rf.x86_64.rpm | grep rbl
/usr/lib64/nagios/plugins/contrib/check_rbl.c

And extract only it from the archive:
Code: Select all
# rpm2cpio nagios-plugins-1.4.15-2.el5.rf.x86_64.rpm | cpio -ivd ./usr/lib64/nagios/plugins/contrib/check_rbl.c
Read more : Extract file(s) from an RPM package | Views : 6451 | Replies : 1




init: /dev/initctl: no such file or directory (TODO)

Code: Select all
mkfifo /dev/initctl
reboot -f
Read more : init: /dev/initctl: no such file or directory (TODO) | Views : 5388 | Replies : 0


Linux kernel boot time parameters

The Linux kernel accepts certain 'command-line options' or 'boot time parameters' at the moment it is started. In general this is used to supply the kernel with information about hardware parameters that the kernel would not be able to determine on its own, or to avoid/override the values that the kernel would otherwise detect.

Taken from:
Code: Select all
man bootparam

'panic=N'
By default the kernel will not reboot after a panic, but this option will cause ...
Read more : Linux kernel boot time parameters | Views : 3280 | Replies : 0


Install Memcached on cPanel server (CentOS)

Memcached - high-performance memory object caching system. It requires LibEvent:
Code: Select all
mkdir ~/memcached
cd ~/memcached
wget "http://monkey.org/~provos/libevent-2.0.12-stable.tar.gz"
tar xvfz libevent-2.0.12-stable.tar.gz
cd libevent-2.0.12-stable
./configure && make && make install

Now we are ready to install Memcached:
Code: Select all
cd ~/memcached
wget "http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz"
tar xvfz memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --with-lib-event=/usr/local/ && make && make install

Configure dynamic linker run time bindings for LibEvent:
Code: Select all
echo "/usr/local/lib/" > /etc/ld.so.conf.d/libevent.conf
ldconfig

Create init script for Memcached:
Code: Select all
touch /etc/init.d/memcached
chmod +x /etc/init.d/memcached

#!/bin/bash ...
Read more : Install Memcached on cPanel server (CentOS) | Views : 3873 | Replies : 0


Pretty output of mount (Linux,FreeBSD)

Show mounted file-systems:
Code: Select all
mount | column -t
Read more : Pretty output of mount (Linux,FreeBSD) | Views : 2888 | Replies : 0


 

Login


Statistics

Total posts 505 • Total topics 442 • Total members 22

cron