# 修改第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