Dr. Andres Baravalle
What we are going to do today is a taster activity based on what you will be doing in your second year at the University of East London.
Do not be worried if you do not understand all the steps - it is normal at this stage.
We will be installing Pidora on your Rasperri Pies. Pidora is a Linux distribution based on Fedora Linux.
We are going to install Pidora using Noobs 1.3.x.
The installation of the operating system will take about 12 minutes.
During the installation, you will:
If anything goes wrong during the installation, you’ll probably need to get your SD card reformatted and to start the installation again.
After your first boot, you will see the log in screen.
Log in with your user account, and run the following command:
id addr
The command will return an output including your ip address. It is likely to be 192.168.1.x. Take note of your ip address.
Change directory |
cd foldername |
Coping resources |
cp source destination |
Moving or renaming resources |
mv source destination |
Creating folders |
mkdir folder |
Changing owner |
chmod |
Show current folder |
pwd |
Show text file |
cat filename |
Documentation |
man command |
Change to superuser |
su - |
Find the ip address |
ifconfig eth0 |
Free space |
df -h |
We will now use the super user:
su -
Once the system is installed, you should update it (do not do it on the Open Day as it’s a lengthy process).
yum update -y --nogpgcheck
We are now ready to complete the installation of our LAMP stack:
yum install httpd php php-mysqli mysql mysql-server wordpress -y
/bin/systemctl enable httpd.service
/bin/systemctl enable mariadb.service
We can now boot into graphical mode:
init 5
Once in graphical mode, we will have to open a terminal to run the remaining commands.
/bin/systemctl start mariadb.service
Before we move on, we need to create a superuser for the database:
/usr/bin/mysqladmin -u root password 'new-password'
Now we are ready to log-in into the database server to set
it up properly. We need to log in to the mysql shell:
mysql -u root -p
We can now create a user and a database for our application and exit the shell (if there are no errors):
CREATE DATABASE wordpress;
CREATE USER wordpress@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* to wordpress@localhost;
FLUSH PRIVILEGES;
exit
We will need to edit the file /etc/php.ini (your PHP settings):
leafpad /etc/php.ini
change the following lines:
max_execution_time = 300
memory_limit = 256M
and update the database settings in the Wordpress configuration file:
leafpad /etc/wordpress/wp-config.php
Set the details for the database, the database username and the password, and save the file.
Now we are ready to start the web server:
/bin/systemctl start httpd.service
Open the test page for the web server with the default browser: http://localhost to verify that the server is up and running.
Before starting the Wordpress installation we need to edit the settings file: /etc/wordpress/wp-config.php (using leafpad) and include the details for the database, the database username and the password.
Once you have saved your wp-config.php files, open your browser at http://localhost/wordpress and start the installation.
If things go wrong during the Wordpress installation, you will have to roll back and restart the installation.
The easier way to roll back is to drop the database, delete the settings file and start again.
To drop the database, connect to mysql as root and run the command:
DROP DATABASE wordpress;
And then create the database again and reset the privileges.
You are ready to create your first blog post – and you can check the web sites of the other persons working on this activity, if you know their IP address!
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License (what does it mean? you can copy/modify/redistribute this content).