Skip to content

Instantly share code, notes, and snippets.

View abarth500's full-sized avatar

Shohei Yokoyama abarth500

  • Tokyo Metropolitan University
  • Tokyo Japan
View GitHub Profile
@abarth500
abarth500 / gist:5418891
Last active December 16, 2015 10:19
[情報科学科実験I] サーバの起動
#Webサーバ起動
sudo systemctl enable httpd.service
sudo systemctl start httpd.service
#データベースサーバ(mysql)起動
sudo systemctl enable mariadb.service
sudo systemctl start mariadb.service
#SSHD起動
sudo systemctl enable sshd.service
@abarth500
abarth500 / gist:5419081
Last active December 16, 2015 10:19
[情報科学科実験I] サーバのリブート
#サーバのリブート
sudo reboot
@abarth500
abarth500 / gist:5419125
Last active December 16, 2015 10:19
[情報科学科実験I] エディタのインストール
#emacs派ですか?
sudo yum install emacs
#それともvim派ですか?
sudo yum install vim
@abarth500
abarth500 / gist:5419365
Last active December 16, 2015 10:19
[情報科学科実験I] apacheのユーザディレクトリ有効化
#ユーザディレクトリの設定ファイルをテキストエディタで開く
sudo vi /etc/httpd/conf.d/userdir.conf
@abarth500
abarth500 / gist:5419393
Created April 19, 2013 10:06
[情報科学科実験I] UserDirの有効化
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
@abarth500
abarth500 / gist:5419405
Created April 19, 2013 10:09
[情報科学科実験I] UserDirの有効化(つづき)
cd /home
chmod 755 *
chmod 755 */public_html
@abarth500
abarth500 / gist:5419430
Last active December 16, 2015 10:19
[情報科学科実験I] Apache再起動
sudo systemctl restart httpd.service
@abarth500
abarth500 / gist:5419456
Last active December 16, 2015 10:19
[情報科学科実験I] mysqlの初期化とrootでのログイン
#データベースサーバ初期化
sudo mysql_secure_installation
#データベースのrootのパスワードを設定する
Set root password? [Y/n] 空エンター
New password: パスワード
Re-enter new password: パスワード確認
#この後の質問は全て空エンター
# ・・・
@abarth500
abarth500 / gist:5419510
Last active December 16, 2015 10:19
[情報科学科実験I] データベースとユーザの作成
#rootでmysqlにログイン
mysql -u root -p
#パスワードを聞かれるので先ほど入力したパスワードを入れる
@abarth500
abarth500 / gist:5419556
Created April 19, 2013 10:39
[情報科学科実験I] CSexp1ユーザでCSexp1DBへログイン
mysql -D CSexp1DB -u CSexp1 -p