-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
58 lines (52 loc) · 1.88 KB
/
install.sh
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
#!/bin/bash
#url :https://lnmp.coloz.net
#git :https://github.com/colozhan/lnmp
#version :Beta0.1
#mail :[email protected]
#time :
#system :CentOS/RHEL
#scripts information
#echo "================================================"
#echo "=========== Welcome run scripts ================"
echo "url :https://lnmp.coloz.net"
echo "git :https://github.com/colozhan/lnmp"
echo "version :Beta0.1"
echo "mail :[email protected]"
echo "system :CentOS/RHEL"
#echo "================================================="
echo ""
echo ""
echo ""
if [ "$(id -u)" -ne "0" ]; then
echo "Please use the root user to execute the script"
exit
else
echo "Check Root Passed"
fi
echo ""
echo ""
echo ""
#Uninstall the current LNMP
#echo "=========================="
echo "Uninstall the current LNMP"
#echo "=========================="
echo "stop apache"&& service httpd stop && chkconfig --del httpd
echo "stop nginx" && service nginx stop && chkconfig --del nginx
echo ""
echo ""
echo ""
#disabled selinux
#/*if [ "$(grep SELINUX= /etc/selinux/config | grep -v "#" | cut -d= -f2)" == "disabled" ]; then
# echo -e "\033[34m Selinux is disabled !\033[0m"
#
# elif [ "$(grep SELINUX= /etc/selinux/config | grep -v "#" | cut -d= -f2)" == "enforcing" ]; then
# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
# setenforce 0
# echo -e "\033[34m disabled selinux done !\033[0m"
# echo -e "\033[34m Current Selinux Status is $(getenforce)\033[0m"
#
# elif [ "$(grep SELINUX= /etc/selinux/config | grep -v "#" | cut -d= -f2)" == "permissive" ]; then
# sed -i "s/SELINUX=permissive/SELINUX=disabled/g" /etc/selinux/config
# echo -e "\033[34m disabled selinux ok !\033[0m"
# echo -e "\033[34m Current Selinux Status is $(getenforce)\033[0m"
fi