« よく使うメモ | メイン | いまさらだけど、postgresユーザー »
2017年04月10日
centos7使い始めるよ
時代遅れのむーさんは今頃centos7に乗り換えてるのであった。
0,足りない物入れ
yum groupinstall "Development Tools"
yum install rpm-build
lvも
rpmbuild --rebuild lv-4.51-25.el7.src.rpm
yum install /mydir/rpmbuild/RPMS/x86_64/lv-4.51-25.el7.centos.x86_64.rpm
Selinuxの確認 わたしゃ使い切らんので切る。
/etc/selinux/config
SELINUX=disabled
firewall関連
firewalldってのが基本使われるらしいのですが、わからないのでポイ
使い慣れた(ってそんなに使わないけどw)iptablesでお願いします。
[root@localhost ~]# systemctl list-unit-files | grep firewalld
firewalld.service enabled
有効に成ってるねぇ。
systemctl disable firewalld.service
systemctl stop firewalld
yum -y install iptables-services
systemctl enable iptables.service
systemctl start iptables.service
ごにょごにょ iptablesいじってその状態で保存したいなら
iptables-save > /etc/sysconfig/iptables
1,サービスの起動方法
/etc/init.d/httpd start
からの
systemctl start unit名
systemctl stop unit名
systemctl restart unit名
systemctl kill unit名
要はhttpd なら systemctl start httpd
だがしかし、configtestはまた違うw
service httpd configtest
まとめてくれよ・・・
2,unit名はタブ補完効かない!
ls -al /usr/lib/systemd/system/|grep service
このあたりか?
yum install bash-completion すれば補完効くんだって
ただし反応超鈍い・・・
3,電源投入時の起動設定
chkconfig --list
systemctl list-unit-files
chkconfig httpd on
systemctl enable httpd
chkconfig httpd off
systemctl disable httpd
やってることは
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
的なシンボリックリンクを貼る作業
4,postgresスタートしないぞ
Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details.
初期化忘れだね。
su - postgres
initdb
投稿者 muuming : 2017年04月10日 10:11