From af600b8ad3e03226a946d9fec80f06cb6ebd2f3d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 31 May 2015 18:55:58 +0200 Subject: [PATCH 1/5] Read-me: info for git install/update https://github.com/FreshRSS/FreshRSS/issues/861 https://github.com/FreshRSS/FreshRSS/issues/845 --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 0d27e7d1b..50d2ee011 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,37 @@ We are a friendly community. 5. Everything should be working :) If you encounter any problem, feel free to contact me. 6. Advanced configuration settings can be seen in [config.php](./data/config.default.php). +## Example of full installation on Linux Debian/Ubuntu +```sh +# If you use an Apache Web server (otherwise you need another Web server) +sudo apt-get install apache2 +sudo a2enmod headers expires rewrite ssl +# (Optional) If you want a MySQL database server +sudo apt-get install mysql-server mysql-client php5-mysql +# Main components (git is optional if you manually download the installation files) +sudo apt-get install git php5 php5-curl php5-gd php5-intl php5-json php5-gmp php5-sqlite +# Restart Web server +sudo service apache2 restart +# For FreshRSS itself +cd /usr/share/ +sudo git clone https://github.com/FreshRSS/FreshRSS.git +# Set the rights so that your Web browser can access the files +cd FreshRSS +sudo chown -R :www-data . +sudo chmod -R g+w ./data/ +# Publish FreshRSS in your public HTML directory +sudo ln -s /usr/share/FreshRSS/p /var/www/html/FreshRSS +# Navigate to http://example.net/FreshRSS to complete the installation. +# (If you do it from localhost, you may have to adjust the setting of your public address later) + +# Update to a newer version of FreshRSS +cd /usr/share/FreshRSS +sudo git reset --hard +sudo git pull +sudo chown -R :www-data . +sudo chmod -R g+w ./data/ +``` + # Access control It is needed for the multi-user mode to limit access to FreshRSS. You can: * use form authentication (need JavaScript and PHP 5.3.7+, works with some PHP 5.3.3+) From 20924a4705067145521538bb8254741a8387e2dc Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 31 May 2015 18:57:21 +0200 Subject: [PATCH 2/5] Readme white line --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 50d2ee011..e0996508c 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ sudo apt-get install mysql-server mysql-client php5-mysql sudo apt-get install git php5 php5-curl php5-gd php5-intl php5-json php5-gmp php5-sqlite # Restart Web server sudo service apache2 restart + # For FreshRSS itself cd /usr/share/ sudo git clone https://github.com/FreshRSS/FreshRSS.git From 2afb4592264a1280b16b0cc86b1b14d5067056b3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 31 May 2015 19:05:34 +0200 Subject: [PATCH 3/5] Read-me.fr: info for git install/update https://github.com/FreshRSS/FreshRSS/issues/861 https://github.com/FreshRSS/FreshRSS/issues/845 --- README.fr.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.fr.md b/README.fr.md index 00b081155..99281d80a 100644 --- a/README.fr.md +++ b/README.fr.md @@ -42,13 +42,45 @@ Nous sommes une communauté amicale. ![Capture d’écran de FreshRSS](http://marienfressinaud.fr/data/images/freshrss/freshrss_default-design.png) # Installation -1. Récupérez l’application FreshRSS via la commande git ou [en téléchargeant l’archive](https://github.com/FreshRSS/FreshRSS/archive/master.zip) +1. Récupérez l’application FreshRSS via la commande git ou [en téléchargeant l’archive](../releases) 2. Placez l’application sur votre serveur (la partie à exposer au Web est le répertoire `./p/`) 3. Le serveur Web doit avoir les droits d’écriture dans le répertoire `./data/` 4. Accédez à FreshRSS à travers votre navigateur Web et suivez les instructions d’installation 5. Tout devrait fonctionner :) En cas de problème, n’hésitez pas à me contacter. 6. Des paramètres de configuration avancée peuvent être accédés depuis [config.php](./data/config.default.php). +## Exemple d’installation complète sur Linux Debian/Ubuntu +```sh +# Si vous utilisez le serveur Web Apache (sinon il faut un autre serveur Web) +sudo apt-get install apache2 +sudo a2enmod headers expires rewrite ssl +# (optionnel) Si vous voulez un serveur de base de données MySQL +sudo apt-get install mysql-server mysql-client php5-mysql +# Composants principaux (git est optionnel si vous déployez manuellement les fichiers d’installation) +sudo apt-get install git php5 php5-curl php5-gd php5-intl php5-json php5-gmp php5-sqlite +# Redémarrage du serveur Web +sudo service apache2 restart + +# Pour FreshRSS lui-même +cd /usr/share/ +sudo git clone https://github.com/FreshRSS/FreshRSS.git +# Mettre les droits d’accès pour le serveur Web +cd FreshRSS +sudo chown -R :www-data . +sudo chmod -R g+w ./data/ +# Publier FreshRSS dans votre répertoire HTML public +sudo ln -s /usr/share/FreshRSS/p /var/www/html/FreshRSS +# Naviguez vers http://example.net/FreshRSS pour terminer l’installation. +# (Si vous le faite depuis localhost, vous pourrez avoir à ajuster le réglage de votre adresse publique) + +# Mettre à jour FreshRSS vers une nouvelle version +cd /usr/share/FreshRSS +sudo git reset --hard +sudo git pull +sudo chown -R :www-data . +sudo chmod -R g+w ./data/ +``` + # Contrôle d’accès Il est requis pour le mode multi-utilisateur, et recommandé dans tous les cas, de limiter l’accès à votre FreshRSS. Au choix : * En utilisant l’identification par formulaire (requiert JavaScript, et PHP 5.3.7+ recommandé – fonctionne avec certaines versions de PHP 5.3.3+) From 96ba71e618468f7d28a04c4ebc7c46dd912ccd75 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 31 May 2015 20:22:27 +0200 Subject: [PATCH 4/5] MySQL create table bug https://github.com/FreshRSS/FreshRSS/issues/845 And updated version comments to 1.1.1 --- app/Models/EntryDAO.php | 2 +- app/SQL/install.sql.mysql.php | 8 ++++---- app/SQL/install.sql.sqlite.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index f939a0fb3..bd575989d 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -92,7 +92,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return $this->addEntry($valuesTmp); } elseif ((int)($info[0] / 1000) !== 23) { //Filter out "SQLSTATE Class code 23: Constraint Violation" because of expected duplicate entries Minz_Log::error('SQL error addEntry: ' . $info[0] . ': ' . $info[1] . ' ' . $info[2] - . ' while adding entry in feed ' . $valuesTmp['id_feed'] . ' with title: ' . $valuesTmp['title']. ' ' . $this->addEntryPrepared); + . ' while adding entry in feed ' . $valuesTmp['id_feed'] . ' with title: ' . $valuesTmp['title']); } return false; } diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.php index 9c6af405d..c5787d25b 100644 --- a/app/SQL/install.sql.mysql.php +++ b/app/SQL/install.sql.mysql.php @@ -41,8 +41,8 @@ CREATE TABLE IF NOT EXISTS `%1$sentry` ( `content_bin` blob, -- v0.7 `link` varchar(1023) CHARACTER SET latin1 NOT NULL, `date` int(11), -- Until year 2038 - `lastSeen` INT(11) DEFAULT 0, -- v1.2, Until year 2038 - `hash` BINARY(16), -- v1.2 + `lastSeen` INT(11) DEFAULT 0, -- v1.1.1, Until year 2038 + `hash` BINARY(16), -- v1.1.1 `is_read` boolean NOT NULL DEFAULT 0, `is_favorite` boolean NOT NULL DEFAULT 0, `id_feed` SMALLINT, -- v0.7 @@ -51,8 +51,8 @@ CREATE TABLE IF NOT EXISTS `%1$sentry` ( FOREIGN KEY (`id_feed`) REFERENCES `%1$sfeed`(`id`) ON DELETE CASCADE ON UPDATE CASCADE, UNIQUE KEY (`id_feed`,`guid`), -- v0.7 INDEX (`is_favorite`), -- v0.7 - INDEX (`is_read`) -- v0.7 - INDEX entry_lastSeen_index (`lastSeen`) -- v1.2 + INDEX (`is_read`), -- v0.7 + INDEX `entry_lastSeen_index` (`lastSeen`) -- v1.1.1 ) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB; diff --git a/app/SQL/install.sql.sqlite.php b/app/SQL/install.sql.sqlite.php index 77e8e094c..71bad7311 100644 --- a/app/SQL/install.sql.sqlite.php +++ b/app/SQL/install.sql.sqlite.php @@ -39,8 +39,8 @@ $SQL_CREATE_TABLES = array( `content` text, `link` varchar(1023) NOT NULL, `date` int(11), -- Until year 2038 - `lastSeen` INT(11) DEFAULT 0, -- v1.2, Until year 2038 - `hash` BINARY(16), -- v1.2 + `lastSeen` INT(11) DEFAULT 0, -- v1.1.1, Until year 2038 + `hash` BINARY(16), -- v1.1.1 `is_read` boolean NOT NULL DEFAULT 0, `is_favorite` boolean NOT NULL DEFAULT 0, `id_feed` SMALLINT, @@ -52,7 +52,7 @@ $SQL_CREATE_TABLES = array( 'CREATE INDEX IF NOT EXISTS entry_is_favorite_index ON `%1$sentry`(`is_favorite`);', 'CREATE INDEX IF NOT EXISTS entry_is_read_index ON `%1$sentry`(`is_read`);', -'CREATE INDEX IF NOT EXISTS entry_lastSeen_index ON `%1$sentry`(`lastSeen`);', //v1.2 +'CREATE INDEX IF NOT EXISTS entry_lastSeen_index ON `%1$sentry`(`lastSeen`);', //v1.1.1 'INSERT OR IGNORE INTO `%1$scategory` (id, name) VALUES(1, "%2$s");', ); From 384a146883548ba0274f8cbee0c2e67dc053f70e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 31 May 2015 20:48:18 +0200 Subject: [PATCH 5/5] Minor comment 1.1.1 https://github.com/FreshRSS/FreshRSS/issues/845 --- app/Models/EntryDAO.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index bd575989d..9ddcfcfb3 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -11,7 +11,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $hasTransaction = false; try { $stm = null; - if ($name === 'lastSeen') { //v1.2 + if ($name === 'lastSeen') { //v1.1.1 if (!$this->bd->inTransaction()) { $this->bd->beginTransaction(); $hasTransaction = true; @@ -29,7 +29,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if ($hasTransaction) { $this->bd->rollBack(); } - } elseif ($name === 'hash') { //v1.2 + } elseif ($name === 'hash') { //v1.1.1 $stm = $this->bd->prepare('ALTER TABLE `' . $this->prefix . 'entry` ADD COLUMN hash BINARY(16)'); return $stm && $stm->execute(); }