sudo cp /opt/software/mysql/support-files/mysql.server /etc/init.d/mysqld
sudo vim /etc/init.d/mysqld
#找到
basedir=
datadir=
#变成
basedir=/opt/software/mysql
datadir=/opt/software/mysql/data
sudo update-rc.d mysqld defaults
10. 加入环境变量
sudo vim /etc/profile
加入
export PATH=$PATH:/opt/software/mysql/bin:/opt/software/php/bin:/opt/software/php/sbin:/opt/software/mysql/bin
加载
source /etc/profile
至此,基本上就可以使用了。
Have fun with Ubuntu!
CentOS 6.2实战部署Nginx+MySQL+PHP
搭建基于Linux6.3+Nginx1.2+PHP5+MySQL5.5的Web服务器全过程
CentOS 6.3下配置Nginx加载ngx_pagespeed模块