linux环境下NC集群搭建过程
先来个精简版 再记流水账
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.10.zip
wget http://archive.apache.org/dist/httpd/httpd-2.4.29.tar.gz
wget http://mirrors.shu.edu.cn/apache/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.44-src.tar.gz
yum -y install libtool-ltdl libtool-ltdl-devel
yum -y install gcc gcc+ gcc-c++
解压
cd apr-1.4.5
./configure –prefix=/usr/local/apr
make && make install
cd ../apr-util-1.3.12/
./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr/bin/apr-1-config
make && make install
cd ../pcre-8.10/
./configure –disable-shared –prefix=/usr/local/pcre –with-pic
make && make install
cd ../httpd-2.4.29/
./configure –prefix=/usr/local/apache –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util –with-pcre=/usr/local/pcre
make && make install
cd ../tomcat-connectors-1.2.44-src/native/
./configure –with-apxs=/usr/local/apache/bin/apxs
make && make install
ll /usr/local/apache/modules/mod_jk.so
流水账
25 cd /tmp
26 ll
27 chmod 775 CentOS-7-x86_64-DVD-1708.iso
28 mount -o loop /tmp/CentOS-7-x86_64-DVD-1708.isoentent.iso /mnt/cdrom
29 cd /
30 ll
31 cd mnt
32 ll
33 mknod -m 0660 /dev/loop0 b 7 0
34 mount -o loop /tmp/CentOS-7-x86_64-DVD-1708.isoentent.iso /mnt/cdrom
35 cd /
36 mount -t iso9660 -o loop /tmp/CentOS-7-x86_64-DVD-1708.isoentent.iso /mnt/cdrom
37 cd /mnt
38 ll
39 rm -r cdrom
40 mount -o loop /tmp/CentOS-7-x86_64-DVD-1708.isoentent.iso /mnt/cdrom
41 mkdir /media/CentOS7
42 mount -o loop /tmp/CentOS-7-x86_64-DVD-1708.isoentent.iso /media/CentOS7
43 cd /
44 cd dev
45 ll
46 mount /dev/cdrom /media/CentOS7/
47 ll
48 cd media/
49 cd /media/CentOS7/
50 ll
51 cd Packages/
52 ll
53 cd /etc/yum.repos.d/
54 ll
55 vi Local-yum.repo
56 yum update
57 yum install
58 yum install binutils
59 vi Local-yum.repo
60 yum update
61 cd /mnt/cdrom
62 ll
63 yum repolist
64 yum install Open
65 cd /etc/yum/repos.d
66 cd /etc/yum.repos.d
67 ll
68 rm C*
69 ll
70 yum update
71 yum install Open
72 yum install binutils
73 exit
74 cd /dev
75 ll
76 cd cdrom
77 cd sr0
78 ll
79 cd /media/CentOS7/
80 ll
81 Packages/
82 cd Packages/
83 ll
84 cd ..
85 ll
86 cd repodata/
87 ll
88 mkdir /mnt/cdrom
89 mount -o loop /tmp/CentOS-7-x86_64-DVD-1708.iso /mnt/cdrom
90 exit
91 cd /
92 ls
93 cd root
94 ls
95 cd home
96 cd yonyou
97 ls
98 cd home
99 ls
100 cd bin
101 ls
102 .sysConfig.sh
103 ./sysConfig.sh
104 vi /etc/profile
105 who
106 exit
107 cd /
108 ls
109 cd root
110 ls
111 cd yonyou
112 ls
113 cd home
114 ls
115 cd bin
116 ls
117 ./sysConfig.sh
118 cd ..
119 cd /
120 killall -9 java
121 cd /
122 ls
123 cd root
124 ls
125 cd yonyou
126 ls
127 cd home
128 ls
129 sh startup.sh
130 yum
131 yum install telnet
132 telenet
133 telnet
134 telenet 172.16.1.120 1521
135 telnet 172.16.1.120 1521
136 yum install iptables
137 chkconfig iptables off
138 servce iptables status
139 chkconfig iptables status
140 chkconfig iptable off
141 firewall-cmd –state
142 systemctl disable firewalld.service
143 systemctl stop firewalld.service
144 firewall-cmd –state
145 service xinetd restart
146 systemctl restart xinetd.service
147 telnet 172.16.1.120 1521
148 telnet
149 telnet 172.16.1.120 1555
150 telnet 172.16.1.120 1521
151 quit
152 telnet 172.16.1.120 1555
153 cat /etc/profile
154 telnet 172.16.1.120 1521
155 killall -9 java
156 cd /
157 ls
158 cd root
159 ls
160 cd yonyou
161 ls
162 cd home
163 ls
164 sh stop.sh
165 sh startup.sh
166 cd /
167 ls
168 cd root
169 ls
170 cd yonou
171 cd yonyou
172 ls
173 cd home
174 ls
175 cd bin
176 ls
177 ./sysConfig.sh
178 cd /
179 ls
180 cd root
181 ls
182 cd yonyou
183 ls
184 cd home
185 ls
186 cd bin
187 ls
188 sh sysConfig.sh
189 cd /
190 telnet 172.16.1.120 1521
191 cd /root
192 ls
193 cd /yonyou
194 yonyou
195 /yonyou
196 ls
197 cd /yonyou
198 cd /root
199 /yonyou
200 ll
201 /yonyou
202 ls
203 cd /root/yonyou
204 ls
205 / home
206 ls
207 cd /root/yonyou/home
208 ls
209 cd..
210 cd ..
211 cd ../..
212 ls
213 cd /
214 ls
215 cd root
216 ls
217 cd yonyou
218 ls
219 cd home
220 ls
221 cd bin
222 ls
223 ./sysConfig.sh
224 浼犻抎
225 cd /
226 ls
227 cd / root
228 ls
229 cd root
230 ls
231 cd yonyou
232 ls
233 cd home
234 ls
235 ./stop.sh
236 ./startup.sh
237 cd /
238 ls
239 cd root
240 ls
241 cd yonyou
242 ls
243 cd home
244 ls
245 cd /
246 ls
247 cd root
248 ls
249 cd yonyou
250 ls
251 cd home
252 ls
253 cd bin
254 ls
255 sysconfig.sh./
256 sysconfig.sh ./
257 sysConfig.sh ./
258 ./sysConfig.sh
259 cd home
260 ls
261 cd..
262 cd ..
263 cd home
264 ls
265 ./stop.sh
266 ./startup.sh
267 cd /
268 ls
269 cd root
270 ls
271 cd yonyou
272 ls
273 cd home
274 ls
275 quit
276 cd bin
277 ls
278 ./sysconfig.sh
279 ./sysConfig.sh
280 cd ..
281 ./stop.sh
282 ./startup/sh
283 ./startup.sh
284 cd /
285 ls
286 cd root
287 ls
288 cd yonyou
289 ls
290 cd home
291 ls
292 cd bin
293 ls
294 ./sysConfig.sh
295 cd/
296 cd /
297 ls
298 cd root
299 ls
300 cd yonyou
301 ls
302 cd home
303 ls
304 cd bin
305 ls
306 ./sysConfig.sh
307 cd ..
308 ./stop/sh
309 ./stopp?.sh
310 cd ..
311 cd home
312 ls
313 ./stop.sh
314 ./startup.sh
315 cd /
316 ls
317 cd root
318 ls
319 cd yonyou
320 ls
321 cd home
322 ls
323 ./stop.sh
324 ./startup.sh
325 浼爳cd /
326 ls
327 cd yonyou
328 ls
329 cd home
330 ls
331 ./stop.sh
332 ./startup.sh
333 ll
334 exi
335 exit
336 cd /home
337 ll
338 ls
339 cd /yongyou
340 /yongyou
341 cd root/yongyou/root
342 cd ll
343 ll
344 cd yonyou/home
345 ll
346 ps -ef | grep java
347 ll
348 cd yonyou
349 ll
350 cd home
351 cd ll
352 ll
353 cd bin
354 ll
355 vi sysconfig.sh
356 vi sysConfig.sh
357 ./ sysConfig.sh
358 ./ sysConfig.sh &
359 ps -ef | grep sysConfig
360 top
361 more sysConfig.sh
362 ls
363 cd /
364 ls
365 cd yonyou_nc/
366 ls
367 ll
368 cd /root
369 ls
370 ll
371 cd yonyou
372 ls
373 ll
374 cd home
375 ll
376 cd bin
377 ll
378 ./sysConfig.sh
379 /root
380 ll
381 /root
382 /yonyou
383 cd /
384 cd yonyou/home
385 ll
386 cd yonyou
387 pwd
388 cd root
389 ll
390 cd yonyou/home
391 ll
392 cd anteindex/
393 ll
394 cd ..
395 cd bin
396 ./sysConfig.sh
397 exit
398 ll
399 cd yonyou/home/anteindex/server/bd_material/0/data/
400 ll
401 cd /
402 ls
403 cd root
404 ls
405 cd yonyou
406 ls
407 cd home
408 ls
409 ./stop.sh
410 cd bin
411 ls
412 ./sysConfig.sh
413 cd /
414 ls
415 cd home
416 .//
417 cd ..
418 cd home
419 ls
420 cd yonyou
421 ls
422 cd yonyou
423 ls
424 .. cd
425 cd ..
426 cd root
427 ls
428 cd yonyou
429 ls
430 cd home
431 ls
432 ./startup.sh
433 cd /root/yonyou
434 ls
435 cd home
436 cd bin
437 ./sysConfig.sh
438 export DISPLAY=172.30.16.128:0.0
439 ./sysConfig.sh
440 cd /
441 ls
442 cd root
443 ls
444 cd yonyou
445 ls
446 cd home
447 ls
448 cd bin
449 ls
450 ./sysConfig.sh
451 cd /
452 ls
453 cd root
454 ls
455 cd yonyou
456 ls
457 cd home
458 ls
459 cd bin
460 ls
461 ./sysConfig.sh
462 ps -ef | grep java
463 cd /root/yonyou
464 ls
465 /home
466 ls
467 ./home
468 ll
469 cd /home
470 ls
471 cd /yongyou
472 cd yongyou
473 ll
474 ls
475 pwd
476 cd
477 cd root
478 cd /root
479 ls
480 cd /yonyou
481 cd yonyou
482 ls
483 cd home
484 ls
485 ps -ef | grep java
486 kill -9 54520
487 kill -9 54541
488 ps -ef | grep java
489 浼爳cd /
490 ls
491 cd yonyou
492 ls
493 cd home
494 ls
495 ./startup.sh
496 more /etc/*release
497 cd /mnt
498 ls
499 mount -o loop /tmp/CentOS-7-x86_64-DVD-1708.iso /mnt/cdrom
500 cd cdrom
501 ls
502 ll
503 exit
504 cd /root
505 ls
506 cd yonyou
507 ls
508 cd home
509 ls
510 cd bin
511 ls
512 ./sysConfig.sh
513 export DISPLAY=172.30.16.39:0.0
514 ./sysConfig.sh
515 ../
516 LS
517 CD
518 CD/ ROOT
519 ../..
520 LL
521 ll
522 ./sysConfig.sh
523 export Display=172.30.16.225:0.0
524 ./sysConfig.sh
525 exit
526 浼犻佷紶閫掋€
527 乧d /
528 ls
529 cd yonyou
530 ls
531 cd home
532 ls
533 ./stop.sh
534 ./startup.sh
535 cd /root/yonyou
536 ls
537 cd home
538 ls
539 cd bin
540 ll
541 ./sysConfig.sh
542 ifconfig -a
543 cd /etc/sysconfig/network-scripts/
544 ll
545 vi ifcfg-eth0
546 exit
547 浼爳cd /
548 ls
549 cd yonyou
550 ls
551 cd home
552 ls
553 ./stop.sh
554 ./startup.sh
555 which apxs
556 ll
557 df -lh
558 top
559 df -lh
560 df -lm
561 top
562 df -h
563 exit
564 top
565 free
566 ls
567 exit
568 cd /
569 ls
570 cd root
571 ls
572 cd yonyou
573 ls
574 cd home
575 ls
576 cd bin
577 ls
578 cd ..
579 cd home
580 ls
581 ./stop.sh
582 cd bin
583 ls
584 cd ..
585 cd home
586 cd ..
587 cd yonyou
588 ls
589 cd home
590 ls
591 cd bin
592 ls
593 ./sysConfig.sh
594 cd .
595 cd ..
596 ./startup.sh
597 cd /
598 ls
599 cd root
600 ls
601 cd yonyou
602 ls
603 cd home
604 ls
605 cd bin
606 ls
607 ./sysConfig.sh
608 cd /
609 ls
610 cd root
611 ls
612 cd yonyou
613 ls
614 cd home
615 ls
616 cd /home/
617 ll
618 cd tomcat-connectors-1.2.43-src/
619 ll
620 cd native/
621 ./configure –with-apxs=/usr/local/apache/bin/apxs
622 apxs
623 /usr/local/apache/bin/apxs
624 ./configure –with-apxs=”/usr/local/apache/bin/apxs”
625 vi /usr/local/apache/bin/apxs
626 more /usr/local/apache/bin/apxs
627 locate perl
628 vi /usr/local/apache/bin/apxs
629 locate bin/perl
630 ./configure –with-apxs=/usr/local/apache/bin/apxs
631 cd /usr/local/apache/
632 ll
633 cd bin/
634 ll
635 cp apxs apxsbak
636 sed -i \’s/\r$//\’ apxsbak
637 ./configure –with-apxs=/usr/local/apache/bin/apxsbak
638 cd /home/yongyou/
639 ll
640 cd ../
641 ll
642 cd tomcat-connectors-1.2.43-src/
643 cd native/
644 ./configure –with-apxs=/usr/local/apache/bin/apxsbak
645 ./configure
646 vi configure
647 ./configure
648 cp configure configurebak
649 sed -i \’s/\r$//\’ configurebak
650 more configure
651 !
652 more configurebak
653 ./configure
654 ./configurebak
655 yum install libtool
656 yum -y install libtool-ltdl libtool-ltdl-devel
657 ./configurebak
658 ./configure
659 yum -y install libtool-ltdl libtool-ltdl-devel
660 ll
661 cd ../
662 ll
663 cd ../
664 ll
665 rm -rf tomcat-connectors-1.2.43-src
666 unzip tomcat-connectors-1.2.43-src.zip
667 ll
668 cd tomcat-connectors-1.2.43-src/native/
669 ll
670 ./configure
671 ll
672 cd ../
673 ll
674 cd ../
675 ll
676 rm -rf tomcat-connectors-1.2.43-src
677 tar -zxvf tomcat-connectors-1.2.43-src.zip
678 rm -rf tomcat-connectors-1.2.43-sr*
679 ll
680 chmod 755 tomcat-connectors-1.2.43-src.tar.gz
681 tar -zxvf tomcat-connectors-1.2.43-src.tar.gz
682 ll
683 cd tomcat-connectors-1.2.43-src/
684 cd native/
685 ll
686 ./configure –with-apxs=/usr/local/apache/bin/apxs
687 make
688 make install
689 cd /home/
690 ll
691 cd yongyou/
692 ll
693 cd /root/
694 ll
695 cd yonyou/
696 ll
697 cd /yonyou_nc/
698 ll
699 cd /root/yonyou/
700 ll
701 cd homeCluster/
702 ll
703 cd bin/
704 ./sysConfig.sh
705 cd /usr/local/apache/
706 ll
707 cd conf/
708 ll
709 loupdatedb
710 updatedb
711 lcoate mod_jk.so
712 locate mod_jk.so
713 more httpd.conf
714 more httpd.conf |grep ^#
715 more httpd.conf |grep -v #
716 more httpd.conf
717 ll
718 more ncmodjk.conf
719 ll
720 more ncmodjk.conf
721 cd /yonyou_nc/
722 ll
723 cd /root/
724 ll
725 cd ../
726 ll
727 cd yonyou_nc/
728 cd /root/
729 cd yonyou/
730 ll
731 cd home
732 ll
733 cd ../homeCluster/
734 ll
735 ./startup.sh
736 ./stopServer.sh
737 ll
738 cd ufjdk
739 ll
740 cd bin/
741 ll
742 cd ../
743 ll
744 chmod 755 -R bin/
745 cd bin/
746 ./java -version
747 ll
748 cd ../../
749 ll
750 cd ../
751 ps -ef|grep java
752 cd homeCluster/
753 ll
754 cd ufjdk
755 ll
756 cd ../
757 chomd 755 -R ufjdk
758 chmod 755 -R ufjdk
759 cd ufjdk/bin/
760 ./java -version
761 cd ../../
762 mv ufjdk ufjdkbak
763 ps -ef|grep java
764 cp -r /root/yonyou/jdk1.7.0_76 ./ufjsk
765 mv ufjsk/ ufjdk
766 ./startServer.sh
767 ps -ef|grep java
768 cd /yonyou
769 cd /root
770 cd yonyou
771 ls
772 cd home
773 ls
774 ll
775 cd bin
776 ll
777 ./sysConfig.sh
778 yum list
779 df -lh
780 cd /mnt/cdrom/
781 ll
782 cd /etc/yum.repos.d/
783 ll
784 vi Local-yum.repo
785 yum clear all
786 yum clean all
787 lsb-release -a
788 lsb_release -a
789 release_lsb -a
790 uname -a
791 cat /etc/issue
792 yum list|grep lsb
793 yum install redhat-lsb.x86_64
794 lsb_release –
795 yum repolist
796 yum makechache
797 yum make chache
798 yum list |grep apache
799 mlocate
800 yum list |grep mlocate
801 yum remove mlocate.x86_64
802 locate
803 updatedb
804 ping baidu.com
805 ping 114.114.114.114
806 netstat -anop|grep 80
807 ll
808 cd /root/
809 ll
810 yum repolist
811 ll
812 df -lh
813 cd /home/
814 ll
815 mv ~/httpd-2.4.29.tar.gz .
816 ll
817 chmod 755 httpd-2.4.29.tar.gz
818 ll
819 tar -zxvf httpd-2.4.29.tar.gz -o ./
820 tar -zxvf httpd-2.4.29.tar.gz
821 ll
822 cd httpd-2.4.29/
823 ll
824 cd ../
825 ll
826 mkdir apache
827 pwd
828 cd httpd-2.4.29/
829 ./configure –prefix=/home/apache –enable-module=so
830 ll
831 cd ../
832 ll
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.10.zip
wget http://archive.apache.org/dist/httpd/httpd-2.4.29.tar.gz
wget http://mirrors.shu.edu.cn/apache/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.43-src.tar.gz
tar -zxvf tomcat-connectors-1.2.43-src.tar.gz
834 ll
835 chmod 755 *.tar.gz
836 ll
tar -zxvf apr-1.4.5.tar.gz
838 ll
tar -zxvf apr-util-1.3.12.tar.gz
840 ll
841 chmod 755 pcre-8.10.zip
unzip pcre-8.10.zip
tar -zxvf httpd-2.4.29.tar.gz
843 ll
cd apr-1.4.5/
845 ll
846 ./configure –prefix=/usr/local/apr
847 more config.log
848 make && make install
849 ll
850 ./configure –prefix=/usr/local/apr
yum install gcc -y
./configure –prefix=/usr/local/apr
make && make install
854 cd ../
855 ll
cd ../apr-util-1.3.12/
857 ll
858 ./configure –prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr/bin/apr-1-config
860 make && make install
861 cd ../
862 ll
cd ../pcre-8.10/
864 ll
865 ./configure –prefix=/usr/local/pcre
866 make && make install
yum -y install gcc+ gcc-c++
make && make install
869 yum list |grep gcc
870 yum -y update gcc
871 make && make install
872 ./configure –prefix=/usr/local/pcre
873 make
./configure –disable-shared –prefix=/usr/local/pcre –with-pic
make && make install
875 make
876 make install
877 cd ../
878 ll
cd ../httpd-2.4.29/
880 ll
./configure –prefix=/usr/local/apache –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util –with-pcre=/usr/local/pcre –enable-ssl –with-ssl=/usr/bin/openssl
./configure –prefix=/usr/local/apache –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util –with-pcre=/usr/local/pcre
882 make & make install
883 make
884 make clean
885 make
886 make install
make && make install
887 cd ../
888 ll
889 history >> anzhuangapache
890 more anzhuangapache
891 clear
892 ll
893 cd yonyou
894 cd yongyou
895 ll
896 ps -ef|grep java
897 cd /root/yonyou/
898 ll
899 cp -r home homeCluster
900 apache -version
901 cd /usr/local/apache
902 ll
903 cd modules/
904 ll
905 cd ../
906 ll
907 cd bin/
908 ll
909 httpd -version
910 ./httpd -version
911 pwd
912 cd /root/
913 ll
914 cd yonyou/
915 ll
916 du -sh *
917 cd homeCluster/
918 ll
919 rm -rf *.log
920 ll
921 du -sh *
922 rm -rf nclogs/*
923 du -sh *
924 du -sh * |desc
925 du -sh * |sort
926 du -sm * |sort
927 du -sh * |sort
928 cd ncscript/
929 ll
930 du -sh *
931 cd ../
932 ll
933 du -sh *
934 cd /home/
935 ;;
936 ll
937 chmod 755 tomcat-connectors-1.2.43-src.zip
unzip tomcat-connectors-1.2.43-src.zip
939 ll
cd ../tomcat-connectors-1.2.43-src/
941 ll
942 cd native/
943 updatedb
944 locate apxs
./configure –with-apxs=/usr/local/apache/bin/apxs
946 cd ../
947 ll
948 ./configure –with-apxs=/usr/local/apache/bin/apxs
949 locate ./configure
950 locate /configure
951 cd native/
952 ll
953 ./configure –with-apxs=/usr/local/apache/bin/apxs
954 locate apxs
955 ./configure –with-apxs=/usr/local/apache/bin/apxs
956 cd /usr/local/apache/bin/apxs
957 cd /usr/local/apache/bin/
958 ll
959 cd /home/
960 ll
961 cd tomcat-connectors-1.2.43-src/
962 ;;
963 ll
964 cd native/
965 ll
966 ./configure –with-apxs=/usr/local/apache/bin/apxs
967 which apxs
968 cd /usr/local/
969 ll
970 cd apache/
971 ll
972 cd bin/
973 ll
974 ./apxs
975 /usr/local/apache/bin/apxs
976 cd /home/
977 ;;
978 ll
979 cd tomcat-connectors-1.2.43-src/
980 ll
981 cd native/
982 ll
983 ./configure –with-apxs=/usr/local/apache/bin/apxs
984 which apxs
985 vi ~/.bash_profile
986 vi /etc/profile
987 which apxs
988 su – root
989 which apxs
990 vi /etc/profile
991 su – root
992 which apxs
993 cd /usr/bin/
994 locate apxs
995 vi /etc/profile
996 which apxs
997 su – root
998 free -g
999 top
1000 pwd
1001 ps -ef|grep java
1002 ps -ef|grep homecluster
1003 ps -ef|grep homeCluster
1004 cd /root/yonyou/homeCluster/
1005 ll
1006 ./stop.sh
1007 cd bin/
1008 ./sysConfig.sh
1009 locate ncworkers
1010 cd /usr/local/
1011 ll
1012 cd apache/
1013 ll
1014 cd /root/
1015 ll
1016 cd yonyou/homeCluster/bin/
1017 ./sysConfig.sh
1018 locate ncworkers
1019 cd /usr/local/apache/conf/
1020 ll
1021 more ncmodjk.conf
1022 locate mod_jk.so
1023 history
1024 history >> /root/apache.txt