Skip to content

Instantly share code, notes, and snippets.

@MozyOk
Last active October 28, 2019 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MozyOk/0faf547f885fc75906953dd68cad9054 to your computer and use it in GitHub Desktop.
Save MozyOk/0faf547f885fc75906953dd68cad9054 to your computer and use it in GitHub Desktop.
conoha centOS setup

setup apache

centos6 だとエラーが出るので
epel.repo を https to http
https://stackoverflow.com/a/27901957/9116095

httpd と apachectlの違い

http://www.wegirls.tech/entry/2016/09/29/075200

/usr/sbin/apachectl start で起動
IPで表示できるようにしてみる。

https://hombre-nuevo.com/vps/vps0010/

httpd の永続化にはこの設定が必要

/sbin/chkconfig --list httpd
/sbin/chkconfig --level 2345 {サービス名} on / off
https://qiita.com/shotaTsuge/items/9f337bad9f73c3953af1

$ /sbin/chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

0-6の意味

Run Level状態
0システムの停止
1シングルユーザモード
2マルチユーザモード
3マルチユーザモード(コンソールログイン)
4未使用
5マルチユーザモード(ディスプレイマネージャ使用)
6システム再起動

https://qiita.com/shell/items/30031862d91cedf9ceef

###起動確認
/sbin/service httpd status

port 開ける

一覧表示
iptables -L

開ける

$ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
$ sudo service iptables save

http://ask.xmodulo.com/open-port-firewall-centos-rhel.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment