File tree Expand file tree Collapse file tree 15 files changed +167
-0
lines changed Expand file tree Collapse file tree 15 files changed +167
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y apache2 libapache2-mod-php phpmyadmin
4
+
5
+ [[ ! -e ` which mysqld` ]] && echo " Please install mysql-server first" && exit 0
6
+
7
+ service start mysql
8
+ service start apache2
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y dnsmasq
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ $UID -ne 0 ]; then
4
+ echo " [*] The script needs root privilege."
5
+ exit 0
6
+ fi
7
+
8
+ FTP_HOME=" /var/ftp"
9
+ apt-get install -y pure-ftpd
10
+ mkdir -p " $FTP_HOME "
11
+
12
+ groupadd ftpgroup
13
+ useradd -g ftpgroup -d /dev/null -s /etc ftpuser
14
+ pure-pw useradd ftpadmin -u ftpuser -d " $FTP_HOME "
15
+ pure-pw mkdb
16
+
17
+ cd /etc/pure-ftpd/auth/
18
+ ln -s ../conf/PureDB 60pdb
19
+ chown -R ftpuser:ftpgroup " $FTP_HOME "
20
+ service pure-ftpd start
21
+
22
+
23
+ # apt-get install -y ncftp
24
+ # ncftp -u ftpadmin -p password 127.0.0.1
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-14-04
4
+
5
+ apt-get install -y mailutils postfix
6
+
7
+ # /etc/postfix/mail.cf
8
+ # inet_interfaces = localhost
9
+ service postfix restart
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y mongodb-server mongodb-clients
4
+ service mongodb start
5
+
6
+
7
+ # $ mongo
8
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Install MYSQL-Server
4
+ echo ' debconf debconf/frontend select Noninteractive' | debconf-set-selections
5
+
6
+ echo ' mysql-server mysql-server/root_password password password' | debconf-set-selections
7
+ echo ' mysql-server mysql-server/root_password_again password password' | debconf-set-selections
8
+
9
+ apt-get install -y mysql-server
10
+
11
+ service mysql start
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y nfs-kernel-server nfs-common
4
+
5
+ mkdir -p /var/nfs
6
+ echo " /var/nfs * (rw,no_root_squash)" >> /etc/exports
7
+
8
+ systemctl start rpcbind
9
+ systemctl start nfs-server
10
+
11
+ # mkdir -p /mnt/nfs
12
+ # mount -t nfs 127.0.0.1:/var/nfs /mnt/nfs -o nolock
13
+ # umount /mnt/nfs
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y redis-server
4
+ service redis-server start
5
+
6
+ # redis-cli -h 127.0.0.1
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ cat << EOF >/etc/rsyncd.conf
4
+ lock file = /var/run/rsync.lock
5
+ log file = /var/log/rsyncd.log
6
+ pid file = /var/run/rsyncd.pid
7
+
8
+ [code]
9
+ path = /var/rsync
10
+ comment = The documents folder of Juan
11
+ uid = root
12
+ gid = root
13
+ read only = no
14
+ list = yes
15
+ auth users = root
16
+ secrets file = /etc/rsyncd.secrets
17
+ hosts allow = *
18
+ ignore errors = yes
19
+ EOF
20
+
21
+ cat << EOF >/etc/rsyncd.secrets
22
+ root:password
23
+ EOF
24
+
25
+ mkdir -p /var/rsync/
26
+ chmod -R 600 /var/rsync
27
+ service rsync start
28
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # /etc/snmp/snmpd.conf
4
+ # agentAddress udp:0.0.0.0:161
5
+ # snmpwalk -c public -v 1 127.0.0.1
6
+
7
+ apt-get install snmp
8
+ service snmpd start
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y openssh-server
4
+ service ssh start
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y xinetd telnetd
4
+
5
+ cat << EOF > /etc/xinetd.d/telnet
6
+ service telnet
7
+ {
8
+ disable = yes
9
+ flags = REUSE
10
+ socket_type = stream
11
+ wait = no
12
+ user = root
13
+ server = /usr/sbin/in.telnetd
14
+ log_on_failure += USERID
15
+ }
16
+ EOF
17
+
18
+ # /etc/pam.d/login
19
+
20
+ service xinetd start
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y atftpd
4
+ mkdir -p /srv/tftp
5
+ chown -R nobody /srv/tftp
6
+ echo " hello tftp-sevrer" > /srv/tftp/tftp.txt
7
+ service atftpd start
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y tomcat8 tomcat8-admin tomcat8-user tomcat8-common
4
+
5
+ # ==== /var/lib/tomcat8/conf/tomcat-users.xml ====
6
+ echo -e " ---------------------------------------------"
7
+ echo -e " Please enable tomcat manager-gui manually\n"
8
+ echo " /var/lib/tomcat8/conf/tomcat-users.xml"
9
+ echo -e " ---------------------------------------------\n"
10
+ echo ' <role rolename="tomcat"/>'
11
+ echo ' <role rolename="manager-gui"/>'
12
+ echo ' <user username="tomcat" password="tomcat" roles="tomcat, manager-gui"/>'
13
+
14
+ service tomcat8 start
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get install -y tightvncserver xtightvncviewer
4
+ tightvncserver
You can’t perform that action at this time.
0 commit comments