Category: Linux
-
Configure static IP on Raspberry Pi
Some access points does not deliver DHCP to the raspberrypi. You could assign the IP statically as follows: Edit the /etc/network/interfaces file Comment out the following lines. > #allow-hotplug wlan0 > #wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf > #iface eth0 inet manual Add following configs. auto lo iface eth0 inet dhcp auto wlan0 iface wlan0 inet static address x.x.x.x…
-
Upgrade, Restore Drupal 7
Shell script to upgrade and restore Drupal 7 website This script will take care of the necessary actions required for upgrading drupal to higher versions. USAGE Copy the script to your webserver. Edit the script and change the variables to match with your setup Give execute privilege to the owner of the script (chmod u+x…
-
Upgrading Linux Mint 13 (maya) to Linux Mint 14 (nadia).
Take a backup of the current sources.list, preferably make a full backup of the system. Edit the sources.list file, replace the occurrences of maya with nadia and precise with quantal. $ vi /etc/sources.list :%s/maya/nadia/g :%s/precise/quantal/g Resulting file may look like. deb http://packages.linuxmint.com/ nadia main upstream import deb http://archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/…
-
SAN and Tape backup with bacula
Install and configure bacula for SAN and Tape backup There is already an excellent document about bacula installation and configurations at bacula website. This article is one way of getting SAN and Tape backup working together with single bacula director installation. It assumes that you already have installed and mounted the SAN and configured the…
-
Host group based access restriction – Nagios
This is useful especially when you have different host groups belongs to different entities and you need to have access separation. The basic idea is to use the same login user name in the contact groups. I assume that you have Apache htaccess authentication or LDAP authentication in place. You may create new contact group…
-
Delete mailman archieves
If required take backup of the archives $ cp -a /var/lib/mailman/archives/private/<listname>/* <backup_directory> Remove the archives $ rm -rf <listname>/* Once it is removed recreate the html archive files $ mailman/bin/arch <listname> ./arun
-
Detected bug in an extension! Hook FCKeditor_MediaWiki
Detected bug in an extension! Hook FCKeditor_MediaWiki::onCustomEditor failed to return a value; should return true to continue hook processing or false to abort. Backtrace: #0 mediawiki/includes/Wiki.php(497): wfRunHooks(‘CustomEditor’, Array) #1 mediawiki/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest)) #2 mediawiki/index.php(114): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest)) #3 {main} Edit the following file to fix this issue: “FCKeditor/FCKeditor.body.php” — public…
-
svn: Can’t convert string from ‘UTF-8’ to native encoding:
“svn: Can’t convert string from ‘UTF-8’ to native encoding:” This usually happens with special characters in the file name, which the client cannot understand. Just set proper locale in the client to fix this issues, $ export LC_CTYPE=en_US.UTF-8 // make sure the locale is properly set. $ locale LC_CTYPE=en_US.UTF-8 ./arun
-
Fix categories and tags in wordpress custom post_type
By default word press does not look in to custom post_types for categories and tags, even though the category names are visible you get a NOT FOUND page when you click on the category. A work around found for this issue is : Edit : functions.php add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if(is_category() || is_tag()) {…
-
Replace broken hard drive in software RAID1
This scenario assumes that you have two hard disk with RAID1 setup and one of them is broken (say sdb). To check the status of RAID: $ cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md2 : active raid1 sda3[1] 730202368 blocks [2/1] [U_] md1 : active raid1 sda2[1] 264960 blocks [2/1] [U_]…
-
Enable IPv6 on Direct Admin
It was rather easy to get IPv6 working with DA if you have the IPv6 subnet allocated for your server. Make sure that you have IPv6 enabled on your DA. # grep ipv6 /usr/local/directadmin/conf/directadmin.conf ipv6=1 Add the IPv6 Addresses to your direct admin, through IP Management (This will add IPv6 address to the interface). Enter…
-
Extending LVM disk space
Add the new disk drive to the system, you need to reboot the machine and configure the hardware RAID if required. Add the new disk to Volume group For e.g.: if the disk is HP with Smart array # pvcreate /dev/cciss/c0d1 # vgextend <volume_group_name> /dev/cciss/c0d1 Extend the Logical volume: # lvextend -L<+mention_the_size> /dev/<volume_group>/<logical_volume> eg: #…
-
Install and configure rsnapshot for central backup (without root privilege)
Download and install RsnapShot Download the latest package from: http://rsnapshot.org/downloads.html # wget http://rsnapshot.org/downloads/rsnapshot-1.3.1-1.noarch.rpm # rpm -Uvh rsnapshot-1.3.1-1.noarch.rpm Configure public key authentication – Enable public key authentication with remote hosts with normal user privilege local# ssh-keygen -t rsa local# scp id_rsa.pub ssh-remote-server:id_rsa.pub remote# useradd -c “Backup user” -d /data/home/backup/ backup remote# su – backup remote# vi…
-
Upgrading php to 5.2 or 5.3 in Redhat EL 5
Unfortunately RHEL 5 does not have php.5.2 package, which is required by most of the applications including latest wordpress and drupal. First thought of compiling php from source, but hard to keep it uptodate. So decided to make the life easier with EPEL/IUS repositories. Remove all existing php related packages: # rpm -e php php-mysql…
-
svn over ssh tunnel
It is very often required that you need to commit/update to the svn repository which is only indirectly accessible through a gateway (user can ssh to gateway and gateway can ssh to internal svn server) Suppose you have a working copy (locally on your machine) setup…