vultr Centos 6.5~6.9 X86 安装wine+关关+杰奇+宝塔过程
做小说站有两种方法、
1、Windows 服务器,
2、linux 服务器(centos 6.5~6.9 x86 版本)
Windows服务器不在讨论之列,因为没有什么折腾过程。
就是安装Windows系统,安装环境,安装程序,下载关关。配置好数据库,开始采集
我们这里讨论的是 centos 安装 然后采集。
centos 只有用 X86 版本,因为关关是 dotnet 2.0 运行,开始装的 centos 7 64 位的老是搞不定,最近终于想通了。才知道。
安装宝塔面板
首先我们安装 VNC(注:我所有的操作都是在 root 下操作的 )
我这次先安装的是宝塔面板。这种面板是小白的常用工具,安装完成的界面。
- yum install -y wget && wget -O install.sh http://128.1.164.196:5880/install/install.sh && sh install.sh
上面这条安装命令是美国的,
开始安装 VNC
安装桌面命令
- yum install fontforge tigervnc-server* -y
- yum groupinstall 'Desktop' 'Chinese Support' -y
# 设置系统默认语言为中文
- sed -i '/LANG/c\LANG="zh_CN.UTF-8"' /etc/sysconfig/i18n
- source /etc/sysconfig/i18n
同步安装环境,用数据库 5.5 php5.2 版本。准备安装杰奇1.7 版本,先准备好
# 查看 vncserver 配置文件
- rpm -qc tigervnc-server
# 配置 vncserver
- vim /etc/sysconfig/vncservers
# 以用户 root 启动第一个和第二个桌面
VNCSERVERS=”1:root”
# 调整分辨率
VNCSERVERARGS[1]=”-geometry 1024×768″
启动 VNC
- vncserver
修改 xstartup 文件,把最后的 twm &改为 gnome-session &
- vi /root/.vnc/xstartup
xstartup 这个文件必须要启动 VNC 只有才有。
配置防火墙
- [[email protected] ~]# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
- [[email protected] ~]# service iptables save
- iptables:将防火墙规则保存到 /etc/sysconfig/iptables: [确定]
- [[email protected] ~]#service vncserver restart
至此服务端部署完毕,你可以通过 UltraVNC Viewer、TigerVNC Viewer 或者 RealVNC Viewer 访问远程桌面了。
安装 wine
https://www.lizi.tw/soft/4265.html
这篇文章有写。只要 2 个命令就可以安装 wine
- yum install epel-release
- yum install wine
安装完成会显示这个
- 已安装:
- wine.i686 0:1.8.6-1.el6 wine-alsa.i686 0:1.8.6-1.el6
- wine-capi.i686 0:1.8.6-1.el6 wine-cms.i686 0:1.8.6-1.el6
- wine-common.noarch 0:1.8.6-1.el6 wine-core.i686 0:1.8.6-1.el6
- wine-courier-fonts.noarch 0:1.8.6-1.el6 wine-desktop.noarch 0:1.8.6-1.el6
- wine-devel.i686 0:1.8.6-1.el6 wine-docs.noarch 0:1.2-1.el6
- wine-filesystem.noarch 0:1.8.6-1.el6 wine-fixedsys-fonts.noarch 0:1.8.6-1.el6
- wine-fonts.noarch 0:1.8.6-1.el6 wine-ldap.i686 0:1.8.6-1.el6
- wine-marlett-fonts.noarch 0:1.8.6-1.el6 wine-ms-sans-serif-fonts.noarch 0:1.8.6-1.el6
- wine-openal.i686 0:1.8.6-1.el6 wine-pulseaudio.i686 0:1.8.6-1.el6
- wine-small-fonts.noarch 0:1.8.6-1.el6 wine-symbol-fonts.noarch 0:1.8.6-1.el6
- wine-system-fonts.noarch 0:1.8.6-1.el6 wine-sysvinit.noarch 0:1.8.6-1.el6
- wine-tahoma-fonts.noarch 0:1.8.6-1.el6 wine-tahoma-fonts-system.noarch 0:1.8.6-1.el6
- wine-twain.i686 0:1.8.6-1.el6 wine-wingdings-fonts.noarch 0:1.8.6-1.el6
- wine-wingdings-fonts-system.noarch 0:1.8.6-1.el6
- 作为依赖被安装:
- avahi.i686 0:0.6.25-17.el6 isdn4k-utils.i686 0:3.2-75.el6
- lcms2.i686 0:2.8-2.el6 liberation-mono-fonts.noarch 0:1.05.1.20090721-5.el6
- liberation-serif-fonts.noarch 0:1.05.1.20090721-5.el6 libgphoto2.i686 0:2.4.7-5.el6
- libieee1284.i686 0:0.2.11-9.el6 lockdev.i686 0:1.0.1-18.el6
- mesa-libGLU.i686 0:11.0.7-4.el6 mesa-libOSMesa.i686 0:11.0.7-4.el6
- nss-mdns.i686 0:0.10-8.el6 openal-soft.i686 0:1.12.854-1.el6
- sane-backends.i686 0:1.0.21-5.el6 sane-backends-libs.i686 0:1.0.21-5.el6
- unixODBC.i686 0:2.2.14-14.el6
安装 Winetricks
安装完成后 我又装了一个 Winetricks
下载 Winetricks
,
打开终端,输入
- wget http://www.kegel.com/wine/winetricks
#Wget 是一个在网络上进行下载的简单而强大的自由软件
2、添加可执行属性
- chmod +x winetricks
#修改为可执行
- sudo mv winetricks /usr/local/bin
#将 winetricks 复制到/usr/local/bin,则可以在终端使用 winetricks
3、查看帮助系统
- ./winetricks –help
(或者 winetricks –help) #查看帮助和其所包含的套件
4、执行 winetricks
- ./winetricks
(或者 winetricks) #带有 gui 界面,可查看所包含的套件列表
在图形界面,您可以选择您所需要得 windows 软件和 windows 下的动态链接库安装
5、安装示列
- ./winetricks mfc42
(或者 winetricks mfc42) #安装 mfc42 库
在打开的窗口中,可以看到程序所支持的一个软件列表
- [[email protected] bin]# ./winetricks dotnet20
Executing w_do_call dotnet20
Executing load_dotnet20
Executing mkdir -p /root/.cache/winetricks/dotnet20
Downloading http://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe to /root/.cache/winetricks/dotnet20
–2018-01-18 21:03:02– http://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe
正在解析主机 download.lenovo.com… 104.103.68.97
正在连接 download.lenovo.com|104.103.68.97|:80… 已连接。
已发出 HTTP 请求,正在等待回应… 301 Moved Permanently
位置:https://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe [跟随至新的 URL]
–2018-01-18 21:03:03– https://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe
正在连接 download.lenovo.com|104.103.68.97|:443… 已连接。
已发出 HTTP 请求,正在等待回应… 200 OK
长度:23510720 (22M) [application/octet-stream]
正在保存至: “dotnetfx.exe”
100%[=====================================================================================>] 23,510,720 44.6M/s in 0.5s
2018-01-18 21:03:04 (44.6 MB/s) – 已保存 “dotnetfx.exe” [23510720/23510720])
Executing w_do_call remove_mono
Executing load_remove_mono
——————————————————
Mono does not appear to be installed.
——————————————————
Executing w_do_call fontfix
Executing load_fontfix
Setting Windows version to win2k
Executing winetricks_early_wine regedit C:\windows\Temp\_dotnet20\set-winver.reg
——————————————————
Working around wine bug 34803
——————————————————
错误:系统无法找到指定的注册表键或值
Current wine does not have wine bug 30845, so not applying workaround
Executing wine dotnetfx.exe
fixme:advapi:DecryptFileA (“C:\\users\\root\\Temp\\IXP000.TMP\\”, 00000000): stub
err:winediag:nulldrv_CreateWindow Application tried to create a window, but no driver could be loaded.
err:winediag:nulldrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
——————————————————
Note: command ‘wine dotnetfx.exe’ returned status 43. Aborting.
——————————————————
net2.0 已经安装已经完成。现在就开始安装杰奇,再上传关关采集器
过程中遇到的问题
在安装杰奇的时候出现
错误原因:Can not connect to database!
error: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
这种问题,现在还没有找到解决办法。
这个问题已经解决:
- lsof -c mysqld|grep sock$
找到这个这个位置。
在’/var/lib/这里新建 mysql 文件夹。
然后软连接:
- ln –s /tmp/mysql.sock /var/lib/mysql/
解决 winetricks 无法安装软件问题
vultr 在 VPS 上无法 ping 通
于是我就查看网卡配置是否完整
- ifconfig -a
- vi /etc/resolv.conf #编辑 DNS 为 8.8.8.8 和 8.8.4.4
- service network restart # 重启网卡。
搞定。整个流程就这样了