lsb_release -a
- listed on Description linehostnamectl
- listed on Operating System linecat /etc/*release
- DISTRIB_RELEASE or DESCRIPTIONNo adduser
so using just low-level useradd
command Linuxize (advertising infested but good info)
useradd (name)
Then to check:
id (name)
Pour utiliser Communecter vous devez avoir
sudo apt-get install apache2 php5.6
sudo a2enmod rewrite
sudo apt-get install php5.6-curl
sudo apt-get install php5.6-mcrypt
sudo apt-get install php5.6-gd
sudo apt-get install php5.6-mongo
sudo apt-get install php5.6-dom
php -v
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
Clone from GitHub :
mkdir ~/dev && mkdir ~/dev/communecter
mkdir ~/dev/communecter/modules
cd /var/www/html/
sudo ln -s ~/communecter communecter
cd ~/dev/communecter
git clone https://gitlab.adullact.net/pixelhumain/pixelhumain.git
cd modules/
git clone https://gitlab.adullact.net/pixelhumain/citizenToolKit.git
git clone https://gitlab.adullact.net/pixelhumain/co2.git
ln -s co2 network
git clone https://gitlab.adullact.net/pixelhumain/api
git clone https://gitlab.adullact.net/pixelhumain/graph.git
git clone https://gitlab.adullact.net/pixelhumain/classifieds.git
git clone https://gitlab.adullact.net/pixelhumain/ressources.git
git clone https://gitlab.adullact.net/pixelhumain/places.git
git clone https://gitlab.adullact.net/pixelhumain/chat.git
git clone https://gitlab.adullact.net/pixelhumain/learn.git
git clone https://gitlab.adullact.net/pixelhumain/survey.git
git clone https://gitlab.adullact.net/pixelhumain/interop.git
git clone https://gitlab.adullact.net/pixelhumain/cotools.git
git clone https://gitlab.adullact.net/pixelhumain/eco.git
cd ../
Installer les dépendances avec Composer :
sudo apt install composer
cd pixelhumain/ph/
composer update
composer install
Rename the dbconfig file :
cd protected/
cp config/dbconfig.exemple.php config/dbconfig.php
Si le fichier dbconfig.php
n’existe pas, crĂ©er le : nano config/dbconfig.php
<?php
$dbconfig = array(
'class' => 'mongoYii.EMongoClient',
'server' => 'mongodb://127.0.0.1:27017/',
'db' => 'pixelhumain',
);
?>
Création du dossier runtime et assets
mkdir runtime
sudo chmod -R 775 runtime/
cd ../
mkdir assets
sudo chmod -R 775 assets/
cd ../../
sudo chown -R [votreUser]:www-data pixelhumain
sudo chown -R [votreUser]:www-data modules
And configure Apache vhost : edit /etc/apache2/sites-available/communecter.conf
:
<VirtualHost *:80>
ServerName domain.ext
ServerAdmin webmaster@domain.ext
DocumentRoot /var/www/communect/pixelhumain/ph
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias "/ph" "/var/www/communect/pixelhumain/ph"
<Directory "/var/www/communect/pixelhumain/ph">
Options FollowSymLinks Indexes
AllowOverride all
Order deny,allow
Allow from 127.0.0.1
#deny from all
<IfModule mod_rewrite.c>
Options +F ollowSymLinks
IndexIgnore /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^(.*)$ /ph/index.php/$1 [L]
</IfModule>
</Directory>
</VirtualHost>
Activate the new vhost :
sudo a2ensite communecter
sudo a2enmod rewrite
sudo service apache2 reload
#Making the Data folder for MongoDB
mkdir data/
mkdir data/db
Import les données :
cd modules/co2/data
unzip cities.json.zip
mongoimport --db pixelhumain --collection cities --file cities.json
Ajouter ces entrĂ©es dans la collection applications (liĂ© au message d’erreur "Missing Configs db.applications.key…") :
mongo
use pixelhumain
db.createCollection("applications")
db.applications.insert({ "name" : "DEV Config", "key" : "devParams", "mangoPay" : { "ClientId" : "communecter", "ClientPassword" : "xxxx", "TemporaryFolder" : "../../tmp" } } )
db.applications.insert({ "name" : "PROD Config", "key" : "prodParams", "mangoPay" : { "ClientId" : "communecter", "ClientPassword" : "xxxx", "TemporaryFolder" : "../../tmp" } } )
exit
cd ../
Ajouter MongoDB au démarrage et faire le script d’utilisation : sudo nano /etc/init.d/communecterdb
Ajouter ceci :
#!/bin/sh
#
### BEGIN INIT INFO
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Provides: unattended-upgrade-shutdown-check
# Default-Start: 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Check if unattended upgrades are being applied
# Description: Check if unattended upgrades are being applied
# and wait for them to finish
### END INIT INFO
Sauvegardez :
sudo chmod +x /etc/init.d/communecterdb
update-rc.d communecterdb defaults
update-rc.d communecterdb enable
Alternative : créer le script communecterdb.sh
, le rendre exécutable et l’ajouter dans /etc/rc.local
Accéder a l’url suivant : http://127.0.0.1/ph/test Et réglez tout les points rouges.
Accédez à cette adresse : http://127.0.0.1/ph/
Si vous souhaitez avoir une interface pour géré MongoDB vous pouvez télécharger Robo3T : https://robomongo.org/download
crontab -e
: */2 * * * * curl https://127.0.0.1/ph/co2/test/docron
Communecter is now available : http://127.0.0.1/ph/ To try the email service, go to http://127.0.0.1/ph/co2/test/docron To use in production mode, edit index.php
Create /var/www/html/communecter/update.sh
containing :
red=`tput setaf 1`
green=`tput setaf 2`
blue=`tput setaf 0`
bgWhite=`tput setab 7`
reset=`tput sgr0`
Make it executable and launch it.
Pour utiliser Communecter vous devez avoir
sudo apt-get install apache2 php5.6
sudo a2enmod rewrite
sudo apt-get install php5.6-curl
sudo apt-get install php5.6-mcrypt
sudo apt-get install php5.6-gd
sudo apt-get install php5.6-mongo
sudo apt-get install php5.6-dom
php -v
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
Clone from GitHub :
mkdir ~/dev && mkdir ~/dev/communecter
mkdir ~/dev/communecter/modules
cd /var/www/html/
sudo ln -s ~/communecter communecter
cd ~/dev/communecter
git clone https://gitlab.adullact.net/pixelhumain/pixelhumain.git
cd modules/
git clone https://gitlab.adullact.net/pixelhumain/citizenToolKit.git
git clone https://gitlab.adullact.net/pixelhumain/co2.git
ln -s co2 network
git clone https://gitlab.adullact.net/pixelhumain/api
git clone https://gitlab.adullact.net/pixelhumain/graph.git
git clone https://gitlab.adullact.net/pixelhumain/classifieds.git
git clone https://gitlab.adullact.net/pixelhumain/ressources.git
git clone https://gitlab.adullact.net/pixelhumain/places.git
git clone https://gitlab.adullact.net/pixelhumain/chat.git
git clone https://gitlab.adullact.net/pixelhumain/learn.git
git clone https://gitlab.adullact.net/pixelhumain/survey.git
git clone https://gitlab.adullact.net/pixelhumain/interop.git
git clone https://gitlab.adullact.net/pixelhumain/cotools.git
git clone https://gitlab.adullact.net/pixelhumain/eco.git
cd ../
Installer les dépendances avec Composer :
sudo apt install composer
cd pixelhumain/ph/
composer update
composer install
Rename the dbconfig file :
cd protected/
cp config/dbconfig.exemple.php config/dbconfig.php
Si le fichier dbconfig.php
n’existe pas, crĂ©er le : nano config/dbconfig.php
<?php
$dbconfig = array(
'class' => 'mongoYii.EMongoClient',
'server' => 'mongodb://127.0.0.1:27017/',
'db' => 'pixelhumain',
);
?>
Création du dossier runtime et assets
mkdir runtime
sudo chmod -R 775 runtime/
cd ../
mkdir assets
sudo chmod -R 775 assets/
cd ../../
sudo chown -R [votreUser]:www-data pixelhumain
sudo chown -R [votreUser]:www-data modules
And configure Apache vhost : edit /etc/apache2/sites-available/communecter.conf
:
<VirtualHost *:80>
ServerName domain.ext
ServerAdmin webmaster@domain.ext
DocumentRoot /var/www/communect/pixelhumain/ph
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias "/ph" "/var/www/communect/pixelhumain/ph"
<Directory "/var/www/communect/pixelhumain/ph">
Options FollowSymLinks Indexes
AllowOverride all
Order deny,allow
Allow from 127.0.0.1
#deny from all
<IfModule mod_rewrite.c>
Options +F ollowSymLinks
IndexIgnore /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^(.*)$ /ph/index.php/$1 [L]
</IfModule>
</Directory>
</VirtualHost>
Activate the new vhost :
sudo a2ensite communecter
sudo a2enmod rewrite
sudo service apache2 reload
#Making the Data folder for MongoDB
mkdir data/
mkdir data/db
Import les données :
cd modules/co2/data
unzip cities.json.zip
mongoimport --db pixelhumain --collection cities --file cities.json
Ajouter ces entrĂ©es dans la collection applications (liĂ© au message d’erreur "Missing Configs db.applications.key…") :
mongo
use pixelhumain
db.createCollection("applications")
db.applications.insert({ "name" : "DEV Config", "key" : "devParams", "mangoPay" : { "ClientId" : "communecter", "ClientPassword" : "xxxx", "TemporaryFolder" : "../../tmp" } } )
db.applications.insert({ "name" : "PROD Config", "key" : "prodParams", "mangoPay" : { "ClientId" : "communecter", "ClientPassword" : "xxxx", "TemporaryFolder" : "../../tmp" } } )
exit
cd ../
Ajouter MongoDB au démarrage et faire le script d’utilisation : sudo nano /etc/init.d/communecterdb
Ajouter ceci :
#!/bin/sh
#
### BEGIN INIT INFO
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Provides: unattended-upgrade-shutdown-check
# Default-Start: 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Check if unattended upgrades are being applied
# Description: Check if unattended upgrades are being applied
# and wait for them to finish
### END INIT INFO
Sauvegardez :
sudo chmod +x /etc/init.d/communecterdb
update-rc.d communecterdb defaults
update-rc.d communecterdb enable
Alternative : créer le script communecterdb.sh
, le rendre exécutable et l’ajouter dans /etc/rc.local
Accéder a l’url suivant : http://127.0.0.1/ph/test Et réglez tout les points rouges.
Accédez à cette adresse : http://127.0.0.1/ph/
Si vous souhaitez avoir une interface pour géré MongoDB vous pouvez télécharger Robo3T : https://robomongo.org/download
crontab -e
: */2 * * * * curl https://127.0.0.1/ph/co2/test/docron
Communecter is now available : http://127.0.0.1/ph/ To try the email service, go to http://127.0.0.1/ph/co2/test/docron To use in production mode, edit index.php
Create /var/www/html/communecter/update.sh
containing :
red=`tput setaf 1`
green=`tput setaf 2`
blue=`tput setaf 0`
bgWhite=`tput setab 7`
reset=`tput sgr0`
Make it executable and launch it.
Rendering context...