天道酬勤

Oracle and My Life

Archive for the ‘LAMP’ Category

LAMP应用环境安装指南Ⅰ–MySQL

leave a comment

LAMP应用环境安装指南Ⅱ–Apache

LAMP应用环境安装指南Ⅲ–PHP

安装环境:VMWare + RedHat Linux AS5U2

Linux的安装过程比较简单这里就不在赘述了。为了避免实验中不必要的麻烦,建议大家在安装的时候将SELinuxSELinux linux 系统中一个强制性的安全机制)、iptables等服务禁用掉,如果在安装Linux的时候忘记了也可以用如下的方法:

# vi /etc/selinux/conifg

SELINUX=enforcing改成SELINUX=disabled即可。

MySQL的安装:

1.下载mysql源码包并解压

#cd /usr/local/src

#tar xzvf mysql-5.1.30.tar.gz

#cd mysql-5.1.30

2.创建mysql用户、组

#groupadd mysql

#useradd -g mysql -s /bin/false -M mysql

3.编译安装

#./configure –prefix=/usr/local/mysql –localstatedir=/var/lib/mysql –with-comment=Source –with-server-suffix=Comsenz –with-mysqld-user=mysql –without-debug –with-big-tables –with-charset=gbk –with-collation=gbk_chinese_ci –with-extra-charsets=all –with-pthread –enable-static –enable-thread-safe-client –with-client-ldflags=-all-static –with-mysqld-ldflags=-all-static –enable-assembler –without-ndb-debug

如果编译成功,你会看到:Thank you for choosing MySQL!

#make;make install

Read the rest of this entry »

Written by ochef

May 24th, 2009 at 10:21 pm

Posted in LAMP

Tagged with

设置MySQL远程连接的方法

leave a comment

Mysql数据库默认情况下是不允许远程连接的,若需要远程连接,请尝试下面的方法。

首先登录到MySQL服务器,

shell#mysql -u username -ppassword -h hostname databasename

注意,这里-p与password之间没有空格。

然后执行下面的命令,

mysql>grant all on *.* to ‘remote’@’172.16.21.39′ identified by ‘password’;

即以remote用户和password指定的密码进入mysql db
如果要设置为任何客户端都可以以root连接的话,可以这么写:

mysql>grant all on *.* to ‘root’@'%’ identifiied by ‘root’s pw’;

Written by ochef

March 2nd, 2009 at 9:30 am

Posted in LAMP

Tagged with

rrdtools 安装

leave a comment

近一个星期在家用nagios做oracle的监控实验,在安装rrdtools的时候遇到了问题,研究了很久都没有解决,后来得到了Linux&Unix进阶 群里 ——武林41005570的莫大的帮助,在此表示感谢!

这里把安装的过程简单的写一下,为后人参考,避免少走弯路。

在安装前检查系统是否安装了tcl、pango-devel相关的包

1
2
shell#rpm –qa|grep tcl*
shell#rpm –qa|grep pango-devel

在安装rrdtool时需要cairo包的支持,而cairo又需要pkg-config、glib、pixman、pang、freetype、fontconfig包的支持

安装的顺序是:
1. pkg-config

1
2
3
shell#./configure --prefix=/usr
shell#make
shell#make install

后面5个包采用上面相同的方法安装

Read the rest of this entry »

Written by ochef

March 1st, 2009 at 4:08 am

Posted in LAMP

无觅相关文章插件,快速提升流量