wandibudiana

raptor ubuntu

Feb 17th, 2013
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Ubuntu Version tested on 12.10
  2. # wget http://www.raptorcache.com/install/raptor10b-64.sh
  3. # chmod 777 raptor10b-64.sh
  4. # Edit and replace with script below
  5. # bash raptor10b-64.sh
  6. #!/bin/bash
  7. clear
  8. echo "|=====================================================================|"
  9. echo ""
  10. echo " _ __ __ _____ "
  11. echo " | | | \/ |/ ____|"
  12. echo " | | ___ ___| \ / | | __ "
  13. echo " _ | |/ _ \ / _ \ |\/| | | |_ |"
  14. echo " | |__| | (_) | __/ | | | |__| |"
  15. echo " \____/ \___/ \___|_| |_|\_____|"
  16. echo ""
  17. echo "+=====================================================================+"
  18. echo "| INSTALLATION Raptor 1.0b - Squid 3.x |"
  19. echo "| 64 bits |"
  20. echo "+=====================================================================+"
  21. echo ""
  22. V='|-------------------------> Version 64 bits <-------------------------|'
  23. ER='ERROR, Your Linux version is not 64 bits'
  24. ER2='Use the appropriate script for your version'
  25. P=`uname -m`
  26. if [ $P = x86_64 ] ; then
  27. echo $V
  28. else
  29. echo $ER
  30. echo ""
  31. echo $ER2
  32. echo ""
  33. exit 0
  34. fi
  35. echo ""
  36.  
  37. IPSERV=$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
  38. HOST_NAME="local.war.net"
  39.  
  40. sleep 3
  41.  
  42. apt-get update
  43.  
  44. cd ..
  45. mkdir /cache-1
  46. chmod 777 /cache-1
  47. cd /root
  48.  
  49. echo Y | apt-get install squid3
  50.  
  51. sleep 3
  52. touch /etc/squid3/denegados.lst
  53. echo "cracks.st" >> /etc/squid3/denegados.lst
  54.  
  55. rm -rf /etc/squid3/squid.conf
  56. touch /etc/squid3/squid.conf
  57.  
  58. echo "#========================== Squid 3.x Conf ===========================#
  59. # Port Option SQUID 3.x
  60. #----------------------------------------------------------------------
  61. http_port 3128 intercept
  62. visible_hostname proxy.$HOST_NAME
  63. icp_port 0
  64. #----------------------------------------------------------------------
  65. error_directory /usr/share/squid3/errors/English
  66. #----------------------------------------------------------------------
  67. acl denegados url_regex -i "/etc/squid3/denegados.lst"
  68. #----------------------------------------------------------------------
  69. # DNS Option
  70. #----------------------------------------------------------------------
  71. dns_nameservers 8.8.8.8 8.8.4.4
  72. dns_retransmit_interval 5 seconds
  73. dns_timeout 2 minutes
  74. #----------------------------------------------------------------------
  75. acl manager proto cache_object
  76. acl localhost src 127.0.0.1/32 ::1
  77. acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
  78. acl CONNECT method CONNECT
  79.  
  80. acl Safe_ports port 80 # http
  81. acl Safe_ports port 21 # ftp
  82. acl SSL_ports port 443
  83. acl Safe_ports port 443 # https
  84. acl Safe_ports port 70 # gopher
  85. acl Safe_ports port 210 # wais
  86. acl Safe_ports port 1025-65535 # unregistered ports
  87. acl Safe_ports port 280 # http-mgmt
  88. acl Safe_ports port 488 # gss-http
  89. acl Safe_ports port 591 # filemaker
  90. acl Safe_ports port 777 # multiling http
  91. acl Safe_ports port 631 # cups
  92. acl Safe_ports port 873 # rsync
  93. acl Safe_ports port 901 # SWAT
  94. acl Safe_ports port 1863 # MSN
  95. #acl SSL_ports port 443 # https
  96. acl SSL_ports port 563 # snews
  97. acl SSL_ports port 873 # rsync
  98.  
  99. http_access allow manager localhost
  100. http_access deny manager all
  101. http_access deny !Safe_ports
  102. http_access deny CONNECT !SSL_ports
  103. http_access allow localhost
  104. http_access deny denegados
  105. #----------------------------------------------------------------------
  106. coredump_dir /cache-1
  107. #----------------------------------------------------------------------
  108. # Reserved memory for cache
  109. # It is recommended that you take approx. 5 MB of RAM per 1GB assigned to cache_dir
  110. #----------------------------------------------------------------------
  111. cache_mem 50 MB
  112. #----------------------------------------------------------------------
  113. # Maximum size of a file in cache memory
  114. #----------------------------------------------------------------------
  115. maximum_object_size_in_memory 128 KB
  116. #----------------------------------------------------------------------
  117. # Maximum and minimum size of files in the disk cache
  118. #----------------------------------------------------------------------
  119. maximum_object_size 30 MB
  120. minimum_object_size 4 KB
  121. #----------------------------------------------------------------------
  122. # Replace cache files when disk cache reach 96% full
  123. #----------------------------------------------------------------------
  124. cache_swap_low 92
  125. cache_swap_high 96
  126. #----------------------------------------------------------------------
  127. # Total HD space to be used by the cache, number of folders,
  128. # Number of subfolders in cache
  129. # 10000 = 10 GB
  130. #----------------------------------------------------------------------
  131. cache_dir aufs /cache-1 10000 16 256
  132. #----------------------------------------------------------------------
  133. # Standard update cache
  134. # 1 month = 10080 mins, 1 day = 1440 mins
  135. #----------------------------------------------------------------------
  136. refresh_pattern -i \.jpg$ 14400 80% 43200 reload-into-ims
  137. refresh_pattern -i \.gif$ 14400 80% 43200 reload-into-ims
  138. refresh_pattern -i \.png$ 14400 80% 43200 reload-into-ims
  139. refresh_pattern -i \.jpeg$ 14400 80% 43200 reload-into-ims
  140. refresh_pattern -i \.bmp$ 14400 80% 43200 reload-into-ims
  141. refresh_pattern -i \.tif$ 14400 80% 43200 reload-into-ims
  142. refresh_pattern -i \.tiff$ 14400 80% 43200 reload-into-ims
  143. refresh_pattern -i \.swf$ 14400 80% 43200 reload-into-ims
  144. refresh_pattern -i \.html$ 10 20% 4320 reload-into-ims
  145. refresh_pattern -i \.htm$ 10 20% 4320 reload-into-ims
  146. refresh_pattern -i \.shtml$ 10 20% 4320 reload-into-ims
  147. refresh_pattern -i \.shtm$ 10 20% 4320 reload-into-ims
  148. refresh_pattern -i \.nub$ 2880 80% 21600 reload-into-ims
  149. refresh_pattern -i \.exe$ 14400 80% 43200
  150. refresh_pattern -i \.zip$ 14400 80% 43200
  151. refresh_pattern -i \.mov$ 14400 80% 43200
  152. refresh_pattern -i \.mpe?g?$ 14400 80% 43200
  153. refresh_pattern -i \.avi$ 14400 80% 43200
  154. refresh_pattern -i \.qtm?$ 14400 80% 43200
  155. refresh_pattern -i \.viv$ 14400 80% 43200
  156. refresh_pattern -i \.wav$ 14400 80% 43200
  157. refresh_pattern -i \.aiff?$ 14400 80% 43200
  158. refresh_pattern -i \.au$ 14400 80% 43200
  159. refresh_pattern -i \.ram?$ 14400 80% 43200
  160. refresh_pattern -i \.snd$ 14400 80% 43200
  161. refresh_pattern -i \.mid$ 14400 80% 43200
  162. refresh_pattern -i \.mp2$ 14400 80% 43200
  163. refresh_pattern -i \.mp3$ 14400 80% 43200
  164. refresh_pattern -i \.sit$ 14400 80% 43200
  165. refresh_pattern -i \.zip$ 14400 80% 43200
  166. refresh_pattern -i \.hqx$ 14400 80% 43200
  167. refresh_pattern -i \.arj$ 14400 80% 43200
  168. refresh_pattern -i \.lzh$ 14400 80% 43200
  169. refresh_pattern -i \.lha$ 14400 80% 43200
  170. refresh_pattern -i \.cab$ 14400 80% 43200
  171. refresh_pattern -i \.rar$ 14400 80% 43200
  172. refresh_pattern -i \.tar$ 14400 80% 43200
  173. refresh_pattern -i \.gz$ 14400 80% 43200
  174. refresh_pattern -i \.z$ 14400 80% 43200
  175. refresh_pattern -i \.a[0-9][0-9]$ 14400 80% 43200
  176. refresh_pattern -i \.r[0-9][0-9]$ 14400 80% 43200
  177. refresh_pattern -i \.txt$ 14400 80% 43200
  178. refresh_pattern -i \.pdf$ 14400 80% 43200
  179. refresh_pattern -i \.doc$ 14400 80% 43200
  180. refresh_pattern -i \.rtf$ 14400 80% 43200
  181. refresh_pattern -i \.tex$ 14400 80% 43200
  182. refresh_pattern -i \.latex$ 14400 80% 43200
  183. refresh_pattern -i \.class$ 14400 80% 43200
  184. refresh_pattern -i \.js$ 14400 80% 43200
  185. refresh_pattern -i \.ico$ 14400 80% 43200
  186. refresh_pattern -i \.css$ 10 20% 4320
  187. #----------------------------------------------------------------------
  188. refresh_pattern ^ftp: 1440 20% 10080
  189. refresh_pattern ^gopher: 1440 0% 1440
  190. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  191. #refresh_pattern (Release|Package(.gz)*)$ 0 20% 2880
  192. refresh_pattern . 0 20% 4320
  193. #----------------------------------------------------------------------
  194. # Access log for the cache or to SARG
  195. #----------------------------------------------------------------------
  196. logfile_rotate 1
  197. access_log /var/log/squid3/access.log
  198. access_log /var/log/squid3/error.log
  199. cache_store_log none
  200. #----------------------------------------------------------------------
  201. # other configurations
  202. #----------------------------------------------------------------------
  203. half_closed_clients off
  204. server_persistent_connections off
  205. client_persistent_connections off
  206. log_fqdn off
  207. quick_abort_min 0 KB
  208. quick_abort_max 0 KB
  209. quick_abort_pct 100
  210. max_filedescriptors 65536
  211. cache_effective_user proxy
  212. cache_effective_group proxy
  213. #----------------------------------------------------------------------
  214. # Keeping small objects in recent memory
  215. #----------------------------------------------------------------------
  216. memory_replacement_policy heap GDSF
  217. cache_replacement_policy heap LFUDA
  218. #----------------------------------------------------------------------
  219. # Sites that are denied to store files in squid cache
  220. #----------------------------------------------------------------------
  221. acl nocache dstdomain .4shared.com .youtube.com .windowsupdate.com .gl$
  222. no_cache deny nocache
  223. #----------------------------------------------------------------------
  224. # Denying cache for files with extension. Asx and. Asf | streaming |
  225. #----------------------------------------------------------------------
  226. acl asx url_regex -i \.asx$
  227. cache deny asx
  228. acl asf url_regex -i \.asf$
  229. cache deny asf" >> /etc/squid3/squid.conf
  230.  
  231. /etc/init.d/squid3 stop
  232. sleep 1
  233.  
  234. squid3 -z
  235. sleep 1
  236.  
  237. /etc/init.d/squid3 restart
  238.  
  239. sleep 6
  240.  
  241.  
  242. IPSERV=$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
  243.  
  244. sleep 3
  245.  
  246. apt-get update
  247.  
  248. echo Y | apt-get install apache2
  249.  
  250. sleep 1
  251.  
  252. echo Y | apt-get install sqlite gcc libsqlite3-dev libapache2-mod-php5 php-db libstdc++6 g++ unzip
  253.  
  254. echo Y | apt-get install libmysqlclient15-dev libblkid-dev libcurl3-dev lynx ffmpeg lsb-release sudo
  255.  
  256. echo Y | apt-get install make php5-dev php-pear apache2-prefork-dev libpcre3-dev
  257.  
  258.  
  259. cd /root
  260.  
  261. sleep 3
  262.  
  263. wget http://www.raptorcache.com/install/64/raptor64.tar.gz
  264. cp raptor64.tar.gz /tmp
  265. tar -xzvf /tmp/raptor64.tar.gz -C /
  266. rm -rf raptor64.tar.gz
  267. chmod a+x /usr/sbin/raptor
  268.  
  269. mkdir /var/log/raptor && mkdir /var/tmp/raptor && mkdir /var/run/raptor && mkdir /raptorcache &&
  270. chmod a+rwx /var/log/raptor && chmod a+rwx /var/tmp/raptor && chmod a+rwx /var/run/raptor && chmod a+x /etc/init.d/raptor &&
  271. chown -R www-data /raptorcache/
  272. chmod -R 777 /raptorcache/
  273. umask 000 /raptorcache/
  274.  
  275. echo "extension=pdo.so" >> /etc/php5/apache2/php.ini
  276. echo "vm.swappiness=10" >> /etc/sysctl.conf
  277.  
  278. update-rc.d raptor defaults
  279.  
  280. sleep 3
  281.  
  282. echo "
  283. #----------------------------------------------------------------------
  284. acl raptor_lst url_regex -i \"/etc/raptor/raptor.lst\"
  285. cache deny raptor_lst
  286. cache_peer $IPSERV parent 8080 0 proxy-only no-digest
  287. dead_peer_timeout 2 seconds
  288. cache_peer_access $IPSERV allow raptor_lst
  289. cache_peer_access $IPSERV deny all
  290. #----------------------------------------------------------------------" >> /etc/squid3/squid.conf
  291.  
  292. sleep 3
  293.  
  294. wget http://www.raptorcache.com/install/clean/64/clean.zip
  295. unzip clean.zip
  296. mv clean /etc/raptor/
  297. chmod 777 /etc/raptor/clean
  298. rm -rf clean.zip
  299.  
  300. wget http://www.raptorcache.com/install/var/pluginmaker.tar.gz
  301. tar -xzvf pluginmaker.tar.gz
  302. mv pluginmaker /etc/raptor/
  303. rm -rf pluginmaker.tar.gz
  304.  
  305. touch /etc/raptor/raptor.lst
  306.  
  307. wget http://www.raptorcache.com/install/64/plugins/plugins.tar.gz
  308. tar -xzvf plugins.tar.gz
  309. mv plugins /etc/raptor/
  310. rm -rf plugins.tar.gz
  311. clear
  312. chmod 777 /etc/raptor/plugins/*
  313. chmod 777 /etc/raptor/cl0
  314.  
  315. wget -O /usr/lib/libmysqlclient.so.16 http://www.joemg.host56.com/lib/64bits/libmysqlclient.so.16
  316.  
  317. wget http://repo.undip.ac.id/ubuntu//pool/main/m/mysql-5.1/libmysqlclient16_5.1.67-0ubuntu0.11.10.1_amd64.deb
  318.  
  319. dpkg -i libmysqlclient16_5.1.67-0ubuntu0.11.10.1_amd64.deb
  320.  
  321. /etc/init.d/raptor start
  322.  
  323. chmod 777 /etc/raptor/clean
  324.  
  325. sleep 3
  326.  
  327. echo "
  328. ## Raptor
  329. # min(0-59) hour(0-23) days(1-31) month(1-12) weekly(0-7) user command
  330. 59 1 * * * root /etc/raptor/./clean 45
  331. 30 23 * * * root squid3 -k rotate
  332. * */1 * * * root /etc/raptor/./cl0
  333. 59 22 * * * root /etc/raptor/rprotate
  334. */2 * * * * root serv
  335. */1 * * * * root vnstat -u -i eth0" >> /etc/crontab
  336.  
  337. sleep 6
  338.  
  339. apt-get update
  340. clear
  341. echo ""
  342. echo ""
  343. echo "+-------------------------------------------------------------+"
  344. echo "| Installing Mysql |"
  345. echo "| It is important to set the password of Mysql = raptor |"
  346. echo "+-------------------------------------------------------------+"
  347. echo Press enter to continue...
  348. read -n 0 -ers
  349.  
  350. echo Y | apt-get install mysql-server mysql-client php5-mysql &&
  351. echo Y | aptitude install php5-cgi &&
  352. echo Y | apt-get -f upgrade &&
  353.  
  354. wget http://www.raptorcache.com/install/var/raptor.sql
  355. cp raptor.sql /var/tmp/
  356. rm -rf raptor.sql
  357. echo
  358.  
  359. mysql -u root -praptor << eof
  360. CREATE DATABASE raptor;
  361. eof
  362. mysql -u root -praptor raptor < /var/tmp/raptor.sql
  363.  
  364. sleep 6
  365.  
  366. IPSERV=$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
  367. HOST_NAME="local.war.net"
  368.  
  369. sleep 3
  370.  
  371. mv /etc/hosts /etc/hosts_
  372. touch /etc/hosts
  373.  
  374. echo "127.0.0.1 localhost.localdomain localhost
  375. $IPSERV proxy.$HOST_NAME proxy
  376. #
  377. ::1 localhost ip6-localhost ip6-loopback
  378. fe00::0 ip6-localnet
  379. fe00::0 ip6-mcastprefix
  380. ff02:1 ip6-allnodes
  381. ff02::2 ip6-allrouters
  382. ff02::3 ip6-allhosts" >> /etc/hosts
  383.  
  384. sleep 3
  385.  
  386. mv /etc/hostname /etc/hostname_
  387. touch /etc/hostname
  388.  
  389. echo "proxy.$HOST_NAME" >> /etc/hostname
  390.  
  391. mv /etc/resolv.conf /etc/resolv.conf_
  392. touch /etc/resolv.conf
  393.  
  394. echo "search proxy.$HOST_NAME
  395. nameserver 127.0.0.1
  396. nameserver 8.8.8.8
  397. nameserver 8.8.4.4" >> /etc/resolv.conf
  398.  
  399. sleep 3
  400.  
  401. echo Y | apt-get install bind9 dnsutils bind9-doc
  402.  
  403. sleep 3
  404.  
  405. mv /etc/bind/named.conf.options /etc/bind/named.conf.options_old
  406. touch /etc/bind/named.conf.options
  407.  
  408. echo "options {
  409. directory "/var/cache/bind";
  410. forward only;
  411. forwarders { 8.8.8.8; 8.8.4.4; };
  412. auth-nxdomain no; # conform to RFC1035
  413. listen-on-v6 { none; };
  414. listen-on { 127.0.0.1; };
  415. version none;
  416. };" >> /etc/bind/named.conf.options
  417.  
  418. echo "include "/etc/bind/zones.rfc1918";
  419. logging {
  420. category lame-servers {null; };
  421. category edns-disabled { null; };
  422. };" >> /etc/bind/named.conf.local
  423.  
  424. echo "ServerName proxy.$HOST_NAME" >> /etc/apache2/apache2.conf
  425.  
  426. mv /etc/apache2/httpd.conf /etc/apache2/httpd.conf_
  427. mkdir /etc/cacti
  428. touch /etc/cacti/httpd.conf
  429. echo "Listen 82
  430. <VirtualHost *:82>
  431. DocumentRoot /var/raptor
  432. ServerName www.raptorcache.com
  433. ErrorLog /var/log/virtual82-error_log
  434. CustomLog /var/log/virtual82-access_log common
  435. </VirtualHost>
  436. Listen 84
  437. <VirtualHost *:84>
  438. DocumentRoot /var/www/sarg
  439. ServerName www.raptorcache.com
  440. </VirtualHost>" >> /etc/apache2/httpd.conf
  441.  
  442. sleep 6
  443.  
  444. clear
  445.  
  446. sleep 3
  447. echo "
  448. # Repository Sarg for debian
  449. # deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list
  450. apt-get update
  451. echo Y | aptitude install sarg
  452. mv /etc/sarg/sarg.conf /etc/sarg/sarg.conf_old
  453. wget http://www.raptorcache.com/install/var/sarg.conf
  454. mv sarg.conf /etc/sarg/sarg.conf
  455. echo "
  456. # Schedulle of Sarg
  457. 59 21 * * * root sarg" >> /etc/crontab
  458. mkdir /var/www/sarg/
  459. sarg -x
  460.  
  461. sleep 1
  462. wget http://joemg.host56.com/wpanel/raptor.tar.gz
  463. tar -xzvf raptor.tar.gz
  464. mv raptor /var/
  465. rm -rf raptor.tar.gz
  466. clear
  467. chmod 777 /var/raptor/*
  468. chmod 777 /var/raptor/mail/*
  469. chmod 777 /etc/raptor/raptor.lst
  470. chmod 777 /etc/squid3/squid.conf
  471. chmod 777 /etc/raptor/raptor.conf
  472. chmod 777 /etc/squid3/denegados.lst
  473. chmod 777 /etc/network/interfaces
  474. chmod 777 /etc/resolv.conf
  475. clear
  476.  
  477. sleep 1
  478. echo Y | apt-get install snmpd
  479. mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
  480. touch /etc/snmp/snmpd.conf
  481. echo 'rocommunity public
  482. syslocation "PDC, Proxy DataCenter"
  483. syscontact [email protected]' > /etc/snmp/snmpd.conf
  484. rm -rf /etc/default/snmpd
  485. wget http://www.raptorcache.com/install/var/snmpd
  486. mv snmpd /etc/default/
  487. /etc/init.d/snmpd restart
  488. sleep 3
  489. clear
  490. echo ""
  491. echo ""
  492. echo "+--------------------------------------------------------------------------------------+"
  493. echo "| Installing Cacti |"
  494. echo "| Choose Apache2 as web server and then enter the password Mysql(raptor) |"
  495. echo "+--------------------------------------------------------------------------------------+"
  496. echo Press enter to continue...
  497. read -n 0 -ers
  498. echo Y | apt-get install cacti
  499. wget http://www.raptorcache.com/install/var/raptor-cacti.sql
  500. mv raptor-cacti.sql /var/tmp/
  501. mysql -u root -praptor cacti < /var/tmp/raptor-cacti.sql
  502. sleep 1
  503. mv /etc/cacti/apache.conf /etc/cacti/apache.conf_
  504. touch /etc/cacti/apache.conf
  505. echo "Alias /graphcacti /usr/share/cacti/site
  506.  
  507. <Directory /usr/share/cacti/site>
  508. Options +FollowSymLinks
  509. AllowOverride None
  510. order allow,deny
  511. allow from all
  512.  
  513. AddType application/x-httpd-php .php
  514.  
  515. <IfModule mod_php5.c>
  516. php_flag magic_quotes_gpc Off
  517. php_flag short_open_tag On
  518. php_flag register_globals Off
  519. php_flag register_argc_argv On
  520. php_flag track_vars On
  521. # this setting is necessary for some locales
  522. php_value mbstring.func_overload 0
  523. php_value include_path .
  524. </IfModule>
  525.  
  526. DirectoryIndex index.php
  527. </Directory>" >> /etc/cacti/apache.conf
  528. /etc/init.d/apache2 restart
  529.  
  530. echo Y | apt-get install vnstat
  531. vnstat -u -i eth0
  532.  
  533. echo Y | apt-get install smartmontools lvm2 hdparm
  534. sleep 1
  535.  
  536. echo Y | apt-get install lm-sensors
  537. clear
  538. echo ""
  539. echo ""
  540. echo "+---------------------------------------------+"
  541. echo "| temperature sensors Installation |"
  542. echo "+---------------------------------------------+"
  543. echo Press enter to continue...
  544. read -n 0 -ers
  545. sensors-detect
  546. service module-init-tools restart
  547. /etc/init.d/module-init-tools restart
  548. echo "
  549. # DNS Cache
  550. */2 * * * * root rndc dumpdb" >> /etc/crontab
  551.  
  552. clear
  553. wget http://www.raptorcache.com/install/var/upload.cgi
  554. mv upload.cgi /usr/lib/cgi-bin/
  555. chmod 777 /usr/lib/cgi-bin/upload.cgi
  556. echo Y | apt-get --purge remove sudo
  557. echo Y | apt-get install sudo
  558. echo "www-data ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  559. chmod 777/etc/sudoers
  560. clear
  561.  
  562. echo | pecl install apc --with-apxs='/usr/bin/apxs2'
  563. echo "Alias /var/raptor/apc /usr/share/php/apc.php
  564.  
  565. <Directory /usr/share/php/apc.php>
  566. Options +FollowSymLinks
  567. AllowOverride None
  568. order allow,deny
  569. allow from all
  570.  
  571. AddType application/x-httpd-php .php
  572.  
  573. <IfModule mod_php5.c>
  574. php_flag magic_quotes_gpc Off
  575. php_flag short_open_tag On
  576. php_flag register_globals Off
  577. php_flag register_argc_argv On
  578. php_flag track_vars On
  579. # this setting is necessary for some locales
  580. php_value mbstring.func_overload 0
  581. php_value include_path .
  582. </IfModule>
  583.  
  584. DirectoryIndex index.php
  585. </Directory>" >> /etc/apache2/conf.d/apc.conf
  586. echo "extension=apc.so" >> /etc/php5/conf.d/apc.ini
  587. echo "; APC Configuration
  588. apc.enabled = 1
  589. ; Memory allocated to APC. Use Munin or APC Info to see if more is needed.
  590. apc.shm_size=32M
  591. ; rfc1867 allow file upload progression display.
  592. apc.rfc1867 = on" >> /etc/php5/conf.d/apc-config.ini
  593. clear
  594. rm -rf /var/tmp/*
  595. rm -rf web.zip
  596.  
  597. echo ""
  598. echo ""
  599. echo ""
  600. echo ""
  601. echo "+==========================================================================+"
  602. echo "| |"
  603. echo "| Installation Complete |"
  604. echo "| |"
  605. echo "| Reboot your system to complete the installation |"
  606. echo "| |"
  607. echo "+==========================================================================+"
  608. echo ""
  609. echo ""
Advertisement
Add Comment
Please, Sign In to add comment