0499.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Roll Your Own Twitter Alternative with GNU Social</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Alternative,Debian,GNU Social,Homelab,Linux,Micro Blogging,Microblogging,PHP,Self-Hosted,Social Media,Social Network,Twitter,Twitter Alternative,Web Based,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Roll Your Own Twitter Alternative with GNU Social">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="06/14/2022 08:42:19 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>Roll Your Own Twitter Alternative with GNU Social</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <ol>
  26. <li>Log into the Debian device</li>
  27. <li>Run the following commands in a terminal:
  28. <div class="codeBlock"># update software repositories<br />
  29. sudo apt update<br />
  30. # install software updates<br />
  31. sudo apt upgrade -y<br />
  32. # install Apache and MySQL<br />
  33. sudo apt install apache2 mariadb-server mariadb-client -y<br />
  34. # install PHP components<br />
  35. sudo apt install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-mbstring php7.3-xml php7.3-fpm php7.3-gd php7.3-gmp php7.3-intl php7.3-mysql php7.3-json -y<br />
  36. # download gnu social<br />
  37. wget -O ~/Downloads/gnu-social-master.tar.gz https://git.gnu.io/gnu/gnu-social/-/archive/master/gnu-social-master.tar.gz<br />
  38. # extract the tar.gz<br />
  39. tar zxf ~/Downloads/gnu-social-*.tar.gz --directory ~/Downloads<br />
  40. # move the folder to web root<br />
  41. sudo mv ~/Downloads/gnu-social-*/ /var/www/html/gnusocial<br />
  42. # set permissions<br />
  43. sudo chown -R www-data:www-data /var/www/html/gnusocial/<br />
  44. sudo chmod g+w /var/www/html/gnusocial/<br />
  45. # configure the MySQL database<br />
  46. sudo su<br />
  47. mysql_secure_installation</div>
  48. </li>
  49. <li>Press Enter to login as root</li>
  50. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  51. <li>Type Y and press Enter to remove anonymous users</li>
  52. <li>Type Y and press Enter to disallow root login remotely</li>
  53. <li>Type Y and press Enter to remove the test database</li>
  54. <li>Type Y and press Enter to reload privilege tables</li>
  55. <li>Run the following command to login into MySQL:
  56. <div class="codeBlock">mysql -u root -p</div>
  57. </li>
  58. <li>Authenticate with the root password set earlier</li>
  59. <li>Run the following commands to create the GNU Social database and database user
  60. <div class="codeBlock">CREATE DATABASE gnusocial CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<br />
  61. CREATE USER &#39;gnusocial_rw&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;gnu$ocia1!!&#39;;<br />
  62. GRANT ALL PRIVILEGES ON gnusocial.* TO &#39;gnusocial_rw&#39;@&#39;localhost&#39;;<br />
  63. FLUSH PRIVILEGES;<br />
  64. EXIT;<br />
  65. exit</div>
  66. </li>
  67. <li>Continue with the following commands:
  68. <div class="codeBlock"># edit default apache conf<br />
  69. sudo nano /etc/apache2/sites-available/000-default.conf</div>
  70. </li>
  71. <li>Paste the following at the bottom of the .conf file<br />
  72. &lt;Directory /var/www/html/gnusocial/&gt;<br />
  73. AllowOverride all<br />
  74. &lt;/Directory&gt;</li>
  75. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  76. <li>Continue with the following commands:
  77. <div class="codeBlock"># enable .htaccess in ./gnusocial<br />
  78. sudo cp /var/www/html/gnusocial/htaccess.sample /var/www/html/gnusocial/.htaccess<br />
  79. # set the relative path in .htaccess<br />
  80. sudo sed -i &quot;s/RewriteBase \//RewriteBase \/gnusocial\//g&quot; /var/www/html/gnusocial/.htaccess<br />
  81. # enable apache2 modules<br />
  82. sudo a2enmod rewrite<br />
  83. # restart apache2<br />
  84. sudo systemctl restart apache2</div>
  85. </li>
  86. <li>Open a web browser and navigate to http://DNSorIP/gnusocial/install.php</li>
  87. <li>The GNU Social installation screen should be displayed</li>
  88. <li>Enter a site name and fill out the database connection information as follows
  89. <p>Hostname: localhost<br />
  90. Name: gnusocial<br />
  91. DB username: gnusocial_rw<br />
  92. DB password: gnu$ocia1!!</p>
  93. </li>
  94. <li>Enter an administrator username, password and email</li>
  95. <li>Click the Submit button</li>
  96. <li>After the installation completes, click the visit your new GNU social site link toward the bottom of the page</li>
  97. <li>Click Login at the top right of the page</li>
  98. <li>Login with the administrator user created during initialization</li>
  99. <li>Welcome to GNU Social</li>
  100. </ol>
  101. <p>Source: <a href="https://git.gnu.io/gnu/gnu-social/blob/master/INSTALL" target="_blank">https://git.gnu.io/gnu/gnu-social/blob/master/INSTALL</a></p>
  102. </div>
  103. </div>
  104. </body>
  105. </html>