網頁

2010年12月30日 星期四

Configure VLAN on Cisco Network Device(Part I)

Recently,I am studying Cisco network technology due to my job will touch some network knowledge. Since go to the present corporation, I have no chance to touch any network skill when someone is the ownership of network engineer. I have to wake up some memory from network lab by myself.

First lab, How to configure VLAN on Cisco Switch & Router?


To search some article by Google and study some network book,the following steps are my lab experience for your reference.
Isolation Between Two Layer 2 VLANs on Switch(refer to Cisco)
A Layer 2 VLAN is the VLAN created in the switch and not configured with the interface vlan command. Hosts in the different Layer 2 VLANs cannot communicate with each other.



(1).Configure Switch by Console
  • Enter global configuration mode

1.Add vlans to the vlan database(VLAN Configuration in VLAN Configuration Mode)

2.Configure a trunk port for Router

3.Assigning Static-Access Ports to a VLAN  for PC1 or PC2




(2).Configure Router by Console
1.Add vlan entries to the vlan database

2.Enable the f0/0 interface

3.Configure Subinterfaces for each vlan


4.Confirm IP and VLAN Setup


5.Write Down Database


(3).Set network parameter on PC1 and PC2
Configure PC1
IP address: 192.168.1.2   Subnet Mask:255.255.255.0    Gateway:192.168.1.1

Configure PC2
IP address: 192.168.2.2   Subnet Mask:255.255.255.0    Gateway:192.168.2.1

(4).Test IP Connectivity between PC1 and PC2 by ping command

2010年12月22日 星期三

How to install apt on CentOS 5.5

When I want to use apt to install or update some package on CentOS 5.5, the system show up "apt-get:command not found".

Why I want to replace yum with apt command? The reason has:

  • The some software is packed for Debian system and it is good utility for me.
  • I am a new beginner about Linux system. It is a little difficult for me to compile the package.
  • If apt command is used directly, it also will install the related dependence library or software.
  • When remove software,we don't worry whether exist garbage library or software on system.

If it exist so much benefit,how to install it on CentOS?
The following procedure is testing by myself and confirm the function is normal on CentOS 5.5 platform. Let's go to do it now!

(1). To confirm O.S. platform is i386 or x86_64 for downloading the true package.

(2).Download the rpmforge-release for i386 and save on /tmp

(3).Import DAG GPG key to RPM repository

(4).Verify downloaded file integrity and safety

(5).Install rpmforge package

(6).Install apt package by yum


(7).edit the file /etc/apt/source.list.d/os.list and add the following words for CentOS


After done the above steps,you can use apt-get and install the apt repositories now.


2010年12月17日 星期五

phpSysInfo troubleshooting on CentOS 5.5

The phpSysInfo is a PHP script that display the hardware or system information as Uptime,CPU, Memory,SCSI,IDE,PCI,Ehernet,Floppy and so on. You can download from this URL http://phpsysinfo.sourceforge.net/ next to extract it to /var/www/html/.

When you do it,please rename config.php.new to config.php by command as "#cp config.php.new config.php". In general,it will show up the related information if you search internet articles by Google. But the result is wrong for me! I get a error message as follows:
phpSysInfo requires the mbstring extension to php in order to work properly.


How to resolve this problem? I use the following command to install php-mbstring module.


But I get a problem again. The phpSysInfo default page always is loading and show "please wait".

Finally, I find out the some php-xml module miss. So I use yum to install these files.

After done the above steps,phpSysInfo function is normal and show some information.

By the way,someone in internet said that php configuration need to be modified if page always show "loading" words. But it is not key point for me about resolving this problem. The value of red box is suggested from Internet article. Maybe you can try to change the default value if suffer "Loading..." this problem.

2010年12月11日 星期六

set yum priority on CentOS 5.5

I want to install yum-priorities plus-in so that the yum install or update priority is stable from official to third-party.

After executing the following command, we can see some .repo file locate on the folder "/etc/yum.repos.d/" like CentOS-Base.repo, and so on.
Next step,we will add priority=N (N=1-99 and priority order is from 1 to 99) on the content of these .repo files.

In some article,someone suggest the priority value is as follows rule.

  • [base], [addons], [updates], [extras] … priority=1
  • [CentOSplus],[contrib] … priority=2
  • the third-party repository … priority=N (maybe set N>10)

So I follow this rule to set my CentOS priority value.


After done it, how to verify whether yum install or update follow priority rule?
You can first execute "yum check-update" command to realize whether "priorities" this word show the postfix of "loaded plugins". If you can see it, I think it will be good beginning.

Unfortunately,I cannot install or update PHP the special repository as webtatic then. How to force to install or update PHP by webtatic repository?
"We can temporarily disable ALL and enable webtatic repository by command."

So do that we did can successfully update PHP from 5.1 to 5.3.3 by yum.

2010年12月10日 星期五

Install PHP on CentOS 5.5

I want to execute a PHP page on my Web site today. I am new beginner for Linux system,so I don't clearly how to compile the PHP by myself.




Based on this reason, I begin to search the related information by Google and lucky for me to find the good news.
http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/

Thank Andy pre-compiled the php for us and share it on personal repository.
So do that I will easy to install the PHP 5.3.3 version on my CenstOS.

To install it, I need to follow Andy request:
first we must tell rpm to accept rpm’s signed by Andy, then add the yum repository information to yum


Reconfirm rpm again,the system did install PHP now.

Although PHP has already been installed on system,it also cannot execute PHP page then.

After search some articles by Google again, I find out the Adding PHP Types is one solution.  So I try to add Extra MIME types by Webmin as following
Type="application/x-httpd-php"           Extensions=".php .htm .html"
Type="application/x-httpd-php-source"    Extensions=".phps"


After restarting Apache WebServer,the testing php page has already been shown up on the firefox.

Good lucky!
I hope I can compile PHP by myself in the future!
I think need to spend more time to study hard the related knowledge.

2010年12月5日 星期日

Install vmware tool on Ubuntu in my first experience

Today I want to install Ubuntu Desktop edition on Vmware environment. Why I have this idea?
First, I want to realize whether Ubuntu with WINE can support a lot of Microsoft platform software than other Linux version as RedHat,CentOS and so on.
Second point, Maybe my job will use more and more Linux software in the future.
Base on above reason, I think it need to be prepared the related Linux technical or skill for me.

I never have the enough experience on Linux platform before. After install Ubuntu Desktop,I find out I have no root password. It surprised to me that the installation process never ask me to key in any root password. This problem is found out due to need to install vmware tool.

When I extract vmware tool to the specific path next to execute vmware-install.pl in terminal window, the error message show up as following.

In install procedure, I remember I just name a account "DW" and password once. Besides this,the system never ask me key password for root. So I key in DW's password and get the wrong result.

Let me exchange root account, I think. When I do it, the system ask me the root's password for authentication. Of course, I still get the wrong message.

After google this error, I find out the Ubuntu randomly assign password for root after installing Ubuntu system. This is why the high priority is change root password. Because I need to use it to install vmware tool.

How to do it? It just two steps:
(1)switch root by sudo command and key in personal password.
(2)change root password by passwd command
After finish these steps,the root password did is changed now.

When I switch root and key the new password, the environment has already been changed to root one.

Next to execute .pl, the system did can run this program now.

It is very interested in installing Ubuntu for me. That is have specific thought in the every Linux platform.
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.