小智 11
只需按照以下步骤操作
service odoo-server stop
Run Code Online (Sandbox Code Playgroud)
rm -f /etc/odoo-server.conf
rm -f /etc/odoo.conf
Run Code Online (Sandbox Code Playgroud)
rm -R /opt/odoo
Run Code Online (Sandbox Code Playgroud)
update-rc.d -f odoo-server remove
rm -f /etc/init.d/odoo-server
Run Code Online (Sandbox Code Playgroud)
rm -R /var/log/odoo
Run Code Online (Sandbox Code Playgroud)
sudo service postgresql stop
apt-get remove postgresql -y
apt-get --purge remove postgresql\* -y
rm -r -f /etc/postgresql/
rm -r -f /etc/postgresql-common/
rm -r -f /var/lib/postgresql/
Run Code Online (Sandbox Code Playgroud)
userdel -r postgres
groupdel postgres
Run Code Online (Sandbox Code Playgroud)
要删除postgre,请找到该文件pg_hba.conf- 例如,可以找到它/etc/postgresql-9.1/pg_hba.conf.
cd /etc/postgresql-9.1/
Run Code Online (Sandbox Code Playgroud)
cp pg_hba.conf pg_hba.conf-backup
Run Code Online (Sandbox Code Playgroud)
local all all trust
Run Code Online (Sandbox Code Playgroud)
重启你的PostgreSQL服务器(例如,在Linux上:)
sudo /etc/init.d/postgresql restart
Run Code Online (Sandbox Code Playgroud)
你现在可以像任何用户一样连接.以超级用户postgres连接(注意,超级用户名在安装中可能有所不同.例如,在某些系统中,它被称为pgsql.)
psql -U postgres
Run Code Online (Sandbox Code Playgroud)
重设密码
ALTER USER my_user_name with password 'my_secure_password';
Run Code Online (Sandbox Code Playgroud)
恢复旧的,pg_hba.conf因为留下来是非常危险的
cp pg_hba.conf-backup pg_hba.conf
Run Code Online (Sandbox Code Playgroud)
重启服务器,以便与保险箱一起运行 pg_hba.conf
sudo /etc/init.d/postgresql restart
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18958 次 |
| 最近记录: |