linux learn

来源:互联网 发布:淘宝网上怎么备案啊 编辑:程序博客网 时间:2024/06/06 18:55

ifconfig=ipconfig

how to install java:

down rpm.bin
1.change mod :chmod a+x  java*.rpm.bin
2.run  ./java*.rpm.bin
3.rpm -iv jre-1_5_0-linux-i586.rpm

linux system env file is /etc/profile

etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.
并从/etc/profile.d目录的配置文件中搜集shell的设置.
/etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.
~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该
文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.
~/.bashrc:该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该
该文件被读取.
~/.bash_logout:当每次退出系统(退出bash shell)时,执行该文件.

另外,/etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他们是"父子"关系.

~/.bash_profile 是交互式、login 方式进入 bash 运行的
~/.bashrc 是交互式 non-login 方式进入 bash 运行的


linux command:
cp:
-a 尽可能将档案状态、权限等资料都照原状予以复制。
-r 若 source 中含有目录名,则将目录下之档案亦皆依序拷贝至目的地。
-f 若目的地已经有相同档名的档案存在,则在复制前先予以删除再行复制。
tail:


install the zhcon:
1.tar zxf zhcon*...tar.gz  -c/tmp :   explore to  /tmp
2. cd /tmp/zhocn-0.2 and  run   ./configure
3. make install
4.OK
5.when you in con ,run th e zhcon ,it just  like ucdos .
 this is ok for redflag linux,but not ok in redhat ,in redhat it change to english

install DBI
1.tar xzvf DBI-1.14.tar.gz
2.cd DBI-1.14
3.perl Makefile.PL
4.make
5.make test
6.make install

add user and gorup
root# groupadd mysql   -
[root@localhost mysql]# useradd -g mysql mysql
/********************it must add the  "./scripts" directory*****************************/
root#  ./scripts/mysql_install_db  - -user=mysql  (must at mysql root directory)
/*******************************************************/
then: it repear:
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
/***********************************************************************************/


[root@data mysql]# chown -R root .
[root@data mysql]# chown -R mysql data
[root@data mysql]# chgrp -R mysql .

cat -b xxx -可以加上行号:

远程IP mysql 不能访问问题:
insert into `user` values ('172.18.18.99','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0)

pwd:查看当前的目录

!vi -- 上一个vi命令
!cat   :上一个cat命令 

shutdown the  apache 's question:  when i  shutdown the apache server use  "apachectl stop", the follow error appeared   "Could not determine the server's fully qualified domain name,"  

resolve :  change the %apache_home/conf/httpd.conf  file    remove the comment   "serverName = localhost"

原创粉丝点击