打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
一句话解决linux问题
1、rpm 没有反应
rm -f /var/lib/rpm/__* ; fuser -k /var/lib/rpm/*
2、grub安装错误
在执行grub-install /dev/sda时,如果显示为“/dev/sda does not have any corresponding BIOS drive. ”
那么先执行命令 grub-install --recheck /dev/sda
然后再执行 grub-install /dev/sda
3、Apache启动错误

When I tried to restart my apacher server, i kept getting this error:

Starting httpd: httpd: Could not determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName

 

 [root@myserver]# /etc/init.d/httpd restartStopping httpd:       [  OK  ]

Starting httpd:

httpd: Could not determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName                                                           [  OK  ]

 

THIS IS HOW YOU FIX THIS:

send the follwing two command. You must know your hostname and your domain name for this to work. if you have both, go ahead....

 

echo HOST.DOMAIN.com > /etc/hostname 

HOST = Your host name

DOMAIN = Your Domain Name

 

 /bin/hostname -F /etc/hostname


after I restart my server again, I didnt get the error anymore

hope this helps.


4. how to find the decleration in /usr/include:


> Hello,
>
> Does anyone know which header file defines
> sockaddr_storage?

$ find /usr/include -type f | xargs fgrep -nH sockaddr_storage
/usr/include/bits/socket.h:153:struct sockaddr_storage

 

 


5. The bootloader of RedHat  for Sparc is SILO(Sparc Improved boot LOader)

 and type

    linux single can enter the single user mode

6. 1KB = 1024 B
    1MB = 1024 KB
    1GB = 1024 MB
    1TB = 1024 GB

7. How to float calculation?
   echo "12 / 345" | bc -l

8. Why not color in VIM under SecureCRT?
    1). make sure that vim-enhanced and vim-common have been installed.
    2). make sure terminal->emulation: Linux and ANSI color are selected in SecureCRT
    3). make sure TERM=linux or xterm, not vt100!

9. How to type ^M in VIM?
    Ctrl v then Ctrl m

10. FTP login error:
[nms@wh-nms2 ~]$ ftp 219.243.213.139
Connected to 219.243.213.139.
421 Service not available.
ftp> bye

then check the /etc/hosts.allow in 219.243.213.139
ALL:166.111.247.192/255.255.255.192,202.38.120.240/255.255.255.240,219.243.213.128/255.255.255.248,219.243.214.1/255.255.255.
248

the red note should be changed to 219.243.213.136/255.255.255.248, which can then contain the 219.243.213.139/140, etc

finally, we can login with success:
[nms@wh-nms2 ~]$ ftp 219.243.213.139
Connected to 219.243.213.139.
220 (vsFTPd 1.1.3)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (219.243.213.139:nms): ftp
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.

11 a little tip in ctags + vim
      how to enable the recurse function?
      ctags -R or --recurse(recommended) can generate a single "tag" file in the top directory, but this file contains all the tags under the top source code tree.
     Then how to search in the sub-directory?
      Edit the ~/.vimrc and add the
         "set tags=tags;"  ---------the ";" is necessary!
      then the vim will search the tag upward the upper directory.

12  can‘t access the MySQL DB,
     $ ‘mysql -uroot -hlocalhost -p‘
     $ can‘t access with "root@localhost" , permission denied
    the reason behind it is almost certain be that : you forget the password of root for Database! Because the MySQL Database can be accessed by root with default.
   then the problem becomes:
    "How to obtain the forget root password of MySQL ?"
    the steps is :
    # killall -TERM myspld
    # safe_mysqld --skip-grant-tables &
    # mysql -u root
   mysql > use mysql; update user set Password=password("new_password") where User="root" and Host="localhost"; flush privileges; quit
    # killall -TERM mysqld
    # service mysqld start
    Then you can access the DB with root successfully.   

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
教你怎么制作Linux U盘启动盘
简单构建Linux(LFS)
将centos7打造成桌面系统
【折腾一天安装Centos7,以及后面恢复Win7引导的曲折历程】
CentOS 7 Tomcat服务的安装与配置
linux的root密码更改 - Linux - Tech - JavaEye论坛
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服