12 June 2010

How To Backup Your Ubuntu System With Remastersys

remastersys-logoAfter countless hours of configuring, tweaking, installing new applications onto your Ubuntu system, the last thing that you want to do is to reformat and start everything all over again. Remastersys is here to save you all this trouble. Remastersys is a simple and easy to use application that allows you to easily clone and backup your Ubuntu system so that you can quickly restore your computer to its previous state in the event that it crashes.
There are two thing that Remastersys can do:
  1. To do a full system backup, including all installed applications, their settings and your personal data, to a live CD or DVD. You can use this live CD or DVD to restore your system or to install it in another computer. You can also bring it around and use it everywhere as a Live CD.
  2. To create a custom distributable copy of your current Ubuntu system and share it with your friends.
Remastersys comes with a GUI to guide you through the process. There is little or no configuration to do. In as little as one step, you will be backing up your Ubuntu (or creating custom distributable iso) in no time. Remastersys works only in Ubuntu and its derivative such as Linux Mint.

Installing Remastersys

In your terminal,
gksu gedit /etc/apt/sources.list
Add the following line to the end of the file.
For Gutsy and Earlier
# Remastersys
deb http://www.geekconnection.org/remastersys/repository remastersys/
For Hardy and Newer with original grub
# Remastersys
deb http://www.geekconnection.org/remastersys/repository ubuntu/
For Karmic and Newer with grub2
# Remastersys
deb http://www.geekconnection.org/remastersys/repository karmic/
Save and exit.
Update the repositories and install Remastersys
sudo apt-get update
sudo apt-get install remastersys
Once the installation has finished, go to System -> Administration -> Remastersys Backup
If you have any other windows or applications running, close them all. Click OK to continue.
remastersys-screenshot1
Select the action that you want to do. If you want to create a backup of your system, including all the personal data, highlight Backup and click OK. If you want to create a distributable copy of your current system, select Dist and click OK.
remastersys-selection
Remastersys will proceed to do the task that you have specified. This will take a long time, depending on the number of applications and files in your system.
remastersys-in-process
You will receive a prompt when the backup process is done. The backup cd filesystem and iso can be found at /home/remastersys/remastersys folder.
remastersys-finish
If you have Virtualbox or VMware installed, you can test the iso file by loading it in a virtual machine.
remastersys-bootup

Conclusion

Remastersys is a powerful, yet simple to use application. There is no technical knowledge involved. You simply load it up, select the option and off it goes. It is ideal for backing up your system so that you can restore it in the event your system crashes. I like the feature where it allows you to create a custom distribution of Ubuntu. Over the time, I have received many queries from friends on how to install the various applications. With Remastersys, I can now create my own distro with all the applications pre-installed and distribute them to my friends.
For alternative way to create your custom distro, check out Reconstructor.

18 April 2010

Linux route add command


Q. How do I add new / default gateway using route command under Linux?
A. You can use any one of the following tool to add route:
=> route command : show / manipulate the IP routing table
=> ip command : show / manipulate routing, devices, policy routing and tunnels

Linux route add using route command

Route all traffic via 192.168.1.254 gateway connected via eth0 network interface:
# route add default gw 192.168.1.254 eth0

Linux route add using ip command

Just like above but with ip command:
# ip route add 192.168.1.0/24 dev eth0

Restart Networking

/etc/init.d/networking {stop|start|restart}

11 April 2010

HOWTO: configure MySQL’s my.cnf file

