This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#サーバのリブート | |
sudo reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#emacs派ですか? | |
sudo yum install emacs | |
#それともvim派ですか? | |
sudo yum install vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ユーザディレクトリの設定ファイルをテキストエディタで開く | |
sudo vi /etc/httpd/conf.d/userdir.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home | |
chmod 755 * | |
chmod 755 */public_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl restart httpd.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#データベースサーバ初期化 | |
sudo mysql_secure_installation | |
#データベースのrootのパスワードを設定する | |
Set root password? [Y/n] 空エンター | |
New password: パスワード | |
Re-enter new password: パスワード確認 | |
#この後の質問は全て空エンター | |
# ・・・ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rootでmysqlにログイン | |
mysql -u root -p | |
#パスワードを聞かれるので先ほど入力したパスワードを入れる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -D CSexp1DB -u CSexp1 -p |