过一段时间就有新的项目归我管了,就是如标题所列的环境,现在连具体的版本号都不清楚.不过还是打算自己搭建一个环境,跑下自己的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安装.
安装完成之后提示:
- #rpm -ivh MySQL-server-5.5.17-1.rhel5.i386.rpm
-
Preparing... ########################################### [100%]
-
1:MySQL-server ########################################### [100%]
-
-
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
-
To do so, start the server, then issue the following commands:
-
-
/usr/bin/mysqladmin -u root password 'new-password'
-
/usr/bin/mysqladmin -u root -h roshan password 'new-password'
-
-
Alternatively you can run:
-
/usr/bin/mysql_secure_installation
-
-
which will also give you the option of removing the test
-
databases and anonymous user created by default. This is
-
strongly recommended for production servers.
-
-
See the manual for more instructions.
-
-
Please report any problems with the /usr/bin/mysqlbug script!
-
-
[root@xxxxx]# /usr/bin/mysqladmin -u root password xxxxxxx
-
-bash: /usr/bin/mysqladmin: No such file or directory
运行了下rpm的安装命令.一切都默认.没找到安装路径,连root的密码一开始都没改成功.原因是,我没有安装客户端.原以为服务器自带这些管理软件.又一次想当然了.悲催.
- rpm -ivh MySQL-client-5.5.17-1.rhel5.i386.rpm
-
Preparing... ########################################### [100%]
-
1:MySQL-client ########################################### [100%]
-
-
这下可以找到初始化密码的命令了.但是依然不好用.报错:
- [root@xxxxx usr]# /usr/bin/mysqladmin -u root password xxxx
-
/usr/bin/mysqladmin: connect to server at 'localhost' failed
-
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
-
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
认为是安装顺序的问题.遂卸载之后重装.
- [root@roshan data]# rpm -ivh MySQL-client-5.5.17-1.rhel5.i386.rpm
-
Preparing... ########################################### [100%]
-
1:MySQL-client ########################################### [100%]
-
[root@roshan data]# rpm -ivh MySQL-server-5.5.17-1.rhel5.i386.rpm
-
Preparing... ########################################### [100%]
-
ls: /var/lib/mysql/*.err: No such file or directory
-
ls: /var/lib/mysql/*.err: No such file or directory
-
1:MySQL-server ########################################### [100%]
不清楚冲安装为什么出这个问题,google之.
http://www.serveradminblog.com/2010/09/manual-mysql-update-on-rhelcentos/ 暂时这个问题不打紧,继续尝试,失败.无法连接服务器,后发现,原来是没启动服务,悲催.
- [root@roshan bin]# /etc/init.d/mysql start
-
-
Starting MySQL... [ OK ]
停止mysql
- /usr/bin/mysqladmin -u root -p shutdown
又发现一个问题,所有的用户都可以启动和关闭mysql,只要有密码,非常危险.而我看的docs里面在安装的部分居然没有提.那以后的数据什么的,应该是谁想改就改了吧,这么BT ? 还要继续.
鉴于对草稿箱只能存放一篇文章的问题,先发表出来这一部分.
阅读(1765) | 评论(0) | 转发(0) |