27

H340 doesn’t have a VGA port, so you can’t plug your monitor to the mother board to install ubuntu. There are servial solutions to resolve this issue. If you are like me, don’t want to spend $70-$90 to buy a special VGA/PS2 cable, and you don’t know how to build your own cable. Here is a better solution.

1. Install a ubuntu10.04 to a new hard drive in a computer with
monitor/keyboard/mouse. Set static ip address to eth0. Make sure you select install SSH server.
2. login to the ubuntu.
- sudo vi /etc/udev/rules.d/70-persistent-net.rule
- remove every line, like
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”,………
3. save and shutdown
4. unplug this hard drive and plug it into the H340’s first bay.
5. turn on H340. You should see the lights on NIC blinking.
6. ping and ssh to this H340. DONE. :)
If you can’t ping and ssh to H340, plug this hard drive back to computer. Make sure all lines like
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”,………
in /etc/udev/rules.d/70-persistent-net.rule have been removed.
Thanks to druhboruch from ubuntuforum, he/she is the real hero. :)
http://ubuntuforums.org/showthread.php?t=1193348
31

This is suppose to be an easy task, but somehow not so easy for me.  No…… I’m not that smart….

Assume you installed ubuntu 10.04 already. For Virtual Box to run, you need a desktop, at least I need a desktop. So,

$> sudo apt-get install ubuntu-desktop
( This will take a long long time, so, turn on your TV, and start watching LOST season 6 start from episode 1,2,3……….  After Jack closes his eyes, you should be able to get this red+purple+orangeish color Desktop. :) )

Bounce your computer a few times, make sure it’s stable. Then login and open a terminal.

$>sudo apt-get install virtualbox-ose
(Virtualbox installed)

Now we need to create some virtual NICs

$>sudo vi /etc/network/interfaces
(put these lines in, don’t worry about the IP address mis-match your network, you won’t use them anyway.. You can try 127.0.0.1/32, if you like.)
auto virbr1
iface virbr1 inet static
        address 192.168.0.99
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off
        hwaddress ether 00:01:2e:2c:d6:ea

$>sudo /etc/init.d/networking restart

Now go back to virtualbox on your Desktop. Create the virtual server as you usually do, then make sure in “Networking”, select “birdge adapter” mode, then choose “virbr1″. After that, put the MAC address of virbr1 into the MAC address bar below. (if you don’t change MAC address, it still works. I just follow this pattern from my previous opensolaris settings.)

Now install guest OS, and setup the IP address/mask and gateway. My IP is like, 192.168.88.111/24. You should be able to ping this IP address from other computers, like 192.168.88.112/24.

Done.

十一 28

Last time I installed a websphere 7.0 deployment manager on a CentOS. This time I’ll create an application server on a different Host, and federate this new app server to the deployment manager I installed last time.

1. Install a standalone WAS.

- Follow the “Install Websphere7.0 on CentOS (1)” document to download and untar the source.
- vi responsefile.nd.txt, turn on the following options,

-OPT silentInstallLicenseAcceptance=”true”
-OPT allowNonRootSilentInstall=”true”
-OPT disableOSPrereqChecking=”true”
-OPT disableNonBlockingPrereqChecking=”true”
-OPT installType=”installNew”
-OPT profileType=”standAlone”
-OPT feature=”noFeature”
-OPT PROF_enableAdminSecurity=”true”
-OPT PROF_adminUserName=”admin”
-OPT PROF_adminPassword=”password”
-OPT installLocation=”/home/user/IBM/WebSphere/AppServer”
-OPT cimSelected=”true”
-OPT cimRepositoryLocation=”/home/user/IBM/WebSphere/cimrepos”
-OPT PROF_profilePath=”/home/user/IBM/WASprofiles”
-OPT PROF_profileName=”FatWAS70serverProf”
-OPT PROF_isDefault=”true”
-OPT PROF_hostName=”FatWASHost1″
-OPT PROF_nodeName=”FatWASNode1″
-OPT PROF_cellName=”FatWASCell1″
-OPT PROF_serverName=”server1″
-OPT PROF_defaultPorts=”true”

Save it and run this command,
- ./install -options “./responsefile.nd.txt” -silent

