Last active
September 24, 2020 09:20
-
-
Save TirolJPN/aa0f0f595fab825524579945301b51d7 to your computer and use it in GitHub Desktop.
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
# Switch to root user | |
sudo su - << EOF | |
# Setting time zone | |
timedatectl set-timezone Asia/Tokyo | |
# Change the character code to Japanese. | |
sed -i "s/en_US\.UTF-8/ja_JP\.UTF-8/g" /etc/sysconfig/i18n | |
# Updating the package management tool yum | |
yum update -y | |
# Install apache | |
yum install -y httpd | |
# Install php | |
amazon-linux-extras install -y php7.2 | |
yum install -y php-mbstring php-xml php-intl | |
# Install git | |
yum install -y git | |
# Install MySQL server and client | |
sudo yum install -y mariadb-server | |
systemctl start mariadb | |
sudo systemctl enable mariadb | |
sudo systemctl is-enabled mariadb | |
# Change permission for files and dirs | |
usermod -a -G apache ec2-user | |
chown -R ec2-user:apache /var/www | |
chmod 2775 /var/www | |
find /var/www -type d -exec sudo chmod 2775 {} \; | |
find /var/www -type f -exec sudo chmod 0664 {} \; | |
# Install compoer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php composer-setup.php | |
rm composer-setup.php | |
sudo mv composer.phar /usr/local/bin/composer | |
# Set it up manually | |
# vi /etc/httpd/conf/httpd.conf | |
# ====== In vim editor ======= | |
# <IfModule mime_module> | |
# AddType application/x-httpd-php .php | |
# </IfModule> | |
# | |
# <Directory "/var/www/html"> | |
# AllowOverride All | |
# </Directory> | |
# ====== In vim editor ======= | |
# vi /etc/php.ini | |
# ====== In vim editor ======= | |
# memory_limit = 256M | |
# ====== In vim editor ======= | |
# systemctl restart httpd.service | |
# mysql_secure_installation | |
# mysql -u root -p | |
# Create empty database and user who has privilege for the database | |
# cd /var/www/html/ | |
# chmod 764 ec-cube/bin/console | |
# cd ec-cube/ | |
# composer install | |
# bin/console eccube:install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment