Linux problem summary, linux Summary

Source: Internet
Author: User

Linux problem summary, linux Summary
1. Modify the redhat performanise5 Language

Problem description: language change

Cd/etc/sysconfig
Vi i18n
Set LANG = en_US.UTF-8
Change to LANG = zh_CN.gb2312

 

2. bash: ifconfig: command not found

Problem description:

Switch to the root user
[Root @ localhost/] $ ifconfig
Still prompt: "bash: ifconfig: command not found"

 

Whereis ifconfig

Method 1: [root @ localhost sbin] $/sbin/ifconfig
Method 2: [root @ localhost sbin] $ export PATH = $ PATH:/sbin. After this setting, you can directly access it next time, eliminating the first type of trouble.

 

Method 3: Modify the/etc/profile file and comment out the if statement.
Comment out the following if statement:
# Path manipulation
If ["$ EUID" = "0"]; then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
Fi
Change
# Path manipulation
# If ["$ EUID" = "0"]; then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
# Fi

3. redhat linux enters the command line after it is started.

Vi/etc/inittab id: 5: initdefault: change 5 in this sentence to 3.

 

4. Failed to install JDK in redhat

The following error occurs when installing the jdk-7u21-linux-i586.tar.gz in red hat enterprise linux5:

Error: dl failure on line 864

Error: failed/home/jiangyang/jdk1.7.0 _ 21/jre/lib/i386/client/libjvm. so, because/home/jiangyang/jdk1.7.0 _ 21/jre/lib/i386/client/libjvm. so: cannot restore segment prot after reloc: Permission denied

 

Solution:

Chcon-t textrel_shlib_t $ JAVA_HOME/jre/lib/i386/client/libjvm. so

 

5. Set the root permission for mysql remote connection

Mysql> Grant all privileges on *. * to 'root' @ '%' identified by 'Password' with grant option;
(% Indicates all external machines. If a specific machine is specified, change % to the corresponding machine name; 'root' indicates the user name to be used ,)
Mysql> flush privileges;

(Run this statement to take effect, or restart MySQL)

6. configure a static IP address in ubuntu

Root @ ubuntu1 :~ # Vi/etc/network/interfaces

# This file describes the network interfaces available on your system

# And how to activate them. For more information, see interfaces (5 ).

 

# The loopback network interface

Auto lo

Iface lo inet loopback

 

# The primary network interface

Auto eth0

 

Iface eth0 inet static

Address 192.168.2.111

Netmask 255.255.255.0

Gateway 192.168.2.1

Root @ ubuntu1 :~ #/Etc/init. d/networking restart

 

If the dynamic IP address is configured as follows:

 

# This file describes the network interfaces available on your system

# And how to activate them. For more information, see interfaces (5 ).

 

# The loopback network interface

Auto lo

Iface lo inet loopback

 

# The primary network interface

Auto eth0

Iface eth0 inet dhcp

7 install chkconfig in Ubuntu

There is no chkconfig command in Ubuntu and the chkconfig command is used by installing the chkconfig_11.0-79.1-2_all.deb.

8. Install ubuntu mysql

Install mysql-6.0.7-alpha-linux-i686-glibc23.tar.gz linux.

 

Groupadd mysql

Useradd-g mysql

Cd/usr/local

Gunzip </path/to/mysql-VERSION-OS.tar.gz | tar xvf-

Ln-s full-path-to-mysql-VERSION-OS mysql

Cd mysql

Chown-R mysql.

Chgrp-R mysql.

Scripts/mysql_install_db -- user = mysql

Chown-R root.

Chown-R mysql data

Bin/mysqld_safe -- user = mysql &

/Usr/local/mysql/bin/mysqladmin-u root password 'new password'

Cp support-files/mysql. server/etc/init. d/mysql

Chmod + x/etc/rc. d/init. d/mysql

Chkconfig -- add mysql

Cp support-files/my-medium.cnf/etc/my. cnf

Service mysql start

9. mysql garbled characters in linux

If mysql is used in linux, garbled characters may occur at noon. By querying the mysql replica set, you can find that latin1 needs to be modified.

 

Modify the/etc/my. cnf configuration file.

 

# The following options will be passed to all MySQL clients

[Client]

# Password = your_password

Port = 3306

Socket =/tmp/mysql. sock

Default-character-set = utf8

 

# Here follows entries for some specific programs

 

# The MySQL server

[Mysqld]

Port = 3306

Socket =/tmp/mysql. sock

Skip-locking

Key_buffer = 16 M

Max_allowed_packet = 1 M

Table_cache = 64

Sort_buffer_size = 512 K

Net_buffer_length = 8 K

Read_buffer_size = 256 K

Read_rnd_buffer_size = 512 K

Myisam_sort_buffer_size = 8 M

Default-character-set = utf8

 

After the database is restarted, view the region set information of the database again.

 

/Etc/init. d/mysql stop

/Etc/init. d/mysql start

 


LINUX learning experiences

First, tell you not to be afraid. You can install it as prompted. Then, read the following:

Linux installation in Windows

HQY published on 18:25:00
If you want to use both Windows and Linux systems on the same computer, you must first learn to install Linux on a computer with Windows systems installed.

