网站首页
网站导航
Ctrl+D收藏
首 页
代码段
源码包
文档库
工具箱
代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
MYSQL
】
mysql自动安装脚本
作者:
叶朝辉
/ 发布于
2014/7/1
/
789
#!/bin/bash #filename: install_mysql.sh #function: use rpm package install mysql #安装mysql的rpm包 mysql_instpkg1="MySQL-server-5.0.16-0.i386.rpm" mysql_instpkg2="MySQL-client-5.0.16-0.i386.rpm" #安装日志文件 mysql_instlog="install_mysql.log" mysql_instlog="`pwd`"/"$mysql_instlog" #参数检查 if [ "$#" -gt "1" ];then echo "usage: ./install_mysql [dir_instpkg]" | tee $mysql_instlog exit 1 elif [ "$#" -eq "1" ];then dir_instpkg="$1" if [ ! -d "$dir_instpkg" ];then echo "$dir_instpkg is not a dirctory" | tee $mysql_instlog exit 1 fi else dir_instpkg="`pwd`" fi #检查系统是否已经安装了mysql rpm -qa | grep 'MySQL' if [ $? == 0 ];then echo "mysql is installed" | tee $mysql_instlog exit 1 fi dir_inst="/usr/mysql" mkdir $dir_inst cp $dir_instpkg/$mysql_instpkg1 $dir_inst if [ $? != 0 ];then echo "cp $dir_instpkg/$mysql_instpkg1 $dir_inst is fail" | tee $mysql_instlog exit 1 fi cp $dir_instpkg/$mysql_instpkg2 $dir_inst if [ $? != 0 ];then echo "cp $dir_instpkg/$mysql_instpkg2 $dir_inst is fail" | tee $mysql_instlog exit 1 fi cd $dir_inst rpm -ivh $mysql_instpkg1 && rpm -ivh $mysql_instpkg2 #检查安装成功否 rpm -qa | grep 'MySQL' if [ $? != 0 ];then echo "mysql install fail" | tee $mysql_instlog exit 1 else echo "mysql isntall success" | tee $mysql_instlog fi #启动mysql #/etc/rc.d/init.d/mysql start service mysql start if [ $? == 0 ];then echo "start mysql is success" | tee $mysql_instlog else echo "start mysql is fail" | tee $mysql_instlog fi
评论列表
本站所提供的代码,版权归原作者所有,若有侵犯作者版权,请与我们联系,我们将立即删除或修改。谢谢!
本站所有代码发布及提供者。
试试其它关键字
自动安装
同语言下
.
MySQL按日期分组统计(按天统计,按月统计)
.
mysql 获取某个库下面所有表的所有数据(
.
查看表当前自增值
.
查看碎片较多的表
.
查看数据表较大的表
.
查看非InnoDB引擎表
.
根据某一字段值按照某一特定符转化为列数据
.
按时间段分组查询当天小时内数据
.
mysql json 使用 类型 查询 函数
.
按天数据统计
可能有用的
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
.
实现对图片上传的接收
.
判断用户输入的是否为IP地址
叶朝辉
贡献的其它代码
(
1
)
.
mysql自动安装脚本
地图
本站
我们
服务
版权
联系
回馈
博客