跳至內容

ANTFARM/通用/命令

來自維基文庫,一個開放世界的開放書籍

在 Antfarm 中使用 Postgresql 資料庫需要執行以下操作

   sudo apt-get install postgresql postgresql-client postgresql-client-common postgresql-server-dev-8.3
   sudo su - postgres
   $ createuser <user name>
   Shall the new role be a superuser? (y/n) y
   $ exit

你建立的使用者將與所有 antfarm 檔案關聯,並且必須對所有 Antfarm 檔案具有許可權,這就是為什麼他們在此方面被視為超級使用者。

對於使用的每個環境,以下命令用於設定你的資料庫。

   createdb <environment name> (this only needs to be done once per environment)
   antfarm -e <environment name> db—migrate (this is used to create the tables)
   antfarm -e <environment name> db—reset (this is used to prepare the tables to be filled)
華夏公益教科書