mysql -u root -e 'create database wordpress character set utf8; grant all privileges on wordpress.* to 'root'@'localhost' identified by "WordPress!234"; flush privileges;'
WordPress 설치
1
2
mkdir /wordpress
cd /wordpress && wget http://wordpress.org/latest.tar.gz && tar -xzf /wordpress/latest.tar.gz -C /wordpress --strip-components 1
WordPress 설정
1
2
3
4
5
6
cp /wordpress/wp-config-sample.php /wordpress/wp-config.php
sed -i -e "s/database_name_here/wordpress/g" /wordpress/wp-config.php
sed -i -e "s/username_here/root/g" /wordpress/wp-config.php
sed -i -e "s/password_here/WordPress\!234/g" /wordpress/wp-config.php
cp -R * /var/www/html/