First knowledge of Suse--linux

Source: Internet
Author: User

Linux is a very strange system, almost every different version, the installation and other important commands it uses are changed. If you want to master an OS, then if you install software/applications, that's the first step in getting started.
In the installation command:

RedHat and CentOS use "yum"

Debain, Ubuntu use "Apt-get"
Suse-linux uses "Zypper" of course, "Yast2"/"YaST" is also available.
Its usage: zypper [--Global options] < commands > [--Command options] [parameters]

Zypper se xxxxx is a search package
Zypper SL Lists the source list
Zypper Refresh list (equivalent to Yum clean all)
Zypper in xxxxx is the installation software
Zypper RM xxxx Delete
Zypper up xxxx Update software

Zypper-h See Help, of course you can also direct man
First, about SuSE source
Add Command:
#zyppr ar URL Alias
AR is the abbreviation of Addrepo

URL is the address of the software source
Alias is one of your names.

Local ISO source, how to add:

~>sudo zypper Addrepo Iso:/?iso=/media/software/opensuse-11.4-dvd-i586.iso dvdiso
To add a local source manually:
Create a file under/ETC/ZYPP/REPOS.D Iso_local.repo

The contents of the file are as follows:

[Iso_local]

Name=iso_local

Enabled=1

Autorefresh=1

#以下为本地rmp文件夹路径

Baseurl=dir:///mnt/iso

path=/

Type=plaindir

Keeppackages=0

To add a source on the network, in the way:
#zypper ar Http://download.opensuse.org/repositories/home:/Thruth/openSUSE_11.0/My_home_Thruth

Some of the related commands:

SuSEfirewall2 Stop/start/restart (firewall)
#vim/etc/sysconfig/susefirewall2 (Modify command)
#/etc/sysconfig/network (Network configuration directory)

Report:

Suse Linux Common Commands Summary

1 SUSE9 Configuring the default gateway

A, add the following line under the/etc/sysconfig/network/routes file:

Default gateway IP address--

B. Restart the Network Service

#/etc/init.d/xinetd Restart

# rcnetwork Restart

C. View routes

# Netstat-r

2 Suse9 to turn on the Telnet service

A, modify/etc/xinetd.d/telnet file: Disnable=no

If the Telnet file does not exist under/ETC/XINETD.D, it is possible that the Telnet Service pack is not installed and requires

Install it through the CD.

b, modify the/etc/pam.d/login file, comment The following line, allow the root user to Telnet

"Auth Required pam_securetty.so"

C. Edit the/etc/securetty file

# Vi/etc/securetty

Add the following content to the file:

pts/0

Pts/1

Pts/2

Pts/3

Pts/4

Pts/5

Pts/6

Pts/7

Pts/8

Pts/9

d Restart Network Service

#/etc/init.d/xinetd Restart

# rcnetwork Restart

3 Open FTP service under SUSE9

A, modify/ETC/XINETD.D/VSFTPD file: Disnable=no

b, modify the/etc/vsftpd.conf file, uncomment the following line:

Write_enable=yes

Local_enable=yes

local_umask=022

Ascii_upload_enable=yes

Ascii_download_enable=yes

C, modify the/etc/ftpusers, comment out the FTP-enabled users, such as root

D. Restart the Network Service

#/etc/init.d/xinetd Restart

4 Suse9 under Configuration rlogin

A. Configure the. rhosts file in the user $home directory

# VI. rhosts

Host Name 1 User name

Host Name 2 user name

B. Modify/etc/xinetd.d/rlogin file: Disnable=no

C, modify the/etc/pam.d/rlogin file, note the following line, allowing the root user rlogin

"Auth Required pam_securetty.so"

D. Restart the Network Service

#/etc/init.d/xinetd Restart

Version 5 kernel

# cat/etc/issue Suse Linux Common command Summary. Internal disclosure

Welcome to SUSE LINUX Enterprise Server 9 (i586)-Kernel \ R (\l).

# cat/proc/version

Linux version 2.6.5-7.201-BIGSMP ([email protected]) (GCC version

3.3.3 (SuSE Linux)) #1 SMP Sun Feb 5 16:58:22 CST 2006

# Uname-r

2.6.5-7.201-bigsmp

Description: 2.6.5 indicates that the operating system version for suse9;201 represents a patched version: 191~243 represents SP2,

244-257 = SP3

6 View CPU, MEM

# grep "model name"/proc/cpuinfo

Model Name:intel (R) Xeon (TM) CPU 2.40GHz

Model Name:intel (R) Xeon (TM) CPU 2.40GHz

Model Name:intel (R) Xeon (TM) CPU 2.40GHz

Model Name:intel (R) Xeon (TM) CPU 2.40GHz

# grep Memtotal/proc/meminfo

memtotal:4147836 KB

7 viewing the number of operating system bits

# getconf Long_bit

32

# getconf Word_bit

32

8 view VCs dual-machine software version

# Rpm-qa | grep vrts

9 Host name Modification

# YaST

Network Devices > Network Card >configure >host name and name server >

To modify the value of host name

10 Checking the system partition

# df–l

11 Checking memory Space

# free-t

12 Check the time zone settings

# Cat/etc/sysconfig/clock

13 Modifying the time zone setting

# YaST

Select System > Date and Time >region (region selection) >time Zone (timezone selection)

14 System Time settings

# date Mmddhhmmccyy

15 re-setting the fiber drive

# Rmmod qla2300

# Rmmod Qla2xxx.ko

# insmod/lib/modules/' uname

-R '/kernel/drivers/scsi/qla2xxx/qla2xxx.ko ql2xfailover=1

# modprobe qla2300

The ql2xfailover=1 is a multi-path feature that turns on the fiber, that is, when a node connects to an external disk, a fibre Channel

When the fault occurs, the system automatically adopts another fibre channel corresponding to the node.

16 Checking disk partition information

# fdisk-l

17 Creating a physical volume

# PVCREATE-FF/DEV/SDB1

-FF: Indicates that you do not need to confirm any information to force the creation.

18 Viewing the PV that has been created

# Pvscan

19 Creating a volume group

# vgcreate-s 4m-v VGGFEP/DEV/SDB1

-S: Specifies the size of the PE, the system default is 4MB, and the maximum value for the logical volume created on the volume group is 256GB.

If you need to create a larger logical volume, you need to expand the value of the PE, such as 8MB, 16MB, and so on.

20 Creating a logical volume

# lvcreate-l 4g-n LVGFEP VGGFEP

21 viewing the volume groups and logical volumes created

# Vgdisplay–v

22 Creating a file system

# mkfs-t REISERFS/DEV/VGGFEP/LVGFEP

23 activating/deactivating a volume group

# vgchange-a y Vggfep

# vgchange-a N VGGFEP

24 Finding Volume Group information

# Vgscan

25IP address configuration

(temporarily valid, will be lost after system restart)

Note: In the SuSE 9 operating system, configuring IP with YaST causes the heartbeat network card to be inactive,

To modify the IP address, do not modify the IP address with YaST.

A, configure eth1 native fixed IP

# ifconfig eth1 10.71.114.10 netmask 255.255.255.0

B. Configure the native floating IP on the eth1 NIC

# ifconfig eth1:0 10.71.114.12 netmask 255.255.255.0

C. Check that the IP address configuration is successful

# ifconfig

26IP address configuration

(Permanent effect)

A, check the MAC address of the network card

# ifconfig Eth1

Where the hwaddr behind the corresponding bold part of the eth1 NIC corresponding to the MAC address, such as:

00:1f:29:e8:97:6e

B. Create an IP profile for the eth1 NIC

# cd/etc/sysconfig/network

# VI ifcfg-eth-id-00:1f:29:e8:97:6e

Add the following content to the file:

bootproto= ' Static '

broadcast1= ' 10.71.105.255 '

ipaddr1= ' 192.168.0.13 '

netmask1= ' 255.255.255.128 '

network1= ' 10.71.105.128 '

Broadcast2= ' 10.71.105.255 '

Ipaddr2= ' 10.71.105.223 '

Netmask2= ' 255.255.255.128 '

Network2= ' 10.71.105.128 '

Mtu= "

Remote_ipaddr= "

Startmode= ' Onboot '

Description

Broadcast: Represents a broadcast address

IPADDR: Represents an IP address

NETMASK: Represents the subnet mask

NETWORK: Represents the routing Address

IPADDR1 a native floating ip,ipaddr2 to a native fixed IP

C. Restart the operating system

d. Check if IP address configuration is successful

# IP Address Show eth1

27 Configuring the IP address and Node name Mapping relationship

# vi/etc/hosts

Add the following content to the/etc/hosts file:

10.71.105.221 GFEP1

10.71.105.222 GFEP2

10.71.105.220 gfepshare_ip

# VI/ETC/HOSTS.EQUIV

Add the following content to the/etc/hosts.equiv file:

Gfep1

Gfep2

28 activating/deactivating the NIC

# ifup Eth1

# Ifdown Eth1

29 Configuring a dual-machine SSH trust relationship

(This action is performed on two nodes)

----------Configuring the SSH trust relationship start--------------------------------

# Ssh-keygen-t DSA

# chmod 755 ~/.ssh

# CD $HOME/.ssh

# CP Id_dsa.pub $HOME/.ssh/authorized_keys2

--Use the FTP command to copy the Id_dsa.pub file of another node to the native/test directory in ASCII mode

Under

# Mkdir/test

# Cd/test

# FTP .....

# cat Id_dsa.pub >> $HOME/.ssh/authorized_keys2

adding passphrase to memory

# exec/usr/bin/ssh-agent $SHELL

# Ssh-add

----------Test the trust relationship----

# SSH Node name

--If prompted connection refused indicates that the SSH service on this node is not started, you need to use the following command

Start:

# sshd

----------Configure the SSH trust relationship end----------------------------------

30 configuring the user's. rhosts file

# VI. rhosts

GFEP1 Root

GFEP2 Root

31 Configuring the Heartbeat card information

A. Edit the HotPlug file

# Cd/etc/sysconfig

# VI HotPlug

Set Hotplug_pci_queue_nic_events to Yes to save the file.

B. Configure config file

# cd/etc/sysconfig/network

# VI Config

Add the MAC address that you want to set as the heartbeat NIC to Mandatory_devices, as follows:

Mandatory_devices= "ETH-ID-00:E0:FC:8C:33:CF

Eth-id-00:e0:fc:8c:33:ce "

Mandatory_devices configured NIC information, the previous MAC address is the MAC address of the main heartbeat network card,

The MAC address of the back is the MAC address of the standby heartbeat network card.

C. Create a configuration file for the main heartbeat card

# VI Ifcfg-eth-id-00:18:82:61:89:45

Add the following to the last line of the file:

Persistent_name=eth0

D. Create a configuration file for the standby heartbeat card

# VI Ifcfg-eth-id-00:18:82:61:89:e3

Add the following to the last line of the file:

Persistent_name=eth4

Locate the following line:

displaymanager.requestport:0

Fix it to

! displaymanager.requestport:0

B. Modify the KDMRC file

# VI/ETC/OPT/KDE3/SHARE/CONFIG/KDM/KDMRC

Modify the Settings section ' [XDMCP] '

Change "Enable=false" to "Enable=true"

C, edit the file '/etc/sysconfig/displaymanager '

Change ' displaymanager_remote_access= ' no ' to

' Displaymanager_remote_access= ' yes '

Change ' displaymanager_root_login_remote= ' no ' to

' Displaymanager_root_login_remote= ' yes '

D. Restart the XDm service

# RCXDM Restart

Open FTP Service under SUSE10SP1

--inetd mode

A, modify/ETC/XINETD.D/VSFTPD file: Disnable=no

b, modify the/etc/vsftpd.conf file, uncomment the following line:

Write_enable=yes

Local_enable=yes

local_umask=022

Ascii_upload_enable=yes

Ascii_download_enable=yes

C, modify the/etc/vsftpd.conf file, note the following line:

Listen=yes

D, modify the/etc/ftpusers, comment out the FTP-enabled users, such as root

E. Restart the Network Service

#/etc/init.d/xinetd Restart

--standalone mode (in case of heavy server load)

A, modify/ETC/XINETD.D/VSFTPD file: Disnable=yes

b, modify the/etc/vsftpd.conf file, uncomment the following line:

Write_enable=yes

Local_enable=yes

local_umask=022

Ascii_upload_enable=yes

Ascii_download_enable=yes

C, modify the/etc/ftpusers, comment out the FTP-enabled users, such as root

D. Restart the Network Service

#/etc/init.d/xinetd Restart

36 Viewing operating system patches

# spident

Conclusion:system is up-to-date!

Found SLE-10-X86_64-SP1

37 Viewing operational versions

# uname-a

# lsb_release-a Http://www.cnblogs.com/sbaicl/archive/2013/06/27/3159847.html

(turn) First suse--linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.