1. Modify Redhat ENTERPRISE5 language
Problem Description: Switching languages
|
Cd/etc/sysconfig
VI i18n
Will Lang=en_us. UTF-8
Change into lang=zh_cn.gb2312 |
2.bash:ifconfig:command not found
Problem Description:
Switch to the root user
[Email protected]/]$ ifconfig
Still tip: "Bash:ifconfig:command not Found"
|
Whereis ifconfig look at the directory under which this command is
Method one: [[email protected] sbin]$/sbin/ifconfig can appear using the
Method two: [[email protected] sbin]$ export path= $PATH:/sbin This setting, the next time you can access directly, free of the first kind of trouble
Method Three: Modify the/etc/profile file, comment out the IF statement can be
Comment out the following if statement:
# Path Manipulation
If ["$EUID" = "0"]; Then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
Fi
Revision changed to
# Path Manipulation
# if ["$EUID" = "0"]; Then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
#fi |
3. Redhat Linux boot to the command line
|
Vi/etc/inittab Id:5:initdefault: Change the sentence in 5 to 3 |
4. Redhat installation of JDK failed
The following error occurred while installing 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 MySQL remote connection root permissions
|
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' Password ' with Grant option;
(% means all external machines, if a certain machine is specified, the% is changed to the corresponding machine name; ' root ' means the username to be used.) MySQL> Flush privileges;
(Run this sentence to take effect, or restart MySQL) |
6. Ubuntu Configuration static IP
|
[Email protected]:~# 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 |
|
[Email protected]:~#/etc/init.d/networking Restart |
If you configure dynamic IP 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 |
7Ubuntu Mounting Chkconfig
in Ubuntu , there is no chkconfig command to install Chkconfig_11.0-79.1-2_all.deb to achieve the purpose of using the Chkconfig command.
8.ubuntu MySQL Installation
Install the mysql-6.0.7-alpha-linux-i686-glibc23.tar.gz version of Linux.
|
Groupadd MySQL
useradd-g MySQL 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 under Linux
If you use MySQL under Linux, you may get garbled at noon. By querying the MySQL encoding set you can find that the latin1 you are using needs to be modified.
Modify the/ETC/MY.CNF configuration file.
|
# The following options would 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 = 16M
Max_allowed_packet = 1M
Table_cache =
Sort_buffer_size = 512K
Net_buffer_length = 8 k
Read_buffer_size = 256K
Read_rnd_buffer_size = 512K
Myisam_sort_buffer_size = 8M
Default-character-set=utf8 |
Review the encoding set information for the database again after restarting the database.
|
/etc/init.d/mysql stop
/etc/init.d/mysql start |