UPDATE: I recently used this MySQL tuner script, I basically went with what it told me, but I’m using a higher query_cache_size than it recommends, basically because I don’t see anything online saying it will hurt things.  So I’m now using the following values on my server:
[mysqld]
user=mysql
bind-address=127.0.0.1
datadir=/var/lib/mysql
pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysql/mysql.sock
port=3306
tmpdir=/tmp
language=/usr/share/mysql/english
skip-external-locking
query_cache_limit=64M
query_cache_size=32M
query_cache_type=1
max_connections=15
max_user_connections=300
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_stack=128K
thread_cache_size=128
myisam-recover=BACKUP
key_buffer=64M
join_buffer=1M
max_allowed_packet=32M
table_cache=512M
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=768K
max_connect_errors=10
thread_concurrency=4
myisam_sort_buffer_size=32M
skip-locking
skip-bdb
expire_logs_days=10
max_binlog_size=100M
server-id=1
[mysql.server]
user=mysql
basedir=/usr
[safe_mysqld]
bind-address=127.0.0.1
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=8192
SAFE_MYSQLD_OPTIONS=”–defaults-file=/etc/my.cnf –log-slow-queries=/var/log/slow-queries.log”
[mysql]
[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout
max_heap_table_size = 64 M
tmp_table_size = 64 M
!includedir /etc/mysql/conf.d/
I’ve gone back and forth over the years configuring MySQL for optimal performance, and while I know I’m not there, I now have a new baseline to build from. From a post called Standard MYSQL my.cnf configuration, you can see all the base information, but also things like:
key_buffer=256M # 64M for 1GB, 128M for 2GB, 256 for 4GB
Which defines the value (256M) but then spells out ideal base values for you to start with if you have more RAM on your system. This is very helpful, I’m tried to go a step further by combining it with Debian’s default my.cnf that comes on 5.0 (lenny) for MySQL 5. As I’m always open for suggestions for improvements, please comment if you have a different view on these choices, thanks. Here it is:
[client]
socket=/var/run/mysqld/mysqld.sock
port=3306

[mysqld_safe]
socket=/var/run/mysqld/mysqld.sock
nice=0

[mysqld]
user=mysql
bind-address=127.0.0.1
datadir=/var/lib/mysql
pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysql/mysql.sock
port=3306
tmpdir=/tmp
language=/usr/share/mysql/english
skip-external-locking
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=3000
max_user_connections=600
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_stack=128K
thread_cache_size=128
myisam-recover=BACKUP
#key_buffer - 64M for 1GB, 128M for 2GB, 256 for 4GB
key_buffer=64M
#join_buffer_size - 1M for 1GB, 2M for 2GB, 4M for 4GB
join_buffer=1M
max_allowed_packet=32M
table_cache=1024
#sort_buffer_size - 1M for 1GB, 2M for 2GB, 4M for 4GB
sort_buffer_size=1M
#read_buffer_size - 1M for 1GB, 2M for 2GB, 4M for 4GB
read_buffer_size=1M
#read_rnd_buffer_size - 768K for 1GB, 1536K for 2GB, 3072K for 4GB
read_rnd_buffer_size=768K
max_connect_errors=10
thread_concurrency=4
#myisam_sort_buffer_size - 32M for 1GB, 64M for 2GB, 128 for 4GB
myisam_sort_buffer_size=32M
skip-locking
skip-bdb
expire_logs_days=10
max_binlog_size=100M
server-id=1

[mysql.server]
user=mysql
basedir=/usr

[safe_mysqld]
bind-address=127.0.0.1
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=8192
SAFE_MYSQLD_OPTIONS=”–defaults-file=/etc/my.cnf –log-slow-queries=/var/log/slow-queries.log”

#[mysqldump]
#quick
#quote-names
#max_allowed_packet=16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
#key_buffer - 64M for 1GB, 128M for 2GB, 256M for 4GB
key_buffer=64M
#sort_buffer - 64M for 1GB, 128M for 2GB, 256M for 4GB
sort_buffer=64M
#read_buffer - 16M for 1GB, 32M for 2GB, 64M for 4GB
read_buffer=16M
#write_buffer - 16M for 1GB, 32M for 2GB, 64M for 4GB
write_buffer=16M

[myisamchk]
#key_buffer - 64M for 1GB, 128M for 2GB, 256M for 4GB
key_buffer=64M
#sort_buffer - 64M for 1GB, 128M for 2GB, 256M for 4GB
sort_buffer=64M
#read_buffer - 16M for 1GB, 32M for 2GB, 64M for 4GB
read_buffer=16M
#write_buffer - 16M for 1GB, 32M for 2GB, 64M for 4GB
write_buffer=16M

[mysqlhotcopy]
interactive-timeout

!includedir /etc/mysql/conf.d/

21 March 2010

New Ubuntu 10.04 Change is Coming

Ubuntu as one of the most popular linux distros start make over herself with a new look and design to strengthen brandingnya. From the logo, theme and splash screen when booting all changed



The following splash screen display when booting :



And the following new theme GTK view :



Get it while it's hot. ISOs and torrents are available at:


http://cdimage.ubuntu.com/releases/lucid/alpha-1/ (Ubuntu Desktop and Server)
http://uec-images.ubuntu.com/releases/lucid/alpha-1/ (Ubuntu Server for UEC and EC2)
http://cdimage.ubuntu.com/ports/releases/lucid/alpha-1/ (Ubuntu ARM)
http://cdimage.ubuntu.com/kubuntu/releases/lucid/alpha-1/ (Kubuntu Desktop and Netbook Remix)
http://cdimage.ubuntu.com/xubuntu/releases/lucid/alpha-1/ (Xubuntu)