For Windows/Linux systems with multiple operating systems, the installation sequence is to install Windows first, and then Linux. Next we will introduce how to install RedHat Linux 9.0 on a single hard disk that has been installed on Windows.

Preparations before Linux Installation
1. Collect hardware information in Windows
Before installing Linux, you need to use the Windows system to learn basic information about computer hardware, such as the memory size, sound card, display, mouse, and graphics card model.

2. Set the boot system from the CD
Linux supports several installation methods, but it is most convenient and fast to directly start the installation with a CD boot. If you want the machine to start with a CD, you need to modify the BIOS settings, change the CD-ROM to the first place on the machine order.

3. Linux partition
Linux partition Representation
Partitioning separates disk drives into independent areas. Each area is like a separate disk drive. in DOS/Windows, disk partitions can be divided into C, D, and E disks. However, in Linux, disks are managed and used as block device files, which start with/dev (device abbreviation.

For example, in Linux, "/dev/hda1" is used to represent the C drive in Windows.
Among them, hd indicates the IDE Hard Disk (sd for SCSI hard disk); hda indicates the first IDE Hard Disk (hdb for the second);/dev/hda1 indicates the primary partition, and the logical partition starts from 5, for example: /dev/hda5,/dev/hda6,/dev/hda7, etc.

Prepare partitions for Linux
Linux partitions are different from Windows partitions and cannot be shared. Therefore, you need to create an idle partition for Linux, preferably the last partition. 1. Use the Partition Magic (Partition Magic) software in Windows to free up space on disk D to create a new Partition edisk (or use an existing idle edisk). The file type is currently set to FAT32, for Linux partition creation later, RedHat 9.0 requires about 4 ~ 5 GB space.

4. Linux File System
File systems vary with operating systems. The Windows File System is FAT16, FAT32, and NTFS. Linux file systems can be divided into ext2, ext3, swap, and vfat. Ext2 supports a file name of up to 255 characters. ext3 is based on ext2. It mainly reduces the time it takes to restore the file system after the system crashes. RedHat 9.0 defaults to ext3; swap zone swap is used to support virtual memory; Windows FAT partition is displayed as vfat file type in Linux.

1. boot with the first installation disc of RedHat 9.0. The installation menu will appear after the system is started.

The installation Menu provides a graphical and text Installation Method for the user to choose from. Press enter to select the graphical mode for installation. Before entering the installation mode of the graphic screen, RedHat 9.0 is more than the previous version, that is, it prompts to check the installation disc media, or you can press the "Skip" button to Skip the detection.

2. Then the installer automatically detects the hardware, including the video card (Display Card), display, and mouse configuration, and then enters the Installation Wizard of the graphic screen. In the "language selection" screen, select "simplified Chinese", so that the text on the subsequent installation interface will be changed to Chinese. On the keyboard configuration screen, use the default American English keyboard. Select... the remaining full text>

Training reports for Linux?

Linux

Real
Training
Report
Notice

Class: Network 081
Name: Xu Xiaoyu
Student ID: 5

Training Content:
1. Install the RedLinux System in text mode and set it to start from text mode by default. Wait for 5 seconds to start.

2. Create a directory:

3. copy the file to the/tmp/jxgcxy directory and rename it temp. Modify the permission to read, write, and execute the file by the owner, and read and write the file in the same group, read by others. Delete the wl directory.

4. Copy the last 10 lines in the/etc/shadow file to the test. c file.

5. Add User test, which limits the user test to be in the/home partition and can only use up to 20 mb of disk space.

6. A system administrator needs to do some repetitive work every day. Prepare a solution according to the following requirements: (1) Delete all directories and all files under the/abc directory at pm. (2) archive and compress all files in the/home/test directory to the test-data.tar.gz file in the/backupcatalog every Friday.

7. Implement disk quota. Add ten users: test1 ~ Test10: Limits test1 users, including hard block limit of 1000, hard limit of 100 for I nodes, soft limit of 50, and set the time limit to 3 days, copy the quota settings of test1 users to nine other users.

8. Create a user jxgcxy and specify the user's main directory as/tmp/jxgcxy. the user ID is 550, the group number is 580, the shell used is bash, and the user test1 is renamed user1, and modify its home directory to/home/user1. Set test2 as the root group and set the account validity period to one month to check whether the corresponding file is set successfully.

9. Use the ps and top commands to view the process and compare the advantages and disadvantages of the two methods. Do not refresh the meaning of each part of the result and refresh multiple times in the top, set the ftp priority to-5 and the user test priority to-5.

10. Install the VNC server on the linux system, install the VNC client software on the windows system, and operate the linux system using the client software.

11. Design a shell program and create 50 directories under the/userdate directory, that is, user1 ~ User50, and set the permissions for each directory. the permissions of other users are: read; the permissions of the file owner are: read, write, and execute; the permissions of the file owner in the group are: read and execute.

I have been busy with my short internship. Although it is extremely short, I feel a lot about it. I finally understand why the school should adopt such practical training activities, it is not only to enhance the supplement of knowledge, but also to sum up the previous knowledge and review the previous knowledge.
 

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.