Thursday, 31 December 2009

MySQL create a new account

mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
-> WITH GRANT OPTION;
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
-> WITH GRANT OPTION;
mysql> CREATE USER 'admin'@'localhost';
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
mysql> CREATE USER 'dummy'@'localhost';

wiki under Ubuntu

First of all, get web server ready.

Use Synaptic Package Manager to install the essential packages into the system. You need MySQL, PHP and Apache2.

Create an account for wiki under Ubuntu.

Enable the public_html folder for website by "sudo a2enmod userdir".

Change the setting in config directory of wiki and put the right username and password for wiki to access MySQL database.

Now the wiki is ready by typing 'localhost/~wiki' and you can see the site.

Wednesday, 30 December 2009

Add a new hard drive in Ubuntu

There is a very good guide from Ubuntu community. (https://help.ubuntu.com/community/InstallingANewHardDrive)

1. Get the drive information; (sudo lshw -C disk)
2. Install GParted; (sudo apt-get install gparted)
3. Partition and format the hard drive;
4. Create a mounting point; (sudo mkdir /media/mynewdrive)
5. Automatic mount at boot; (Edit fstab and put line '/dev/sdb1 /media/mynewdrive ext3 defaults 0 2' at the end)
6. Allow the specific group user to access;
sudo chgrp plugdev /media/mynewdrive
sudo chmod g+w /media/mynewdrive
sudo chmod +t /media/mynewdrive

Monday, 2 February 2009

Check hardware information

A few commands are very useful to check the system information of the Solaris systems.

uname -X can give you the information of OS version and number of processors.

psrinfo -v can tell you the information of the processors

prtconf -v can tell you the memory installed.

df -k is for you to check the information of HDD

IRIX set up default gateway

http://software.majix.org/irix/network-setup.shtml

The above link introduces the detailed steps of setting it up. The system I have is 6.5 version.

1. Set up DNS in /etc/resolv.conf

domain majix.homeip.net
nameserver 192.168.1.2
nameserver 192.168.10.1

2. Default gateway

At the end of the file /etc/config/static-route.options simply add the line
$ROUTE $QUIET add -net default 130.60.XX.1

3. Start/stop daemon

chkconfig routed off

Either you can log in as root, type
route add -net default 130.60.XX.1