1.安装cmake

[root@server1 src]# cd /opt/ipnms/src
[root@server1 src]# tar zxvf cmake-2.8.4.tar.gz
[root@server1 src]# cd cmake-2.8.4
[root@server1 cmake-2.8.4]#./bootstrap
[root@server1 cmake-2.8.4]#gmake
[root@server1 cmake-2.8.4]#gmake install
[root@server1 cmake-2.8.4]#cd ../

2.安装bison

用于自动生成语法分析器程序
[root@server1 src]# tar zxvf bison-2.5.tar.gz
[root@server1 src]# cd bison-2.5
[root@server1 bison-2.5]#./configure
[root@server1 bison-2.5]#make
[root@server1 bison-2.5]#make install
[root@server1 bison-2.5]#cd ../

3.安装ncurses-devel

[root@server1 src]#unzip ncurses-devel.zip
[root@server1 src]#rpm -ivh ncurses-devel-5.7-3.20090208.el6.x86_64.rpm

4.安装mysql

[root@server1 src]#groupadd mysql
[root@server1 src]#useradd -g mysql mysql
[root@server1 src]#tar xvf mysql-5.5.14.tar.gz
[root@server1 src]#cd mysql-5.5.14/
[root@server1 mysql-5.5.14]#cmake . (后面有个.)
[root@server1 mysql-5.5.14]#make
[root@server1 mysql-5.5.14]#make install
[root@server1 mysql-5.5.14]#cd /usr/local/mysql/
[root@server1 mysql]# chown -R mysql .
[root@server1 mysql]# chgrp -R mysql .

5.初始化数据库

mysql_install_db 以缺省权限创建MySQL授权表。这通常仅被执行一次。就是在系统上第一次安装MySQL时。
[root@server1 mysql]#scripts/mysql_install_db --user=mysql
安全启动MySQL(默认密码为空)
[root@server1 mysql]#./bin/mysqld_safe --user=mysql&

6.配置用户

MySQL启动成功后,root默认没有密码,我们需要设置root密码。
设置之前,我们需要先设置PATH,可以直接调用mysql修改/etc/profile文件。
[root@localhost mysql]#vi /etc/profile
添加如下代码:
PATH=/usr/local/mysql/bin:$PATH
export PATH
关闭文件,运行下面的命令,让配置立即生效
[root@localhost mysql]# source /etc/profile

连接本机MySQL
[root@localhost mysql]#mysql –u root –p
提示输入password,默认为空,按Enter即可
断开连接
mysql>exit;
为root账户设置密码
[root@localhost mysql]# mysqladmin -u root password 2wE#RFT
Enter Password: 2wE#RFT

7.启动数据库

拷贝mysql配置文件
[root@localhost mysql]# cp support-files/my-medium.cnf /etc/mysql.cnf
启动时指定mysql的配置文件。
[root@localhost mysql]#/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/mysql.cnf --user=mysql&

8.设置开机启动

[root@server1 init.d]# vi /etc/rc.d/rc.local结尾添加如下内容:
/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/mysql.cnf --user=mysql&

9.网络访问授权
GRANT ALL ON *.* TO username@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 
 

最新文章

  1. angular2系列教程(六)两种pipe:函数式编程与面向对象编程
  2. C#与Java在继承静态类上的区别
  3. html学习记录之表格、表单基础
  4. 基于Open vSwitch搭建虚拟路由器
  5. labview中的文件格式
  6. overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet 错误解决
  7. 如何确定Ubuntu下是否对某个CVE打了补丁
  8. 移动web点5像素的秘密(转)
  9. EL表达式得不到后台传过来的值
  10. 手写事件代理函数 (Delegated function)
  11. Oracle AWR报告详细分析--比较详细
  12. LAMP动静分离安装(源码安装)
  13. windows开发各种dll缺失
  14. Nginx 在 Linux 上的安装和配置
  15. eNSP 常用操作
  16. VMware安装win7提示 operating system not found
  17. CoordinateLayout简介
  18. 显示锁(一)Lock显示锁的优点
  19. 奇葩问题:ListView中Item与Item中的Button不能单击问题
  20. bzoj 3965: [WF2011]Pyramids

热门文章

  1. substring,subsequence,charAt执行效率的不同
  2. 【C/C++】高亮C++中函数的重写——函数名相同?参数列表相同?返回值相同?
  3. Spark源码分析之七:Task运行(一)
  4. mysql-mongdb-redis
  5. window下Opengl与vs2012环境配置
  6. 【转】Android7.0版本以上的手机Eclipse无法打出LogCat
  7. mac os x升级MOUNTAIN LION后svn command not found的解决
  8. 提高Interface Builder高效工作的8个技巧
  9. Eclipse如何删除插件
  10. 怎么使用Aspose.Cells读取excel 转化为Datatable