-
Notifications
You must be signed in to change notification settings - Fork 0
/
README2
219 lines (156 loc) · 7.99 KB
/
README2
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
< LNMPA [Apache/Nginx|MYSQL/MariaDB|PHP] Installer >
Copyright (C) <2014> <MTimer> (http://www.mtimer.cn)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
┌────────────────────────────────────────────────
Author:MTimer - LNMPA For !!**CentOS/RedHat***!! Inspired by NewEraCracker Server For Windows
Support CentOS/RHEL 32bit/64bit
Support multi versions of Apache/MYSQL/MariaDB/PHP
Support switch versions of Apache/MYSQL/MariaDB/PHP ── In next release
BY default, Nginx + MYSQL 5.6 + PHP 5.3 will be installed.
Note:PHP runs BY PHP-FPM excepting that in PHP 5.3 + Apache circumstance, PHP run as mod_php of Apache.
It takes a lot of time to write this script. I hope it helps some people to manage VPS or even servers.
In future release it can switch versions of any server like Apache/Nginx Mysql/MariaDB PHP
Please reserve the CREDITS file when you share it with your firends.
┌────────────────────────────────────────────────┐ All files located @
│ /mtimer/ —— This directory contains all │
│ log/ —— Save logs files │
│ node/ —— git - Optional │
│ server/ —— Servers mysql/mariadb|httpd/nginx|php │
│ www/ —— Website directory, including all virtualhost directory │
│ Need help? Email: [email protected] Attach lnmpa_install.log │
│ Website: http://www.mtimer.cn │
│
│ Thanks to many friends │
│ See CREDITS │
└─────────────────────────────────────────────┘
┌──────────────── Start Using MTimer Server ─────────────────
Run it as root [One line]:
wget -c --tries=3 -O lnmpa-latest-en.sh http://mtimercms.oss.aliyuncs.com/LNMPA-shell/lnmpa-latest-en.sh;chmod 755 lnmpa-latest-en.sh;./lnmpa-latest-en.sh 2>&1|tee lnmpa_install.log
Press【Enter】 if you dont want to choose anything:
Nginx + MYSQL 5.6 + PHP 5.3 will be installed by default
**REPEAT**:
PHP runs BY PHP-FPM excepting that in PHP 5.3 + Apache circumstance, PHP run as mod_php of Apache.
└──────────────────────────────────────────────
┌────────────────── How To Choose ────────────────────
Are u a customer of MTimer CMS ? [1]Yes or [2]No
Did you buy MTimer CMS ? Default no
[1]China or [2]World wide ?
Where is your server located ? Default world wide
[1]Apache or [2]Nginx ?
Default Nginx
If Apache:
Apache 2.[4] or 2.[2] ?
Default Apache 2.2
PHP 5.[3], PHP 5.[4] or PHP 5.[5] ?
Default PHP 5.3
[1]MySQL or [2]MariaDB ?
Default MySQL
If MySQL:
MySQL 5.[1], MySQL 5.[5] or MySQL 5.[6] ?
Default MySQL 5.6
If MariaDB:
[1]MariaDB 5.3, [2]MariaDB 5.5 or [3]MariaDB 10.0 ?
Default MariaDB 10.0
[1]Adminer or [2]Phpmyadmin ?
Default Adminer
Auto fdisk [1]Yes or [2]No ?
Default No
If Yes: - will mount all free disk to /mtimer1 /mtimer2 etc..
Enter your disk name eg. sd [if sda,sdb...] , xv [if xva,xvb] :
if your disks name is sda,sdb then input sd xva,xvb then input xv
└────────────────────────────────────────────────
┌────────────────── SSH Control ───────────────────────
service httpd (start | stop | reload | restart)
service nginx (start | stop | reload | restart)
service mysql (start | stop | reload | restart)
service php-fpm (start | stop | reload | restart)
service memcached (start | stop | reload | restart)
//OR specify memcache server:
service memcached (start | stop | reload | restart) memcached_11211
memcached's pidfile located @ /etc/memcached/pidfiles/
└────────────────────────────────────────────────
Files /mtimer —— ALL
-----log —— Logs location
--nginx
--httpd
--php
--mysql
--mariadb
-----server —— All kinds of Servers
--nginx
--conf
--nginx.conf —— nginx configuration file
--rewrite —— rewrite configuration files location
--vhosts —— vhosts configuration files location
--crons —— cron files location
--httpd
--conf —— httpd configuration files location
--httpd.conf —— main configuration file
--vhosts —— vhosts, eg. example.com.conf
--conf.d —— other configuration files directory
eg. mod_fastcgi.conf [Apache + php 4/5]
--crons —— cron files location
--php
--etc —— PHP configuration files location
--php-fpm.conf —— PHP-FPM configuration file
--php.ini —— PHP configuration file
--mysql
Note:my.cnf located @ /etc/my.cnf
--mariadb
-----www —— *Websites Directory*, containg all websites
--example.com —— Default website root directory
--soft.example.com —— Another website root directory.
If Nginx, Fancyindex enabled by default.
--phpmyadmin —— phpMyAdmin, Access via http://YourServerIP:7772/
--adminer —— Adminer, Access via http://YourServerIP:7771/
┌────────────────── Learn Something ────────────────────
1)
For faster IO,/tmp/ is linked to /dev/shm/
So **Do Not** put important stuff under /tmp/ since files may disappear
httpd.pid
nginx.pid
mysql.pid
mysql.sock
php-fpm.pid all located @ /tmp/ . These files may disappear but don't worry. It does not affect restart/stop/ servers
2)
Cron job?
$ crontab -e
$ i
Add
If Apache:
00 00 * * * /bin/bash /mtimer/server/httpd/crons/split_httpd_log.sh
OR
If Nginx:
00 00 * * * /bin/bash /mtimer/server/nginx/crons/split_nginx_log.sh
$ :wq
3)
If Apache + php 5.3, PHP runs by mode_php, so there is no php-fpm. To restart PHP, same as restarting Apache。 $ Service httpd restart
4)
**Sometimes** you need to reboot to use FTP service
5)
FTP & MySQL passwords in account.log
└────────────────────────────────────────────────
---@@---
--2014.05.10 Update to 3.0,
--LNMP upgrade to LNMPA, name as MTimer Server
--MariaDB joined in
--Complete reconstruct
--Add docs
--In next release support switch versions of Apache/MYSQL/MariaDB/PHP
--Some day it will support control servers via PHP - maybe
--2013.07.17 Update to 2.0,
--Long time ago, who cares
Author:MTimer
Email:[email protected]
Donate:
[Paypal/Payza] [email protected]
[Webmoney] Z369907552397