Advertisement
Guest User

DefSec 1.0

a guest
Nov 11th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. sudo su
  2. apt-get update && apt-get upgrade
  3. apt-get install apache2
  4. ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
  5. curl http://icanhazip.com
  6. sudo apt-get install mysql-server php5-mysql
  7. sudo mysql_install_db
  8. sudo mysql_secure_installation
  9. sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
  10. apt-get install php5-mysql php5-curl php5-gd
  11. php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache
  12. php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite
  13. php5-tidy php5-xmlrpc php5-xsl
  14. sudo nano /etc/apache2/mods-enabled/dir.conf
  15. -----------------------------------------------------------------
  16. Finden und einfügen :
  17. <IfModule mod_dir.c>
  18. DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
  19. </IfModule>
  20.  
  21. (index.php)
  22.  
  23. ----------------------------------------------------------------
  24. sudo service apache2 restart
  25. (Web Server Restart) (ON:OFF) = status OK
  26. * Kontrole Ob alle php5 module da sind
  27.  
  28. apt-cache search php5-
  29.  
  30. "hp5-cgi - server-side, HTML-embedded scripting language (CGI binary)
  31. php5-cli - command-line interpreter for the php5 scripting language
  32. php5-common - Common files for packages built from the php5 source
  33. php5-curl - CURL module for php5
  34. php5-dbg - Debug symbols for PHP5
  35. php5-dev - Files for PHP5 module development
  36. php5-gd - GD module for php5
  37. . . ."
  38.  
  39. -------------------------------------------------------------------
  40. sudo apt-get install php5-cli
  41. sudo nano /var/www/html/info.php
  42.  
  43. <?php
  44. phpinfo();
  45. ?>
  46.  
  47.  
  48. test -> localhost/info.php
  49.  
  50. ------------------------------------------------------------------
  51. apt-get install phpmyadmin
  52. sudo apt install php-gettext
  53. nano /etc/apache2/apache2.conf
  54. Include /etc/phpmyadmin/apache.conf
  55. /etc/init.d/apache2 restart
  56.  
  57. wen nicht klappt dan
  58.  
  59. sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
  60. sudo a2enconf phpmyadmin
  61. sudo ln -s /usr/share/phpmyadmin /var/www
  62. sudo service apache2 reload
  63.  
  64. ENDE "WEB HOSTING"
  65.  
  66. -----------------------------------------------------------------
  67.  
  68. SEEDDMS Instalation 16.4.3 Ubuntu .
  69.  
  70. Offne das Terminal :
  71.  
  72. sudo mkdir /home/www-data
  73. dan auf die seite zugreifen :
  74. https://sourceforge.net/projects/seeddms/files/seeddms-5.1.4/
  75.  
  76. Alles runterladen und dan in /home/www-data transferiren
  77.  
  78. tar -xvf seeddms-quickstart-5.1.4.tgz
  79. sudo apt-get install php-pear
  80. sudo apt-get install poppler-utils catdoc
  81. sudo pear install (Pakete die da sind - Core , Lucene , Preview)
  82. sudo pear install log
  83. sudo pear channel-discover pear.dotkernel.com/zf1/svn
  84. sudo pear install zend/zend
  85. sudo pear upgrade zend/zend
  86. sudo chown -R www-data:www-data /home/www-data
  87. sudo nano /etc/apache2/sites-enabled/000-default.conf
  88. <Directory/>
  89. Require all granted
  90. </Directory>
  91.  
  92. Alias /seeddms “/home/www-data/seeddms51x/www/“
  93. <Directory "="" home="" www-data="" seeddms51x="" www="" "="">
  94. DirectoryIndex index.php
  95. AllowOverride All
  96. Order deny,allow
  97. Deny from all
  98. Allow from all
  99. </Directory>
  100.  
  101. Wen nicht funktioniert dan benutzen wir das
  102.  
  103. <VirtualHost *:80="">
  104. ServerAdmin webmaster@localhost
  105. DocumentRoot /var/www/html
  106.  
  107. ErrorLog ${APACHE_LOG_DIR}/error.log
  108. CustomLog ${APACHE_LOG_DIR}/access.log combined
  109. <Directory />
  110. Require all granted
  111. </Directory>
  112.  
  113. Alias /seeddms “/home/www-data/seeddms51x/www/"
  114. <Directory "/home/www-data/seeddms51x/www/">
  115. DirectoryIndex index.php
  116. AllowOverride All
  117. Order deny,allow
  118. Deny from all
  119. Allow from all
  120. </Directory>
  121.  
  122. </VirtualHost>
  123.  
  124. sudo a2enmod rewrite
  125. sudo service apache2 restart
  126. cd /home/www-data/seeddms51x/www/conf
  127. cp settings.xml settings.xml.original
  128. sudo touch /home/www-data/seeddms51x/seeddms-5.1.4/conf/ENABLE_INSTALL_TOOL
  129. localhost/seeddms/install
  130.  
  131.  
  132.  
  133. -----------------------------------------------------------------------------------------------
  134.  
  135.  
  136. PART 2#
  137.  
  138. ownload four tar balls from;
  139. http://sourceforge.net/projects/seeddms/files/seeddms-4.0.0-pre5/
  140.  
  141. seeddms-4.0.0-pre5.tar.gz
  142. SeedDMS_Preview-1.0.0.tgz
  143. SeedDMS_Lucene-1.1.1.tgz
  144. SeedDMS_Core-4.0.0pre5.tgz
  145.  
  146. Install as follows the pear components:
  147. sudo pear install SeedDMS_Core-4.0.0pre5.tgz
  148. sudo pear install SeedDMS_Preview-1.0.0.tgz
  149. sudo pear install SeedDMS_Lucene-1.1.1.tgz
  150.  
  151. Download and install the pear Log application:
  152. wget http://download.pear.php.net/package/Log-1.12.7.tgz
  153. sudo pear install Log-1.12.7.tgz
  154.  
  155. And zend:
  156. sudo pear channel-discover zend.googlecode.com/svn
  157. sudo pear install zend/zend
  158.  
  159. I installed the following packages, not all of which may be required
  160. and you may require other packages, please check the dependencies on
  161. the README.md for example for full text search, you need pdftotext,
  162. catdoc, xls2csv or scconvert, cat, id3
  163.  
  164. sudo apt-get install php5-mysql php5-mysqlnd libapache2-mod-php5
  165. sudo apt-get install pdo_mysql php5-gd id3 scconvert
  166. sudo apt-get install php-http-webdav-server
  167. sudo apt-get install zend-framework zend-framework-bin
  168. sudo apt-get install libzend-framework-zendx-php
  169. sudo apt-get install libjs-dojo-core libjs-dojo-dijit libjs-dojo-dojox
  170. sudo apt-get install libzend-framework-php (It kept bitching about Zend so I just kept piling on packages until it worked)
  171.  
  172. mbstring is already a part of libapache2-mod-php5
  173. pepper:~> show libapache2-mod-php5|grep mbstring
  174. mbstring mhash openssl pcre Phar posix Reflection session shmop SimpleXML
  175.  
  176.  
  177. Define three locations:
  178. [1] Some cosy place in yourfile system for the source files to which you
  179. will link
  180. I chose "/opt/seeddms-4.0.0-pre5/"
  181. untar seeddms-4.0.0-pre5.tar.gz into this location
  182.  
  183. [2] Make a directory and three subdirectories for the data for your site;
  184. I chose to do this under "/opt/dms/seeddms_multisite_test/data"
  185. sudo mkdir -p /opt/dms/seeddms_multisite_test/data/lucene/
  186. sudo mkdir /opt/dms/seeddms_multisite_test/data/staging/
  187. sudo mkdir /opt/dms/seeddms_multisite_test/data/cache/
  188.  
  189. Give ownership (or write access) to your httpd process to those directories;
  190. sudo chown -cvR www-data /opt/dms/seeddms_multisite_test/data/
  191.  
  192. [3] Somewhere under your www root, make a directory for the sources of
  193. your site:
  194. These can be of course under different virtual domains.
  195. /var/www/www.mydomain.eu/seeddms_multisite_test
  196. cd /var/www/www.mydomain.eu/seeddms_multisite_test;
  197. sudo ln -s /opt/seeddms-4.0.0-pre5 src (README.md does not include the `src'!)
  198. ln -s src/inc inc
  199. ln -s src/op op
  200. ln -s src/out out
  201. ln -s src/js js
  202. ln -s src/views views
  203. ln -s src/languages languages
  204. ln -s src/styles styles
  205. ln -s src/themes themes
  206. ln -s src/install install
  207. ln -s src/index.php index.php
  208.  
  209. If need be;
  210. sudo chown -cvR www-data /var/www/www.mydomain.eu/seeddms_multisite_test/
  211.  
  212. Create Dataabse;
  213. Run the following sql commands to create your db and a user with
  214. appropriate privileges.
  215.  
  216. mysql> create database seeddms_multisite_test;
  217. mysql> grant all privileges on seeddms_multisite_test.* to seeddms@localhost identified by 'your_passwd';
  218.  
  219.  
  220. Point your browser to the location of your instance as in [3] above
  221. and /install
  222. I resorted to a text browser on my server due to failure to access the
  223. db from a remote browser;
  224.  
  225. pepper:~> elinks www.mydomain.eu/seeddms_multisite_test/install
  226.  
  227. This is how I filled it in;
  228. SeedDMS: INSTALL
  229. SeedDMS Installation for version 4.0.0
  230.  
  231. Server settings
  232. Root directory: /opt/seeddms-4.0.0-pre5/_______________________
  233. Http Root: /seeddms_multisite_test/_______________________
  234. Content directory: /opt/dms/seeddms_multisite_test/data___________
  235. Directory for full text index: /opt/dms/seeddms_multisite_test/data/lucene/___
  236. Directory for partial uploads: /opt/dms/seeddms_multisite_test/data/staging/__
  237. Core SeedDMS directory: _______________________________________________
  238. Lucene SeedDMS directory: _______________________________________________
  239. Extra PHP include Path: _______________________________________________
  240. Database settings
  241. Database Type: mysql________________
  242. Server name: localhost____________
  243. Database: seeddms_multisite_tes
  244. Username: seeddms______________
  245. Password: ********_____________
  246. Create database tables: [X]
  247.  
  248. [ Apply ]
  249.  
  250.  
  251. If all is okay (and I hope this happens more quickly for you than for me),
  252. you should be notified accordingly and invited to login to your new site
  253. with credentials admin/admin. (This password is cleverly set to expire
  254. in a couple of days. So do not get a shock like I did when it suddenly
  255. does not work).
  256.  
  257. -------------------------------------------------------------------------------
  258.  
  259. To make additional sites;
  260.  
  261. If you wish to make additional sites, you need to copy the data directories thusly;
  262. sudo cp -avr /opt/dms/seeddms_multisite_test /opt/dms/seeddms_multisite_test_2
  263. And the sources thusly;
  264. sudo cp -avr /var/www/www.mydomain.eu/seeddms_multisite_test /var/www/www.mydomain.eu/seeddms_multisite_test_2
  265.  
  266. And of course make data directories for this site:
  267. sudo mkdir -p /opt/dms/seeddms_multisite_test_2/data/lucene/
  268. sudo mkdir /opt/dms/seeddms_multisite_test_2/data/staging/
  269. sudo mkdir /opt/dms/seeddms_multisite_test_2/data/cache/
  270.  
  271. Then create another database as shown above but of course give the db
  272. another name.
  273. Run the install again from the new location.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement