Rootop 服务器运维与web架构

2011-09-15
发表者 Venus
暂无评论

重置mysql数据库root用户的密码 (mysql忘记root密码)

添加红色部分代码:

[root@rhel ~]# vi /etc/my.cnf
[mysqld]
skip-grant-tables
max_connections=1000
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
保存退出,重启服务。

[root@rhel ~]# service mysqld restart
停止 MySQL:                                               [确定]
启动 MySQL:
[root@rhel ~]# mysql -u root -p
Enter password:             //此处直接回车,即可进入mysql数据库
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

然后根据自己情况修改密码即可。

修改密码可参考:https://www.rootop.org/pages/354.html

命令行参数启动mysql:/usr/bin/mysqld_safe –skip-grant-tables &

–skip-grant-tables

在启动mysql时不启动 grant-tables 授权表。
PS:
如果在my.cnf中添加 skip-grant-tables 后,那么任何的帐号用任何的密码都可以登录到mysql数据库。

2011-09-15
发表者 Venus
暂无评论

tar: 由于前面延迟的错误而退出

linux-2.6.18/arch/m68k/fpsp040/x_unfl.S
tar: 跳转到下一个头
tar: 归档包含过时的 base-64 头

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: 由于前面延迟的错误而退出

出现这个问题,一般是文件受到破坏。再怎么折腾也没用··· ···

2011-09-09
发表者 Venus
暂无评论

手动分区后GHOST系统不能引导

      用PM软件手动分区,然后ghost到c盘,电脑启动后无法引导,根据系统启动过程判定为磁盘引导问题。    

     解决方法:

     进入PE,打开 PartitionMagic ,进入程序后选择C盘,右键,选择“设置活动”。
     不同版本的 PartitionMagic 操作界面不太一样。在菜单里也有一个“设置活动”,然后应用重启即可。

     活动分区是计算机启动分区,操作系统的启动文件都装在这个分区,windows系统下一般被默认为C盘。在Windows7中,Windows7系统自动分出100MB的分区用来存放Windows7操作系统的启动文件,此分区即为活动分区并且这个分区没有分配盘符。而Linux则根据具体设置而定。启动系统时,活动分区上的操作系统将执行一个称为驱动器映像的过程,它给主分区和逻辑驱动器分配驱动器名。所有的主分区首先被映像,而逻辑驱动器用后续的字母指定。

2011-09-08
发表者 Venus
暂无评论

redhat 5.5_64 编译 tomcat-connectors-1.2.32 configure: error: Cannot find the WebServer

[root@rhel native]# yum install -y gcc
[root@rhel native]# yum install -y gcc-c++
[root@rhel native]# ./configure
checking for target platform… unix
no apache given
no netscape given
configure: error: Cannot find the WebServer
发现是没有“apxs”命令, ./configure –with-apxs=/usr/sbin/apxs 编译时,要查找到此拓展工具才会继续进行编译,最后发现需要安装httpd-devel 包。
[root@rhel native]# yum install -y httpd-devel
[root@rhel native]# ./configure –with-apxs=/usr/sbin/apxs
apxs的相关信息可以参考下:https://www.rootop.org/ApacheManual/Apache2.2_zh_CN/programs/apxs.html

然后make安装
[root@rhel apache-2.0]# pwd
/root/jsp/tomcat-connectors-1.2.32-src/native/apache-2.0
[root@rhel apache-2.0]# ll mod_jk.so
-rwxr-xr-x 1 root root 1080859 09-08 14:35 mod_jk.so
[root@rhel apache-2.0]#

编译出mod_jk.so模块。

2011-09-08
发表者 Venus
暂无评论

HTTP Status 403 – Access to the requested resource has been denied

HTTP Status 403 – Access to the requested resource has been denied

——————————————————————————–

type Status report

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
——————————————————————————–

Apache Tomcat/7.0.21

      tomcat 管理用户登录时,报如上错误,折腾了很久,才搞定,而且不同的版本,配置文件也是不一样的。

服务器tomcat版本为:apache-tomcat-7.0.21.tar.gz  我最终的配置内容如下:

<?xml version=’1.0′ encoding=’utf-8′?>
<tomcat-users>
  <role rolename=”admin-gui”/>
  <role rolename=”admin-script”/>
  <role rolename=”manager-gui”/>
  <role rolename=”manager-script”/>
  <role rolename=”manager-jmx”/>
  <role rolename=”manager-status”/>
  <user username=”nq” password=”nq” roles=”admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status”/>
</tomcat-users>

修改完tomcat-users.xml后重启tomcat服务,并且清空IE缓存密码表单等信息再次尝试登录!

如果你用了我上面的配置内容还是无法登陆,请尝试度娘及谷大爷中的其它配置代码。