Chinaunix首页 | 论坛 | 博客
  • 博客访问: 213872
  • 博文数量: 39
  • 博客积分: 891
  • 博客等级: 准尉
  • 技术积分: 452
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-08 18:24
文章分类

全部博文(39)

文章存档

2012年(11)

2011年(28)

我的朋友

分类: Java

2011-11-11 11:41:27

    过一段时间就有新的项目归我管了,就是如标题所列的环境,现在连具体的版本号都不清楚.不过还是打算自己搭建一个环境,跑下自己的demo.  但是开源的东西,自由度太大了,每一个细小的差别都会造成巨大的影响,以前没什么感觉,现在感触深刻了.项目的文档风格完全不同.可能自己接触的比较少吧.
    linux 采用的是Red-Hat的 2.6.18-53.el5 32位.
    apache2.2.13
    tomcat6.0
    mysql5.5
   
安装apache,编译安装 路径是/usr/local/httpd.2.2.21
tomcat路径是
/usr/local/apache-tomcat-6.0.33
mysql一开始采用编译安装,我没有看懂doc,果断暂缓,采用rpm安装.
安装完成之后提示:
   
  1. #rpm -ivh MySQL-server-5.5.17-1.rhel5.i386.rpm
  2. Preparing... ########################################### [100%]
  3.    1:MySQL-server ########################################### [100%]

  4. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  5. To do so, start the server, then issue the following commands:

  6. /usr/bin/mysqladmin -u root password 'new-password'
  7. /usr/bin/mysqladmin -u root -h roshan password 'new-password'

  8. Alternatively you can run:
  9. /usr/bin/mysql_secure_installation

  10. which will also give you the option of removing the test
  11. databases and anonymous user created by default. This is
  12. strongly recommended for production servers.

  13. See the manual for more instructions.

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

  15. [root@xxxxx]# /usr/bin/mysqladmin -u root password xxxxxxx
  16. -bash: /usr/bin/mysqladmin: No such file or directory
运行了下rpm的安装命令.一切都默认.没找到安装路径,连root的密码一开始都没改成功.原因是,我没有安装客户端.原以为服务器自带这些管理软件.又一次想当然了.悲催.
  1. rpm -ivh MySQL-client-5.5.17-1.rhel5.i386.rpm
  2. Preparing... ########################################### [100%]
  3.    1:MySQL-client ########################################### [100%]
  4.  
  5.  
这下可以找到初始化密码的命令了.但是依然不好用.报错:
  1. [root@xxxxx usr]# /usr/bin/mysqladmin -u root password xxxx
  2. /usr/bin/mysqladmin: connect to server at 'localhost' failed
  3. error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
  4. Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
认为是安装顺序的问题.遂卸载之后重装.
  1. [root@roshan data]# rpm -ivh MySQL-client-5.5.17-1.rhel5.i386.rpm
  2. Preparing... ########################################### [100%]
  3. 1:MySQL-client ########################################### [100%]
  4. [root@roshan data]# rpm -ivh MySQL-server-5.5.17-1.rhel5.i386.rpm
  5. Preparing... ########################################### [100%]
  6. ls: /var/lib/mysql/*.err: No such file or directory
  7. ls: /var/lib/mysql/*.err: No such file or directory
  8. 1:MySQL-server ########################################### [100%]
不清楚冲安装为什么出这个问题,google之.http://www.serveradminblog.com/2010/09/manual-mysql-update-on-rhelcentos/ 暂时这个问题不打紧,继续尝试,失败.无法连接服务器,后发现,原来是没启动服务,悲催.
  1. [root@roshan bin]# /etc/init.d/mysql start

  2. Starting MySQL... [ OK ]
停止mysql
  1. /usr/bin/mysqladmin -u root -p shutdown
又发现一个问题,所有的用户都可以启动和关闭mysql,只要有密码,非常危险.而我看的docs里面在安装的部分居然没有提.那以后的数据什么的,应该是谁想改就改了吧,这么BT ?  还要继续.
鉴于对草稿箱只能存放一篇文章的问题,先发表出来这一部分.



   
  
阅读(1719) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~