Advertisement
Guest User

democracyos install process

a guest
May 27th, 2017
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.55 KB | None | 0 0
  1. steps
  2.  
  3. create new VPS
  4. 512 MB RAM
  5. 1 CPU
  6. 20 GB storage
  7. Ubuntu 16.04.2 X64
  8.  
  9. login as root
  10. # adduser chris
  11. # adduser chris sudo
  12. # su - chris
  13. chris@democracyos:~$ sudo apt update
  14.  
  15. ---begin output---
  16. [sudo] password for chris:
  17. Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
  18. Get:2 http://security.ubuntu.com/ubuntu xenial-security/main Sources [72.5 kB]
  19. Get:3 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,600 B]
  20. Get:4 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [28.0 kB]
  21. Get:5 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1,144 B]
  22. Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [268 kB]
  23. Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [113 kB]
  24. Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [115 kB]
  25. Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [59.8 kB]
  26. Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2,752 B]
  27. Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1,232 B]
  28. Hit:12 http://mirrors.digitalocean.com/ubuntu xenial InRelease
  29. Get:13 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease [102 kB]
  30. Get:14 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease [102 kB]
  31. Get:15 http://mirrors.digitalocean.com/ubuntu xenial/main Sources [868 kB]
  32. Get:16 http://mirrors.digitalocean.com/ubuntu xenial/restricted Sources [4,808 B]
  33. Get:17 http://mirrors.digitalocean.com/ubuntu xenial/universe Sources [7,728 kB]
  34. Get:18 http://mirrors.digitalocean.com/ubuntu xenial/multiverse Sources [179 kB]
  35. Get:19 http://mirrors.digitalocean.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
  36. Get:20 http://mirrors.digitalocean.com/ubuntu xenial/universe Translation-en [4,354 kB]
  37. Get:21 http://mirrors.digitalocean.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
  38. Get:22 http://mirrors.digitalocean.com/ubuntu xenial/multiverse Translation-en [106 kB]
  39. Get:23 http://mirrors.digitalocean.com/ubuntu xenial-updates/main Sources [251 kB]
  40. Get:24 http://mirrors.digitalocean.com/ubuntu xenial-updates/restricted Sources [2,996 B]
  41. Get:25 http://mirrors.digitalocean.com/ubuntu xenial-updates/universe Sources [155 kB]
  42. Get:26 http://mirrors.digitalocean.com/ubuntu xenial-updates/multiverse Sources [5,672 B]
  43. Get:27 http://mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 Packages [543 kB]
  44. Get:28 http://mirrors.digitalocean.com/ubuntu xenial-updates/main Translation-en [220 kB]
  45. Get:29 http://mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages [469 kB]
  46. Get:30 http://mirrors.digitalocean.com/ubuntu xenial-updates/universe Translation-en [185 kB]
  47. Get:31 http://mirrors.digitalocean.com/ubuntu xenial-updates/multiverse amd64 Packages [8,928 B]
  48. Get:32 http://mirrors.digitalocean.com/ubuntu xenial-updates/multiverse Translation-en [4,460 B]
  49. Get:33 http://mirrors.digitalocean.com/ubuntu xenial-backports/main Sources [3,304 B]
  50. Get:34 http://mirrors.digitalocean.com/ubuntu xenial-backports/universe Sources [4,036 B]
  51. Get:35 http://mirrors.digitalocean.com/ubuntu xenial-backports/main amd64 Packages [4,684 B]
  52. Get:36 http://mirrors.digitalocean.com/ubuntu xenial-backports/main Translation-en [3,216 B]
  53. Get:37 http://mirrors.digitalocean.com/ubuntu xenial-backports/universe amd64 Packages [5,616 B]
  54. Get:38 http://mirrors.digitalocean.com/ubuntu xenial-backports/universe Translation-en [2,872 B]
  55. Fetched 23.8 MB in 15s (1,500 kB/s)
  56. Reading package lists... Done
  57. Building dependency tree
  58. Reading state information... Done
  59. 16 packages can be upgraded. Run 'apt list --upgradable' to see them.
  60. ---end output---
  61.  
  62. chris@democracyos:~$ sudo apt upgrade
  63.  
  64. ---begin output---
  65. Reading package lists... Done
  66. Building dependency tree
  67. Reading state information... Done
  68. Calculating upgrade... Done
  69. The following packages have been kept back:
  70. cloud-init
  71. The following packages will be upgraded:
  72. apport bash cloud-initramfs-copymods cloud-initramfs-dyn-netconf grub-legacy-ec2 iproute2 login overlayroot passwd python3-apport python3-problem-report
  73. python3-software-properties software-properties-common uidmap unattended-upgrades
  74. 15 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  75. Need to get 2,577 kB of archives.
  76. After this operation, 0 B of additional disk space will be used.
  77. Do you want to continue? [Y/n] y
  78. Get:1 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 bash amd64 4.3-14ubuntu1.2 [583 kB]
  79. Get:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 login amd64 1:4.2-3.1ubuntu5.3 [304 kB]
  80. Get:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 passwd amd64 1:4.2-3.1ubuntu5.3 [779 kB]
  81. Get:4 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 iproute2 amd64 4.3.0-1ubuntu3.16.04.1 [522 kB]
  82. Get:5 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 python3-problem-report all 2.20.1-0ubuntu2.6 [9,984 B]
  83. Get:6 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 python3-apport all 2.20.1-0ubuntu2.6 [79.6 kB]
  84. Get:7 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 apport all 2.20.1-0ubuntu2.6 [120 kB]
  85. Get:8 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 software-properties-common all 0.96.20.7 [9,452 B]
  86. Get:9 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 python3-software-properties all 0.96.20.7 [20.3 kB]
  87. Get:10 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 uidmap amd64 1:4.2-3.1ubuntu5.3 [64.8 kB]
  88. Get:11 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 unattended-upgrades all 0.90ubuntu0.6 [32.9 kB]
  89. Get:12 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 cloud-initramfs-copymods all 0.27ubuntu1.4 [4,202 B]
  90. Get:13 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 cloud-initramfs-dyn-netconf all 0.27ubuntu1.4 [6,756 B]
  91. Get:14 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 grub-legacy-ec2 all 0.7.9-113-g513e99e0-0ubuntu1~16.04.1 [26.3 kB]
  92. Get:15 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 overlayroot all 0.27ubuntu1.4 [15.4 kB]
  93. Fetched 2,577 kB in 1s (1,564 kB/s)
  94. Preconfiguring packages ...
  95. (Reading database ... 53888 files and directories currently installed.)
  96. Preparing to unpack .../bash_4.3-14ubuntu1.2_amd64.deb ...
  97. Unpacking bash (4.3-14ubuntu1.2) over (4.3-14ubuntu1.1) ...
  98. Processing triggers for install-info (6.1.0.dfsg.1-5) ...
  99. Processing triggers for man-db (2.7.5-1) ...
  100. Setting up bash (4.3-14ubuntu1.2) ...
  101. update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
  102. (Reading database ... 53888 files and directories currently installed.)
  103. Preparing to unpack .../login_1%3a4.2-3.1ubuntu5.3_amd64.deb ...
  104. Unpacking login (1:4.2-3.1ubuntu5.3) over (1:4.2-3.1ubuntu5.2) ...
  105. Processing triggers for man-db (2.7.5-1) ...
  106. Setting up login (1:4.2-3.1ubuntu5.3) ...
  107. (Reading database ... 53888 files and directories currently installed.)
  108. Preparing to unpack .../passwd_1%3a4.2-3.1ubuntu5.3_amd64.deb ...
  109. Unpacking passwd (1:4.2-3.1ubuntu5.3) over (1:4.2-3.1ubuntu5.2) ...
  110. Processing triggers for ureadahead (0.100.0-19) ...
  111. Processing triggers for man-db (2.7.5-1) ...
  112. Setting up passwd (1:4.2-3.1ubuntu5.3) ...
  113. (Reading database ... 53888 files and directories currently installed.)
  114. Preparing to unpack .../iproute2_4.3.0-1ubuntu3.16.04.1_amd64.deb ...
  115. Unpacking iproute2 (4.3.0-1ubuntu3.16.04.1) over (4.3.0-1ubuntu3) ...
  116. Preparing to unpack .../python3-problem-report_2.20.1-0ubuntu2.6_all.deb ...
  117. Unpacking python3-problem-report (2.20.1-0ubuntu2.6) over (2.20.1-0ubuntu2.5) ...
  118. Preparing to unpack .../python3-apport_2.20.1-0ubuntu2.6_all.deb ...
  119. Unpacking python3-apport (2.20.1-0ubuntu2.6) over (2.20.1-0ubuntu2.5) ...
  120. Preparing to unpack .../apport_2.20.1-0ubuntu2.6_all.deb ...
  121. Unpacking apport (2.20.1-0ubuntu2.6) over (2.20.1-0ubuntu2.5) ...
  122. Preparing to unpack .../software-properties-common_0.96.20.7_all.deb ...
  123. Unpacking software-properties-common (0.96.20.7) over (0.96.20.6) ...
  124. Preparing to unpack .../python3-software-properties_0.96.20.7_all.deb ...
  125. Unpacking python3-software-properties (0.96.20.7) over (0.96.20.6) ...
  126. Preparing to unpack .../uidmap_1%3a4.2-3.1ubuntu5.3_amd64.deb ...
  127. Unpacking uidmap (1:4.2-3.1ubuntu5.3) over (1:4.2-3.1ubuntu5.2) ...
  128. Preparing to unpack .../unattended-upgrades_0.90ubuntu0.6_all.deb ...
  129. Unpacking unattended-upgrades (0.90ubuntu0.6) over (0.90ubuntu0.5) ...
  130. Preparing to unpack .../cloud-initramfs-copymods_0.27ubuntu1.4_all.deb ...
  131. Unpacking cloud-initramfs-copymods (0.27ubuntu1.4) over (0.27ubuntu1.3) ...
  132. Preparing to unpack .../cloud-initramfs-dyn-netconf_0.27ubuntu1.4_all.deb ...
  133. Unpacking cloud-initramfs-dyn-netconf (0.27ubuntu1.4) over (0.27ubuntu1.3) ...
  134. Preparing to unpack .../grub-legacy-ec2_0.7.9-113-g513e99e0-0ubuntu1~16.04.1_all.deb ...
  135. Leaving 'diversion of /usr/sbin/grub-set-default to /usr/sbin/grub-set-default.real by grub-legacy-ec2'
  136. Unpacking grub-legacy-ec2 (0.7.9-113-g513e99e0-0ubuntu1~16.04.1) over (0.7.9-90-g61eb03fe-0ubuntu1~16.04.1) ...
  137. Preparing to unpack .../overlayroot_0.27ubuntu1.4_all.deb ...
  138. Unpacking overlayroot (0.27ubuntu1.4) over (0.27ubuntu1.3) ...
  139. Processing triggers for man-db (2.7.5-1) ...
  140. Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
  141. Processing triggers for ureadahead (0.100.0-19) ...
  142. Processing triggers for systemd (229-4ubuntu17) ...
  143. Processing triggers for dbus (1.10.6-1ubuntu3.3) ...
  144. Setting up iproute2 (4.3.0-1ubuntu3.16.04.1) ...
  145. Setting up python3-problem-report (2.20.1-0ubuntu2.6) ...
  146. Setting up python3-apport (2.20.1-0ubuntu2.6) ...
  147. Setting up apport (2.20.1-0ubuntu2.6) ...
  148. Setting up python3-software-properties (0.96.20.7) ...
  149. Setting up software-properties-common (0.96.20.7) ...
  150. Setting up uidmap (1:4.2-3.1ubuntu5.3) ...
  151. Setting up unattended-upgrades (0.90ubuntu0.6) ...
  152. Replacing config file /etc/apt/apt.conf.d/50unattended-upgrades with new version
  153. Setting up cloud-initramfs-copymods (0.27ubuntu1.4) ...
  154. Setting up cloud-initramfs-dyn-netconf (0.27ubuntu1.4) ...
  155. Setting up grub-legacy-ec2 (0.7.9-113-g513e99e0-0ubuntu1~16.04.1) ...
  156. Searching for GRUB installation directory ... found: /boot/grub
  157. Searching for default file ... found: /boot/grub/default
  158. Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
  159. Searching for splash image ... none found, skipping ...
  160. Found kernel: /boot/vmlinuz-4.4.0-78-generic
  161. Found kernel: /boot/vmlinuz-4.4.0-78-generic
  162. Updating /boot/grub/menu.lst ... done
  163.  
  164. Setting up overlayroot (0.27ubuntu1.4) ...
  165. Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
  166. update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
  167. W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
  168. ---end output---
  169.  
  170. chris@democracyos:~$ echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
  171.  
  172. ---begin output---
  173. deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse
  174. ---end output---
  175.  
  176. chris@democracyos:~$ sudo apt-get update
  177.  
  178. ---begin output---
  179. Ign:1 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 InRelease
  180. Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
  181. Get:3 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 Release [3,462 B]
  182. Get:4 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 Release.gpg [455 B]
  183. Get:5 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0/multiverse amd64 Packages [11.3 kB]
  184. Hit:6 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
  185. Hit:7 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease
  186. Hit:8 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease
  187. Fetched 117 kB in 1s (102 kB/s)
  188. Reading package lists... Done
  189. ---end output---
  190.  
  191. chris@democracyos:~$ sudo apt-get install -y mongodb-org
  192.  
  193. ---begin output---
  194. Reading package lists... Done
  195. Building dependency tree
  196. Reading state information... Done
  197. The following additional packages will be installed:
  198. mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
  199. The following NEW packages will be installed:
  200. mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
  201. 0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
  202. Need to get 43.7 MB of archives.
  203. After this operation, 174 MB of additional disk space will be used.
  204. Get:1 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0/multiverse amd64 mongodb-org-shell amd64 3.0.15 [3,852 kB]
  205. Get:2 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0/multiverse amd64 mongodb-org-server amd64 3.0.15 [7,332 kB]
  206. Get:3 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0/multiverse amd64 mongodb-org-mongos amd64 3.0.15 [3,544 kB]
  207. Get:4 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0/multiverse amd64 mongodb-org-tools amd64 3.0.15 [29.0 MB]
  208. Get:5 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0/multiverse amd64 mongodb-org amd64 3.0.15 [3,570 B]
  209. Fetched 43.7 MB in 2s (17.6 MB/s)
  210. Selecting previously unselected package mongodb-org-shell.
  211. (Reading database ... 53888 files and directories currently installed.)
  212. Preparing to unpack .../mongodb-org-shell_3.0.15_amd64.deb ...
  213. Unpacking mongodb-org-shell (3.0.15) ...
  214. Selecting previously unselected package mongodb-org-server.
  215. Preparing to unpack .../mongodb-org-server_3.0.15_amd64.deb ...
  216. Unpacking mongodb-org-server (3.0.15) ...
  217. Selecting previously unselected package mongodb-org-mongos.
  218. Preparing to unpack .../mongodb-org-mongos_3.0.15_amd64.deb ...
  219. Unpacking mongodb-org-mongos (3.0.15) ...
  220. Selecting previously unselected package mongodb-org-tools.
  221. Preparing to unpack .../mongodb-org-tools_3.0.15_amd64.deb ...
  222. Unpacking mongodb-org-tools (3.0.15) ...
  223. Selecting previously unselected package mongodb-org.
  224. Preparing to unpack .../mongodb-org_3.0.15_amd64.deb ...
  225. Unpacking mongodb-org (3.0.15) ...
  226. Processing triggers for man-db (2.7.5-1) ...
  227. Processing triggers for ureadahead (0.100.0-19) ...
  228. Setting up mongodb-org-shell (3.0.15) ...
  229. Setting up mongodb-org-server (3.0.15) ...
  230. Adding system user `mongodb' (UID 112) ...
  231. Adding new user `mongodb' (UID 112) with group `nogroup' ...
  232. Not creating home directory `/home/mongodb'.
  233. Adding group `mongodb' (GID 116) ...
  234. Done.
  235. Adding user `mongodb' to group `mongodb' ...
  236. Adding user mongodb to group mongodb
  237. Done.
  238. Setting up mongodb-org-mongos (3.0.15) ...
  239. Setting up mongodb-org-tools (3.0.15) ...
  240. Setting up mongodb-org (3.0.15) ...
  241. Processing triggers for ureadahead (0.100.0-19) ...
  242. ---end output---
  243.  
  244. chris@democracyos:~$ sudo mkdir /data
  245. chris@democracyos:~$ sudo mkdir /data/db
  246. chris@democracyos:~$ sudo chown chris /data/db -R
  247.  
  248. install NVM
  249. chris@democracyos:~$ curl https://raw.githubusercontent.com/creationix/nvm/v0.11.1/install.sh | bash
  250.  
  251. ---begin output---
  252. % Total % Received % Xferd Average Speed Time Time Time Current
  253. Dload Upload Total Spent Left Speed
  254. 100 3329 100 3329 0 0 8784 0 --:--:-- --:--:-- --:--:-- 8783
  255. => Downloading nvm from git to '/home/chris/.nvm'
  256. => Cloning into '/home/chris/.nvm'...
  257. remote: Counting objects: 6430, done.
  258. remote: Compressing objects: 100% (3/3), done.
  259. remote: Total 6430 (delta 0), reused 1 (delta 0), pack-reused 6427
  260. Receiving objects: 100% (6430/6430), 1.89 MiB | 0 bytes/s, done.
  261. Resolving deltas: 100% (3985/3985), done.
  262. Checking connectivity... done.
  263. Note: checking out 'v0.11.1'.
  264.  
  265. You are in 'detached HEAD' state. You can look around, make experimental
  266. changes and commit them, and you can discard any commits you make in this
  267. state without impacting any branches by performing another checkout.
  268.  
  269. If you want to create a new branch to retain commits you create, you may
  270. do so (now or later) by using -b with the checkout command again. Example:
  271.  
  272. git checkout -b <new-branch-name>
  273.  
  274. HEAD is now at 7a423b7... v0.11.1
  275. Deleted branch master (was 3497474).
  276.  
  277. => Appending source string to /home/chris/.profile
  278. => Close and reopen your terminal to start using nvm
  279. ---end output---
  280.  
  281. chris@democracyos:~$ source ~/.profile
  282. chris@democracyos:~$ nvm install 6.10.3
  283.  
  284. ---begin output---
  285. ######################################################################## 100.0%
  286. Checksums empty
  287. Now using node v6.10.3
  288. ---end output---
  289.  
  290. chris@democracyos:~$ node --version
  291.  
  292. ---begin output---
  293. v6.10.3
  294. ---end output---
  295.  
  296. chris@democracyos:~$ sudo ln -s /usr/bin/nodejs /usr/bin/node
  297. chris@democracyos:~$ sudo apt-get install make git
  298.  
  299. ---begin output---
  300. Reading package lists... Done
  301. Building dependency tree
  302. Reading state information... Done
  303. git is already the newest version (1:2.7.4-0ubuntu1.1).
  304. Suggested packages:
  305. make-doc
  306. The following NEW packages will be installed:
  307. make
  308. 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
  309. Need to get 151 kB of archives.
  310. After this operation, 365 kB of additional disk space will be used.
  311. Do you want to continue? [Y/n] y
  312. Get:1 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
  313. Fetched 151 kB in 0s (318 kB/s)
  314. Selecting previously unselected package make.
  315. (Reading database ... 53939 files and directories currently installed.)
  316. Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
  317. Unpacking make (4.1-6) ...
  318. Processing triggers for man-db (2.7.5-1) ...
  319. Setting up make (4.1-6) ...
  320. ---end output---
  321.  
  322. chris@democracyos:~$ sudo nano ~/.bashrc
  323.  
  324. ---contents of ~/.bashrc---
  325. # ~/.bashrc: executed by bash(1) for non-login shells.
  326. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  327. # for examples
  328.  
  329. # If not running interactively, don't do anything
  330. case chris@democracyos:~$- in
  331. *i*) ;;
  332. *) return;;
  333. esac
  334.  
  335. # don't put duplicate lines or lines starting with space in the history.
  336. # See bash(1) for more options
  337. HISTCONTROL=ignoreboth
  338.  
  339. # append to the history file, don't overwrite it
  340. shopt -s histappend
  341.  
  342. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  343. HISTSIZE=1000
  344. HISTFILESIZE=2000
  345.  
  346. # check the window size after each command and, if necessary,
  347. # update the values of LINES and COLUMNS.
  348. shopt -s checkwinsize
  349.  
  350. # If set, the pattern "**" used in a pathname expansion context will
  351. # match all files and zero or more directories and subdirectories.
  352. #shopt -s globstar
  353.  
  354. # make less more friendly for non-text input files, see lesspipe(1)
  355. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  356.  
  357. # set variable identifying the chroot you work in (used in the prompt below)
  358. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  359. debian_chroot=$(cat /etc/debian_chroot)
  360. fi
  361.  
  362. # set a fancy prompt (non-color, unless we know we "want" color)
  363. case "$TERM" in
  364. xterm-color|*-256color) color_prompt=yes;;
  365. esac
  366.  
  367. # uncomment for a colored prompt, if the terminal has the capability; turned
  368. # off by default to not distract the user: the focus in a terminal window
  369. # should be on the output of commands, not on the prompt
  370. #force_color_prompt=yes
  371.  
  372. if [ -n "$force_color_prompt" ]; then
  373. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  374. # We have color support; assume it's compliant with Ecma-48
  375. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  376. # a case would tend to support setf rather than setaf.)
  377. color_prompt=yes
  378. else
  379. color_prompt=
  380. fi
  381. fi
  382.  
  383. if [ "$color_prompt" = yes ]; then
  384. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  385. else
  386. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  387. fi
  388. unset color_prompt force_color_prompt
  389.  
  390. # If this is an xterm set the title to user@host:dir
  391. case "$TERM" in
  392. xterm*|rxvt*)
  393. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  394. ;;
  395. *)
  396. ;;
  397. esac
  398.  
  399. # enable color support of ls and also add handy aliases
  400. if [ -x /usr/bin/dircolors ]; then
  401. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  402. alias ls='ls --color=auto'
  403. #alias dir='dir --color=auto'
  404. #alias vdir='vdir --color=auto'
  405.  
  406. alias grep='grep --color=auto'
  407. alias fgrep='fgrep --color=auto'
  408. alias egrep='egrep --color=auto'
  409. fi
  410.  
  411. # colored GCC warnings and errors
  412. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  413.  
  414. # some more ls aliases
  415. alias ll='ls -alF'
  416. alias la='ls -A'
  417. alias l='ls -CF'
  418.  
  419. # Add an "alert" alias for long running commands. Use like so:
  420. # sleep 10; alert
  421. alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
  422.  
  423. # Alias definitions.
  424. # You may want to put all your additions into a separate file like
  425. # ~/.bash_aliases, instead of adding them here directly.
  426. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  427.  
  428. if [ -f ~/.bash_aliases ]; then
  429. . ~/.bash_aliases
  430. fi
  431.  
  432. # enable programmable completion features (you don't need to enable
  433. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  434. # sources /etc/bash.bashrc).
  435. if ! shopt -oq posix; then
  436. if [ -f /usr/share/bash-completion/bash_completion ]; then
  437. . /usr/share/bash-completion/bash_completion
  438. elif [ -f /etc/bash_completion ]; then
  439. . /etc/bash_completion
  440. fi
  441. fi
  442. [NEW LINE] export GITHUB_USERNAME="teslasmoustache"
  443. [NEW LINE] export GITHUB_PASSWORD="[REDACTED]"
  444. ---end contents of ~/.bashrc---
  445.  
  446. chris@democracyos:~$ git clone https://github.com/DemocracyOS/app.git
  447.  
  448. ---begin output---
  449. Cloning into 'app'...
  450. remote: Counting objects: 42027, done.
  451. remote: Total 42027 (delta 0), reused 0 (delta 0), pack-reused 42026
  452. Receiving objects: 100% (42027/42027), 10.53 MiB | 7.53 MiB/s, done.
  453. Resolving deltas: 100% (27316/27316), done.
  454. Checking connectivity... done.
  455. ---end output---
  456.  
  457. chris@democracyos:~$ cd app
  458. chris@democracyos:~/app$ git checkout 2.5.1
  459.  
  460. ---begin output---
  461. Note: checking out '2.5.1'.
  462.  
  463. You are in 'detached HEAD' state. You can look around, make experimental
  464. changes and commit them, and you can discard any commits you make in this
  465. state without impacting any branches by performing another checkout.
  466.  
  467. If you want to create a new branch to retain commits you create, you may
  468. do so (now or later) by using -b with the checkout command again. Example:
  469.  
  470. git checkout -b <new-branch-name>
  471.  
  472. HEAD is now at 3832d92... bump to 2.5.1
  473. ---end output---
  474.  
  475. chris@democracyos:~/app$ cp config/defaults.json config/development.json
  476. chris@democracyos:~/app$ sudo service mongod start
  477. Failed to start mongod.service: Unit mongod.service not found.
  478. chris@democracyos:~/app$ sudo nano /etc/systemd/system/mongodb.service
  479.  
  480. ---begin contents of /etc/systemd/system/mongodb.service---
  481. [Unit]
  482. Description=High-performance, schema-free document-oriented database
  483. After=network.target
  484.  
  485. [Service]
  486. User=mongodb
  487. ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
  488.  
  489. [Install]
  490. WantedBy=multi-user.target
  491. ---end contents of /etc/systemd/system/mongodb.service---
  492.  
  493. chris@democracyos:~/app$ sudo systemctl start mongodb
  494. chris@democracyos:~/app$ sudo systemctl status mongodb
  495.  
  496. ---begin output---
  497. ● mongodb.service - High-performance, schema-free document-oriented database
  498. Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset: enabled)
  499. Active: active (running) since Sun 2017-05-28 00:19:38 UTC; 5s ago
  500. Main PID: 12187 (mongod)
  501. Tasks: 11
  502. Memory: 59.3M
  503. CPU: 208ms
  504. CGroup: /system.slice/mongodb.service
  505. └─12187 /usr/bin/mongod --quiet --config /etc/mongod.conf
  506.  
  507. May 28 00:19:38 democracyos systemd[1]: Started High-performance, schema-free document-oriented database.
  508. ---end output---
  509.  
  510. chris@democracyos:~/app$ sudo systemctl enable mongodb
  511.  
  512. ---begin output---
  513. Created symlink from /etc/systemd/system/multi-user.target.wants/mongodb.service to /etc/systemd/system/mongodb.service.
  514. ---end output---
  515.  
  516. chris@democracyos:~/app$ make run
  517.  
  518. ---begin output---
  519. Installing dependencies...
  520. npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
  521. npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
  522. npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
  523. npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
  524. npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
  525. npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
  526.  
  527. > democracyos@2.5.1 preinstall /home/chris/app
  528. > bin/dos-ext-install
  529.  
  530.  
  531.  
  532. Makefile:22: recipe for target 'packages' failed
  533. make: *** [packages] Error 1
  534. ---end output---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement