0009.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Installing Ajenti Web Administration Panel</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Administration,Browser Based SSH,Browser Based Tools,Debian,Free Software,Freeware,Linux,Server Administration,System Administration,System Administrator,Ubuntu,Web Tools,Ajenti,Ajenti Web Panel,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Installing Ajenti Web Administration Panel">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="08/20/2023 06:50:38 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Installing Ajenti Web Administration Panel</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Ajenti?</h2>
  26. <blockquote><em>[Ajenti is] an admin&#39;s tool for a more civilized age, providing you with a fast and secure way to manage a remote Linux box at any time using everyday tools like a web terminal, text editor, file manager and others.-<a href="https://ajenti.org/" target="_blank">https://ajenti.org/</a></em></blockquote>
  27. <ol>
  28. <li>Log into the Linux device</li>
  29. <li>Run the following commands in a terminal:
  30. <div class="codeBlock"># update software repositories<br />
  31. sudo apt update<br />
  32. # install software updates<br />
  33. sudo apt upgrade -y<br />
  34. # install pre-requisites<br />
  35. sudo apt install build-essential python3-pip python3-dev python3-lxml python3-dbus python3-augeas libssl-dev python3-apt ntpdate -y<br />
  36. # upgrade pip<br />
  37. sudo pip3 install setuptools pip wheel -U<br />
  38. # install ajenti<br />
  39. sudo pip3 install ajenti-panel ajenti.plugin.ace ajenti.plugin.augeas ajenti.plugin.auth-users ajenti.plugin.core ajenti.plugin.dashboard ajenti.plugin.datetime ajenti.plugin.filemanager ajenti.plugin.filesystem ajenti.plugin.network ajenti.plugin.notepad ajenti.plugin.packages ajenti.plugin.passwd ajenti.plugin.plugins ajenti.plugin.power ajenti.plugin.services ajenti.plugin.settings ajenti.plugin.terminal<br />
  40. # create and edit ajenti.service<br />
  41. sudo nano /lib/systemd/system/ajenti.service</div>
  42. </li>
  43. <li>Paste the following configuration into the service file
  44. <p>[Unit]<br />
  45. Description=Ajenti panel<br />
  46. After=network.target<br />
  47. <br />
  48. [Service]<br />
  49. Type=forking<br />
  50. PIDFile=/var/run/ajenti.pid<br />
  51. ExecStart=/usr/bin/python3 /usr/local/bin/ajenti-panel -d<br />
  52. ExecStartPost=/bin/sleep 5<br />
  53. <br />
  54. [Install]<br />
  55. WantedBy=multi-user.target</p>
  56. </li>
  57. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  58. <li>Continue with the following commands:
  59. <div class="codeBlock"># reload daemons<br />
  60. sudo systemctl daemon-reload<br />
  61. # enable and start ajenti service<br />
  62. sudo systemctl enable ajenti --now<br />
  63. # set the PANEL variable<br />
  64. PANEL=$(which ajenti-panel)<br />
  65. # create and edit the initscript<br />
  66. sudo nano /etc/init.d/ajenti</div>
  67. </li>
  68. <li>Paste the following into the init file
  69. <p>#!/bin/sh<br />
  70. <br />
  71. ### BEGIN INIT INFO<br />
  72. # Provides: ajenti<br />
  73. # Required-Start: $network $syslog $local_fs<br />
  74. # Required-Stop: $network $syslog $local_fs<br />
  75. # Should-Start: $local_fs<br />
  76. # Should-Stop: $local_fs<br />
  77. # Default-Start: 2 3 4 5<br />
  78. # Default-Stop: 0 1 6<br />
  79. # Short-Description: Ajenti<br />
  80. # Description: Ajenti administration frontend<br />
  81. ### END INIT INFO<br />
  82. <br />
  83. if [ -e /lib/lsb/init-functions ]; then<br />
  84. . /lib/lsb/init-functions<br />
  85. <br />
  86. log_success() {<br />
  87. log_success_msg &quot;\$1&quot;<br />
  88. }<br />
  89. <br />
  90. log_failure() {<br />
  91. log_failure_msg &quot;\$1&quot;<br />
  92. }<br />
  93. else<br />
  94. . /etc/rc.d/init.d/functions<br />
  95. <br />
  96. log_success() {<br />
  97. echo_success<br />
  98. echo &quot;\$1&quot;<br />
  99. }<br />
  100. <br />
  101. log_failure() {<br />
  102. echo_failure<br />
  103. echo &quot;\$1&quot;<br />
  104. }<br />
  105. fi<br />
  106. <br />
  107. NAME=Ajenti<br />
  108. PIDFILE=/var/run/ajenti.pid<br />
  109. <br />
  110. case &quot;\$1&quot; in<br />
  111. start)<br />
  112. echo &quot;Starting \$NAME:&quot;<br />
  113. export LC_CTYPE=en_US.UTF8<br />
  114. <br />
  115. if pidofproc -p \$PIDFILE \$PANEL &gt; /dev/null; then<br />
  116. log_failure &quot;already running&quot;<br />
  117. exit 1<br />
  118. fi<br />
  119. if \$DAEMON -d ; then<br />
  120. log_success &quot;started&quot;<br />
  121. else<br />
  122. log_failure &quot;failed&quot;<br />
  123. fi<br />
  124. ;;<br />
  125. stop)<br />
  126. echo &quot;Stopping \$NAME:&quot;<br />
  127. if pidofproc -p \$PIDFILE \$PANEL &gt; /dev/null; then<br />
  128. killproc -p \$PIDFILE \$PANEL<br />
  129. /bin/rm -rf \$PIDFILE<br />
  130. log_success &quot;stopped&quot;<br />
  131. else<br />
  132. log_failure &quot;not running&quot;<br />
  133. fi<br />
  134. ;;<br />
  135. restart)<br />
  136. \$0 stop &amp;&amp; sleep 2 &amp;&amp; \$0 start<br />
  137. ;;<br />
  138. status)<br />
  139. if pidofproc -p \$PIDFILE \$PANEL &gt; /dev/null; then<br />
  140. log_success &quot;\$NAME is running&quot;<br />
  141. else<br />
  142. log_success &quot;\$NAME is not running&quot;<br />
  143. fi<br />
  144. ;;<br />
  145. *)<br />
  146. echo &quot;Usage: \$0 {start|stop|restart|status}&quot;<br />
  147. exit 1<br />
  148. esac<br />
  149. <br />
  150. exit 0</p>
  151. </li>
  152. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  153. <li>Continue with the following commands:
  154. <div class="codeBlock"># make the init script executable<br />
  155. sudo chmod +x /etc/init.d/ajenti<br />
  156. # run the init script<br />
  157. sudo /etc/init.d/ajenti start</div>
  158. </li>
  159. <li>Open a web browser and navigate to http://DNSorIP:8000</li>
  160. <li>Login with the username root and the root Linux password</li>
  161. <li>Welcome to Ajenti</li>
  162. </ol>
  163. <p>Source: <a href="http://docs.ajenti.org/en/latest/man/install.html" target="_blank">http://docs.ajenti.org/en/latest/man/install.html</a></p> </div>
  164. </div>
  165. </body>
  166. </html>