Gentoo Squid完全命令行笔记

5 emerge –sync

6 eselect news list

7 eselect profile list

8 eselect profile list

9 ls usr/share/zoneinfo/

10 cp usr/share/zoneinfo/NZ /etc/timezone

11 echo “NZ” > /etc/timezone

12 ls /etc/timezone

13 ls /etc/timezone

14 cd /etc/

15 cd timezone

16 emerge gentoo-sources

17 ls -l /usr/src/linux

18  emerge pciutils

19  lspci

20  cd /usr/src/linux

21  lsmod

22  lsmod -la

23  lsmod | more

24  make menuconfig

25  make menuconfig

26  make menuconfig

27  make && make modules_install

28  ls

29  cp arch/x86_64/boot/bzImage /boot/kernel-1234

30  ls

31  cd ..

32  ls -l

33  mv /boot/kernel-1234 /boot/kernel-3.8.13-gentoo

34  nano -w /etc/fstab

35  nano -w /etc/conf.d/hostname

36  nano -w /etc/conf.d/net

37  cd /etc/ini

38  ln -s net.lo net.eth0

39  rc-update add net.eth0 default

40  nano /etc/hosts

41  passwd

42  nano -w /etc/conf.d/hwclock

43  env-update && source /etc/profile

44  emerge syslog-ng vixie-cron mlocate sshd

45  emerge syslog-ng vixie-cron mlocate

46  rc-update add syslog-ng default

47  rc-update add vixie-cron default

48  rc-update add ssd default

49  rc-update add ssgd default

50  rc-update add sshd default

51  emerge dhcpcd

52  emerge grub

53  nano /boot/grub/grub.conf

54  ls /boot

55  nano /boot/grub/grub.conf

56  grep -v rootfs /proc/mounts > /etc/mtab

57  grub-install

58  grub-install /dev/sda

59  exit

60  ifconfig

61  /etc/init.d/net.eth0 start

62  cd /usr/src/linux/

63  make menuconfig

64  lsmod

65  lspci

66  ifconfig eth0 up

67  ifconfig eth1 up

68  nano /var/log/messages

69  cat /proc/net/dev

70  nano /var/log/messages

71  ifconfig enps0 up

72  ifconfig enp2s0 up

73  ifconfig

74  cd /etc/init.d/

75  mv net.eth0 net.enp2s0

76  ./net.enp2s0 start

77  nano /etc/conf.d/net

78  ping google.co.nz

79  ifconfig

80  ping … …

81  /etc/init.d/sshd restart

82  reboot

83  ifconfig

84  nano /etc/conf.d/net

85  nano /var/log/messages

86  nano /etc/conf.d/net

87  nano /var/log/messages

88  nano /etc/conf.d/net

89  mount /dev/sda1 /boot/

90  nano /boot/grub/grub.conf

91  grub-install /dev/sda

92  reboot

93  ifconfig

94  nano /etc/conf.d/net

95  cd /etc/init.d/

96  mv net.enp2s0 net.eth0

97  /etc/init.d/net.eth0 restart

98  ifconfig

99  /etc/init.d/net.eth0 stop

100  /etc/init.d/net.eth0 start

101  ifconfig

102  reboot

103  ifconfig

104  ping … …

105  halt

106  /etc/init.d/mit-krb5k status

107  /etc/init.d/mit-krb5kdc status

108  nano /etc/samba/smb.conf.default

109  nano /etc/samba/smb.conf

110  /etc/init.d/samba start

111  nano /etc/conf.d/samba

112  /etc/init.d/samba restart

113  nano /etc/conf.d/samba

114  emerge -pv samba

115  USE=”ldap winbind” emerge -pv samba

116  USE=”ldap winbind ads” emerge samba

117  USE=”kerberos ldap pam” emerge -pv squid openldap mit-krb5

118  USE=”kerberos ldap pam samba logrotate mysql” emerge -pv squid openldap mit-krb5

119  USE=”kerberos ldap pam samba logrotate mysql” emerge squid openldap mit-krb5

120  scp 10.1.1.2:/etc/squid/squid.conf /etc/squid/squid2.conf

121  nano /etc/squid/squid2.conf

122  cd /etc/squid/

123  mv squid.conf squid.old.conf

124  mv squid2.conf squid.conf

125  /etc/init.d/squid start

126  /etc/init.d/squid restart

127  cd ..

128  cd squidGuard/

129  ls

130  ls

131  rm -rf squidGuard/

132  ifconfig

133  /etc/init.d/squid restart

134  nano /etc/squid/squid.conf

135  /etc/init.d/squid restart

136  tail /var/log/squid/cache.log

137  cat /var/run/samba/

138  ls -l /var/run/samba/

139  ls /var/cache/samba/

140  ls -l /var/cache/samba/

141  ls -l /var/cache/samba/winbindd_privileged/

142  chgrp squid /var/cache/samba/winbindd_privileged/