Then start server to check if install is successful.

2. Federate!

2.1 Pre-Federate.

- put the following entries into /etc/hosts file on BOTH deployment manager server and this server.
192.168.xx.xx(This server’s IP addr)  FatWASHost1
192.168.xx.xx(Dmgr server’s IP addr)  FatWASDmgr

- Check the time on these two servers. The difference must be smaller than 5 minutes. To make sure the time is set properly, do this on both servers,
- yum install ntp
- ntpdate us.pool.ntp.org

2.2 Federate this node
- cd /home/user/IBM/WASprofiles/bin
- startup the Deployment Manager
-  ./addNode.sh DMGR_IP_ADDR 8879 -conntype SOAP -includeapps -trace -username admin -password password -localusername admin -localpassword password

… …
ADMU0003I: Node FatWASNode1 has been successfully federated.

- logout/login to the dmgr’s web console, then check “Servers -> Server Types -> WebSphere application server”. There should be a server1 in the list. Start it up.

Done.

十一 26

I need to install a Websphere7.0 onto a CentOS5.3 linux server, with 2 conditions, 1, install with non-root user account. 2, install without a web browser.

Why I’m not the root user? Because I’m not the System Admin. Why there is no web browser? Because the SA doesn’t like me….. :)

My plan is to install the deployment mgr on to a container first, then use the dmgr console to manage other app servers. To make that work, of course you need the ND version.

- Download that big C?????.tar.gz file from IBM website.
- make a source directory like /home/user/WAS70ND, and move your gz file into there.
- cd /home/user/WAS70ND
- tar -zxvf ?.tar.gz
- cd WAS

Now edit the response file.
- vi responsefile.nd.txt
I have the following options turned on,

-OPT silentInstallLicenseAcceptance=”true”
-OPT allowNonRootSilentInstall=”true”
-OPT disableOSPrereqChecking=”true”
-OPT disableNonBlockingPrereqChecking=”true”
-OPT installType=”installNew”
-OPT profileType=”management”
-OPT feature=”noFeature”
-OPT PROF_enableAdminSecurity=”true”
-OPT PROF_adminUserName=”admin”
-OPT PROF_adminPassword=”password”
-OPT installLocation=”/home/user/IBM/WebSphere/AppServer”
-OPT cimSelected=”true”
-OPT cimRepositoryLocation=”/home/user/IBM/WebSphere/cimrepos”
-OPT PROF_profilePath=”/home/user/IBM/WASprofiles”
-OPT PROF_profileName=”FatWAS70Dmgr”
-OPT PROF_isDefault=”true”
-OPT PROF_serverType=”DEPLOYMENT_MANAGER”
-OPT PROF_hostName=”FatWASDmgr”
-OPT PROF_nodeName=”FatWASDmgrNode”
-OPT PROF_cellName=”FatWASCell”
-OPT PROF_defaultPorts=”true”

Save it and run this command,
- ./install -options “./responsefile.nd.txt” -silent

