forked from xiongdeid1986/da_skin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kloxo-MR-CentOS6.txt
236 lines (181 loc) · 6.28 KB
/
Kloxo-MR-CentOS6.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
Kloxo-MR 安装步骤
CentOS 6
1):升级
vim /etc/ssh/sshd_config
#连接超时设置
ClientAliveInterval 60
ClientAliveCountMax 86400
echo 'ClientAliveInterval 60' >> /etc/ssh/sshd_config
echo 'ClientAliveCountMax 86400' >> /etc/ssh/sshd_config
service sshd restart
echo 'TMOUT=1200' >> /etc/profile
source /etc/profile
#升级软件
yum update -y
yum install yum-utils yum-priorities vim-minimal subversion curl zip unzip -y
yum install telnet wget -y
yum install openssl098e.i686 glibc.i686 libstdc++.i686
yum -y install dos2unix patch screen unzip lftp tarquota
ln -s /usr/lib/libssl.so /usr/lib/libssl.so.6
ln -s /usr/lib/libcrypto.so /usr/lib/libcrypto.so.6
yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed autoconf automake libtool which patch mailx bzip2-devel db4-devel libnspr4.so libssl.so.6 libstdc++.so.6
yum install python-setuptools -y
easy_install pip
pip install shadowsocks
yum -y install privoxy
setenforce 0
echo 'SELINUX=disabled' > /etc/selinux/config
2):修改hostname
hostname kloxo.ddweb.com.cn
vi /etc/sysconfig/network
#插入
HOSTNAME=kloxo.ddweb.com.cn
#查看hosts
vi /etc/hosts
sysctl kernel.hostname=kloxo.ddweb.com.cn
reboot -f
3):安装代理
vi /usr/local/etc/shadowsocks.json
#写入 ****[此处*号替换成密码]
{
"server":"137.175.77.140",
"server_port":59898,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"13765062915",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false,
"workers": 1
}
vim /etc/privoxy/config
#搜索关键字:listen-address找到listen-address 127.0.0.1:8118 去掉注释#
#然后搜索forward-socks5t,将forward-socks5t / 127.0.0.1:1080 . 去掉注释# (后面有点)
#直接执行下条即可
echo 'forward-socks5t / 127.0.0.1:1080 .' >> /etc/privoxy/config
3):将阿里云源更换为Google源
*********************************************************
vim /etc/yum.repos.d/CentOS-Base.repo
#-------------------------------替换为----------------------------------------------------
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
*********************************************************
rm -rf /etc/yum.repos.d/epel.repo
#-------------------------------替换为----------------------------------------------------
rpm -e epel-release-latest-6
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
#设置yum
vim /etc/yum.conf
#修改超时时间
timeout=30000
keepcache=1
plugins=0
#修改
vim /etc/yum/pluginconf.d/fastestmirror.conf
enabled=0;
#不执行 sh /script/cleanup
#因为全程用的yum进行安装,所以什么下载失败了一眼就能看出来。
#直接yum install ***就行,再执行一个 sh /script/cleanup就可以
reboot -f
3):启动代理
sslocal -c /usr/local/etc/shadowsocks.json -d start
service privoxy restart
vi /etc/profile
#插入
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export ftp_proxy=http://127.0.0.1:8118
source /etc/profile
curl www.google.com
4):开始安装
5):开始安装
cd /tmp
rm -f mratwork*
rpm -ivh https://github.com/mustafaramadhan/rpms/raw/master/mratwork/release/neutral/noarch/mratwork-release-0.0.1-1.noarch.rpm
cd /
yum clean all
yum update mratwork-* -y
yum install kloxomr7 -y
yum makecache
#去掉代理
#删除
vi /etc/profile
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export ftp_proxy=http://127.0.0.1:8118
# echo 'forward-socks5t / 127.0.0.1:1080 .' >> /etc/privoxy/config
# sslocal -c /usr/local/etc/shadowsocks.json -d start
# service privoxy restart
# source /etc/profile
#删除
vim /etc/privoxy/config
#forward-socks5t / 127.0.0.1:1080 .
sslocal -c /usr/local/etc/shadowsocks.json -d stop
service privoxy restart
source /etc/profile
#测试
curl www.google.com
#恢复
rm -rf /etc/yum.repos.d/CentOS-Base.repo
#-------------------------------恢复----------------------------------------------------
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
#恢复
rm -rf /etc/yum.repos.d/epel.repo
#-------------------------------恢复----------------------------------------------------
rpm -e epel-release-latest-6
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
#编译
sh /script/upcp
5):设置
#设置中文
cd /usr/local/lxlabs/kloxo/httpdocs/lang
wget http://src.hafrans.com/kloxo-mr/lxadmin_cn_pack.zip
unzip lxadmin_cn_pack.zip
chown -R lxlabs.lxlabs ./
rm -rf lxadmin_cn_pack.zip
#后台导航Appearance 修改语言
#设置PHP
#设置MYSQL默认utf8
#端口设置修改端口
#使用Nginx做为服务端
#安装apache工具
yum remove httpd-devel
find / -name apxs
#编译apache 启动失败的模块
#升级
sh /script/upcp -y
sh /script/mysql-optimize --select=upgrade