Просмотр исходного кода

Merge branch 'FreshRSS/dev' into dev

Alexandre Alapetite 11 лет назад
Родитель
Сommit
d68f6fcd38
5 измененных файлов с 73 добавлено и 9 удалено
  1. 33 1
      README.fr.md
  2. 32 0
      README.md
  3. 1 1
      app/Models/EntryDAO.php
  4. 4 4
      app/SQL/install.sql.mysql.php
  5. 3 3
      app/SQL/install.sql.sqlite.php

+ 33 - 1
README.fr.md

@@ -43,13 +43,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+)

+ 32 - 0
README.md

@@ -50,6 +50,38 @@ 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+)

+ 1 - 1
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;
 		}

+ 4 - 4
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;
 

+ 3 - 3
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");',
 );