Skip to content

Instantly share code, notes, and snippets.

@AdamLawicki
AdamLawicki / gist:7d5082f1f592a2eef6c6
Created October 18, 2015 20:58
login to mysqld server
[ec2-user ~]$ mysql -u root -p
Enter password:
@AdamLawicki
AdamLawicki / gist:f455c394489e616e6477
Created October 18, 2015 20:55
start mysqld server
[ec2-user ~]$ sudo service mysqld start
@AdamLawicki
AdamLawicki / gist:569a9be78b57c33bb083
Created October 18, 2015 20:51
Unzip and unarchive the package. It will unzip to a folder called wordpress
[ec2-user ~]$ tar -xzf latest.tar.gz
[ec2-user ~]$ ls
latest.tar.gz wordpress
@AdamLawicki
AdamLawicki / gist:b68634feb37674a1a61b
Created October 18, 2015 20:49
Download WordPress using wget. This downloads the most recent WordPress installation package.
[ec2-user ~]$ wget https://wordpress.org/latest.tar.gz
--2013-08-09 17:19:01-- https://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 66.155.40.249, 66.155.40.250
Connecting to wordpress.org (wordpress.org)|66.155.40.249|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4028740 (3.8M) [application/x-gzip]
Saving to: latest.tar.gz
100%[======================================>] 4,028,740 20.1MB/s in 0.2s
@AdamLawicki
AdamLawicki / gist:8ef79ab121edbc7017da
Created October 18, 2015 20:02
IF YOU want MySQL server to start every time the server boots, type:
[ec2-user ~]$ sudo chkconfig mysqld on
@AdamLawicki
AdamLawicki / gist:ed73694b5a62e41515b0
Created October 18, 2015 19:56
run mysql_secure_installation
[ec2-user ~]$ sudo mysql_secure_installation
@AdamLawicki
AdamLawicki / gist:5f72026b632840881ce4
Created October 18, 2015 19:56
Start MySQL server and run mysql_secure_installation
[ec2-user ~]$ sudo service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
@AdamLawicki
AdamLawicki / gist:313ed3cdf002ba10a3d4
Created October 18, 2015 19:54
delete php test file
[ec2-user ~]$ rm /var/www/html/phpinfo.php
@AdamLawicki
AdamLawicki / gist:eed15f26e9c901b651f3
Created October 18, 2015 19:52
Creating a simple PHP file (it will temporarily reside in the Apache document root)
[ec2-user ~]$ echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
@AdamLawicki
AdamLawicki / gist:c427f88a2ed925efd663
Created October 18, 2015 19:48
Change the file permissions of /var/www and subdirectories to add group write permissions (this is recursive)
[ec2-user ~]$ find /var/www -type f -exec sudo chmod 0664 {} +