# 修改第9行,去掉#,修改數據庫名 dbms.active_database=wkq_graph.db # 修改第12行,去掉#。修改路徑,改爲絕對路徑 dbms.directories.data=C:/WorkSpaces/Neo4j/ # 修改9行和12行後,neo4j數據存放在 C:/WorkSpaces/Neo4j/databases/wkq_graph.db,沒錯,多了一個databases # 修改第22行,在前面加個#,load csv時容許從任意路徑讀取文件 #dbms.directories.import=import # 修改第26行,刪除#後,鏈接數據庫不須要密碼 #dbms.security.auth_enabled=false # 修改35行和36行,設置JVM初始堆內存和JVM最大堆內存,這是在我本身電腦上測試用,生產環境本身慢慢調 # 建議生產環境給的JVM最大堆內存越大越好,可是要小於機器的物理內存 dbms.memory.heap.initial_size=1024 dbms.memory.heap.max_size=2048m # 修改46行,能夠認爲這個是緩存,若是機器配置高,這個越大越好 dbms.memory.pagecache.size=10g # 修改54行,去掉改行的#,能夠遠程經過ip訪問neo4j數據庫 dbms.connectors.default_listen_address=0.0.0.0 # 默認 bolt端口是7687,http端口是7474,https關口是7473,不修改下面3項也能夠 # 修改71行,去掉#,設置http端口爲7474,端口能夠自定義,只要不和其餘端口衝突就行 #dbms.connector.bolt.listen_address=:7687 # 修改75行,去掉#,設置http端口爲7474,端口能夠自定義,只要不和其餘端口衝突就行 dbms.connector.http.listen_address=:7474 # 修改79行,去掉#,設置http端口爲7473,端口能夠自定義,只要不和其餘端口衝突就行 dbms.connector.https.listen_address=:7473 # 修改227行,去掉#,容許從遠程url來load csv dbms.security.allow_csv_import_from_file_urls=true # 修改233行,容許使用neo4j-shell,相似於mysql 命令行之類的 dbms.shell.enabled=true # 修改235行,去掉#,設置鏈接neo4j-shell的端口,通常都是localhost或者127.0.0.1,這樣安全,其餘地址的話,通常使用https就行 dbms.shell.host=127.0.0.1 # 修改237行,去掉#,設置neo4j-shell端口,端口能夠自定義,只要不和其餘端口衝突就行 dbms.shell.port=1337 # 修改241行,設置neo4j可讀可寫 dbms.read_only=false #在文件最後手動添加如下信息 # CTT - Asia/Shanghai dbms.db.timezone=SYSTEM # dbms.logs.timezone has been replaced with dbms.db.timezone. #dbms.logs.timezone=SYSTEM #db.temporal.timezone=Asia/Shanghai # disable udc dbms.udc.enabled=false # apoc #dbms.security.procedures.whitelist=apoc.load.* dbms.security.procedures.unrestricted=apoc.* apoc.import.file.enabled=true apoc.export.file.enabled=true apoc.trigger.enabled=true apoc.ttl.enabled=false
neo4j.conf漢化版
For more details and a complete list of settings, please see https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/ # 若是想自定義neo4j數據庫數據的存儲路徑,要同時修改dbms.active_database 和 dbms.directories.data 兩項配置, # 修改配置後,數據會存放在${dbms.directories.data}/databases/${dbms.active_database} 目錄下 # 安裝的數據庫的名稱,默認使用${NEO4J_HOME}/data/databases/graph.db目錄 # The name of the database to mount #dbms.active_database=graph.db #安裝Neo4j數據庫的各個配置路徑,默認使用$NEO4J_HOME下的路徑 #Paths of directories in the installation. # 數據路徑 #dbms.directories.data=data # 插件路徑 #dbms.directories.plugins=plugins #dbms.directories.certificates=certificates 證書路徑 #dbms.directories.logs=logs 日誌路徑 #dbms.directories.lib=lib jar包路徑 #dbms.directories.run=run 運行路徑 #默認狀況下想load csv文件,只能把csv文件放到${NEO4J_HOME}/import目錄下,把下面的#刪除後,能夠在load csv時使用絕對路徑,這樣可能不安全 #This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to allow files to be loaded from anywhere in the filesystem; this introduces possible security problems. See the `LOAD CSV` section of the manual for details. #此設置將全部「LOAD CSV」導入文件限制在`import`目錄下。刪除註釋容許從文件系統的任何地方加載文件;這引入了可能的安全問題。 dbms.directories.import=import #把下面這行的#刪掉後,鏈接neo4j數據庫時就不用輸密碼了 #Whether requests to Neo4j are authenticated. 是否對Neo4j的請求進行了身份驗證。 #To disable authentication, uncomment this line 要禁用身份驗證,請取消註釋此行。 #dbms.security.auth_enabled=false #Enable this to be able to upgrade a store from an older version. 是否兼容之前版本的數據 dbms.allow_format_migration=true #Java Heap Size: by default the Java heap size is dynamically calculated based on available system resources. Java堆大小:默認狀況下,Java堆大小是動態地根據可用的系統資源計算。 #Uncomment these lines to set specific initial and maximum heap size. 取消註釋這些行以設置特定的初始值和最大值 #dbms.memory.heap.initial_size=512m #dbms.memory.heap.max_size=512m #The amount of memory to use for mapping the store files, in bytes (or kilobytes with the 'k' suffix, megabytes with 'm' and gigabytes with 'g'). 用於映射存儲文件的內存量(以字節爲單位)千字節帶有'k'後綴,兆字節帶有'm',千兆字節帶有'g')。 #If Neo4j is running on a dedicated server, then it is generally recommended to leave about 2-4 gigabytes for the operating system, give the JVM enough heap to hold all your transaction state and query context, and then leave the rest for the page cache. 若是Neo4j在專用服務器上運行,那麼一般建議爲操做系統保留大約2-4千兆字節,爲JVM提供足夠的堆來保存全部的事務狀態和查詢上下文,而後保留其他的頁面緩存 。 #The default page cache memory assumes the machine is dedicated to running Neo4j, and is heuristically set to 50% of RAM minus the max Java heap size. 默認頁面緩存存儲器假定機器專用於運行Neo4j,而且試探性地設置爲RAM的50%減去最大Java堆大小。 #dbms.memory.pagecache.size=10g ### Network connector configuration #With default configuration Neo4j only accepts local connections. Neo4j默認只接受本地鏈接(localhost) #To accept non-local connections, uncomment this line: 要接受非本地鏈接,請取消註釋此行 dbms.connectors.default_listen_address=0.0.0.0 (這是刪除#後的配置,能夠經過ip訪問) #You can also choose a specific network interface, and configure a non-default port for each connector, by setting their individual listen_address. 還能夠選擇特定的網絡接口,並配置非默認值端口,設置它們各自的listen_address #The address at which this server can be reached by its clients. This may be the server's IP address or DNS name, or it may be the address of a reverse proxy which sits in front of the server. This setting may be overridden for individual connectors below. 客戶端能夠訪問此服務器的地址。這能夠是服務器的IP地址或DNS名稱,或者能夠是位於服務器前面的反向代理的地址。此設置可能會覆蓋如下各個鏈接器。 #dbms.connectors.default_advertised_address=localhost #You can also choose a specific advertised hostname or IP address, and configure an advertised port for each connector, by setting their individual advertised_address. 您還能夠選擇特定廣播主機名或IP地址, 爲每一個鏈接器配置通告的端口,經過設置它們獨特的advertised_address。 #Bolt connector 使用Bolt協議 dbms.connector.bolt.enabled=true dbms.connector.bolt.tls_level=OPTIONAL dbms.connector.bolt.listen_address=:7687 #HTTP Connector. There must be exactly one HTTP connector. 使用http協議 dbms.connector.http.enabled=true dbms.connector.http.listen_address=:7474 #HTTPS Connector. There can be zero or one HTTPS connectors. 使用https協議 dbms.connector.https.enabled=true dbms.connector.https.listen_address=:7473 #Number of Neo4j worker threads. Neo4j線程數 #dbms.threads.worker_count= #Logging configuration 日誌配置 #To enable HTTP logging, uncomment this line 要啓用HTTP日誌記錄,請取消註釋此行 dbms.logs.http.enabled=true #Number of HTTP logs to keep. 要保留的HTTP日誌數 #dbms.logs.http.rotation.keep_number=5 #Size of each HTTP log that is kept. 每一個HTTP日誌文件的大小 dbms.logs.http.rotation.size=20m #To enable GC Logging, uncomment this line 要啓用GC日誌記錄,請取消註釋此行 #dbms.logs.gc.enabled=true #GC Logging Options see http://docs.oracle.com/cd/E19957-01/819-0084-10/pt_tuningjava.html#wp57013 for more information. GC日誌記錄選項 有關詳細信息,請參見http://docs.oracle.com/cd/E19957-01/819-0084-10/pt_tuningjava.html#wp57013 #dbms.logs.gc.options=-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintPromotionFailure -XX:+PrintTenuringDistribution #Number of GC logs to keep. 要保留的GC日誌數 #dbms.logs.gc.rotation.keep_number=5 #Size of each GC log that is kept. 保留的每一個GC日誌文件的大小 #dbms.logs.gc.rotation.size=20m #Size threshold for rotation of the debug log. If set to zero then no rotation will occur. Accepts a binary suffix "k", "m" or "g". 調試日誌旋轉的大小閾值。若是設置爲零,則不會發生滾動(達到指定大小後切割日誌文件)。接受二進制後綴「k」,「m」或「g」。 #dbms.logs.debug.rotation.size=20m #Maximum number of history files for the internal log. 最多保存幾個日誌文件 #dbms.logs.debug.rotation.keep_number=7 ### Miscellaneous configuration 其餘配置 #Enable this to specify a parser other than the default one. 啓用此選項可指定除默認解析器以外的解析器 #cypher.default_language_version=3.0 #Determines if Cypher will allow using file URLs when loading data using `LOAD CSV`. Setting this value to `false` will cause Neo4j to fail `LOAD CSV` clauses that load data from the file system. 肯定當使用加載數據時,Cypher是否容許使用文件URL `LOAD CSV`。將此值設置爲`false`將致使Neo4j不能經過互聯網上的URL導入數據,`LOAD CSV` 會從文件系統加載數據。 dbms.security