Posts Tagged ‘Linux’

moodle upgrade – database needs to be stored in utf-8

Tuesday, March 3rd, 2009

While I was upgrading moodle, I got this message:

It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).

After googling around, I was able to get this solution:

1. Create a dump of your old database.

> mysqldump -uUSER -p OLD_DATABASE > OLD_DATABASE.sql

2. Create a new database. This is where you will transfer the old one.

mysql> create database NEW_DATABASE default charset=utf8;

mysql> grant all privileges on NEW_DATASE to ‘USER’@'localhost’;

3. Load your old database to the new one.

>mysql -uUSER -p NEW_DATABASE < OLD_DATABASE.sql

  • Share/Bookmark

add multiple users

Wednesday, August 13th, 2008

Taken from the PLUG list

#!/bin/bash

exec < password_file

while read LINE; do
IFS=” “; set — $(echo $LINE)
MyUserName=$1
MyPassword=$2
MyFullName=$3

useradd “${MyUserName}” -c “${MyFullName}”

echo “${MyPassword}” | passwd “${MyUserName}” –stdin

done

  • Share/Bookmark

Restart X

Wednesday, August 13th, 2008

ctrl-alt-bkspace you dum dum! :)

  • Share/Bookmark

Fixing Windows with Knoppix

Wednesday, August 13th, 2008

http://www.extremetech.com/article2/0,1697,1918301,00.asp

  • Share/Bookmark

Managing Mailboxes with cyradm

Wednesday, August 13th, 2008

http://www.oreilly.com/catalog/mimap/chapter/ch09.html

http://www.bursik.net/kb/linux/cyrus/install.html

  • Share/Bookmark

chmod script

Wednesday, August 13th, 2008

find . -type d -exec chmod 755 ‘{}’ ‘;’ ; find . -type f -exec chmod 644 ‘{}’ ‘;’

  • Share/Bookmark

A Cure for the Common SSH Login Attack

Wednesday, August 13th, 2008

Check http://www.dotancohen.com/howto/portknocking.php

  • Share/Bookmark

How to customize the Kernel in CentOS

Wednesday, August 13th, 2008

1. install kernel-sourecode
2. go to /usr/src/linux-2.6.9-5.0.3.EL
3. make mrproper
4. edit the Makefile and change the EXTRAVERSION and NAME lines to whatever name that suits/describes your kernel.
5. copy your current config file from /boot to /usr/src/linux-2.6.9-5.0.3.EL/.config
6. make oldconfig
7. make menuconfig
8. make bzImage
9. make modules
10. make modules_install
11. cp arch/your_arch/boot/bzImage /boot/vmlinuz-version-name
12. cd /boot
13. mkinitrd initrd-version-name.img kernel-version
14. edit your /boot/grub/grub.conf to point to your new kernel and initrd.img

  • Share/Bookmark

Network Failover

Wednesday, August 13th, 2008

http://www.ucarp.org/

  • Share/Bookmark

Linux Bridging+Firewalling

Wednesday, August 13th, 2008

http://www.lug.udel.edu/articles/firewall-bridge/bridge.html

Live CD:
http://www.sentryfirewall.com/

  • Share/Bookmark