SΑ,
I will start with some tips for CentOS, I am using them all the time. So, I thought may be some one else will need and use them.
- Use
- GUI tool to configure your network.
- To check your wireless connection use:
# iwlist wlan0 scan
- To show the IP routing table:
- There is a work around to enable your wireless card
# rpm --import …./RPM-GPG-key-…
# rpm -Uvh …./elrepo…….rpm
# yum --enablerepo=elrepo install kmod-ndiswrraper
#modprobe ndiswrraper
# ndiswrraper -i /..path-to-the-driver/hardware.inf & .sys file
- To mount NTFS on Centos:
# uname -i
Install DAG's GPG key
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
Verify the package you have downloaded
# rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
# rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
Install the package
# rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
This will add a yum repository config file and import the appropriate GPG keys.
# yum install fuse fuse-ntfs-3g
# yum --enablerepo=rpmforge install fuse fuse-ntfs-3g
# rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
This will add a yum repository config file and import the appropriate GPG keys.
# yum install fuse fuse-ntfs-3g
# yum --enablerepo=rpmforge install fuse fuse-ntfs-3g
Create a mount point
# mkdir /mymount/ /mymount/win/
# vi /etc/fstab
/dev/sda1 /mymount/win ntfs-3g rw,umask=0000,defaults 0 0
# mount /mymount/win
# mkdir /mymount/ /mymount/win/
# vi /etc/fstab
/dev/sda1 /mymount/win ntfs-3g rw,umask=0000,defaults 0 0
# mount /mymount/win
- To increase the time out before the default OS starting:
Timeout=30 (in sec)
- To install a new repository
Verify the package you have downloaded
# rpm –K ……rpm
# rpm -Uvh ……rpm
# yum --enable-repo=”Repo-name” install “Required package”
- If you face any problem with enabling the network
Gateway=”Gateway IP”
2. Check /etc/resolv.conf
nameserver “DNS IP”
3. Check the default gateway using: # route
If it is not correct delete it using:
# /sbin/route del default gw GW-IP
Add the correct one:
# /sbin/route add default gw GW-IP
- Wget is a very cool command-line down loader for Linux and UNIX environments.
Most Linux distributions come with wget pre-installed.
The most basic operation a download manager needs to perform is to download a file from a URL. Here’s how you would use wget to download a file:
# wget http://www.sevenacross.com/photos.zip
- Display TOTAL hard disk size
- To disable SELinux:
Selinux=disable
Or : # setenforce 0
Or : # lokkit //Firewall and SELinux configuration tool.
- To check md5
- To list CPU info
- To check the RAM Size in Linux Machine
- To disable ping responses
OR
#sysctl -w net.ipv4.icmp_echo_ignore_all=1
- To enable ping responses
OR
#sysctl -w net.ipv4.icmp_echo_ignore_all=0
- To make this permanent set the following into /etc/sysctl.conf
How to Assign an IP Address Using ifconfig Command Line Tool?
# cp /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1.bak
ifconfig eth1 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
The
ifconfig
command does not store these changes permanently. Upon reboot this information is lost. To make your changes permanent, open the file /etc/sysconfig/network-scripts/ifcfg-eth1 and enter the following information.Static IP configuration
DEVICE=eth1
BOOTPROTO=static
BROADCAST=XXX.XXX.XXX.255
IPADDR=XXX.XXX.XXX.XXX
NETMASK=255.255.255.0
NETWORK=XXX.XXX.XXX.0
ONBOOT=yes
DHCP configuration
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
Once you have made changes to the files above, you can make the network card use the new values without any reboot by running the following command.
# ifup eth1
ifup is a script residing in /etc/sysconfig/network-scripts/ifup, which is used to bring network interfaces on-line.
Note: To disable DHCP change BOOTPROTO=dhcp to BOOTPROTO=none in the ifcfg-eth1 file above.
In order for updated information in any of these files to take effect, one must issue the command:
# service network restart
- Setting a Default Gateway for Redhat / CentOS systems?
Option 1: You can add a gateway definition to the /etc/sysconfig/network file. This definition will apply to all network interfaces.
/etc/sysconfig/network file.
GATEWAY=192.168.4.1
Option 2: You can define a default gateway for a specific interface. For this approach you need to modify your interface definition. Let’s say we want to modify eth0 then you need to add the same definition to the /etc/sysconfig/network-scripts/ifcfg-eth0 file.
For both options, your modifications will be activated after you restart your networking service.
root@centos ~]# /etc/init.d/networking restart
I hope if any one have any question or any comment will not hesitate to tell me.
Done.
Inas
No comments:
Post a Comment