Wikiarguments deployment — различия между версиями

Материал из Вікі Фаланстэра
Перейти к: навигация, поиск
(Новая страница: «Install packages: <pre> sudo apt install mysql-server php5 apache2 memcached php5-imap php5-memcache php5-mysql </pre> Clone the repo: <pre> git clone https://gi…»)
 
м (Bot: Adding category Non-category)
 
(не показаны 2 промежуточные версии 2 участников)
Строка 1: Строка 1:
Install packages:
+
* Install packages:
 
<pre>
 
<pre>
 
sudo apt install mysql-server php5 apache2 memcached php5-imap php5-memcache php5-mysql
 
sudo apt install mysql-server php5 apache2 memcached php5-imap php5-memcache php5-mysql
 
</pre>
 
</pre>
  
Clone the repo:
+
* Clone the repo:
 
<pre>
 
<pre>
 
git clone https://github.com/falanster/wikiarguments_by.git
 
git clone https://github.com/falanster/wikiarguments_by.git
 
</pre>
 
</pre>
 +
тут як наладзіць SSH ключ: https://help.github.com/articles/generating-ssh-keys/
  
Create database:
+
* Create database:
 
<pre>
 
<pre>
 
mysql -u root -p
 
mysql -u root -p
Строка 16: Строка 17:
 
</pre>
 
</pre>
  
Import sql:
+
* Import sql:
 
<pre>
 
<pre>
 
cd wikiargments_by/localization
 
cd wikiargments_by/localization
Строка 22: Строка 23:
 
</pre>
 
</pre>
  
Rename wikiarguments_by/etc/config.php.sample to wikiarguments_by/etc/config.php and edit it according to your db and hostname.
+
* Rename wikiarguments_by/etc/config.php.sample to wikiarguments_by/etc/config.php and edit it according to your db and hostname.
  
Add to /etc/hosts:
+
* Add to /etc/hosts:
 
<pre>
 
<pre>
 
127.0.0.1      wikiarguments
 
127.0.0.1      wikiarguments
 
</pre>
 
</pre>
  
Create /etc/apache2/sites-available/wikiarguments.conf, fill it with the following (note the <your_path>):
+
* Create /etc/apache2/sites-available/wikiarguments.conf, fill it with the following (note the <your_path>):
 
<pre>
 
<pre>
 
<VirtualHost *:80>
 
<VirtualHost *:80>
Строка 48: Строка 49:
 
</pre>
 
</pre>
  
Enable the site:
+
* Enable the site:
 
<pre>
 
<pre>
 
sudo a2ensite /etc/apache2/sites-enabled/wikiarguments
 
sudo a2ensite /etc/apache2/sites-enabled/wikiarguments
 
</pre>
 
</pre>
  
Enable mod_rewrite:
+
* Enable mod_rewrite:
 
<pre>
 
<pre>
 
sudo a2enmod rewrite
 
sudo a2enmod rewrite
 
</pre>
 
</pre>
  
Restart apache2:
+
* Restart apache2:
 
<pre>
 
<pre>
 
service apache2 restart
 
service apache2 restart
 
</pre>
 
</pre>
  
Open your browser and go to http://wikiarguments/
+
* Open webbrowser and go to http://wikiarguments/
 +
 
 +
[[Категория:Non-category]]

Текущая версия на 21:14, 14 апреля 2017

  • Install packages:
sudo apt install mysql-server php5 apache2 memcached php5-imap php5-memcache php5-mysql
  • Clone the repo:
git clone https://github.com/falanster/wikiarguments_by.git

тут як наладзіць SSH ключ: https://help.github.com/articles/generating-ssh-keys/

  • Create database:
mysql -u root -p
CREATE DATABASE wikiargdb;
\q
  • Import sql:
cd wikiargments_by/localization
mysql -u root -p<password> wikiargdb < betatest.sql
  • Rename wikiarguments_by/etc/config.php.sample to wikiarguments_by/etc/config.php and edit it according to your db and hostname.
  • Add to /etc/hosts:
127.0.0.1       wikiarguments
  • Create /etc/apache2/sites-available/wikiarguments.conf, fill it with the following (note the <your_path>):
<VirtualHost *:80>
        ServerAdmin admin@wikiarguments
        DocumentRoot <your_path>/wikiarguments_by
        ServerName wikiarguments
        ServerAlias www.wikiarguments
        RewriteEngine On
        RewriteOptions inherit

        <Directory <your_path>/wikiarguments_by/ >
                Options Includes FollowSymLinks
                AllowOverride All
                Require host wikiarguments
                Require all granted
        </Directory>
</VirtualHost>
  • Enable the site:
sudo a2ensite /etc/apache2/sites-enabled/wikiarguments
  • Enable mod_rewrite:
sudo a2enmod rewrite
  • Restart apache2:
service apache2 restart