-
-
Save teja156/8c35a05f43635da4cbd06b47c0d91e93 to your computer and use it in GitHub Desktop.
YouTube video link: https://youtu.be/8Uofkq718n8 | |
All the commands that are executed in the above youtube video are mentioned in this gist. | |
1. Install Apache server on Ubuntu | |
sudo apt install apache2 | |
2. Install php runtime and php mysql connector | |
sudo apt install php libapache2-mod-php php-mysql | |
3. Install MySQL server | |
sudo apt install mysql-server | |
4. Login to MySQL server | |
sudo mysql -u root | |
5. Change authentication plugin to mysql_native_password (change the password to something strong) | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Testpassword@123'; | |
6. Create a new database user for wordpress (change the password to something strong) | |
CREATE USER 'wp_user'@localhost IDENTIFIED BY 'Testpassword@123'; | |
7. Create a database for wordpress | |
CREATE DATABASE wp; | |
8. Grant all privilges on the database 'wp' to the newly created user | |
GRANT ALL PRIVILEGES ON wp.* TO 'wp_user'@localhost; | |
9. Download wordpress | |
cd /tmp | |
wget https://wordpress.org/latest.tar.gz | |
10. Unzip | |
tar -xvf latest.tar.gz | |
11. Move wordpress folder to apache document root | |
sudo mv wordpress/ /var/www/html | |
12. Command to restart/reload apache server | |
sudo systemctl restart apache2 | |
OR | |
sudo systemctl reload apache2 | |
13. Install certbot | |
sudo apt-get update | |
sudo apt install certbot python3-certbot-apache | |
14. Request and install ssl on your site with certbot | |
sudo certbot --apache |
If you have any issues regarding permalinks and pages showing error not found. Goto this path: /etc/apache2/sites-enabled
and sudo nano 000-default.conf
then add this code:
<Directory path/to/dir>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</ Directory>
(the closing without space)
Then restart apache2 sudo systemctl restart apache2
I follow every step and get succedd, thx for it
I Have a problem:
If you have any issues regarding permalinks and pages showing error not found. Goto this path:
/etc/apache2/sites-enabled
andsudo nano 000-default.conf
then add this code:<Directory path/to/dir> Options Indexes FollowSymLinks AllowOverride All Require all granted </ Directory>
(the closing without space) Then restart apache2
sudo systemctl restart apache2
If you have any issues regarding permalinks and pages showing error not found. Goto this path:
/etc/apache2/sites-enabled
andsudo nano 000-default.conf
then add this code:
<Directory path/to/dir> Options Indexes FollowSymLinks AllowOverride All Require all granted </ Directory>
(the closing without space) Then restart apache2sudo systemctl restart apache2
Make sure you added the correct path to your website directory here: <Directory path/to/dir>
And remove the space at the closing tag (I added space so that GitHub doesn't change the output of the code).
In the last part of the video, to request the SSL certificate for the domain, certbot failed to authenticate the domain. Can anyone help me?
Thanks
If I close MobaXterm, my website can't be reached. So, is there any another way, or i am missing out something?
i have added a certbot but its still saying not secure kindly help
Hi all, Just got the tutorial which will work.
https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview
Thank you.
it requires sudo apt-get update after installing Apache2
ubuntu@ip-172-31-13-249:
$ sudo apt install mysql-server$Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libcgi-fast-perl libcgi-pm-perl libclone-perl libencode-locale-perl
libevent-pthreads-2.1-7 libfcgi-bin libfcgi-perl libfcgi0ldbl
libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl
libhttp-date-perl libhttp-message-perl libio-html-perl
liblwp-mediatypes-perl libmecab2 libprotobuf-lite23 libtimedate-perl
liburi-perl mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0
mysql-client-core-8.0 mysql-common mysql-server-8.0 mysql-server-core-8.0
Suggested packages:
libdata-dump-perl libipc-sharedcache-perl libbusiness-isbn-perl libwww-perl
mailx tinyca
The following NEW packages will be installed:
libcgi-fast-perl libcgi-pm-perl libclone-perl libencode-locale-perl
libevent-pthreads-2.1-7 libfcgi-bin libfcgi-perl libfcgi0ldbl
libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl
libhttp-date-perl libhttp-message-perl libio-html-perl
liblwp-mediatypes-perl libmecab2 libprotobuf-lite23 libtimedate-perl
liburi-perl mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0
mysql-client-core-8.0 mysql-common mysql-server mysql-server-8.0
mysql-server-core-8.0
0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.8 MB/29.6 MB of archives.
After this operation, 243 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Ign:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-client-core-8.0 amd64 8.0.35-0ubuntu0.22.04.1
Ign:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-client-8.0 amd64 8.0.35-0ubuntu0.22.04.1
Ign:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-server-core-8.0 amd64 8.0.35-0ubuntu0.22.04.1
Ign:4 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-server-8.0 amd64 8.0.35-0ubuntu0.22.04.1
Ign:5 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-server all 8.0.35-0ubuntu0.22.04.1
Err:1 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-client-core-8.0 amd64 8.0.35-0ubuntu0.22.04.1
404 Not Found [IP: 52.15.107.13 80]
Err:2 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-client-8.0 amd64 8.0.35-0ubuntu0.22.04.1
404 Not Found [IP: 52.15.107.13 80]
Err:3 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-server-core-8.0 amd64 8.0.35-0ubuntu0.22.04.1
404 Not Found [IP: 52.15.107.13 80]
Err:4 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-server-8.0 amd64 8.0.35-0ubuntu0.22.04.1
404 Not Found [IP: 52.15.107.13 80]
Err:5 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 mysql-server all 8.0.35-0ubuntu0.22.04.1
404 Not Found [IP: 52.15.107.13 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/mysql-client-core-8.0_8.0.35-0ubuntu0.22.04.1_amd64.deb 404 Not Found [IP: 52.15.107.13 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/mysql-client-8.0_8.0.35-0ubuntu0.22.04.1_amd64.deb 404 Not Found [IP: 52.15.107.13 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/mysql-server-core-8.0_8.0.35-0ubuntu0.22.04.1_amd64.deb 404 Not Found [IP: 52.15.107.13 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/mysql-server-8.0_8.0.35-0ubuntu0.22.04.1_amd64.deb 404 Not Found [IP: 52.15.107.13 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/mysql-server_8.0.35-0ubuntu0.22.04.1_all.deb 404 Not Found [IP: 52.15.107.13 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ubuntu@ip-172-31-13-249: