Open Sec-il-n opened 3 years ago
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
CentOS は 7 以降で systemctl を使用 参考 ( service も使えるが、service は内部で systemctl を呼ぶ )
Memo:
「sbin」はシステム管理用のコマンドやプログラムを置くディレクトリ ( ファイルシステムのマウント以前に行われるシステムの初期化に使用される rcs スクリプトなど )
カリキュラムバージョン指定
gem install pg -v '1.2.3' --source 'https://rubygems.org/'
設定ファイルの編集
vi /var/lib/pgsql/data/postgresql.conf
connection settings
listen_addresses = '*'
認証設定
vi /var/lib/pgsql/data/pg_hba.conf
追記
local all all trust
host all all 0.0.0.0/0 md5
コメントアウト
# "local" is for Unix domain socket connections only
# local all all
# IPv4 local connections:
# host all all 127.0.0.1/32 ident
# IPv6 local connections:
# host all all ::1/128 ident
再起動
sudo
systemctl restart postgresql.service
$ sudo su -
# sudo yum install postgresql-server postgresql-devel -y
docp.4<- PostgreSQLをインストール# gem install pg --source 'https://rubygems.org/'
<-接続用のgem# gem install bundler
# psql --version