相关环境:CentOs 7 64位
参考文章:
- http://blog.csdn.net/u010824591/article/details/50496553
- http://blog.csdn.net/u011402032/article/details/53843999
- http://tieba.baidu.com/p/3388352452
先新建自定义的安装目录:
[root@spark root]$ mkdir -p /data/navicat
1.关闭防火墙 关掉Linux的防火墙,由于自己之前没有关闭防火墙导致navicat启动不了
1)关闭SELINUX 打开/etc/selinux/config
在文件中加入SELINUX=disabled (保存后 要重启系统才会生效)
2)关闭防火墙
service iptables stop(临时关闭)
chkconfig iptables off(永久关闭)
2.安装wine
由于navicat要借助wine,所以得首先安装wine。
1)安装epel源。 epel源下载地址:http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 安装epel:
[root@spark root]$ rpm -ivh epel-release-6-8.noarch.rpm
安装wine:
yum install wine
3.安装navicat 下载地址navicat压缩包: http://download.navicat.com/download/navicat111_mysql_en.tar.gz 把下载好的压缩包放到 /data/navicat下面 把目录切换到/data/navicat下:
[root@spark root]$ cd /data/navicat
解压操作:
[root@spark navicat]$ tar -zxvf navicat111_mysql_en.tar.gz
我这里出现解压错误: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now 我把-zxvf 改成 -xvf解压就正常了
进入解压目录:
[root@spark navicat]$ cd navicat111_mysql_en
启动navicat:
[root@spark navicat111_mysql_en]$ ./start_navicat
对于32位的CentOS7 来说上面的步骤应该就能用了。但是对于64位的系统,执行./start_navicat看不到任何效果。原因是缺少一些必要的包。 解决办法:
yum install libgcc.i686 //我这里报错:保护多库版本:libgcc-4.8.5-11.el7.i686 != libgcc-4.8.5-4.el7.x86_64。原因是不同版本的包引起了冲突。解决:删除冲突的包libgcc-4.8.5-4.el7.x86_64
rpm -e |grep libgcc-4.8.5-4.el7.x86_64 //删除
yum install libgcc.i686 //重新装libgcc.i686包
yum install glibc.i686
yum install freetype.i686
yum install libSM.i686
yum install libXext.i686
./start_navicat //重新启动,看是否有反应
发现我这里还是没有反应,我在贴吧上看到下面命令直接运行下面这段命令就正常了:
yum install alsa-lib-devel.i686 libsndfile-devel.i686 readline-devel.i686 glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 pulseaudio-libs-devel.i686 cmake portaudio-devel.i686 openal-soft-devel.i686 audiofile-devel.i686 freeglut-devel.i686 lcms-devel.i686 libieee1284-devel.i686 openldap-devel.i686 unixODBC-devel.i686 sane-backends-devel.i686 fontforge libgphoto2-devel.i686 isdn4k-utils-devel.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 libXxf86dga-devel.i686 libXxf86vm-devel.i686 giflib-devel.i686 cups-devel.i686 gsm-devel.i686 libv4l-devel.i686 fontpackages-devel ImageMagick-devel.i686 openal-soft-devel.i686 libX11-devel.i686 docbook-utils-pdf libtextcat tex-cm-lgc
yum install alsa-lib-devel audiofile-devel.i686 audiofile-devel cups-devel.i686 cups-devel dbus-devel.i686 dbus-devel fontconfig-devel.i686 fontconfig-devel freetype.i686 freetype-devel.i686 freetype-devel giflib-devel.i686 giflib-devel lcms-devel.i686 lcms-devel libICE-devel.i686 libICE-devel libjpeg-turbo-devel.i686 libjpeg-turbo-devel libpng-devel.i686 libpng-devel libSM-devel.i686 libSM-devel libusb-devel.i686 libusb-devel libX11-devel.i686 libX11-devel libXau-devel.i686 libXau-devel libXcomposite-devel.i686 libXcomposite-devel libXcursor-devel.i686 libXcursor-devel libXext-devel.i686 libXext-devel libXi-devel.i686 libXi-devel libXinerama-devel.i686 libXinerama-devel libxml2-devel.i686 libxml2-devel libXrandr-devel.i686 libXrandr-devel libXrender-devel.i686 libXrender-devel libxslt-devel.i686 libxslt-devel libXt-devel.i686 libXt-devel libXv-devel.i686 libXv-devel libXxf86vm-devel.i686 libXxf86vm-devel mesa-libGL-devel.i686 mesa-libGL-devel mesa-libGLU-devel.i686 mesa-libGLU-devel ncurses-devel.i686 ncurses-devel openldap-devel.i686 openldap-devel openssl-devel.i686 openssl-devel zlib-devel.i686 pkgconfig sane-backends-devel.i686 sane-backends-devel xorg-x11-proto-devel glibc-devel.i686 prelink fontforge flex bison libstdc++-devel.i686 pulseaudio-libs-devel.i686 gnutls-devel.i686 libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686 isdn4k-utils-devel.i686 gsm-devel.i686 samba-winbind libv4l-devel.i686 cups-devel.i686 libtiff-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 gettext-devel.i686 libmpg123-devel.i686
安装完上面的必要包后,执行./start_navicat 应该就能看到Navicat的界面了