To check the install process, open another window then check the log
- tail -f /home/user/waslogs/log.txt
… …
(Nov 25, 2009 10:48:49 AM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFSUCCESS

Start dmgr admin console
- cd /home/ycui/IBM/WASprofiles/bin
- ./startManager.sh
Visit the the url: http://yourIP:9060/ibm/console
十一 25

syntax:
useradd -s /bin/bash -d [folder_name]  -c “[name]” [userid]

sample:
useradd -s /bin/bash -d /home/holden -c "Holden C" holden

Chagne password:
passwd holden

十一 18

word press doesn’t have Chinese language package by default, and the db char set doesn’t support Chinese, so you need a little extra admin work.

1. download/install Chinese language pack

1.1. download http://svn.automattic.com/wordpress-i18n/zh_CN/wporg/rosetta-zh_CN.mo and change file name to zh_CN.mo

1.2. then download http://svn.automattic.com/wordpress-i18n/zh_CN/wporg/rosetta-zh_CN.po and change file name to zh_CN.po

1.3.  use your FTP client to create a folder named “languages” in your domain. e.g. my folder is here: WEB_HOME/webtech/wp-content/languages/

1.4. upload the zh_CN.po and zh_CN.mo files into this “languages” folder.

2. change your wp-config.php file to allow database to save and read 16 bits chars.

2.1. go to your domain and find the file named “wp-config.php”. e.g. my file is located at WEB_HOME/webtech/wp-config.php

2.2. edit this file and find the line shows, “define(‘DB_CHARSET’, ‘utf8′);”, then change it to “define(‘DB_CHARSET’, ‘utf16′);”.
then find the line shows, ” define (‘WPLANG’, ”);”, and change it to “define (‘WPLANG’, ‘zh_CN’);”

2.3. save and test your word press posting. It should work, like mine.

美人卷珠帘,家里断水电,骂你没有钱,爹娘无颜见。

十一 09

Taking a course in BCIT, to learn some Drupal stuff. So, setting up a test box at home to play with.

$>sudo apt-get install apache2
$>sudo /etc/init.d/apache2 restart
$>sudo apt-get install php5 libapache2-mod-php5
$>sudo /etc/init.d/apache2 restart
$>sudo vi /var/www/testphp.php
<?php phpinfo(); ?>
$>sudo apt-get install mysql-server
rootpassword: ROOTPASSWORD
$>sudo vi /etc/mysql/my.cnf
bind-address = 0.0.0.0 $>sudo mysql -u root -p exit
$>sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
check both apache2,lighthttp phpmyadmin: yes put password
$>sudo vi /etc/php5/apache2/php.ini extension=msql.so memory_limit = 256M
sudo vi /etc/mysql/my.cn
$>wget http://drupal.org/files/projects/drupal-6.13.tar.gz $>tar -zxvpf drupal-6.13.tar.gz $>sudo mv drupal-6.13/* drupal-6.13/.htaccess /var/www/

visit http://YOURIP/install.php?profile=default


31

OS: centos5.2
VPS host: vpsstart.com

create a new yum source file
$>vi /etc/yum.repos.d/centos-asterisk.repo

[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium
[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

create a digium source file
$>vi /etc/yum.repos.d/centos-digium.repo

[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium
[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

Install all apps
$>yum install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux
$>yum install dahdi-tools libpri asterisk16-addons subversion

Install asterisk GUI
$>cd /usr/src
$>svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ asterisk-gui
$>cd asterisk-gui
$>./configure
$>make
$>make install

Then follow this post (http://netkoo.ca/webtech/?p=66)

$>vi /etc/asterisk/http.conf
$>vi /etc/asterisk/manager.conf
use IE, visit this url: http://YOURIP:8088/asterisk/static/config/index.html

Thanks to thisarticlehttp://www.asterisk.org/downloads/yum

09

Install & configure asterisk-gui

Install the subversion first ( not sure why subversion is not installed as default)

yum -y install subversion

Install the asterisk-gui

cd /usr/src
svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ asterisk-gui

Configure asterisk-gui. I guess asterisk has it’s own apache server, so don’t bother to install another apache.

cd /usr/src
./configure
make
make install
vi /etc/asterisk/http.conf
[general]
enabled = yes
enablestatic = yes
prefix=asterisk
bindaddr=0.0.0.0
bindport=8088
vi /etc/asterisk/manager.conf
[general]
enabled = yes
webenabled = yes
[admin]
secret = thiswouldbeaninsecurepassword
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config

Check config

make checkconfig
"
...
* GUI should be available at http://yourservername:8088/asterisk/static/config/index.html
* Note: If you have bindaddr=127.0.0.1 in /etc/asterisk/http.conf
you will only be able to visit it from the local machine.
Example: http://localhost:8088/asterisk/static/config/index.html
* The login and password should be an entry from /etc/asterisk/manager.conf
which has 'config' permission in read and write. For example:
[admin]
secret = mysecret22009
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config
--- Good luck! ---
"

Reload asterisk

Then visit the URL

http://myVPSipaddr:8088/asterisk/static/config/index.html

userid: admin
pw: youknow

09

To start asterisk server
/usr/sbin/asterisk

To stop asterisk server
/usr/sbin/asterisk -r
CLI>stop now

To reload asterisk server
CLI>reload

To restart asterisk server
CLI>restart now