Press "Enter" to skip to content

Category: Linux运维

Linux,unix,mysql,database,oracle,mysql

Linux/Unix系统常用查找命令

find / -name httpd.conf 查找根目录下名为httpd.conf的文件
find /etc -name ‘*srm*’ 查找/etc目录下,文件名中间包含srm的文件
find / -name “httpd.conf” -ls 查找根目录下名为httpd.conf的文件,并显示文件信息
find /tmp -size +100c 查找/tmp目录中大于100字节的文件,c表示字节,如果不加c表示查找100块的文件
find / -type d -name httpd 查找根目录下名为httpd的目录

6 Comments

mysql mysqladmin: command not found解决方法

有时候安装好MySQL程序的时候,直接输入命令mysql或mysqladmin会发现提示命令不存在,这是由于系统默认会查找/usr/bin下的命令,如果这个命令不在这个目录下,当然会找不到命令,我们需要做的就是映射一个链接到/usr/bin目录下,相当于建立一个链接文件。

首先得知道mysql命令或mysqladmin命令的完整路径,比如mysql的路径是:/usr/local/mysql/bin/mysql,我们则可以这样执行命令:

ln -s /usr/local/mysql/bin/mysql /usr/bin
ln -s /usr/local/mysql/bin/mysqladmin /usr/bin

当提示mysqldump: command not found时同样可以通过此方法来解决。

8 Comments

linux中cat命令的使用方法

cat命令在linux系统中算是比较常用的命令.

cat主要有三大功能:
1.一次显示整个文件。
$ cat filename
2.从键盘创建一个文件。
$ cat > filename
只能创建新文件,不能编辑已有文件.
3.将几个文件合并为一个文件。
$cat file1 file2 > file

cat具体命令格式为 : cat [-AbeEnstTuv] [–help] [–version] fileName

说明:把档案串连接后传到基本输出(屏幕或加 > fileName 到另一个档案)

8 Comments

Linux下查看指定端口的占用情况

1,查看8010端口是否被占用
[root@cloud ~]# netstat -an|grep 8010
tcp 0 0 0.0.0.0:8010 0.0.0.0:* LISTEN

2,查看8010是被何以程序占用
[root@cloud ~]# lsof -i:8010
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 25402 root 38u IPv4 207991 TCP *:8010 (LISTEN)
哦,原来是被一个java程序给占用了。
查看这个进程的情况用ps -ef|grep java,可能会有很多java进程,找到PID为25402的即可。

3,杀死这个进程,用Kill -9 25402

注意:如果没有lsof这个命令,CentOS可以用yum install lsof来安装之。

Leave a Comment

在windows server上安装Linux(centos)过程

在windows server上安装Linux(centos)过程,记录一下。

1,在windows server下载此文件,然后解压。安装其中的WinGrub.exe,一般装到就C盘默认就好。

2,将ISOLINUX目录下的所有文件复制到C盘根目录。

3,启动WinGrub,选择菜单Tools – Install Grub,然后选择下面的boot.ini 点击lnstall。

4,编辑C:\Grub\MENU.LST,加入以下代码

title Install centos 5.7
root (hd0,0)
kernel /vmlinuz
initrd /initrd.img
26 Comments

如何判断自己的VPS是OpenVZ的还是Xen的

一般来说,VPS的虚拟化技术,有Xen、OpenVZ、Xen HVM和VMware这几种,那么,如何判断自己的VPS是基于哪种虚拟化技术的呢?

1、执行:ls /proc/命令,一般Xen的VPS,/proc目录下面会有xen的目录,openvz的会有vz目录。

2、执行:free -m命令看内存,openvz的没有swap,当然也有xen的没有swap,但是xen的是可以加的,openvz不行。

3、执行:uname -a命令,有些xen的VPS里面会显示有xen。

4、执行:ifconfig命令查看网卡,openvz的一般都是venet0:* ,xen的一般都是eth*。

5、通过VPS控制面板查看,像SolusVM、vePortal控制面板上都显示虚拟技术。

11 Comments

Too difficult to operate Oracle? Try MiCORE Solutions!

Maybe you feel too difficult to operate the Oracle database, maybe you are worried about this, but now you don’t need to worry about this any longer, because MiCORE Solutions can help you.

MiCORE Solutions is a very professional company which provide Oracle technology support and services, specializing in architecting, optimizing, and managing complex Oracle environments. Their services is very simple, monitor or optimize your Oracle products from remote, or you can call them your “remote oracle dba“.

MiCORE Solutions have a strong and professional expert team who can give your database a simple, effective maintenance and upgrades. They can make sure of your database secure, stable and easily. And they also provide some other services such as “Google apps consultants“, may be you will like it.

Try their service: www.micoresolutions.com.

9 Comments