143  tail – f/var/log/squid/cache.log

144  tail -f /var/log/squid/cache.log

145  tail -f /var/log/squid/access.log

146  nano /etc/squid/squid.conf

147  tail -F /var/log/squid/access.log

148  exit

149  nano /etc/squid/squid.conf

150  /etc/init.d/squid restart

151  nano /etc/squid/squid.conf

152  /etc/init.d/squid restart

153  nano /etc/squid/squid.conf

154  nano /etc/squid/squid.conf

155  tail -F /var/log/squid/access.log | grep

156  tail -F /var/log/squid/access.log | grep

157  tail -F /var/log/squid/access.log | grep

158  nano /etc/squid/squid.conf

159  /etc/init.d/squid reload

160  tail -F /var/log/squid/access.log | grep

161  tail -F /var/log/squid/access.log | grep

162  nano /etc/squid/squid.conf

163  tail -F /var/log/squid/access.log | grep

164  nano /etc/squid/squid.conf

165  tail /var/log/squidGuard/squidGuard.log

166  tail /var/log/squidGuard/squidGuard.log

167  tail /var/log/squidGuard/squidGuard.log

168  tail /var/log/squidGuard/squidGuard.log

169  cd /etc/squidGuard/db/

170  ls

171  ls -l

172  chown -R * squid

173  chown -R squid *

174  exit

175  tail -F /var/log/squid/access.log

176  tail -F /var/log/squid/access.log | grep

177  tail -F /var/log/squid/access.log | grep

178  tail -F /var/log/squidGuard/squidGuard.log

179  /etc/init.d/squid restart

180  nano /etc/squid/squid.conf

181  /etc/init.d/squid reload

182  nano /etc/squid/squid.conf

183  /etc/init.d/samba

184  ps -aux

185  ps -aux | grep samba

186  /etc/init.d/samba start

187  /etc/init.d/samba restart

188  /etc/init.d/squid restart

189  /etc/init.d/squid start

190  /etc/init.d/squid restart

191  nano /etc/squid/squid.conf

192  ping www.google.com

193  nano /etc/squid/squid.conf

194  cd /etc/squid

195  ls

196  nano msntauth.conf

197  ping google.co.nz

198  nano /etc/squid/squid.conf

199  ping stuff.co.nz

200  service status -all

201  service samba status

202  /etc/init.d/squid status

203  /etc/init.d/samba status

204  /etc/init.d/all status

205  tail -F /var/log/squid/access.log | grep

206  tail -F /var/log/squid/access.log | grep

207  tail -F /var/log/squid/access.log | grep .harrow

208  nano /etc/squid/squid.conf

209  /etc/init.d/squid restart

210  tail -F /var/log/squid/access.log | grep

211  tail -F /var/log/squid/access.log | grep

212* nano

213  nano /etc/squid/squid.conf

214  ls /etc/squid/

215  tail -F /var/log/squid/access.log | grep

216  nano /etc/squid/squid.conf

217  nano /etc/squid/squid.conf

218  nano /var/log/squid/cache.log

219  nano /var/log/squid/cache.log

220  nano /etc/squidGuard/squidGuard.conf

221  nano dbhome /etc/squidGuard/db

222  nano /etc/squidGuard/db

223  nano /etc/squidGuard/db/whitelist/domains

224  nano /etc/squidGuard/db/whitelist/domains

225  /etc/init.d/squid restart

226  nano /etc/squidGuard/db/whitelist/domains

227  nano /etc/squidGuard/squidGuard.conf

228  /etc/init.d/squid restart

229  nano /etc/squidGuard/db/whitelist/

230  nano /etc/squidGuard/db/whitelist/domains

231  nano /etc/squidGuard/db/malware/domains

232  nano /etc/squidGuard/db/whitelist/domains

233  nano /etc/squidGuard/squidGuard.conf

234  nano /etc/squidGuard/db/whitelist/urls

235  nano /etc/squidGuard/db/whitelist/domains

236  /etc/init.d/squid restart

237  nano /etc/squidGuard/db/whitelist/domains

238  nano /etc/squidGuard/db/whitelist/urls

239  squidGuard

240  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard

241  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard -c /etc/squidGuard/squidGuard.conf

242  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard -c /etc/squidGuard/squidGuard.conf

243  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard -c /etc/squidGuard/squidGuard.conf

244  squidGuard –help

245  squidGuard -d

246  nano /etc/squidGuard/squidGuard.conf

247  squidGuard -d

248  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard -c /etc/squidGuard/squidGuard.conf

249  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard -c /etc/squidGuard/squidGuard.conf

250  nano /etc/squidGuard/db/whitelist/domains

251  /etc/init.d/squid restart

252  bg

253  echo “http://www.***.com 10.0.0.1/ – – GET” | squidGuard -c /etc/squidGuard/squidGuard.conf